diff --git a/README.md b/README.md index d2309d1..f75c76f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,15 @@ # MDT-Webapps-Gulp +1. Projekt klonen +2. MDT5.sln öffnen um Projekt auszuführen ("einkaufsliste_neu.html" als Startseite festlegen) +3. Gulp: + 3.1 Im Ordner App (location von gulpfile.js) eine CMD öffnen + 3.2 Funktionen aus der gulpfile.js ausführen über CMD mit Kommando gulp + -> Funktionen um eine ausführbare App zu erhalten: minifyhtml und image + -> Diese Beiden Funktionen sind auch in der Funktion watch enthalten. Watch arbeitet immer nur bei + Änderung einer Datei, überwacht sozusagen die Projektmappe. + 3.3 Alle von gulp erzeugten Dateien befinden sich in einem Ordner "dist" in der Projektmappe, + der von gulp eigenständig angelegt wird. + 3.4 Die kommprimierte Website kann auch über MDT5.sln geöfnet werden, hierzu einfach + die Datei "einkaufsliste_neu.html" im Ordner dist als Startseite festlegen. + diff --git a/code/.vs/MDT5/v15/.suo b/code/.vs/MDT5/v15/.suo new file mode 100644 index 0000000..d5bc2fe Binary files /dev/null and b/code/.vs/MDT5/v15/.suo differ diff --git a/code/.vs/config/applicationhost.config b/code/.vs/config/applicationhost.config new file mode 100644 index 0000000..da3d992 --- /dev/null +++ b/code/.vs/config/applicationhost.config @@ -0,0 +1,1033 @@ + + + + + + + +
+
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+ + +
+
+
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/code/MDT5.sln b/code/MDT5.sln new file mode 100644 index 0000000..fab9546 --- /dev/null +++ b/code/MDT5.sln @@ -0,0 +1,44 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27428.2005 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "code", ".", "{9311C3EF-F1D1-4606-8668-322C176CA58F}" + ProjectSection(WebsiteProperties) = preProject + TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0" + Debug.AspNetCompiler.VirtualPath = "/localhost_49537" + Debug.AspNetCompiler.PhysicalPath = "..\code\" + Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_49537\" + Debug.AspNetCompiler.Updateable = "true" + Debug.AspNetCompiler.ForceOverwrite = "true" + Debug.AspNetCompiler.FixedNames = "false" + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.VirtualPath = "/localhost_49537" + Release.AspNetCompiler.PhysicalPath = "..\code\" + Release.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_49537\" + Release.AspNetCompiler.Updateable = "true" + Release.AspNetCompiler.ForceOverwrite = "true" + Release.AspNetCompiler.FixedNames = "false" + Release.AspNetCompiler.Debug = "False" + VWDPort = "49537" + SlnRelativePath = "..\code\" + EndProjectSection +EndProject +Global + GlobalSection(Performance) = preSolution + HasPerformanceSessions = true + EndGlobalSection + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9311C3EF-F1D1-4606-8668-322C176CA58F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9311C3EF-F1D1-4606-8668-322C176CA58F}.Debug|Any CPU.Build.0 = Debug|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {B1CA379E-4295-41CB-A81A-11D05D4683F6} + EndGlobalSection +EndGlobal diff --git a/code/application_liste/app/README.txt b/code/application_liste/app/README.txt new file mode 100644 index 0000000..e7ffd76 --- /dev/null +++ b/code/application_liste/app/README.txt @@ -0,0 +1,12 @@ +1. Projekt klonen +2. MDT5.sln öffnen um Projekt auszuführen ("einkaufsliste_neu.html" als Startseite festlegen) +3. Gulp: + 3.1 Im Ordner App (location von gulpfile.js) eine CMD öffnen + 3.2 Funktionen aus der gulpfile.js ausführen über CMD mit Kommando gulp + -> Funktionen um eine ausführbare App zu erhalten: minifyhtml und image + -> Diese Beiden Funktionen sind auch in der Funktion watch enthalten. Watch arbeitet immer nur bei + Änderung einer Datei, überwacht sozusagen die Projektmappe. + 3.3 Alle von gulp erzeugten Dateien befinden sich in einem Ordner "dist" in der Projektmappe, + der von gulp eigenständig angelegt wird. + 3.4 Die kommprimierte Website kann auch über MDT5.sln geöfnet werden, hierzu einfach + die Datei "einkaufsliste_neu.html" im Ordner dist als Startseite festlegen. \ No newline at end of file diff --git a/code/application_liste/app/css/Stylecss.css b/code/application_liste/app/css/Stylecss.css new file mode 100644 index 0000000..899a5ba --- /dev/null +++ b/code/application_liste/app/css/Stylecss.css @@ -0,0 +1,169 @@ +* { + box-sizing: border-box; +} + +body { + font-family: Arial, Helvetica, sans-serif; + margin: 0; +} + +.header { + padding: 80px; + text-align: center; + background: #1abc9c; + color: antiquewhite; +} + + /* Increase the font size of the heading */ + .header h1 { + font-size: 40px; + } + +/* Sticky navbar - toggles between relative and fixed, depending on the scroll position. It is positioned relative until a given offset position is met in the viewport - then it "sticks" in place (like position:fixed). The sticky value is not supported in IE or Edge 15 and earlier versions. However, for these versions the navbar will inherit default position */ +.navbar { + overflow: hidden; + background-color: burlywood; + position: sticky; + position: -webkit-sticky; + top: 0; +} + + /* Style the navigation bar links */ + .navbar a { + float: left; + display: block; + color: white; + text-align: center; + padding: 14px 20px; + text-decoration: none; + } + + + /* Right-aligned link */ + .navbar a.right { + float: right; + } + + /* Change color on hover */ + .navbar a:hover { + background-color: #ddd; + color: black; + } + + /* Active/current link */ + .navbar a.active { + background-color: #666; + color: white; + } + +/* Column container */ +.row { + display: -ms-flexbox; /* IE10 */ + display: flex; + -ms-flex-wrap: wrap; /* IE10 */ + flex-wrap: wrap; +} + +/* Create two unequal columns that sits next to each other */ +/* Sidebar/left column */ +.side { + -ms-flex: 30%; + flex: 30%; + background-color: #f1f1f1; + padding: 20px; +} + +/* Main column */ +.main { + -ms-flex: 70%; + flex: 70%; + background-color: white; + padding: 20px; + text-align: center; +} + +.liste { + display: block; + position: relative; + padding-left: 35px; + margin-bottom: 12px; + cursor: pointer; + font-size: 22px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +/* Create a custom checkbox */ +.checkmark { + position: center; + top: 0; + left: 0; + height: 25px; + width: 25px; + background-color: #eee; +} + +/* On mouse-over, add a grey background color */ +.liste:hover input ~ .checkmark { + background-color: #ccc; +} + +/* When the checkbox is checked, add a blue background */ +.liste input:checked ~ .checkmark { + background-color: #2196F3; +} + +/* Create the checkmark/indicator (hidden when not checked) */ +.checkmark:after { + content: ""; + position: absolute; + display: none; +} + +/* Show the checkmark when checked */ +.liste input:checked ~ .checkmark:after { + display: block; +} + +/* Style the checkmark/indicator */ +.liste .checkmark:after { + left: 9px; + top: 5px; + width: 5px; + height: 10px; + border: solid white; + border-width: 0 3px 3px 0; + -webkit-transform: rotate(45deg); + -ms-transform: rotate(45deg); + transform: rotate(45deg); +} + +/* Fake image, just for this example */ +.fakeimg { + background-color: #aaa; + width: 100%; + padding: 20px; +} + +/* Footer */ +.footer { + padding: 20px; + text-align: center; + background: #ddd; +} + +/* Responsive layout - when the screen is less than 700px wide, make the two columns stack on top of each other instead of next to each other */ +@media screen and (max-width: 700px) { + .row { + flex-direction: column; + } +} + +/* Responsive layout - when the screen is less than 400px wide, make the navigation links stack on top of each other instead of next to each other */ +@media screen and (max-width: 400px) { + .navbar a { + float: none; + width: 100%; + } +} diff --git a/code/application_liste/app/css/galerie.css b/code/application_liste/app/css/galerie.css new file mode 100644 index 0000000..2129b7e --- /dev/null +++ b/code/application_liste/app/css/galerie.css @@ -0,0 +1,20 @@ +div.gallery { + margin: 5px; + border: 1px solid #ccc; + float: left; + width: 180px; +} + + div.gallery:hover { + border: 1px solid #777; + } + + div.gallery img { + width: 100%; + height: auto; + } + +div.desc { + padding: 15px; + text-align: center; +} diff --git a/code/application_liste/app/dist/css/Stylecss.css b/code/application_liste/app/dist/css/Stylecss.css new file mode 100644 index 0000000..6ccafbe --- /dev/null +++ b/code/application_liste/app/dist/css/Stylecss.css @@ -0,0 +1,16 @@ +div.gallery{margin:5px;border:1px solid #ccc;float:left;width:180px}div.gallery:hover{border:1px solid #777} +div.gallery img{width:100%;height:auto}div.desc{padding:15px;text-align:center}*{box-sizing:border-box} +body{font-family:Arial,Helvetica,sans-serif;margin:0}.header{padding:80px;text-align:center;background:#1abc9c;color:antiquewhite} +.header h1{font-size:40px}.navbar{overflow:hidden;background-color:burlywood;position:sticky;position:-webkit-sticky;top:0} +.navbar a{float:left;display:block;color:white;text-align:center;padding:14px 20px;text-decoration:none} +.navbar a.right{float:right}.navbar a:hover{background-color:#ddd;color:black}.navbar a.active{background-color:#666;color:white} +.row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.side{-ms-flex:30%;flex:30%;background-color:#f1f1f1;padding:20px} +.main{-ms-flex:70%;flex:70%;background-color:white;padding:20px;text-align:center} +.liste{display:block;position:relative;padding-left:35px;margin-bottom:12px;cursor:pointer;font-size:22px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none} +.checkmark{position:center;top:0;left:0;height:25px;width:25px;background-color:#eee} +.liste:hover input ~ .checkmark{background-color:#ccc}.liste input:checked ~ .checkmark{background-color:#2196f3} +.checkmark:after{content:"";position:absolute;display:none} +.liste input:checked ~ .checkmark:after{display:block}.liste .checkmark:after{left:9px;top:5px;width:5px;height:10px;border:solid white;border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)} +.fakeimg{background-color:#aaa;width:100%;padding:20px}.footer{padding:20px;text-align:center;background:#ddd} +@media screen and (max-width:700px){.row{flex-direction:column}}@media screen and (max-width:400px){.navbar a{float:none;width:100%} +} \ No newline at end of file diff --git a/code/application_liste/app/dist/einkaufsliste.zip b/code/application_liste/app/dist/einkaufsliste.zip new file mode 100644 index 0000000..56c96ec Binary files /dev/null and b/code/application_liste/app/dist/einkaufsliste.zip differ diff --git a/code/application_liste/app/dist/einkaufsliste_neu.html b/code/application_liste/app/dist/einkaufsliste_neu.html new file mode 100644 index 0000000..1531917 --- /dev/null +++ b/code/application_liste/app/dist/einkaufsliste_neu.html @@ -0,0 +1 @@ +Einkaufsliste

Einkaufliste

Erstelle deine persönlich Einkaufsliste

Angebot der Woche

bei Lidl

Nur diese Woche reduziert

Rezeptideen



Image

Einkaufsliste

Webapp zur Erstellung einer Einkaufsliste

Diese Pyramiede soll sie daran erinnern auf eine ausgewogene Ernährung zu achten.

\ No newline at end of file diff --git a/code/application_liste/app/dist/galerie.html b/code/application_liste/app/dist/galerie.html new file mode 100644 index 0000000..03add83 --- /dev/null +++ b/code/application_liste/app/dist/galerie.html @@ -0,0 +1 @@ +Einkaufsliste

Einkaufliste

Erstelle deine persönlich Einkaufsliste

\ No newline at end of file diff --git a/code/application_liste/app/dist/img/Ernaehrungspyramide.jpg b/code/application_liste/app/dist/img/Ernaehrungspyramide.jpg new file mode 100644 index 0000000..9911806 Binary files /dev/null and b/code/application_liste/app/dist/img/Ernaehrungspyramide.jpg differ diff --git a/code/application_liste/app/dist/img/aepfel.jpg b/code/application_liste/app/dist/img/aepfel.jpg new file mode 100644 index 0000000..0011963 Binary files /dev/null and b/code/application_liste/app/dist/img/aepfel.jpg differ diff --git a/code/application_liste/app/dist/img/eathealty.jpg b/code/application_liste/app/dist/img/eathealty.jpg new file mode 100644 index 0000000..fc1d290 Binary files /dev/null and b/code/application_liste/app/dist/img/eathealty.jpg differ diff --git a/code/application_liste/app/dist/img/einkaufstasche.png b/code/application_liste/app/dist/img/einkaufstasche.png new file mode 100644 index 0000000..18b73d1 Binary files /dev/null and b/code/application_liste/app/dist/img/einkaufstasche.png differ diff --git a/code/application_liste/app/dist/img/milch.jpg b/code/application_liste/app/dist/img/milch.jpg new file mode 100644 index 0000000..a309a64 Binary files /dev/null and b/code/application_liste/app/dist/img/milch.jpg differ diff --git a/code/exercise03/app/img/ohm.ico b/code/application_liste/app/dist/img/ohm.ico similarity index 100% rename from code/exercise03/app/img/ohm.ico rename to code/application_liste/app/dist/img/ohm.ico diff --git a/code/application_liste/app/dist/img/pizza.jpg b/code/application_liste/app/dist/img/pizza.jpg new file mode 100644 index 0000000..5ace7b5 Binary files /dev/null and b/code/application_liste/app/dist/img/pizza.jpg differ diff --git a/code/application_liste/app/dist/img/spareribs-im-backofen.jpg b/code/application_liste/app/dist/img/spareribs-im-backofen.jpg new file mode 100644 index 0000000..136e7af Binary files /dev/null and b/code/application_liste/app/dist/img/spareribs-im-backofen.jpg differ diff --git a/code/application_liste/app/dist/img/wasser.jpg b/code/application_liste/app/dist/img/wasser.jpg new file mode 100644 index 0000000..a578d97 Binary files /dev/null and b/code/application_liste/app/dist/img/wasser.jpg differ diff --git a/code/application_liste/app/dist/img/weisse-pizza-mit-steinpilz-gorgonzola-und-rucola.jpg b/code/application_liste/app/dist/img/weisse-pizza-mit-steinpilz-gorgonzola-und-rucola.jpg new file mode 100644 index 0000000..2a85e0f Binary files /dev/null and b/code/application_liste/app/dist/img/weisse-pizza-mit-steinpilz-gorgonzola-und-rucola.jpg differ diff --git a/code/application_liste/app/dist/liste_anlegen.html b/code/application_liste/app/dist/liste_anlegen.html new file mode 100644 index 0000000..37ce035 --- /dev/null +++ b/code/application_liste/app/dist/liste_anlegen.html @@ -0,0 +1 @@ +Einkaufsliste

Einkaufliste

Erstelle deine persönlich Einkaufsliste

Einkaufsliste





\ No newline at end of file diff --git a/code/application_liste/app/dist/skripts/einkauf.js b/code/application_liste/app/dist/skripts/einkauf.js new file mode 100644 index 0000000..63dcd6c --- /dev/null +++ b/code/application_liste/app/dist/skripts/einkauf.js @@ -0,0 +1 @@ +var counter=0;function onClick(){var e=document.getElementById("element"),t=document.getElementById("menge");console.log(e.value),add(e.value,t.value)}function add(e,t){counter++;var n=document.getElementById("liste"),c=document.createElement("input");c.setAttribute("type","checkbox"),c.setAttribute("id","cb"+counter),c.setAttribute("class","checkmark");var d=document.createElement("label");d.innerHTML=e+" "+t,d.setAttribute("for","cb"+counter),n.appendChild(c),n.appendChild(d),n.appendChild(document.createElement("br"))} \ No newline at end of file diff --git a/code/application_liste/app/dist/skripts/speichern_liste.js b/code/application_liste/app/dist/skripts/speichern_liste.js new file mode 100644 index 0000000..88ad26f --- /dev/null +++ b/code/application_liste/app/dist/skripts/speichern_liste.js @@ -0,0 +1 @@ +function init(){document.getElementById("button1").onclick=add,document.getElementById("button2").onclick=allesLoeschen,document.getElementById("button3").onclick=deleteLast;for(var e=HoleEintraege(),t=0;t + + + Einkaufsliste + + + + + + + + +
+

Einkaufliste

+

Erstelle deine persönlich Einkaufsliste

+
+ + + +
+
+

Angebot der Woche

+
bei Lidl
+
+

Nur diese Woche reduziert

+

Rezeptideen

+ +
+ +
+
Image
+
+
+

Einkaufsliste

+
Webapp zur Erstellung einer Einkaufsliste
+
+

Diese Pyramiede soll sie daran erinnern auf eine ausgewogene Ernährung zu achten.

+
+
+ + + + + diff --git a/code/application_liste/app/galerie.html b/code/application_liste/app/galerie.html new file mode 100644 index 0000000..baa5cd3 --- /dev/null +++ b/code/application_liste/app/galerie.html @@ -0,0 +1,49 @@ + + + + + Einkaufsliste + + + + + + + +
+

Einkaufliste

+

Erstelle deine persönlich Einkaufsliste

+
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/code/application_liste/app/gulpfile.js b/code/application_liste/app/gulpfile.js new file mode 100644 index 0000000..e1b7064 --- /dev/null +++ b/code/application_liste/app/gulpfile.js @@ -0,0 +1,48 @@ +var gulp = require("gulp"); +var uglifycss = require('gulp-uglifycss'); +var image = require('gulp-image'); +var uglify = require('gulp-uglify'); +var pipeline = require('readable-stream').pipeline; +var concatCss = require('gulp-concat-css'); +var htmlmin = require('gulp-htmlmin'); +var inlineCss = require('gulp-inline-css'); +var injectJS = require('gulp-inject-js'); + +gulp.task('minifyhtml', () => { + return gulp.src('*.html') + .pipe(htmlmin({ collapseWhitespace: true })) + .pipe(inlineCss()) + .pipe(injectJS()) + .pipe(gulp.dest('dist')); +}); + +gulp.task('css', async function () { + gulp.src('./css/*.css') + .pipe(concatCss("Stylecss.css")) + .pipe(uglifycss({ + "maxLineLen": 80, + "uglyComments": true + })) + .pipe(gulp.dest('dist/css')); +}); + + + +gulp.task('image', async function () { + gulp.src('./img/*') + .pipe(image()) + .pipe(gulp.dest('./dist/img')); +}); + +gulp.task('compress', async function () { + return pipeline( + gulp.src('./skripts/*.js'), + uglify(), + gulp.dest('./dist/skripts') + ); +}); + +gulp.task('watch', async function () { + gulp.watch('app/img/*', gulp.series('image')); + gulp.watch('app/*.html', gulp.series('minifyhtml')); +}); diff --git a/code/application_liste/app/img/Ernaehrungspyramide.jpg b/code/application_liste/app/img/Ernaehrungspyramide.jpg new file mode 100644 index 0000000..c5d2d76 Binary files /dev/null and b/code/application_liste/app/img/Ernaehrungspyramide.jpg differ diff --git a/code/application_liste/app/img/aepfel.jpg b/code/application_liste/app/img/aepfel.jpg new file mode 100644 index 0000000..d8a0531 Binary files /dev/null and b/code/application_liste/app/img/aepfel.jpg differ diff --git a/code/application_liste/app/img/eathealty.jpg b/code/application_liste/app/img/eathealty.jpg new file mode 100644 index 0000000..bc48034 Binary files /dev/null and b/code/application_liste/app/img/eathealty.jpg differ diff --git a/code/exercise04/app/img/kisspng-shopping-bag-grocery-store-shopping-cart-vegetable-bag2-myspeedyx-5cb7cce50fbf87.6493526215555494130645.png b/code/application_liste/app/img/einkaufstasche.png similarity index 100% rename from code/exercise04/app/img/kisspng-shopping-bag-grocery-store-shopping-cart-vegetable-bag2-myspeedyx-5cb7cce50fbf87.6493526215555494130645.png rename to code/application_liste/app/img/einkaufstasche.png diff --git a/code/application_liste/app/img/milch.jpg b/code/application_liste/app/img/milch.jpg new file mode 100644 index 0000000..029c804 Binary files /dev/null and b/code/application_liste/app/img/milch.jpg differ diff --git a/code/exercise04/app/img/ohm.ico b/code/application_liste/app/img/ohm.ico similarity index 100% rename from code/exercise04/app/img/ohm.ico rename to code/application_liste/app/img/ohm.ico diff --git a/code/application_liste/app/img/pizza.jpg b/code/application_liste/app/img/pizza.jpg new file mode 100644 index 0000000..5ace7b5 Binary files /dev/null and b/code/application_liste/app/img/pizza.jpg differ diff --git a/code/application_liste/app/img/spareribs-im-backofen.jpg b/code/application_liste/app/img/spareribs-im-backofen.jpg new file mode 100644 index 0000000..1300622 Binary files /dev/null and b/code/application_liste/app/img/spareribs-im-backofen.jpg differ diff --git a/code/application_liste/app/img/wasser.jpg b/code/application_liste/app/img/wasser.jpg new file mode 100644 index 0000000..ee41460 Binary files /dev/null and b/code/application_liste/app/img/wasser.jpg differ diff --git a/code/application_liste/app/img/weisse-pizza-mit-steinpilz-gorgonzola-und-rucola.jpg b/code/application_liste/app/img/weisse-pizza-mit-steinpilz-gorgonzola-und-rucola.jpg new file mode 100644 index 0000000..8e464fa Binary files /dev/null and b/code/application_liste/app/img/weisse-pizza-mit-steinpilz-gorgonzola-und-rucola.jpg differ diff --git a/code/application_liste/app/liste_anlegen.html b/code/application_liste/app/liste_anlegen.html new file mode 100644 index 0000000..bffb067 --- /dev/null +++ b/code/application_liste/app/liste_anlegen.html @@ -0,0 +1,48 @@ + + + + Einkaufsliste + + + + + + + + +
+

Einkaufliste

+

Erstelle deine persönlich Einkaufsliste

+
+ + + +
+
+

+ Einkaufsliste +

+
+
+
+ + + + +
+
+
+ + + + +
+
+ + + \ No newline at end of file diff --git a/code/application_liste/app/node_modules/.bin/atob b/code/application_liste/app/node_modules/.bin/atob new file mode 100644 index 0000000..59a6bf0 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/atob @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../atob/bin/atob.js" "$@" + ret=$? +else + node "$basedir/../atob/bin/atob.js" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/atob.cmd b/code/application_liste/app/node_modules/.bin/atob.cmd new file mode 100644 index 0000000..b0df169 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/atob.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\atob\bin\atob.js" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/atob.ps1 b/code/application_liste/app/node_modules/.bin/atob.ps1 new file mode 100644 index 0000000..d276879 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/atob.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../atob/bin/atob.js" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../atob/bin/atob.js" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/color-support b/code/application_liste/app/node_modules/.bin/color-support new file mode 100644 index 0000000..8bf9de4 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/color-support @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../color-support/bin.js" "$@" + ret=$? +else + node "$basedir/../color-support/bin.js" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/color-support.cmd b/code/application_liste/app/node_modules/.bin/color-support.cmd new file mode 100644 index 0000000..4ad9831 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/color-support.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\color-support\bin.js" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/color-support.ps1 b/code/application_liste/app/node_modules/.bin/color-support.ps1 new file mode 100644 index 0000000..bbca6c6 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/color-support.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../color-support/bin.js" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../color-support/bin.js" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/escodegen b/code/application_liste/app/node_modules/.bin/escodegen new file mode 100644 index 0000000..aa70e8b --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/escodegen @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../escodegen/bin/escodegen.js" "$@" + ret=$? +else + node "$basedir/../escodegen/bin/escodegen.js" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/escodegen.cmd b/code/application_liste/app/node_modules/.bin/escodegen.cmd new file mode 100644 index 0000000..6b7adbf --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/escodegen.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\escodegen\bin\escodegen.js" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/escodegen.ps1 b/code/application_liste/app/node_modules/.bin/escodegen.ps1 new file mode 100644 index 0000000..d4614ac --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/escodegen.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../escodegen/bin/escodegen.js" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../escodegen/bin/escodegen.js" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/esgenerate b/code/application_liste/app/node_modules/.bin/esgenerate new file mode 100644 index 0000000..4a2495a --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/esgenerate @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../escodegen/bin/esgenerate.js" "$@" + ret=$? +else + node "$basedir/../escodegen/bin/esgenerate.js" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/esgenerate.cmd b/code/application_liste/app/node_modules/.bin/esgenerate.cmd new file mode 100644 index 0000000..4ad231e --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/esgenerate.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\escodegen\bin\esgenerate.js" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/esgenerate.ps1 b/code/application_liste/app/node_modules/.bin/esgenerate.ps1 new file mode 100644 index 0000000..eb4fc38 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/esgenerate.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../escodegen/bin/esgenerate.js" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../escodegen/bin/esgenerate.js" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/esparse b/code/application_liste/app/node_modules/.bin/esparse new file mode 100644 index 0000000..735d854 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/esparse @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../esprima/bin/esparse.js" "$@" + ret=$? +else + node "$basedir/../esprima/bin/esparse.js" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/esparse.cmd b/code/application_liste/app/node_modules/.bin/esparse.cmd new file mode 100644 index 0000000..b8c6a63 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/esparse.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\esprima\bin\esparse.js" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/esparse.ps1 b/code/application_liste/app/node_modules/.bin/esparse.ps1 new file mode 100644 index 0000000..567aea3 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/esparse.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../esprima/bin/esparse.js" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../esprima/bin/esparse.js" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/esvalidate b/code/application_liste/app/node_modules/.bin/esvalidate new file mode 100644 index 0000000..d278bc7 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/esvalidate @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../esprima/bin/esvalidate.js" "$@" + ret=$? +else + node "$basedir/../esprima/bin/esvalidate.js" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/esvalidate.cmd b/code/application_liste/app/node_modules/.bin/esvalidate.cmd new file mode 100644 index 0000000..74859bd --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/esvalidate.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\esprima\bin\esvalidate.js" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/esvalidate.ps1 b/code/application_liste/app/node_modules/.bin/esvalidate.ps1 new file mode 100644 index 0000000..b1ed174 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/esvalidate.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../esprima/bin/esvalidate.js" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../esprima/bin/esvalidate.js" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/gifsicle b/code/application_liste/app/node_modules/.bin/gifsicle new file mode 100644 index 0000000..416828c --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/gifsicle @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../gifsicle/cli.js" "$@" + ret=$? +else + node "$basedir/../gifsicle/cli.js" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/gifsicle.cmd b/code/application_liste/app/node_modules/.bin/gifsicle.cmd new file mode 100644 index 0000000..e97c383 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/gifsicle.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\gifsicle\cli.js" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/gifsicle.ps1 b/code/application_liste/app/node_modules/.bin/gifsicle.ps1 new file mode 100644 index 0000000..4e83a45 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/gifsicle.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../gifsicle/cli.js" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../gifsicle/cli.js" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/guetzli b/code/application_liste/app/node_modules/.bin/guetzli new file mode 100644 index 0000000..205d1e0 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/guetzli @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../guetzli/cli.js" "$@" + ret=$? +else + node "$basedir/../guetzli/cli.js" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/guetzli.cmd b/code/application_liste/app/node_modules/.bin/guetzli.cmd new file mode 100644 index 0000000..3243f87 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/guetzli.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\guetzli\cli.js" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/guetzli.ps1 b/code/application_liste/app/node_modules/.bin/guetzli.ps1 new file mode 100644 index 0000000..d907c36 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/guetzli.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../guetzli/cli.js" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../guetzli/cli.js" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/gulp b/code/application_liste/app/node_modules/.bin/gulp new file mode 100644 index 0000000..89f64dd --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/gulp @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../gulp/bin/gulp.js" "$@" + ret=$? +else + node "$basedir/../gulp/bin/gulp.js" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/gulp.cmd b/code/application_liste/app/node_modules/.bin/gulp.cmd new file mode 100644 index 0000000..426ab81 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/gulp.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\gulp\bin\gulp.js" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/gulp.ps1 b/code/application_liste/app/node_modules/.bin/gulp.ps1 new file mode 100644 index 0000000..1e2949c --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/gulp.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../gulp/bin/gulp.js" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../gulp/bin/gulp.js" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/he b/code/application_liste/app/node_modules/.bin/he new file mode 100644 index 0000000..6837070 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/he @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../he/bin/he" "$@" + ret=$? +else + node "$basedir/../he/bin/he" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/he.cmd b/code/application_liste/app/node_modules/.bin/he.cmd new file mode 100644 index 0000000..efc7fc8 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/he.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\he\bin\he" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/he.ps1 b/code/application_liste/app/node_modules/.bin/he.ps1 new file mode 100644 index 0000000..4f94281 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/he.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../he/bin/he" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../he/bin/he" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/html-minifier b/code/application_liste/app/node_modules/.bin/html-minifier new file mode 100644 index 0000000..8c6403f --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/html-minifier @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../html-minifier/cli.js" "$@" + ret=$? +else + node "$basedir/../html-minifier/cli.js" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/html-minifier.cmd b/code/application_liste/app/node_modules/.bin/html-minifier.cmd new file mode 100644 index 0000000..5547e48 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/html-minifier.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\html-minifier\cli.js" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/html-minifier.ps1 b/code/application_liste/app/node_modules/.bin/html-minifier.ps1 new file mode 100644 index 0000000..2a96dce --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/html-minifier.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../html-minifier/cli.js" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../html-minifier/cli.js" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/jpeg-recompress b/code/application_liste/app/node_modules/.bin/jpeg-recompress new file mode 100644 index 0000000..b4eb237 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/jpeg-recompress @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../jpeg-recompress-bin/cli.js" "$@" + ret=$? +else + node "$basedir/../jpeg-recompress-bin/cli.js" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/jpeg-recompress.cmd b/code/application_liste/app/node_modules/.bin/jpeg-recompress.cmd new file mode 100644 index 0000000..e974b72 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/jpeg-recompress.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\jpeg-recompress-bin\cli.js" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/jpeg-recompress.ps1 b/code/application_liste/app/node_modules/.bin/jpeg-recompress.ps1 new file mode 100644 index 0000000..311a986 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/jpeg-recompress.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../jpeg-recompress-bin/cli.js" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../jpeg-recompress-bin/cli.js" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/js-yaml b/code/application_liste/app/node_modules/.bin/js-yaml new file mode 100644 index 0000000..4537030 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/js-yaml @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../js-yaml/bin/js-yaml.js" "$@" + ret=$? +else + node "$basedir/../js-yaml/bin/js-yaml.js" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/js-yaml.cmd b/code/application_liste/app/node_modules/.bin/js-yaml.cmd new file mode 100644 index 0000000..9597bdf --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/js-yaml.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\js-yaml\bin\js-yaml.js" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/js-yaml.ps1 b/code/application_liste/app/node_modules/.bin/js-yaml.ps1 new file mode 100644 index 0000000..728b322 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/js-yaml.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/lpad-align b/code/application_liste/app/node_modules/.bin/lpad-align new file mode 100644 index 0000000..39b99d2 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/lpad-align @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../lpad-align/cli.js" "$@" + ret=$? +else + node "$basedir/../lpad-align/cli.js" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/lpad-align.cmd b/code/application_liste/app/node_modules/.bin/lpad-align.cmd new file mode 100644 index 0000000..222e16c --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/lpad-align.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\lpad-align\cli.js" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/lpad-align.ps1 b/code/application_liste/app/node_modules/.bin/lpad-align.ps1 new file mode 100644 index 0000000..bc56a86 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/lpad-align.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../lpad-align/cli.js" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../lpad-align/cli.js" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/mime b/code/application_liste/app/node_modules/.bin/mime new file mode 100644 index 0000000..91e5e16 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/mime @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../mime/cli.js" "$@" + ret=$? +else + node "$basedir/../mime/cli.js" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/mime.cmd b/code/application_liste/app/node_modules/.bin/mime.cmd new file mode 100644 index 0000000..746a279 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/mime.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\mime\cli.js" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/mime.ps1 b/code/application_liste/app/node_modules/.bin/mime.ps1 new file mode 100644 index 0000000..a6f6f47 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/mime.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../mime/cli.js" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../mime/cli.js" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/mkdirp b/code/application_liste/app/node_modules/.bin/mkdirp new file mode 100644 index 0000000..bcd333f --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/mkdirp @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../mkdirp/bin/cmd.js" "$@" + ret=$? +else + node "$basedir/../mkdirp/bin/cmd.js" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/mkdirp.cmd b/code/application_liste/app/node_modules/.bin/mkdirp.cmd new file mode 100644 index 0000000..c2c9350 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/mkdirp.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\mkdirp\bin\cmd.js" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/mkdirp.ps1 b/code/application_liste/app/node_modules/.bin/mkdirp.ps1 new file mode 100644 index 0000000..35ce690 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/mkdirp.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/mozjpeg b/code/application_liste/app/node_modules/.bin/mozjpeg new file mode 100644 index 0000000..45250cd --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/mozjpeg @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../mozjpeg/cli.js" "$@" + ret=$? +else + node "$basedir/../mozjpeg/cli.js" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/mozjpeg.cmd b/code/application_liste/app/node_modules/.bin/mozjpeg.cmd new file mode 100644 index 0000000..49142a1 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/mozjpeg.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\mozjpeg\cli.js" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/mozjpeg.ps1 b/code/application_liste/app/node_modules/.bin/mozjpeg.ps1 new file mode 100644 index 0000000..b567d44 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/mozjpeg.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../mozjpeg/cli.js" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../mozjpeg/cli.js" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/optipng b/code/application_liste/app/node_modules/.bin/optipng new file mode 100644 index 0000000..17d2fbc --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/optipng @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../optipng-bin/cli.js" "$@" + ret=$? +else + node "$basedir/../optipng-bin/cli.js" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/optipng.cmd b/code/application_liste/app/node_modules/.bin/optipng.cmd new file mode 100644 index 0000000..dfd15e3 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/optipng.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\optipng-bin\cli.js" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/optipng.ps1 b/code/application_liste/app/node_modules/.bin/optipng.ps1 new file mode 100644 index 0000000..1836753 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/optipng.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../optipng-bin/cli.js" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../optipng-bin/cli.js" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/pngquant b/code/application_liste/app/node_modules/.bin/pngquant new file mode 100644 index 0000000..2496098 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/pngquant @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../pngquant-bin/cli.js" "$@" + ret=$? +else + node "$basedir/../pngquant-bin/cli.js" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/pngquant.cmd b/code/application_liste/app/node_modules/.bin/pngquant.cmd new file mode 100644 index 0000000..76165b3 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/pngquant.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\pngquant-bin\cli.js" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/pngquant.ps1 b/code/application_liste/app/node_modules/.bin/pngquant.ps1 new file mode 100644 index 0000000..1cf6dd2 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/pngquant.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../pngquant-bin/cli.js" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../pngquant-bin/cli.js" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/rimraf b/code/application_liste/app/node_modules/.bin/rimraf new file mode 100644 index 0000000..a3e9f71 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/rimraf @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../rimraf/bin.js" "$@" + ret=$? +else + node "$basedir/../rimraf/bin.js" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/rimraf.cmd b/code/application_liste/app/node_modules/.bin/rimraf.cmd new file mode 100644 index 0000000..698f4ba --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/rimraf.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\rimraf\bin.js" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/rimraf.ps1 b/code/application_liste/app/node_modules/.bin/rimraf.ps1 new file mode 100644 index 0000000..a244a80 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/rimraf.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../rimraf/bin.js" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../rimraf/bin.js" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/seek-bunzip b/code/application_liste/app/node_modules/.bin/seek-bunzip new file mode 100644 index 0000000..7b7b955 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/seek-bunzip @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../seek-bzip/bin/seek-bunzip" "$@" + ret=$? +else + node "$basedir/../seek-bzip/bin/seek-bunzip" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/seek-bunzip.cmd b/code/application_liste/app/node_modules/.bin/seek-bunzip.cmd new file mode 100644 index 0000000..6ecd3ee --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/seek-bunzip.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\seek-bzip\bin\seek-bunzip" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/seek-bunzip.ps1 b/code/application_liste/app/node_modules/.bin/seek-bunzip.ps1 new file mode 100644 index 0000000..7a7de2f --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/seek-bunzip.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../seek-bzip/bin/seek-bunzip" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../seek-bzip/bin/seek-bunzip" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/seek-table b/code/application_liste/app/node_modules/.bin/seek-table new file mode 100644 index 0000000..5caec7a --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/seek-table @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../seek-bzip/bin/seek-bzip-table" "$@" + ret=$? +else + node "$basedir/../seek-bzip/bin/seek-bzip-table" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/seek-table.cmd b/code/application_liste/app/node_modules/.bin/seek-table.cmd new file mode 100644 index 0000000..4be4947 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/seek-table.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\seek-bzip\bin\seek-bzip-table" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/seek-table.ps1 b/code/application_liste/app/node_modules/.bin/seek-table.ps1 new file mode 100644 index 0000000..6a8f489 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/seek-table.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../seek-bzip/bin/seek-bzip-table" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../seek-bzip/bin/seek-bzip-table" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/semver b/code/application_liste/app/node_modules/.bin/semver new file mode 100644 index 0000000..10497aa --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/semver @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../semver/bin/semver" "$@" + ret=$? +else + node "$basedir/../semver/bin/semver" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/semver.cmd b/code/application_liste/app/node_modules/.bin/semver.cmd new file mode 100644 index 0000000..eb3aaa1 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/semver.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\semver\bin\semver" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/semver.ps1 b/code/application_liste/app/node_modules/.bin/semver.ps1 new file mode 100644 index 0000000..a3315ff --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/semver.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../semver/bin/semver" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../semver/bin/semver" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/specificity b/code/application_liste/app/node_modules/.bin/specificity new file mode 100644 index 0000000..897af25 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/specificity @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../specificity/bin/specificity" "$@" + ret=$? +else + node "$basedir/../specificity/bin/specificity" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/specificity.cmd b/code/application_liste/app/node_modules/.bin/specificity.cmd new file mode 100644 index 0000000..102abbe --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/specificity.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\specificity\bin\specificity" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/specificity.ps1 b/code/application_liste/app/node_modules/.bin/specificity.ps1 new file mode 100644 index 0000000..dff171d --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/specificity.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../specificity/bin/specificity" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../specificity/bin/specificity" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/strip-indent b/code/application_liste/app/node_modules/.bin/strip-indent new file mode 100644 index 0000000..0f0810a --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/strip-indent @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../strip-indent/cli.js" "$@" + ret=$? +else + node "$basedir/../strip-indent/cli.js" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/strip-indent.cmd b/code/application_liste/app/node_modules/.bin/strip-indent.cmd new file mode 100644 index 0000000..a5c6285 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/strip-indent.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\strip-indent\cli.js" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/strip-indent.ps1 b/code/application_liste/app/node_modules/.bin/strip-indent.ps1 new file mode 100644 index 0000000..2185fab --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/strip-indent.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../strip-indent/cli.js" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../strip-indent/cli.js" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/svgo b/code/application_liste/app/node_modules/.bin/svgo new file mode 100644 index 0000000..0c8229a --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/svgo @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../svgo/bin/svgo" "$@" + ret=$? +else + node "$basedir/../svgo/bin/svgo" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/svgo.cmd b/code/application_liste/app/node_modules/.bin/svgo.cmd new file mode 100644 index 0000000..de60e7f --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/svgo.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\svgo\bin\svgo" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/svgo.ps1 b/code/application_liste/app/node_modules/.bin/svgo.ps1 new file mode 100644 index 0000000..7bd0bcc --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/svgo.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../svgo/bin/svgo" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../svgo/bin/svgo" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/uglifycss b/code/application_liste/app/node_modules/.bin/uglifycss new file mode 100644 index 0000000..11c6e03 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/uglifycss @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../uglifycss/uglifycss" "$@" + ret=$? +else + node "$basedir/../uglifycss/uglifycss" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/uglifycss.cmd b/code/application_liste/app/node_modules/.bin/uglifycss.cmd new file mode 100644 index 0000000..bc04cdc --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/uglifycss.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\uglifycss\uglifycss" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/uglifycss.ps1 b/code/application_liste/app/node_modules/.bin/uglifycss.ps1 new file mode 100644 index 0000000..a46ec73 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/uglifycss.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../uglifycss/uglifycss" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../uglifycss/uglifycss" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/uglifyjs b/code/application_liste/app/node_modules/.bin/uglifyjs new file mode 100644 index 0000000..8aa695c --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/uglifyjs @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../uglify-js/bin/uglifyjs" "$@" + ret=$? +else + node "$basedir/../uglify-js/bin/uglifyjs" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/uglifyjs.cmd b/code/application_liste/app/node_modules/.bin/uglifyjs.cmd new file mode 100644 index 0000000..ad74c56 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/uglifyjs.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\uglify-js\bin\uglifyjs" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/uglifyjs.ps1 b/code/application_liste/app/node_modules/.bin/uglifyjs.ps1 new file mode 100644 index 0000000..e6749c7 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/uglifyjs.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../uglify-js/bin/uglifyjs" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../uglify-js/bin/uglifyjs" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/uuid b/code/application_liste/app/node_modules/.bin/uuid new file mode 100644 index 0000000..9af3844 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/uuid @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../uuid/bin/uuid" "$@" + ret=$? +else + node "$basedir/../uuid/bin/uuid" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/uuid.cmd b/code/application_liste/app/node_modules/.bin/uuid.cmd new file mode 100644 index 0000000..8154f4e --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/uuid.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\uuid\bin\uuid" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/uuid.ps1 b/code/application_liste/app/node_modules/.bin/uuid.ps1 new file mode 100644 index 0000000..3fcb264 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/uuid.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../uuid/bin/uuid" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../uuid/bin/uuid" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/which b/code/application_liste/app/node_modules/.bin/which new file mode 100644 index 0000000..12cde79 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/which @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../which/bin/which" "$@" + ret=$? +else + node "$basedir/../which/bin/which" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/which.cmd b/code/application_liste/app/node_modules/.bin/which.cmd new file mode 100644 index 0000000..0664965 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/which.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\which\bin\which" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/which.ps1 b/code/application_liste/app/node_modules/.bin/which.ps1 new file mode 100644 index 0000000..d023170 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/which.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../which/bin/which" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../which/bin/which" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/zopflipng b/code/application_liste/app/node_modules/.bin/zopflipng new file mode 100644 index 0000000..8218ce1 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/zopflipng @@ -0,0 +1,15 @@ +#!/bin/sh +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") + +case `uname` in + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; +esac + +if [ -x "$basedir/node" ]; then + "$basedir/node" "$basedir/../zopflipng-bin/cli.js" "$@" + ret=$? +else + node "$basedir/../zopflipng-bin/cli.js" "$@" + ret=$? +fi +exit $ret diff --git a/code/application_liste/app/node_modules/.bin/zopflipng.cmd b/code/application_liste/app/node_modules/.bin/zopflipng.cmd new file mode 100644 index 0000000..9b7b6a4 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/zopflipng.cmd @@ -0,0 +1,17 @@ +@ECHO off +SETLOCAL +CALL :find_dp0 + +IF EXIST "%dp0%\node.exe" ( + SET "_prog=%dp0%\node.exe" +) ELSE ( + SET "_prog=node" + SET PATHEXT=%PATHEXT:;.JS;=;% +) + +"%_prog%" "%dp0%\..\zopflipng-bin\cli.js" %* +ENDLOCAL +EXIT /b %errorlevel% +:find_dp0 +SET dp0=%~dp0 +EXIT /b diff --git a/code/application_liste/app/node_modules/.bin/zopflipng.ps1 b/code/application_liste/app/node_modules/.bin/zopflipng.ps1 new file mode 100644 index 0000000..f5a5e32 --- /dev/null +++ b/code/application_liste/app/node_modules/.bin/zopflipng.ps1 @@ -0,0 +1,18 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + & "$basedir/node$exe" "$basedir/../zopflipng-bin/cli.js" $args + $ret=$LASTEXITCODE +} else { + & "node$exe" "$basedir/../zopflipng-bin/cli.js" $args + $ret=$LASTEXITCODE +} +exit $ret diff --git a/code/application_liste/app/node_modules/@jonkemp/package-utils/LICENSE b/code/application_liste/app/node_modules/@jonkemp/package-utils/LICENSE new file mode 100644 index 0000000..541d110 --- /dev/null +++ b/code/application_liste/app/node_modules/@jonkemp/package-utils/LICENSE @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Jonathan Kemp (jonkemp.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/@jonkemp/package-utils/README.md b/code/application_liste/app/node_modules/@jonkemp/package-utils/README.md new file mode 100644 index 0000000..ef91710 --- /dev/null +++ b/code/application_liste/app/node_modules/@jonkemp/package-utils/README.md @@ -0,0 +1,148 @@ +# package-utils [![Build Status](https://travis-ci.com/jonkemp/package-utils.svg?branch=master)](https://travis-ci.com/jonkemp/package-utils) + +> Helper utility modules for collections, arrays, objects and more. + +Inspired by `_`. 😄 + + +## Install + +Install with [npm](https://npmjs.org/package/@jonkemp/package-utils) + +``` +$ npm install @jonkemp/package-utils +``` + +## Usage + +### forEach + +Iterates over a list of elements, yielding each in turn to an iteratee function. The iteratee is bound to the context object, if one is passed. Each invocation of iteratee is called with three arguments: (element, index, list). If list is a JavaScript object, iteratee's arguments will be (value, key, list). Returns the list for chaining. + +```js +forEach([1, 2, 3], alert); +//=> alerts each number in turn... + +forEach({one: 1, two: 2, three: 3}, alert); +//=> alerts each number value in turn... +``` + +### map + +Produces a new array of values by mapping each value in list through a transformation function (iteratee). The iteratee is passed three arguments: the value, then the index (or key) of the iteration, and finally a reference to the entire list. + +```js +map([1, 2, 3], num => num * 3); +//=> [3, 6, 9] + +map({one: 1, two: 2, three: 3}, (num, key) => num * 3); +//=> [3, 6, 9] + +map([[1, 2], [3, 4]], first); +//=> [1, 3] +``` + +### flatten + +Flattens a nested array (the nesting can be to any depth). If you pass shallow, the array will only be flattened a single level. + +```js +flatten([1, [2], [3, [[4]]]]); +//=> [1, 2, 3, 4]; + +flatten([1, [2], [3, [[4]]]], true); +//=> [1, 2, 3, [[4]]]; +``` + +### allKeys + +Retrieve all the names of object's own and inherited properties. + +```js +function Stooge(name) { + this.name = name; +} +Stooge.prototype.silly = true; +allKeys(new Stooge("Moe")); +//=> ["name", "silly"] +``` + +### property + +Returns a function that will return the specified property of any passed-in object. path may be specified as a simple key, or as an array of object keys or array indexes, for deep property fetching. + +```js +const stooge = {name: 'moe'}; +'moe' === property('name')(stooge); +//=> true + +const stooges = {moe: {fears: {worst: 'Spiders'}}, curly: {fears: {worst: 'Moe'}}}; +const curlysWorstFear = property(['curly', 'fears', 'worst']); +curlysWorstFear(stooges); +//=> 'Moe' +``` + +### matcher + +Returns a predicate function that will tell you if a passed in object contains all of the key/value properties present in attrs. + +```js +const ready = matcher({selected: true, visible: true}); +const readyToGoList = filter(list, ready); +``` + +### isFunction + +Returns true if object is a Function. + +```js +isFunction(alert); +// => true +``` + +### isNumber + +Returns true if object is a Number (including NaN). + +```js +isNumber(8.4 * 5); +//=> true +``` + +### isUndefined + +Returns true if value is undefined. + +```js +isUndefined(window.missingVariable); +//=> true +``` + +### identity + +Returns the same value that is used as the argument. In math: f(x) = x +This function looks useless, but is used throughout Underscore as a default iteratee. + +```js +const stooge = { name: 'moe' }; +stooge === identity(stooge); +//=> true +``` + +### constant + +Creates a function that returns the same value that is used as the argument of constant. + +```js +const stooge = { name: 'moe' }; +stooge === constant(stooge)(); +//=> true +``` + +--- +| **Like us a lot?** Help others know why you like us! **Review this package on [pkgreview.dev](https://pkgreview.dev/npm/package-utils)** | ➡ | [![Review us on pkgreview.dev](https://i.ibb.co/McjVMfb/pkgreview-dev.jpg)](https://pkgreview.dev/npm/package-utils) | +| ----------------------------------------------------------------------------------------------------------------------------------------- | --- | --------------------------------------------------------------------------------------------------------------------- | + +## License + +MIT diff --git a/code/application_liste/app/node_modules/@jonkemp/package-utils/index.js b/code/application_liste/app/node_modules/@jonkemp/package-utils/index.js new file mode 100644 index 0000000..3b8b513 --- /dev/null +++ b/code/application_liste/app/node_modules/@jonkemp/package-utils/index.js @@ -0,0 +1,48 @@ +const { + getLength, + isFunction, + isObject, + identity, + property, + matcher, + optimizeCb, + cb, + forEach, + map, + flatten +} = require('./lib'); + +const isNumber = obj => toString.call(obj) === '[object Number]'; + +const isUndefined = obj => obj === void 0; + +const constant = value => () => value; + +const keyInObj = (value, key, obj) => key in obj; + +const allKeys = obj => { + if (!isObject(obj)) return []; + const keys = []; + + for (const key in obj) keys.push(key); + + return keys; +}; + +module.exports = { + getLength, + optimizeCb, + isFunction, + isNumber, + isUndefined, + property, + matcher, + identity, + constant, + keyInObj, + allKeys, + cb, + forEach, + map, + flatten +}; diff --git a/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/cb.js b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/cb.js new file mode 100644 index 0000000..74232ae --- /dev/null +++ b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/cb.js @@ -0,0 +1,29 @@ +const identity = require('./identity'); + +const isFunction = require('./is-function'); + +const optimizeCb = require('./optimize-cb'); + +const isObject = require('./is-object'); + +const matcher = require('./matcher'); + +const property = require('./property'); + +const baseIteratee = (value, context, argCount) => { + if (value == null) return identity; + if (isFunction(value)) return optimizeCb(value, context, argCount); + if (isObject(value) && !Array.isArray(value)) return matcher(value); + + return property(value); +}; + +let iteratee; + +const exportIteratee = iteratee = (value, context) => baseIteratee(value, context, Infinity); + +module.exports = (value, context, argCount) => { + if (iteratee !== exportIteratee) return iteratee(value, context); + + return baseIteratee(value, context, argCount); +}; diff --git a/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/flatten.js b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/flatten.js new file mode 100644 index 0000000..20504c2 --- /dev/null +++ b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/flatten.js @@ -0,0 +1,26 @@ +const isArrayLike = require('./is-array-like'); +const isArguments = require('./is-arguments'); +const forEach = require('./for-each'); +const flatten = (input, shallow, strict, output = []) => { + let idx = output.length; + + forEach(input, value => { + if (isArrayLike(value) && (Array.isArray(value) || isArguments(value))) { + if (shallow) { + let j = 0; + const len = value.length; + + while (j < len) output[idx++] = value[j++]; + } else { + flatten(value, shallow, strict, output); + idx = output.length; + } + } else if (!strict) { + output[idx++] = value; + } + }); + + return output; +}; + +module.exports = (array, shallow) => flatten(array, shallow, false); diff --git a/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/for-each.js b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/for-each.js new file mode 100644 index 0000000..15ca8a1 --- /dev/null +++ b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/for-each.js @@ -0,0 +1,22 @@ +const getKeys = require('./get-keys'); +const isArrayLike = require('./is-array-like'); +const optimizeCb = require('./optimize-cb'); + +module.exports = (obj, iteratee, context) => { + iteratee = optimizeCb(iteratee, context); + if (isArrayLike(obj)) { + let i = 0; + + for (const item of obj) { + iteratee(item, i++, obj); + } + } else { + const keys = getKeys(obj); + + for (const key of keys) { + iteratee(obj[key], key, obj); + } + } + + return obj; +}; diff --git a/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/get-keys.js b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/get-keys.js new file mode 100644 index 0000000..c34379e --- /dev/null +++ b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/get-keys.js @@ -0,0 +1,7 @@ +const isObject = require('./is-object'); + +module.exports = (obj) => { + if (!isObject(obj)) return []; + + return Object.keys(obj); +}; diff --git a/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/get-length.js b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/get-length.js new file mode 100644 index 0000000..34812c1 --- /dev/null +++ b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/get-length.js @@ -0,0 +1,3 @@ +const shallowProperty = require('./shallow-property'); + +module.exports = shallowProperty('length'); diff --git a/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/identity.js b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/identity.js new file mode 100644 index 0000000..5a308c0 --- /dev/null +++ b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/identity.js @@ -0,0 +1 @@ +module.exports = value => value; diff --git a/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/index.js b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/index.js new file mode 100644 index 0000000..5f74fec --- /dev/null +++ b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/index.js @@ -0,0 +1,50 @@ +const shallowProperty = require('./shallow-property'); + +const getLength = require('./get-length'); + +const isArrayLike = require('./is-array-like'); + +const isFunction = require('./is-function'); + +const isObject = require('./is-object'); + +const isArguments = require('./is-arguments'); + +const identity = require('./identity'); + +const getKeys = require('./get-keys'); + +const property = require('./property'); + +const matcher = require('./matcher'); + +const isMatch = require('./is-match'); + +const optimizeCb = require('./optimize-cb'); + +const cb = require('./cb'); + +const forEach = require('./for-each'); + +const flatten = require('./flatten'); + +const map = require('./map'); + +module.exports = { + shallowProperty, + getLength, + isArrayLike, + isFunction, + isObject, + isArguments, + identity, + getKeys, + property, + matcher, + isMatch, + optimizeCb, + cb, + forEach, + map, + flatten +}; diff --git a/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/is-arguments.js b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/is-arguments.js new file mode 100644 index 0000000..30ebf99 --- /dev/null +++ b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/is-arguments.js @@ -0,0 +1 @@ +module.exports = obj => toString.call(obj) === '[object Arguments]'; diff --git a/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/is-array-like.js b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/is-array-like.js new file mode 100644 index 0000000..1d93d92 --- /dev/null +++ b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/is-array-like.js @@ -0,0 +1,9 @@ +const getLength = require('./get-length'); + +const MAX_ARRAY_INDEX = 2 ** 53 - 1; + +module.exports = (collection) => { + const length = getLength(collection); + + return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX; +}; diff --git a/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/is-function.js b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/is-function.js new file mode 100644 index 0000000..e79b646 --- /dev/null +++ b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/is-function.js @@ -0,0 +1 @@ +module.exports = obj => toString.call(obj) === '[object Function]'; diff --git a/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/is-match.js b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/is-match.js new file mode 100644 index 0000000..52901b4 --- /dev/null +++ b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/is-match.js @@ -0,0 +1,17 @@ +const getKeys = require('./get-keys'); + +module.exports = (object, attrs) => { + const keys = getKeys(attrs); + const {length} = keys; + + if (object == null) return !length; + const obj = Object(object); + + for (let i = 0; i < length; i++) { + const key = keys[i]; + + if (attrs[key] !== obj[key] || !(key in obj)) return false; + } + + return true; +}; diff --git a/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/is-object.js b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/is-object.js new file mode 100644 index 0000000..50ce749 --- /dev/null +++ b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/is-object.js @@ -0,0 +1,5 @@ +module.exports = obj => { + const type = typeof obj; + + return type === 'function' || type === 'object' && !!obj; +}; diff --git a/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/map.js b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/map.js new file mode 100644 index 0000000..2b79908 --- /dev/null +++ b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/map.js @@ -0,0 +1,18 @@ +const getKeys = require('./get-keys'); +const isArrayLike = require('./is-array-like'); +const cb = require('./cb'); + +module.exports = (obj, iteratee, context) => { + iteratee = cb(iteratee, context); + const keys = !isArrayLike(obj) && getKeys(obj); + const { length } = keys || obj; + const results = Array(length); + + for (let index = 0; index < length; index++) { + const currentKey = keys ? keys[index] : index; + + results[index] = iteratee(obj[currentKey], currentKey, obj); + } + + return results; +}; diff --git a/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/matcher.js b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/matcher.js new file mode 100644 index 0000000..8abe663 --- /dev/null +++ b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/matcher.js @@ -0,0 +1,7 @@ +const isMatch = require('./is-match'); + +module.exports = attrs => { + attrs = Object.assign({}, attrs); + + return obj => isMatch(obj, attrs); +}; diff --git a/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/optimize-cb.js b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/optimize-cb.js new file mode 100644 index 0000000..1126df6 --- /dev/null +++ b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/optimize-cb.js @@ -0,0 +1,11 @@ +module.exports = (func, context, argCount) => { + if (context === void 0) return func; + switch (argCount == null ? 3 : argCount) { + case 1: return value => func.call(context, value); + // The 2-argument case is omitted because we’re not using it. + case 3: return (value, index, collection) => func.call(context, value, index, collection); + case 4: return (accumulator, value, index, collection) => func.call(context, accumulator, value, index, collection); + } + + return (...args) => func.apply(context, args); +}; diff --git a/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/property.js b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/property.js new file mode 100644 index 0000000..62819bd --- /dev/null +++ b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/property.js @@ -0,0 +1,20 @@ +const shallowProperty = require('./shallow-property'); + +const deepGet = (obj, path) => { + const { length } = path; + + for (let i = 0; i < length; i++) { + if (obj == null) return void 0; + obj = obj[path[i]]; + } + + return length ? obj : void 0; +}; + +module.exports = path => { + if (!Array.isArray(path)) { + return shallowProperty(path); + } + + return obj => deepGet(obj, path); +}; diff --git a/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/shallow-property.js b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/shallow-property.js new file mode 100644 index 0000000..135bbdd --- /dev/null +++ b/code/application_liste/app/node_modules/@jonkemp/package-utils/lib/shallow-property.js @@ -0,0 +1 @@ +module.exports = key => obj => obj == null ? void 0 : obj[key]; diff --git a/code/application_liste/app/node_modules/@jonkemp/package-utils/package.json b/code/application_liste/app/node_modules/@jonkemp/package-utils/package.json new file mode 100644 index 0000000..41e2efc --- /dev/null +++ b/code/application_liste/app/node_modules/@jonkemp/package-utils/package.json @@ -0,0 +1,77 @@ +{ + "_from": "@jonkemp/package-utils@^1.0.4", + "_id": "@jonkemp/package-utils@1.0.5", + "_inBundle": false, + "_integrity": "sha512-3gpXj6ZK9/ZDruwCNTUgsGTobER8oSdudQBGp/VpawxaOrKuTzdwWQ0kocB1o5ohJbdTDUfqlLrHJ5busqObiA==", + "_location": "/@jonkemp/package-utils", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@jonkemp/package-utils@^1.0.4", + "name": "@jonkemp/package-utils", + "escapedName": "@jonkemp%2fpackage-utils", + "scope": "@jonkemp", + "rawSpec": "^1.0.4", + "saveSpec": null, + "fetchSpec": "^1.0.4" + }, + "_requiredBy": [ + "/pick-util" + ], + "_resolved": "https://registry.npmjs.org/@jonkemp/package-utils/-/package-utils-1.0.5.tgz", + "_shasum": "a49dcbd649b0c83d4aaade2fcd15d074a5bf9932", + "_spec": "@jonkemp/package-utils@^1.0.4", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\pick-util", + "author": { + "name": "Jonathan Kemp", + "email": "kempdogg@gmail.com", + "url": "http://jonkemp.com/" + }, + "bugs": { + "url": "https://github.com/jonkemp/package-utils/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Helper utility modules for collections, arrays, objects and more", + "devDependencies": { + "@rollup/plugin-commonjs": "^11.0.2", + "@rollup/plugin-node-resolve": "^7.1.1", + "babel-eslint": "^10.1.0", + "eslint": "^6.8.0", + "mocha": "^7.1.1", + "rollup": "^2.3.0" + }, + "files": [ + "index.js", + "lib" + ], + "homepage": "https://github.com/jonkemp/package-utils#readme", + "keywords": [ + "helpers", + "utils", + "utilities", + "modules", + "collections", + "arrays", + "objects" + ], + "license": "MIT", + "main": "index.js", + "name": "@jonkemp/package-utils", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/jonkemp/package-utils.git" + }, + "scripts": { + "build": "rollup --config", + "lint": "eslint . --max-warnings 0", + "lint:fix": "eslint . --fix --max-warnings 0", + "prepublishOnly": "npm run build", + "test": "mocha" + }, + "version": "1.0.5" +} diff --git a/code/application_liste/app/node_modules/@sindresorhus/is/dist/example.d.ts b/code/application_liste/app/node_modules/@sindresorhus/is/dist/example.d.ts new file mode 100644 index 0000000..e69de29 diff --git a/code/application_liste/app/node_modules/@sindresorhus/is/dist/example.js b/code/application_liste/app/node_modules/@sindresorhus/is/dist/example.js new file mode 100644 index 0000000..4d575fc --- /dev/null +++ b/code/application_liste/app/node_modules/@sindresorhus/is/dist/example.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=example.js.map \ No newline at end of file diff --git a/code/application_liste/app/node_modules/@sindresorhus/is/dist/example.js.map b/code/application_liste/app/node_modules/@sindresorhus/is/dist/example.js.map new file mode 100644 index 0000000..1677c0d --- /dev/null +++ b/code/application_liste/app/node_modules/@sindresorhus/is/dist/example.js.map @@ -0,0 +1 @@ +{"version":3,"file":"example.js","sourceRoot":"","sources":["../example.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/code/application_liste/app/node_modules/@sindresorhus/is/dist/index.d.ts b/code/application_liste/app/node_modules/@sindresorhus/is/dist/index.d.ts new file mode 100644 index 0000000..fc54f3a --- /dev/null +++ b/code/application_liste/app/node_modules/@sindresorhus/is/dist/index.d.ts @@ -0,0 +1,95 @@ +/// +export declare const enum TypeName { + null = "null", + boolean = "boolean", + undefined = "undefined", + string = "string", + number = "number", + symbol = "symbol", + Function = "Function", + Array = "Array", + Buffer = "Buffer", + Object = "Object", + RegExp = "RegExp", + Date = "Date", + Error = "Error", + Map = "Map", + Set = "Set", + WeakMap = "WeakMap", + WeakSet = "WeakSet", + Int8Array = "Int8Array", + Uint8Array = "Uint8Array", + Uint8ClampedArray = "Uint8ClampedArray", + Int16Array = "Int16Array", + Uint16Array = "Uint16Array", + Int32Array = "Int32Array", + Uint32Array = "Uint32Array", + Float32Array = "Float32Array", + Float64Array = "Float64Array", + ArrayBuffer = "ArrayBuffer", + SharedArrayBuffer = "SharedArrayBuffer", + DataView = "DataView", + Promise = "Promise", +} +declare function is(value: any): TypeName; +declare namespace is { + const undefined: (value: any) => boolean; + const string: (value: any) => boolean; + const number: (value: any) => boolean; + const function_: (value: any) => boolean; + const null_: (value: any) => boolean; + const class_: (value: any) => any; + const boolean: (value: any) => boolean; + const symbol: (value: any) => boolean; + const array: (arg: any) => arg is any[]; + const buffer: (obj: any) => obj is Buffer; + const nullOrUndefined: (value: any) => boolean; + const object: (value: any) => boolean; + const iterable: (value: any) => boolean; + const generator: (value: any) => boolean; + const nativePromise: (value: any) => boolean; + const promise: (value: any) => boolean; + const generatorFunction: (value: any) => boolean; + const asyncFunction: (value: any) => boolean; + const boundFunction: (value: any) => boolean; + const regExp: (value: any) => boolean; + const date: (value: any) => boolean; + const error: (value: any) => boolean; + const map: (value: any) => boolean; + const set: (value: any) => boolean; + const weakMap: (value: any) => boolean; + const weakSet: (value: any) => boolean; + const int8Array: (value: any) => boolean; + const uint8Array: (value: any) => boolean; + const uint8ClampedArray: (value: any) => boolean; + const int16Array: (value: any) => boolean; + const uint16Array: (value: any) => boolean; + const int32Array: (value: any) => boolean; + const uint32Array: (value: any) => boolean; + const float32Array: (value: any) => boolean; + const float64Array: (value: any) => boolean; + const arrayBuffer: (value: any) => boolean; + const sharedArrayBuffer: (value: any) => boolean; + const dataView: (value: any) => boolean; + const directInstanceOf: (instance: any, klass: any) => boolean; + const truthy: (value: any) => boolean; + const falsy: (value: any) => boolean; + const nan: (value: any) => boolean; + const primitive: (value: any) => boolean; + const integer: (value: any) => boolean; + const safeInteger: (value: any) => boolean; + const plainObject: (value: any) => boolean; + const typedArray: (value: any) => boolean; + const arrayLike: (value: any) => boolean; + const inRange: (value: number, range: number | number[]) => boolean; + const domElement: (value: any) => boolean; + const nodeStream: (value: any) => boolean; + const infinite: (value: any) => boolean; + const even: (rem: number) => boolean; + const odd: (rem: number) => boolean; + const empty: (value: any) => boolean; + const emptyOrWhitespace: (value: any) => boolean; + function any(...predicate: any[]): any; + function all(...predicate: any[]): any; +} +export default is; diff --git a/code/application_liste/app/node_modules/@sindresorhus/is/dist/index.js b/code/application_liste/app/node_modules/@sindresorhus/is/dist/index.js new file mode 100644 index 0000000..d613b67 --- /dev/null +++ b/code/application_liste/app/node_modules/@sindresorhus/is/dist/index.js @@ -0,0 +1,215 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const util = require("util"); +const toString = Object.prototype.toString; +const isOfType = (type) => (value) => typeof value === type; // tslint:disable-line:strict-type-predicates +const getObjectType = (value) => { + const objectName = toString.call(value).slice(8, -1); + if (objectName) { + return objectName; + } + return null; +}; +const isObjectOfType = (typeName) => (value) => { + return getObjectType(value) === typeName; +}; +function is(value) { + if (value === null) { + return "null" /* null */; + } + if (value === true || value === false) { + return "boolean" /* boolean */; + } + const type = typeof value; + if (type === 'undefined') { + return "undefined" /* undefined */; + } + if (type === 'string') { + return "string" /* string */; + } + if (type === 'number') { + return "number" /* number */; + } + if (type === 'symbol') { + return "symbol" /* symbol */; + } + if (is.function_(value)) { + return "Function" /* Function */; + } + if (Array.isArray(value)) { + return "Array" /* Array */; + } + if (Buffer.isBuffer(value)) { + return "Buffer" /* Buffer */; + } + const tagType = getObjectType(value); + if (tagType) { + return tagType; + } + if (value instanceof String || value instanceof Boolean || value instanceof Number) { + throw new TypeError('Please don\'t use object wrappers for primitive types'); + } + return "Object" /* Object */; +} +(function (is) { + const isObject = (value) => typeof value === 'object'; + // tslint:disable:variable-name + is.undefined = isOfType('undefined'); + is.string = isOfType('string'); + is.number = isOfType('number'); + is.function_ = isOfType('function'); + is.null_ = (value) => value === null; + is.class_ = (value) => is.function_(value) && value.toString().startsWith('class '); + is.boolean = (value) => value === true || value === false; + // tslint:enable:variable-name + is.symbol = isOfType('symbol'); + is.array = Array.isArray; + is.buffer = Buffer.isBuffer; + is.nullOrUndefined = (value) => is.null_(value) || is.undefined(value); + is.object = (value) => !is.nullOrUndefined(value) && (is.function_(value) || isObject(value)); + is.iterable = (value) => !is.nullOrUndefined(value) && is.function_(value[Symbol.iterator]); + is.generator = (value) => is.iterable(value) && is.function_(value.next) && is.function_(value.throw); + is.nativePromise = isObjectOfType("Promise" /* Promise */); + const hasPromiseAPI = (value) => !is.null_(value) && + isObject(value) && + is.function_(value.then) && + is.function_(value.catch); + is.promise = (value) => is.nativePromise(value) || hasPromiseAPI(value); + // TODO: Change to use `isObjectOfType` once Node.js 6 or higher is targeted + const isFunctionOfType = (type) => (value) => is.function_(value) && is.function_(value.constructor) && value.constructor.name === type; + is.generatorFunction = isFunctionOfType('GeneratorFunction'); + is.asyncFunction = isFunctionOfType('AsyncFunction'); + is.boundFunction = (value) => is.function_(value) && !value.hasOwnProperty('prototype'); + is.regExp = isObjectOfType("RegExp" /* RegExp */); + is.date = isObjectOfType("Date" /* Date */); + is.error = isObjectOfType("Error" /* Error */); + is.map = isObjectOfType("Map" /* Map */); + is.set = isObjectOfType("Set" /* Set */); + is.weakMap = isObjectOfType("WeakMap" /* WeakMap */); + is.weakSet = isObjectOfType("WeakSet" /* WeakSet */); + is.int8Array = isObjectOfType("Int8Array" /* Int8Array */); + is.uint8Array = isObjectOfType("Uint8Array" /* Uint8Array */); + is.uint8ClampedArray = isObjectOfType("Uint8ClampedArray" /* Uint8ClampedArray */); + is.int16Array = isObjectOfType("Int16Array" /* Int16Array */); + is.uint16Array = isObjectOfType("Uint16Array" /* Uint16Array */); + is.int32Array = isObjectOfType("Int32Array" /* Int32Array */); + is.uint32Array = isObjectOfType("Uint32Array" /* Uint32Array */); + is.float32Array = isObjectOfType("Float32Array" /* Float32Array */); + is.float64Array = isObjectOfType("Float64Array" /* Float64Array */); + is.arrayBuffer = isObjectOfType("ArrayBuffer" /* ArrayBuffer */); + is.sharedArrayBuffer = isObjectOfType("SharedArrayBuffer" /* SharedArrayBuffer */); + is.dataView = isObjectOfType("DataView" /* DataView */); + // TODO: Remove `object` checks when targeting ES2015 or higher + // See `Notes`: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getPrototypeOf + is.directInstanceOf = (instance, klass) => is.object(instance) && is.object(klass) && Object.getPrototypeOf(instance) === klass.prototype; + is.truthy = (value) => Boolean(value); + is.falsy = (value) => !value; + is.nan = (value) => Number.isNaN(value); + const primitiveTypes = new Set([ + 'undefined', + 'string', + 'number', + 'boolean', + 'symbol' + ]); + is.primitive = (value) => is.null_(value) || primitiveTypes.has(typeof value); + is.integer = (value) => Number.isInteger(value); + is.safeInteger = (value) => Number.isSafeInteger(value); + is.plainObject = (value) => { + // From: https://github.com/sindresorhus/is-plain-obj/blob/master/index.js + let prototype; + return getObjectType(value) === "Object" /* Object */ && + (prototype = Object.getPrototypeOf(value), prototype === null || // tslint:disable-line:ban-comma-operator + prototype === Object.getPrototypeOf({})); + }; + const typedArrayTypes = new Set([ + "Int8Array" /* Int8Array */, + "Uint8Array" /* Uint8Array */, + "Uint8ClampedArray" /* Uint8ClampedArray */, + "Int16Array" /* Int16Array */, + "Uint16Array" /* Uint16Array */, + "Int32Array" /* Int32Array */, + "Uint32Array" /* Uint32Array */, + "Float32Array" /* Float32Array */, + "Float64Array" /* Float64Array */ + ]); + is.typedArray = (value) => { + const objectType = getObjectType(value); + if (objectType === null) { + return false; + } + return typedArrayTypes.has(objectType); + }; + const isValidLength = (value) => is.safeInteger(value) && value > -1; + is.arrayLike = (value) => !is.nullOrUndefined(value) && !is.function_(value) && isValidLength(value.length); + is.inRange = (value, range) => { + if (is.number(range)) { + return value >= Math.min(0, range) && value <= Math.max(range, 0); + } + if (is.array(range) && range.length === 2) { + // TODO: Use spread operator here when targeting Node.js 6 or higher + return value >= Math.min.apply(null, range) && value <= Math.max.apply(null, range); + } + throw new TypeError(`Invalid range: ${util.inspect(range)}`); + }; + const NODE_TYPE_ELEMENT = 1; + const DOM_PROPERTIES_TO_CHECK = [ + 'innerHTML', + 'ownerDocument', + 'style', + 'attributes', + 'nodeValue' + ]; + is.domElement = (value) => is.object(value) && value.nodeType === NODE_TYPE_ELEMENT && is.string(value.nodeName) && + !is.plainObject(value) && DOM_PROPERTIES_TO_CHECK.every(property => property in value); + is.nodeStream = (value) => !is.nullOrUndefined(value) && isObject(value) && is.function_(value.pipe); + is.infinite = (value) => value === Infinity || value === -Infinity; + const isAbsoluteMod2 = (value) => (rem) => is.integer(rem) && Math.abs(rem % 2) === value; + is.even = isAbsoluteMod2(0); + is.odd = isAbsoluteMod2(1); + const isWhiteSpaceString = (value) => is.string(value) && /\S/.test(value) === false; + const isEmptyStringOrArray = (value) => (is.string(value) || is.array(value)) && value.length === 0; + const isEmptyObject = (value) => !is.map(value) && !is.set(value) && is.object(value) && Object.keys(value).length === 0; + const isEmptyMapOrSet = (value) => (is.map(value) || is.set(value)) && value.size === 0; + is.empty = (value) => is.falsy(value) || isEmptyStringOrArray(value) || isEmptyObject(value) || isEmptyMapOrSet(value); + is.emptyOrWhitespace = (value) => is.empty(value) || isWhiteSpaceString(value); + const predicateOnArray = (method, predicate, args) => { + // `args` is the calling function's "arguments object". + // We have to do it this way to keep node v4 support. + // So here we convert it to an array and slice off the first item. + const values = Array.prototype.slice.call(args, 1); + if (is.function_(predicate) === false) { + throw new TypeError(`Invalid predicate: ${util.inspect(predicate)}`); + } + if (values.length === 0) { + throw new TypeError('Invalid number of values'); + } + return method.call(values, predicate); + }; + function any(predicate) { + return predicateOnArray(Array.prototype.some, predicate, arguments); + } + is.any = any; + function all(predicate) { + return predicateOnArray(Array.prototype.every, predicate, arguments); + } + is.all = all; + // tslint:enable:only-arrow-functions no-function-expression +})(is || (is = {})); +// Some few keywords are reserved, but we'll populate them for Node.js users +// See https://github.com/Microsoft/TypeScript/issues/2536 +Object.defineProperties(is, { + class: { + value: is.class_ + }, + function: { + value: is.function_ + }, + null: { + value: is.null_ + } +}); +exports.default = is; +// For CommonJS default export support +module.exports = is; +module.exports.default = is; diff --git a/code/application_liste/app/node_modules/@sindresorhus/is/dist/index.js.map b/code/application_liste/app/node_modules/@sindresorhus/is/dist/index.js.map new file mode 100644 index 0000000..7461e68 --- /dev/null +++ b/code/application_liste/app/node_modules/@sindresorhus/is/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../source/index.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AAE7B,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;AAC3C,MAAM,aAAa,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAW,CAAC;AAClF,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,IAAI,CAAC;AACzE,MAAM,cAAc,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;AAEvF,YAAY,KAAU;IACrB,EAAE,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC;QACpB,MAAM,CAAC,MAAM,CAAC;IACf,CAAC;IAED,EAAE,CAAC,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC;QACvC,MAAM,CAAC,SAAS,CAAC;IAClB,CAAC;IAED,MAAM,IAAI,GAAG,OAAO,KAAK,CAAC;IAE1B,EAAE,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC;QAC1B,MAAM,CAAC,WAAW,CAAC;IACpB,CAAC;IAED,EAAE,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;QACvB,MAAM,CAAC,QAAQ,CAAC;IACjB,CAAC;IAED,EAAE,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;QACvB,MAAM,CAAC,QAAQ,CAAC;IACjB,CAAC;IAED,EAAE,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;QACvB,MAAM,CAAC,QAAQ,CAAC;IACjB,CAAC;IAED,EAAE,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACzB,MAAM,CAAC,UAAU,CAAC;IACnB,CAAC;IAED,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC1B,MAAM,CAAC,OAAO,CAAC;IAChB,CAAC;IAED,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC5B,MAAM,CAAC,QAAQ,CAAC;IACjB,CAAC;IAED,MAAM,OAAO,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IACrC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;QACb,MAAM,CAAC,OAAO,CAAC;IAChB,CAAC;IAED,EAAE,CAAC,CAAC,KAAK,YAAY,MAAM,IAAI,KAAK,YAAY,OAAO,IAAI,KAAK,YAAY,MAAM,CAAC,CAAC,CAAC;QACpF,MAAM,IAAI,SAAS,CAAC,uDAAuD,CAAC,CAAC;IAC9E,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC;AACjB,CAAC;AAED,WAAU,EAAE;IACX,MAAM,QAAQ,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC;IAG9C,YAAS,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;IAClC,SAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC5B,SAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC5B,YAAS,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC;IACjC,QAAK,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC;IAEvC,SAAM,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACnF,UAAO,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC;IAG5D,SAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAE5B,QAAK,GAAG,KAAK,CAAC,OAAO,CAAC;IACtB,SAAM,GAAG,MAAM,CAAC,QAAQ,CAAC;IAEzB,kBAAe,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC,IAAI,GAAA,SAAS,CAAC,KAAK,CAAC,CAAC;IACnE,SAAM,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,GAAA,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IAC1F,WAAQ,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,GAAA,eAAe,CAAC,KAAK,CAAC,IAAI,GAAA,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;IACxF,YAAS,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,QAAQ,CAAC,KAAK,CAAC,IAAI,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAA,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAE/F,gBAAa,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IAEvD,MAAM,aAAa,GAAG,CAAC,KAAU,EAAE,EAAE,CACpC,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC;QACb,QAAQ,CAAC,KAAK,CAAC;QACf,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC;QACrB,GAAA,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAEX,UAAO,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,aAAa,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,KAAK,CAAC,CAAC;IAGpF,MAAM,gBAAgB,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,GAAA,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,KAAK,CAAC,WAAW,CAAC,IAAI,KAAK,IAAI,CAAC;IAElI,oBAAiB,GAAG,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;IAC1D,gBAAa,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC;IAElD,SAAM,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;IAClC,OAAI,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;IAC9B,QAAK,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IAChC,MAAG,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IAC5B,MAAG,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IAC5B,UAAO,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IACpC,UAAO,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IAEpC,YAAS,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;IACxC,aAAU,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC;IAC1C,oBAAiB,GAAG,cAAc,CAAC,mBAAmB,CAAC,CAAC;IACxD,aAAU,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC;IAC1C,cAAW,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC;IAC5C,aAAU,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC;IAC1C,cAAW,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC;IAC5C,eAAY,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;IAC9C,eAAY,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;IAE9C,cAAW,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC;IAC5C,oBAAiB,GAAG,cAAc,CAAC,mBAAmB,CAAC,CAAC;IAExD,SAAM,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACxC,QAAK,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC;IAE/B,MAAG,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAEvD,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC;QAC9B,WAAW;QACX,QAAQ;QACR,QAAQ;QACR,SAAS;QACT,QAAQ;KACR,CAAC,CAAC;IAEU,YAAS,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC,IAAI,cAAc,CAAC,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC;IAE7E,UAAO,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAClD,cAAW,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAE1D,cAAW,GAAG,CAAC,KAAU,EAAE,EAAE;QAEzC,IAAI,SAAS,CAAC;QAEd,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,QAAQ;YACvC,CAAC,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,SAAS,KAAK,IAAI;gBAC5D,SAAS,KAAK,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC;IAC5C,CAAC,CAAC;IAEF,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC;QAC/B,WAAW;QACX,YAAY;QACZ,mBAAmB;QACnB,YAAY;QACZ,aAAa;QACb,YAAY;QACZ,aAAa;QACb,cAAc;QACd,cAAc;KACd,CAAC,CAAC;IACU,aAAU,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,eAAe,CAAC,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;IAEpF,MAAM,aAAa,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,WAAW,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC;IAC1D,YAAS,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,GAAA,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAExG,UAAO,GAAG,CAAC,KAAa,EAAE,KAAwB,EAAE,EAAE;QAClE,EAAE,CAAC,CAAC,GAAA,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACnB,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAe,CAAC,IAAI,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,KAAe,EAAE,CAAC,CAAC,CAAC;QACvF,CAAC;QAED,EAAE,CAAC,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC;YAExC,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACrF,CAAC;QAED,MAAM,IAAI,SAAS,CAAC,kBAAkB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC9D,CAAC,CAAC;IAEF,MAAM,iBAAiB,GAAG,CAAC,CAAC;IAC5B,MAAM,uBAAuB,GAAG;QAC/B,WAAW;QACX,eAAe;QACf,OAAO;QACP,YAAY;QACZ,WAAW;KACX,CAAC;IAEW,aAAU,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,QAAQ,KAAK,iBAAiB,IAAI,GAAA,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;QACxH,CAAC,GAAA,WAAW,CAAC,KAAK,CAAC,IAAI,uBAAuB,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,IAAI,KAAK,CAAC,CAAC;IAExE,WAAQ,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,CAAC,QAAQ,CAAC;IAElF,MAAM,cAAc,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,CAAC,GAAW,EAAE,EAAE,CAAC,GAAA,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,KAAK,KAAK,CAAC;IAC1F,OAAI,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;IACzB,MAAG,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;IAErC,MAAM,kBAAkB,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,MAAM,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC;IACvF,MAAM,oBAAoB,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,GAAA,MAAM,CAAC,KAAK,CAAC,IAAI,GAAA,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;IACnG,MAAM,aAAa,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,GAAA,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAA,GAAG,CAAC,KAAK,CAAC,IAAI,GAAA,MAAM,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;IACrH,MAAM,eAAe,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,GAAA,GAAG,CAAC,KAAK,CAAC,IAAI,GAAA,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC;IAE1E,QAAK,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC,IAAI,oBAAoB,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,KAAK,CAAC,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;IACtH,oBAAiB,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC,IAAI,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAG3F,MAAM,gBAAgB,GAAG,CAAC,MAAmB,EAAE,SAAc,EAAE,IAAgB,EAAE,EAAE;QAIlF,MAAM,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QAEnD,EAAE,CAAC,CAAC,GAAA,SAAS,CAAC,SAAS,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC;YACpC,MAAM,IAAI,SAAS,CAAC,sBAAsB,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QACtE,CAAC;QAED,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC;YACzB,MAAM,IAAI,SAAS,CAAC,0BAA0B,CAAC,CAAC;QACjD,CAAC;QAED,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACvC,CAAC,CAAC;IAMF,aAAoB,SAAc;QACjC,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IACrE,CAAC;IAFe,MAAG,MAElB,CAAA;IAGD,aAAoB,SAAc;QACjC,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IACtE,CAAC;IAFe,MAAG,MAElB,CAAA;AAEF,CAAC,EA9KS,EAAE,KAAF,EAAE,QA8KX;AAID,MAAM,CAAC,gBAAgB,CAAC,EAAE,EAAE;IAC3B,KAAK,EAAE;QACN,KAAK,EAAE,EAAE,CAAC,MAAM;KAChB;IACD,QAAQ,EAAE;QACT,KAAK,EAAE,EAAE,CAAC,SAAS;KACnB;IACD,IAAI,EAAE;QACL,KAAK,EAAE,EAAE,CAAC,KAAK;KACf;CACD,CAAC,CAAC;AAEH,kBAAe,EAAE,CAAC;AAGlB,MAAM,CAAC,OAAO,GAAG,EAAE,CAAC;AACpB,MAAM,CAAC,OAAO,CAAC,OAAO,GAAG,EAAE,CAAC"} \ No newline at end of file diff --git a/code/application_liste/app/node_modules/@sindresorhus/is/dist/source/index.d.ts b/code/application_liste/app/node_modules/@sindresorhus/is/dist/source/index.d.ts new file mode 100644 index 0000000..f5fe722 --- /dev/null +++ b/code/application_liste/app/node_modules/@sindresorhus/is/dist/source/index.d.ts @@ -0,0 +1,59 @@ +/// +declare function is(value: any): string; +declare namespace is { + const undefined: (value: any) => boolean; + const string: (value: any) => boolean; + const number: (value: any) => boolean; + const function_: (value: any) => boolean; + const null_: (value: any) => boolean; + const class_: (value: any) => any; + const boolean: (value: any) => boolean; + const symbol: (value: any) => boolean; + const array: (arg: any) => arg is any[]; + const buffer: (obj: any) => obj is Buffer; + const nullOrUndefined: (value: any) => boolean; + const object: (value: any) => boolean; + const iterable: (value: any) => boolean; + const generator: (value: any) => boolean; + const nativePromise: (value: any) => boolean; + const promise: (value: any) => boolean; + const generatorFunction: (value: any) => boolean; + const asyncFunction: (value: any) => boolean; + const regExp: (value: any) => boolean; + const date: (value: any) => boolean; + const error: (value: any) => boolean; + const map: (value: any) => boolean; + const set: (value: any) => boolean; + const weakMap: (value: any) => boolean; + const weakSet: (value: any) => boolean; + const int8Array: (value: any) => boolean; + const uint8Array: (value: any) => boolean; + const uint8ClampedArray: (value: any) => boolean; + const int16Array: (value: any) => boolean; + const uint16Array: (value: any) => boolean; + const int32Array: (value: any) => boolean; + const uint32Array: (value: any) => boolean; + const float32Array: (value: any) => boolean; + const float64Array: (value: any) => boolean; + const arrayBuffer: (value: any) => boolean; + const sharedArrayBuffer: (value: any) => boolean; + const truthy: (value: any) => boolean; + const falsy: (value: any) => boolean; + const nan: (value: any) => boolean; + const primitive: (value: any) => boolean; + const integer: (value: any) => boolean; + const safeInteger: (value: any) => boolean; + const plainObject: (value: any) => boolean; + const typedArray: (value: any) => boolean; + const arrayLike: (value: any) => boolean; + const inRange: (value: number, range: number | number[]) => boolean; + const domElement: (value: any) => boolean; + const infinite: (value: any) => boolean; + const even: (rem: number) => boolean; + const odd: (rem: number) => boolean; + const empty: (value: any) => boolean; + const emptyOrWhitespace: (value: any) => boolean; + function any(...predicate: any[]): any; + function all(...predicate: any[]): any; +} +export default is; diff --git a/code/application_liste/app/node_modules/@sindresorhus/is/dist/source/index.js b/code/application_liste/app/node_modules/@sindresorhus/is/dist/source/index.js new file mode 100644 index 0000000..2ff01c9 --- /dev/null +++ b/code/application_liste/app/node_modules/@sindresorhus/is/dist/source/index.js @@ -0,0 +1,182 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const util = require("util"); +const toString = Object.prototype.toString; +const getObjectType = (value) => toString.call(value).slice(8, -1); +const isOfType = (type) => (value) => typeof value === type; +const isObjectOfType = (type) => (value) => getObjectType(value) === type; +function is(value) { + if (value === null) { + return 'null'; + } + if (value === true || value === false) { + return 'boolean'; + } + const type = typeof value; + if (type === 'undefined') { + return 'undefined'; + } + if (type === 'string') { + return 'string'; + } + if (type === 'number') { + return 'number'; + } + if (type === 'symbol') { + return 'symbol'; + } + if (is.function_(value)) { + return 'Function'; + } + if (Array.isArray(value)) { + return 'Array'; + } + if (Buffer.isBuffer(value)) { + return 'Buffer'; + } + const tagType = getObjectType(value); + if (tagType) { + return tagType; + } + if (value instanceof String || value instanceof Boolean || value instanceof Number) { + throw new TypeError('Please don\'t use object wrappers for primitive types'); + } + return 'Object'; +} +(function (is) { + const isObject = (value) => typeof value === 'object'; + is.undefined = isOfType('undefined'); + is.string = isOfType('string'); + is.number = isOfType('number'); + is.function_ = isOfType('function'); + is.null_ = (value) => value === null; + is.class_ = (value) => is.function_(value) && value.toString().startsWith('class '); + is.boolean = (value) => value === true || value === false; + is.symbol = isOfType('symbol'); + is.array = Array.isArray; + is.buffer = Buffer.isBuffer; + is.nullOrUndefined = (value) => is.null_(value) || is.undefined(value); + is.object = (value) => !is.nullOrUndefined(value) && (is.function_(value) || isObject(value)); + is.iterable = (value) => !is.nullOrUndefined(value) && is.function_(value[Symbol.iterator]); + is.generator = (value) => is.iterable(value) && is.function_(value.next) && is.function_(value.throw); + is.nativePromise = isObjectOfType('Promise'); + const hasPromiseAPI = (value) => !is.null_(value) && + isObject(value) && + is.function_(value.then) && + is.function_(value.catch); + is.promise = (value) => is.nativePromise(value) || hasPromiseAPI(value); + const isFunctionOfType = (type) => (value) => is.function_(value) && is.function_(value.constructor) && value.constructor.name === type; + is.generatorFunction = isFunctionOfType('GeneratorFunction'); + is.asyncFunction = isFunctionOfType('AsyncFunction'); + is.regExp = isObjectOfType('RegExp'); + is.date = isObjectOfType('Date'); + is.error = isObjectOfType('Error'); + is.map = isObjectOfType('Map'); + is.set = isObjectOfType('Set'); + is.weakMap = isObjectOfType('WeakMap'); + is.weakSet = isObjectOfType('WeakSet'); + is.int8Array = isObjectOfType('Int8Array'); + is.uint8Array = isObjectOfType('Uint8Array'); + is.uint8ClampedArray = isObjectOfType('Uint8ClampedArray'); + is.int16Array = isObjectOfType('Int16Array'); + is.uint16Array = isObjectOfType('Uint16Array'); + is.int32Array = isObjectOfType('Int32Array'); + is.uint32Array = isObjectOfType('Uint32Array'); + is.float32Array = isObjectOfType('Float32Array'); + is.float64Array = isObjectOfType('Float64Array'); + is.arrayBuffer = isObjectOfType('ArrayBuffer'); + is.sharedArrayBuffer = isObjectOfType('SharedArrayBuffer'); + is.truthy = (value) => Boolean(value); + is.falsy = (value) => !value; + is.nan = (value) => Number.isNaN(value); + const primitiveTypes = new Set([ + 'undefined', + 'string', + 'number', + 'boolean', + 'symbol' + ]); + is.primitive = (value) => is.null_(value) || primitiveTypes.has(typeof value); + is.integer = (value) => Number.isInteger(value); + is.safeInteger = (value) => Number.isSafeInteger(value); + is.plainObject = (value) => { + let prototype; + return getObjectType(value) === 'Object' && + (prototype = Object.getPrototypeOf(value), prototype === null || + prototype === Object.getPrototypeOf({})); + }; + const typedArrayTypes = new Set([ + 'Int8Array', + 'Uint8Array', + 'Uint8ClampedArray', + 'Int16Array', + 'Uint16Array', + 'Int32Array', + 'Uint32Array', + 'Float32Array', + 'Float64Array' + ]); + is.typedArray = (value) => typedArrayTypes.has(getObjectType(value)); + const isValidLength = (value) => is.safeInteger(value) && value > -1; + is.arrayLike = (value) => !is.nullOrUndefined(value) && !is.function_(value) && isValidLength(value.length); + is.inRange = (value, range) => { + if (is.number(range)) { + return value >= Math.min(0, range) && value <= Math.max(range, 0); + } + if (is.array(range) && range.length === 2) { + return value >= Math.min.apply(null, range) && value <= Math.max.apply(null, range); + } + throw new TypeError(`Invalid range: ${util.inspect(range)}`); + }; + const NODE_TYPE_ELEMENT = 1; + const DOM_PROPERTIES_TO_CHECK = [ + 'innerHTML', + 'ownerDocument', + 'style', + 'attributes', + 'nodeValue' + ]; + is.domElement = (value) => is.object(value) && value.nodeType === NODE_TYPE_ELEMENT && is.string(value.nodeName) && + !is.plainObject(value) && DOM_PROPERTIES_TO_CHECK.every(property => property in value); + is.infinite = (value) => value === Infinity || value === -Infinity; + const isAbsoluteMod2 = (value) => (rem) => is.integer(rem) && Math.abs(rem % 2) === value; + is.even = isAbsoluteMod2(0); + is.odd = isAbsoluteMod2(1); + const isWhiteSpaceString = (value) => is.string(value) && /\S/.test(value) === false; + const isEmptyStringOrArray = (value) => (is.string(value) || is.array(value)) && value.length === 0; + const isEmptyObject = (value) => !is.map(value) && !is.set(value) && is.object(value) && Object.keys(value).length === 0; + const isEmptyMapOrSet = (value) => (is.map(value) || is.set(value)) && value.size === 0; + is.empty = (value) => is.falsy(value) || isEmptyStringOrArray(value) || isEmptyObject(value) || isEmptyMapOrSet(value); + is.emptyOrWhitespace = (value) => is.empty(value) || isWhiteSpaceString(value); + const predicateOnArray = (method, predicate, args) => { + const values = Array.prototype.slice.call(args, 1); + if (is.function_(predicate) === false) { + throw new TypeError(`Invalid predicate: ${util.inspect(predicate)}`); + } + if (values.length === 0) { + throw new TypeError('Invalid number of values'); + } + return method.call(values, predicate); + }; + function any(predicate) { + return predicateOnArray(Array.prototype.some, predicate, arguments); + } + is.any = any; + function all(predicate) { + return predicateOnArray(Array.prototype.every, predicate, arguments); + } + is.all = all; +})(is || (is = {})); +Object.defineProperties(is, { + class: { + value: is.class_ + }, + function: { + value: is.function_ + }, + null: { + value: is.null_ + } +}); +exports.default = is; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/code/application_liste/app/node_modules/@sindresorhus/is/dist/source/index.js.map b/code/application_liste/app/node_modules/@sindresorhus/is/dist/source/index.js.map new file mode 100644 index 0000000..5cb0e0c --- /dev/null +++ b/code/application_liste/app/node_modules/@sindresorhus/is/dist/source/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/index.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AAE7B,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC;AAC3C,MAAM,aAAa,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAW,CAAC;AAClF,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,IAAI,CAAC;AACzE,MAAM,cAAc,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;AAEvF,YAAY,KAAU;IACrB,EAAE,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC;QACpB,MAAM,CAAC,MAAM,CAAC;IACf,CAAC;IAED,EAAE,CAAC,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC;QACvC,MAAM,CAAC,SAAS,CAAC;IAClB,CAAC;IAED,MAAM,IAAI,GAAG,OAAO,KAAK,CAAC;IAE1B,EAAE,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC;QAC1B,MAAM,CAAC,WAAW,CAAC;IACpB,CAAC;IAED,EAAE,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;QACvB,MAAM,CAAC,QAAQ,CAAC;IACjB,CAAC;IAED,EAAE,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;QACvB,MAAM,CAAC,QAAQ,CAAC;IACjB,CAAC;IAED,EAAE,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;QACvB,MAAM,CAAC,QAAQ,CAAC;IACjB,CAAC;IAED,EAAE,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACzB,MAAM,CAAC,UAAU,CAAC;IACnB,CAAC;IAED,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC1B,MAAM,CAAC,OAAO,CAAC;IAChB,CAAC;IAED,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC5B,MAAM,CAAC,QAAQ,CAAC;IACjB,CAAC;IAED,MAAM,OAAO,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IACrC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;QACb,MAAM,CAAC,OAAO,CAAC;IAChB,CAAC;IAED,EAAE,CAAC,CAAC,KAAK,YAAY,MAAM,IAAI,KAAK,YAAY,OAAO,IAAI,KAAK,YAAY,MAAM,CAAC,CAAC,CAAC;QACpF,MAAM,IAAI,SAAS,CAAC,uDAAuD,CAAC,CAAC;IAC9E,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC;AACjB,CAAC;AAED,WAAU,EAAE;IACX,MAAM,QAAQ,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC;IAG9C,YAAS,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;IAClC,SAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC5B,SAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC5B,YAAS,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC;IACjC,QAAK,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC;IAEvC,SAAM,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACnF,UAAO,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC;IAG5D,SAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAE5B,QAAK,GAAG,KAAK,CAAC,OAAO,CAAC;IACtB,SAAM,GAAG,MAAM,CAAC,QAAQ,CAAC;IAEzB,kBAAe,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC,IAAI,GAAA,SAAS,CAAC,KAAK,CAAC,CAAC;IACnE,SAAM,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,GAAA,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IAC1F,WAAQ,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,GAAA,eAAe,CAAC,KAAK,CAAC,IAAI,GAAA,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;IACxF,YAAS,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,QAAQ,CAAC,KAAK,CAAC,IAAI,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAA,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAE/F,gBAAa,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IAEvD,MAAM,aAAa,GAAG,CAAC,KAAU,EAAE,EAAE,CACpC,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC;QACb,QAAQ,CAAC,KAAK,CAAC;QACf,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC;QACrB,GAAA,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAEX,UAAO,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,aAAa,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,KAAK,CAAC,CAAC;IAGpF,MAAM,gBAAgB,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,GAAA,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,KAAK,CAAC,WAAW,CAAC,IAAI,KAAK,IAAI,CAAC;IAElI,oBAAiB,GAAG,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;IAC1D,gBAAa,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC;IAElD,SAAM,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;IAClC,OAAI,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;IAC9B,QAAK,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IAChC,MAAG,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IAC5B,MAAG,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IAC5B,UAAO,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IACpC,UAAO,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IAEpC,YAAS,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;IACxC,aAAU,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC;IAC1C,oBAAiB,GAAG,cAAc,CAAC,mBAAmB,CAAC,CAAC;IACxD,aAAU,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC;IAC1C,cAAW,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC;IAC5C,aAAU,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC;IAC1C,cAAW,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC;IAC5C,eAAY,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;IAC9C,eAAY,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;IAE9C,cAAW,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC;IAC5C,oBAAiB,GAAG,cAAc,CAAC,mBAAmB,CAAC,CAAC;IAExD,SAAM,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACxC,QAAK,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC;IAE/B,MAAG,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAEvD,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC;QAC9B,WAAW;QACX,QAAQ;QACR,QAAQ;QACR,SAAS;QACT,QAAQ;KACR,CAAC,CAAC;IAEU,YAAS,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC,IAAI,cAAc,CAAC,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC;IAE7E,UAAO,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAClD,cAAW,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAE1D,cAAW,GAAG,CAAC,KAAU,EAAE,EAAE;QAEzC,IAAI,SAAS,CAAC;QAEd,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,QAAQ;YACvC,CAAC,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,SAAS,KAAK,IAAI;gBAC5D,SAAS,KAAK,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC;IAC5C,CAAC,CAAC;IAEF,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC;QAC/B,WAAW;QACX,YAAY;QACZ,mBAAmB;QACnB,YAAY;QACZ,aAAa;QACb,YAAY;QACZ,aAAa;QACb,cAAc;QACd,cAAc;KACd,CAAC,CAAC;IACU,aAAU,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,eAAe,CAAC,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;IAEpF,MAAM,aAAa,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,WAAW,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC;IAC1D,YAAS,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,GAAA,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,GAAA,SAAS,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAExG,UAAO,GAAG,CAAC,KAAa,EAAE,KAAwB,EAAE,EAAE;QAClE,EAAE,CAAC,CAAC,GAAA,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACnB,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAe,CAAC,IAAI,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,KAAe,EAAE,CAAC,CAAC,CAAC;QACvF,CAAC;QAED,EAAE,CAAC,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC;YAExC,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACrF,CAAC;QAED,MAAM,IAAI,SAAS,CAAC,kBAAkB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC9D,CAAC,CAAC;IAEF,MAAM,iBAAiB,GAAG,CAAC,CAAC;IAC5B,MAAM,uBAAuB,GAAG;QAC/B,WAAW;QACX,eAAe;QACf,OAAO;QACP,YAAY;QACZ,WAAW;KACX,CAAC;IAEW,aAAU,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,QAAQ,KAAK,iBAAiB,IAAI,GAAA,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;QACxH,CAAC,GAAA,WAAW,CAAC,KAAK,CAAC,IAAI,uBAAuB,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,IAAI,KAAK,CAAC,CAAC;IAExE,WAAQ,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,CAAC,QAAQ,CAAC;IAElF,MAAM,cAAc,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,CAAC,GAAW,EAAE,EAAE,CAAC,GAAA,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,KAAK,KAAK,CAAC;IAC1F,OAAI,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;IACzB,MAAG,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;IAErC,MAAM,kBAAkB,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,MAAM,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC;IACvF,MAAM,oBAAoB,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,GAAA,MAAM,CAAC,KAAK,CAAC,IAAI,GAAA,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;IACnG,MAAM,aAAa,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,GAAA,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAA,GAAG,CAAC,KAAK,CAAC,IAAI,GAAA,MAAM,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;IACrH,MAAM,eAAe,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,GAAA,GAAG,CAAC,KAAK,CAAC,IAAI,GAAA,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC;IAE1E,QAAK,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC,IAAI,oBAAoB,CAAC,KAAK,CAAC,IAAI,aAAa,CAAC,KAAK,CAAC,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;IACtH,oBAAiB,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,GAAA,KAAK,CAAC,KAAK,CAAC,IAAI,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAG3F,MAAM,gBAAgB,GAAG,CAAC,MAAmB,EAAE,SAAc,EAAE,IAAgB,EAAE,EAAE;QAIlF,MAAM,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QAEnD,EAAE,CAAC,CAAC,GAAA,SAAS,CAAC,SAAS,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC;YACpC,MAAM,IAAI,SAAS,CAAC,sBAAsB,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QACtE,CAAC;QAED,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC;YACzB,MAAM,IAAI,SAAS,CAAC,0BAA0B,CAAC,CAAC;QACjD,CAAC;QAED,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACvC,CAAC,CAAC;IAMF,aAAoB,SAAc;QACjC,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IACrE,CAAC;IAFe,MAAG,MAElB,CAAA;IAGD,aAAoB,SAAc;QACjC,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IACtE,CAAC;IAFe,MAAG,MAElB,CAAA;AAEF,CAAC,EA9KS,EAAE,KAAF,EAAE,QA8KX;AAID,MAAM,CAAC,gBAAgB,CAAC,EAAE,EAAE;IAC3B,KAAK,EAAE;QACN,KAAK,EAAE,EAAE,CAAC,MAAM;KAChB;IACD,QAAQ,EAAE;QACT,KAAK,EAAE,EAAE,CAAC,SAAS;KACnB;IACD,IAAI,EAAE;QACL,KAAK,EAAE,EAAE,CAAC,KAAK;KACf;CACD,CAAC,CAAC;AAEH,kBAAe,EAAE,CAAC"} \ No newline at end of file diff --git a/code/application_liste/app/node_modules/@sindresorhus/is/dist/source/tests/test.d.ts b/code/application_liste/app/node_modules/@sindresorhus/is/dist/source/tests/test.d.ts new file mode 100644 index 0000000..e69de29 diff --git a/code/application_liste/app/node_modules/@sindresorhus/is/dist/source/tests/test.js b/code/application_liste/app/node_modules/@sindresorhus/is/dist/source/tests/test.js new file mode 100644 index 0000000..7a35b4d --- /dev/null +++ b/code/application_liste/app/node_modules/@sindresorhus/is/dist/source/tests/test.js @@ -0,0 +1,622 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const util = require("util"); +const ava_1 = require("ava"); +const jsdom_1 = require("jsdom"); +const __1 = require(".."); +const isNode8orHigher = Number(process.versions.node.split('.')[0]) >= 8; +class ErrorSubclassFixture extends Error { +} +const document = jsdom_1.jsdom(); +const createDomElement = (el) => document.createElement(el); +const types = new Map([ + ['undefined', { + is: __1.default.undefined, + fixtures: [ + undefined + ] + }], + ['null', { + is: __1.default.null_, + fixtures: [ + null + ] + }], + ['string', { + is: __1.default.string, + fixtures: [ + '🦄', + 'hello world', + '' + ] + }], + ['number', { + is: __1.default.number, + fixtures: [ + 6, + 1.4, + 0, + -0, + Infinity, + -Infinity + ] + }], + ['boolean', { + is: __1.default.boolean, + fixtures: [ + true, false + ] + }], + ['symbol', { + is: __1.default.symbol, + fixtures: [ + Symbol('🦄') + ] + }], + ['array', { + is: __1.default.array, + fixtures: [ + [1, 2], + new Array(2) + ] + }], + ['function', { + is: __1.default.function_, + fixtures: [ + function foo() { }, + function () { }, + () => { }, + function () { + return __awaiter(this, void 0, void 0, function* () { }); + }, + function* () { } + ] + }], + ['buffer', { + is: __1.default.buffer, + fixtures: [ + Buffer.from('🦄') + ] + }], + ['object', { + is: __1.default.object, + fixtures: [ + { x: 1 }, + Object.create({ x: 1 }) + ] + }], + ['regExp', { + is: __1.default.regExp, + fixtures: [ + /\w/, + new RegExp('\\w') + ] + }], + ['date', { + is: __1.default.date, + fixtures: [ + new Date() + ] + }], + ['error', { + is: __1.default.error, + fixtures: [ + new Error('🦄'), + new ErrorSubclassFixture() + ] + }], + ['nativePromise', { + is: __1.default.nativePromise, + fixtures: [ + Promise.resolve(), + ] + }], + ['promise', { + is: __1.default.promise, + fixtures: [ + { then() { }, catch() { } } + ] + }], + ['generator', { + is: __1.default.generator, + fixtures: [ + (function* () { yield 4; })() + ] + }], + ['generatorFunction', { + is: __1.default.generatorFunction, + fixtures: [ + function* () { yield 4; } + ] + }], + ['asyncFunction', { + is: __1.default.asyncFunction, + fixtures: [ + function () { + return __awaiter(this, void 0, void 0, function* () { }); + }, + () => __awaiter(this, void 0, void 0, function* () { }) + ] + }], + ['map', { + is: __1.default.map, + fixtures: [ + new Map() + ] + }], + ['set', { + is: __1.default.set, + fixtures: [ + new Set() + ] + }], + ['weakSet', { + is: __1.default.weakSet, + fixtures: [ + new WeakSet() + ] + }], + ['weakMap', { + is: __1.default.weakMap, + fixtures: [ + new WeakMap() + ] + }], + ['int8Array', { + is: __1.default.int8Array, + fixtures: [ + new Int8Array(0) + ] + }], + ['uint8Array', { + is: __1.default.uint8Array, + fixtures: [ + new Uint8Array(0) + ] + }], + ['uint8ClampedArray', { + is: __1.default.uint8ClampedArray, + fixtures: [ + new Uint8ClampedArray(0) + ] + }], + ['int16Array', { + is: __1.default.int16Array, + fixtures: [ + new Int16Array(0) + ] + }], + ['uint16Array', { + is: __1.default.uint16Array, + fixtures: [ + new Uint16Array(0) + ] + }], + ['int32Array', { + is: __1.default.int32Array, + fixtures: [ + new Int32Array(0) + ] + }], + ['uint32Array', { + is: __1.default.uint32Array, + fixtures: [ + new Uint32Array(0) + ] + }], + ['float32Array', { + is: __1.default.float32Array, + fixtures: [ + new Float32Array(0) + ] + }], + ['float64Array', { + is: __1.default.float64Array, + fixtures: [ + new Float64Array(0) + ] + }], + ['arrayBuffer', { + is: __1.default.arrayBuffer, + fixtures: [ + new ArrayBuffer(10) + ] + }], + ['nan', { + is: __1.default.nan, + fixtures: [ + NaN, + Number.NaN + ] + }], + ['nullOrUndefined', { + is: __1.default.nullOrUndefined, + fixtures: [ + null, + undefined + ] + }], + ['plainObject', { + is: __1.default.plainObject, + fixtures: [ + { x: 1 }, + Object.create(null), + new Object() + ] + }], + ['integer', { + is: __1.default.integer, + fixtures: [ + 6 + ] + }], + ['safeInteger', { + is: __1.default.safeInteger, + fixtures: [ + Math.pow(2, 53) - 1, + -Math.pow(2, 53) + 1 + ] + }], + ['domElement', { + is: __1.default.domElement, + fixtures: [ + 'div', + 'input', + 'span', + 'img', + 'canvas', + 'script' + ].map(createDomElement) + } + ], ['non-domElements', { + is: value => !__1.default.domElement(value), + fixtures: [ + document.createTextNode('data'), + document.createProcessingInstruction('xml-stylesheet', 'href="mycss.css" type="text/css"'), + document.createComment('This is a comment'), + document, + document.implementation.createDocumentType('svg:svg', '-//W3C//DTD SVG 1.1//EN', 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'), + document.createDocumentFragment() + ] + }], + ['infinite', { + is: __1.default.infinite, + fixtures: [ + Infinity, + -Infinity + ] + }] +]); +const testType = (t, type, exclude) => { + const testData = types.get(type); + if (testData === undefined) { + t.fail(`is.${type} not defined`); + return; + } + const { is } = testData; + for (const [key, { fixtures }] of types) { + if (exclude && exclude.indexOf(key) !== -1) { + continue; + } + const assert = key === type ? t.true.bind(t) : t.false.bind(t); + for (const fixture of fixtures) { + assert(is(fixture), `Value: ${util.inspect(fixture)}`); + } + } +}; +ava_1.default('is', t => { + t.is(__1.default(null), 'null'); + t.is(__1.default(undefined), 'undefined'); +}); +ava_1.default('is.undefined', t => { + testType(t, 'undefined', ['nullOrUndefined']); +}); +ava_1.default('is.null', t => { + testType(t, 'null', ['nullOrUndefined']); +}); +ava_1.default('is.string', t => { + testType(t, 'string'); +}); +ava_1.default('is.number', t => { + testType(t, 'number', ['nan', 'integer', 'safeInteger', 'infinite']); +}); +ava_1.default('is.boolean', t => { + testType(t, 'boolean'); +}); +ava_1.default('is.symbol', t => { + testType(t, 'symbol'); +}); +ava_1.default('is.array', t => { + testType(t, 'array'); +}); +ava_1.default('is.function', t => { + testType(t, 'function', ['generatorFunction', 'asyncFunction']); +}); +ava_1.default('is.buffer', t => { + testType(t, 'buffer'); +}); +ava_1.default('is.object', t => { + const testData = types.get('object'); + if (testData === undefined) { + t.fail('is.object not defined'); + return; + } + for (const el of testData.fixtures) { + t.true(__1.default.object(el)); + } +}); +ava_1.default('is.regExp', t => { + testType(t, 'regExp'); +}); +ava_1.default('is.date', t => { + testType(t, 'date'); +}); +ava_1.default('is.error', t => { + testType(t, 'error'); +}); +if (isNode8orHigher) { + ava_1.default('is.nativePromise', t => { + testType(t, 'nativePromise'); + }); + ava_1.default('is.promise', t => { + testType(t, 'promise', ['nativePromise']); + }); +} +ava_1.default('is.generator', t => { + testType(t, 'generator'); +}); +ava_1.default('is.generatorFunction', t => { + testType(t, 'generatorFunction', ['function']); +}); +ava_1.default('is.map', t => { + testType(t, 'map'); +}); +ava_1.default('is.set', t => { + testType(t, 'set'); +}); +ava_1.default('is.weakMap', t => { + testType(t, 'weakMap'); +}); +ava_1.default('is.weakSet', t => { + testType(t, 'weakSet'); +}); +ava_1.default('is.int8Array', t => { + testType(t, 'int8Array'); +}); +ava_1.default('is.uint8Array', t => { + testType(t, 'uint8Array', ['buffer']); +}); +ava_1.default('is.uint8ClampedArray', t => { + testType(t, 'uint8ClampedArray'); +}); +ava_1.default('is.int16Array', t => { + testType(t, 'int16Array'); +}); +ava_1.default('is.uint16Array', t => { + testType(t, 'uint16Array'); +}); +ava_1.default('is.int32Array', t => { + testType(t, 'int32Array'); +}); +ava_1.default('is.uint32Array', t => { + testType(t, 'uint32Array'); +}); +ava_1.default('is.float32Array', t => { + testType(t, 'float32Array'); +}); +ava_1.default('is.float64Array', t => { + testType(t, 'float64Array'); +}); +ava_1.default('is.arrayBuffer', t => { + testType(t, 'arrayBuffer'); +}); +ava_1.default('is.dataView', t => { + testType(t, 'arrayBuffer'); +}); +ava_1.default('is.truthy', t => { + t.true(__1.default.truthy('unicorn')); + t.true(__1.default.truthy('🦄')); + t.true(__1.default.truthy(new Set())); + t.true(__1.default.truthy(Symbol('🦄'))); + t.true(__1.default.truthy(true)); +}); +ava_1.default('is.falsy', t => { + t.true(__1.default.falsy(false)); + t.true(__1.default.falsy(0)); + t.true(__1.default.falsy('')); + t.true(__1.default.falsy(null)); + t.true(__1.default.falsy(undefined)); + t.true(__1.default.falsy(NaN)); +}); +ava_1.default('is.nan', t => { + testType(t, 'nan'); +}); +ava_1.default('is.nullOrUndefined', t => { + testType(t, 'nullOrUndefined', ['undefined', 'null']); +}); +ava_1.default('is.primitive', t => { + const primitives = [ + undefined, + null, + '🦄', + 6, + Infinity, + -Infinity, + true, + false, + Symbol('🦄') + ]; + for (const el of primitives) { + t.true(__1.default.primitive(el)); + } +}); +ava_1.default('is.integer', t => { + testType(t, 'integer', ['number', 'safeInteger']); + t.false(__1.default.integer(1.4)); +}); +ava_1.default('is.safeInteger', t => { + testType(t, 'safeInteger', ['number', 'integer']); + t.false(__1.default.safeInteger(Math.pow(2, 53))); + t.false(__1.default.safeInteger(-Math.pow(2, 53))); +}); +ava_1.default('is.plainObject', t => { + testType(t, 'plainObject', ['object', 'promise']); +}); +ava_1.default('is.iterable', t => { + t.true(__1.default.iterable('')); + t.true(__1.default.iterable([])); + t.true(__1.default.iterable(new Map())); + t.false(__1.default.iterable(null)); + t.false(__1.default.iterable(undefined)); + t.false(__1.default.iterable(0)); + t.false(__1.default.iterable(NaN)); + t.false(__1.default.iterable(Infinity)); + t.false(__1.default.iterable({})); +}); +ava_1.default('is.class', t => { + class Foo { + } + const classDeclarations = [ + Foo, + class Bar extends Foo { + } + ]; + for (const x of classDeclarations) { + t.true(__1.default.class_(x)); + } +}); +ava_1.default('is.typedArray', t => { + const typedArrays = [ + new Int8Array(0), + new Uint8Array(0), + new Uint8ClampedArray(0), + new Uint16Array(0), + new Int32Array(0), + new Uint32Array(0), + new Float32Array(0), + new Float64Array(0) + ]; + for (const el of typedArrays) { + t.true(__1.default.typedArray(el)); + } + t.false(__1.default.typedArray(new ArrayBuffer(1))); + t.false(__1.default.typedArray([])); + t.false(__1.default.typedArray({})); +}); +ava_1.default('is.arrayLike', t => { + (() => { + t.true(__1.default.arrayLike(arguments)); + })(); + t.true(__1.default.arrayLike([])); + t.true(__1.default.arrayLike('unicorn')); + t.false(__1.default.arrayLike({})); + t.false(__1.default.arrayLike(() => { })); + t.false(__1.default.arrayLike(new Map())); +}); +ava_1.default('is.inRange', t => { + const x = 3; + t.true(__1.default.inRange(x, [0, 5])); + t.true(__1.default.inRange(x, [5, 0])); + t.true(__1.default.inRange(x, [-5, 5])); + t.true(__1.default.inRange(x, [5, -5])); + t.false(__1.default.inRange(x, [4, 8])); + t.true(__1.default.inRange(-7, [-5, -10])); + t.true(__1.default.inRange(-5, [-5, -10])); + t.true(__1.default.inRange(-10, [-5, -10])); + t.true(__1.default.inRange(x, 10)); + t.true(__1.default.inRange(0, 0)); + t.true(__1.default.inRange(-2, -3)); + t.false(__1.default.inRange(x, 2)); + t.false(__1.default.inRange(-3, -2)); + t.throws(() => { + __1.default.inRange(0, []); + }); + t.throws(() => { + __1.default.inRange(0, [5]); + }); + t.throws(() => { + __1.default.inRange(0, [1, 2, 3]); + }); +}); +ava_1.default('is.domElement', t => { + testType(t, 'domElement'); + t.false(__1.default.domElement({ nodeType: 1, nodeName: 'div' })); +}); +ava_1.default('is.infinite', t => { + testType(t, 'infinite', ['number']); +}); +ava_1.default('is.even', t => { + for (const el of [-6, 2, 4]) { + t.true(__1.default.even(el)); + } + for (const el of [-3, 1, 5]) { + t.false(__1.default.even(el)); + } +}); +ava_1.default('is.odd', t => { + for (const el of [-5, 7, 13]) { + t.true(__1.default.odd(el)); + } + for (const el of [-8, 8, 10]) { + t.false(__1.default.odd(el)); + } +}); +ava_1.default('is.empty', t => { + t.true(__1.default.empty(null)); + t.true(__1.default.empty(undefined)); + t.true(__1.default.empty(false)); + t.false(__1.default.empty(true)); + t.true(__1.default.empty('')); + t.false(__1.default.empty('🦄')); + t.true(__1.default.empty([])); + t.false(__1.default.empty(['🦄'])); + t.true(__1.default.empty({})); + t.false(__1.default.empty({ unicorn: '🦄' })); + const tempMap = new Map(); + t.true(__1.default.empty(tempMap)); + tempMap.set('unicorn', '🦄'); + t.false(__1.default.empty(tempMap)); + const tempSet = new Set(); + t.true(__1.default.empty(tempSet)); + tempSet.add(1); + t.false(__1.default.empty(tempSet)); +}); +ava_1.default('is.emptyOrWhitespace', t => { + t.true(__1.default.emptyOrWhitespace('')); + t.true(__1.default.emptyOrWhitespace(' ')); + t.false(__1.default.emptyOrWhitespace('🦄')); + t.false(__1.default.emptyOrWhitespace('unicorn')); +}); +ava_1.default('is.any', t => { + t.true(__1.default.any(__1.default.string, {}, true, '🦄')); + t.true(__1.default.any(__1.default.object, false, {}, 'unicorns')); + t.false(__1.default.any(__1.default.boolean, '🦄', [], 3)); + t.false(__1.default.any(__1.default.integer, true, 'lol', {})); + t.throws(() => { + __1.default.any(null, true); + }); + t.throws(() => { + __1.default.any(__1.default.string); + }); +}); +ava_1.default('is.all', t => { + t.true(__1.default.all(__1.default.object, {}, new Set(), new Map())); + t.true(__1.default.all(__1.default.boolean, true, false)); + t.false(__1.default.all(__1.default.string, '🦄', [])); + t.false(__1.default.all(__1.default.set, new Map(), {})); + t.throws(() => { + __1.default.all(null, true); + }); + t.throws(() => { + __1.default.all(__1.default.string); + }); +}); +//# sourceMappingURL=test.js.map \ No newline at end of file diff --git a/code/application_liste/app/node_modules/@sindresorhus/is/dist/source/tests/test.js.map b/code/application_liste/app/node_modules/@sindresorhus/is/dist/source/tests/test.js.map new file mode 100644 index 0000000..ab9ec15 --- /dev/null +++ b/code/application_liste/app/node_modules/@sindresorhus/is/dist/source/tests/test.js.map @@ -0,0 +1 @@ +{"version":3,"file":"test.js","sourceRoot":"","sources":["../../../source/tests/test.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,6BAA6B;AAC7B,6BAA+C;AAC/C,iCAA4B;AAC5B,0BAAmB;AAEnB,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAKzE,0BAA2B,SAAQ,KAAK;CAAG;AAE3C,MAAM,QAAQ,GAAG,aAAK,EAAE,CAAC;AACzB,MAAM,gBAAgB,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;AAOpE,MAAM,KAAK,GAAG,IAAI,GAAG,CAAe;IACnC,CAAC,WAAW,EAAE;YACb,EAAE,EAAE,WAAC,CAAC,SAAS;YACf,QAAQ,EAAE;gBACT,SAAS;aACT;SACD,CAAC;IACF,CAAC,MAAM,EAAE;YACR,EAAE,EAAE,WAAC,CAAC,KAAK;YACX,QAAQ,EAAE;gBACT,IAAI;aACJ;SACD,CAAC;IACF,CAAC,QAAQ,EAAE;YACV,EAAE,EAAE,WAAC,CAAC,MAAM;YACZ,QAAQ,EAAE;gBACT,IAAI;gBACJ,aAAa;gBACb,EAAE;aACF;SACD,CAAC;IACF,CAAC,QAAQ,EAAE;YACV,EAAE,EAAE,WAAC,CAAC,MAAM;YACZ,QAAQ,EAAE;gBACT,CAAC;gBACD,GAAG;gBACH,CAAC;gBACD,CAAC,CAAC;gBACF,QAAQ;gBACR,CAAC,QAAQ;aACT;SACD,CAAC;IACF,CAAC,SAAS,EAAE;YACX,EAAE,EAAE,WAAC,CAAC,OAAO;YACb,QAAQ,EAAE;gBACT,IAAI,EAAE,KAAK;aACX;SACD,CAAC;IACF,CAAC,QAAQ,EAAE;YACV,EAAE,EAAE,WAAC,CAAC,MAAM;YACZ,QAAQ,EAAE;gBACT,MAAM,CAAC,IAAI,CAAC;aACZ;SACD,CAAC;IACF,CAAC,OAAO,EAAE;YACT,EAAE,EAAE,WAAC,CAAC,KAAK;YACX,QAAQ,EAAE;gBACT,CAAC,CAAC,EAAE,CAAC,CAAC;gBACN,IAAI,KAAK,CAAC,CAAC,CAAC;aACZ;SACD,CAAC;IACF,CAAC,UAAU,EAAE;YACZ,EAAE,EAAE,WAAC,CAAC,SAAS;YACf,QAAQ,EAAE;gBAET,iBAAgB,CAAC;gBACjB,cAAY,CAAC;gBACb,GAAG,EAAE,GAAE,CAAC;gBACR;0EAAkB,CAAC;iBAAA;gBACnB,QAAS,CAAC,MAAS,CAAC;aAEpB;SACD,CAAC;IACF,CAAC,QAAQ,EAAE;YACV,EAAE,EAAE,WAAC,CAAC,MAAM;YACZ,QAAQ,EAAE;gBACT,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;aACjB;SACD,CAAC;IACF,CAAC,QAAQ,EAAE;YACV,EAAE,EAAE,WAAC,CAAC,MAAM;YACZ,QAAQ,EAAE;gBACT,EAAC,CAAC,EAAE,CAAC,EAAC;gBACN,MAAM,CAAC,MAAM,CAAC,EAAC,CAAC,EAAE,CAAC,EAAC,CAAC;aACrB;SACD,CAAC;IACF,CAAC,QAAQ,EAAE;YACV,EAAE,EAAE,WAAC,CAAC,MAAM;YACZ,QAAQ,EAAE;gBACT,IAAI;gBACJ,IAAI,MAAM,CAAC,KAAK,CAAC;aACjB;SACD,CAAC;IACF,CAAC,MAAM,EAAE;YACR,EAAE,EAAE,WAAC,CAAC,IAAI;YACV,QAAQ,EAAE;gBACT,IAAI,IAAI,EAAE;aACV;SACD,CAAC;IACF,CAAC,OAAO,EAAE;YACT,EAAE,EAAE,WAAC,CAAC,KAAK;YACX,QAAQ,EAAE;gBACT,IAAI,KAAK,CAAC,IAAI,CAAC;gBACf,IAAI,oBAAoB,EAAE;aAC1B;SACD,CAAC;IACF,CAAC,eAAe,EAAE;YACjB,EAAE,EAAE,WAAC,CAAC,aAAa;YACnB,QAAQ,EAAE;gBACT,OAAO,CAAC,OAAO,EAAE;aAEjB;SACD,CAAC;IACF,CAAC,SAAS,EAAE;YACX,EAAE,EAAE,WAAC,CAAC,OAAO;YACb,QAAQ,EAAE;gBACT,EAAC,IAAI,KAAI,CAAC,EAAE,KAAK,KAAI,CAAC,EAAC;aACvB;SACD,CAAC;IACF,CAAC,WAAW,EAAE;YACb,EAAE,EAAE,WAAC,CAAC,SAAS;YACf,QAAQ,EAAE;gBACT,CAAC,QAAS,CAAC,MAAK,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;aAC7B;SACD,CAAC;IACF,CAAC,mBAAmB,EAAE;YACrB,EAAE,EAAE,WAAC,CAAC,iBAAiB;YACvB,QAAQ,EAAE;gBACT,QAAS,CAAC,MAAK,MAAM,CAAC,CAAC,CAAC,CAAC;aACzB;SACD,CAAC;IACF,CAAC,eAAe,EAAE;YACjB,EAAE,EAAE,WAAC,CAAC,aAAa;YACnB,QAAQ,EAAE;gBACT;0EAAkB,CAAC;iBAAA;gBACnB,GAAS,EAAE,gDAAE,CAAC,CAAA;aACd;SACD,CAAC;IACF,CAAC,KAAK,EAAE;YACP,EAAE,EAAE,WAAC,CAAC,GAAG;YACT,QAAQ,EAAE;gBACT,IAAI,GAAG,EAAE;aACT;SACD,CAAC;IACF,CAAC,KAAK,EAAE;YACP,EAAE,EAAE,WAAC,CAAC,GAAG;YACT,QAAQ,EAAE;gBACT,IAAI,GAAG,EAAE;aACT;SACD,CAAC;IACF,CAAC,SAAS,EAAE;YACX,EAAE,EAAE,WAAC,CAAC,OAAO;YACb,QAAQ,EAAE;gBACT,IAAI,OAAO,EAAE;aACb;SACD,CAAC;IACF,CAAC,SAAS,EAAE;YACX,EAAE,EAAE,WAAC,CAAC,OAAO;YACb,QAAQ,EAAE;gBACT,IAAI,OAAO,EAAE;aACb;SACD,CAAC;IACF,CAAC,WAAW,EAAE;YACb,EAAE,EAAE,WAAC,CAAC,SAAS;YACf,QAAQ,EAAE;gBACT,IAAI,SAAS,CAAC,CAAC,CAAC;aAChB;SACD,CAAC;IACF,CAAC,YAAY,EAAE;YACd,EAAE,EAAE,WAAC,CAAC,UAAU;YAChB,QAAQ,EAAE;gBACT,IAAI,UAAU,CAAC,CAAC,CAAC;aACjB;SACD,CAAC;IACF,CAAC,mBAAmB,EAAE;YACrB,EAAE,EAAE,WAAC,CAAC,iBAAiB;YACvB,QAAQ,EAAE;gBACT,IAAI,iBAAiB,CAAC,CAAC,CAAC;aACxB;SACD,CAAC;IACF,CAAC,YAAY,EAAE;YACd,EAAE,EAAE,WAAC,CAAC,UAAU;YAChB,QAAQ,EAAE;gBACT,IAAI,UAAU,CAAC,CAAC,CAAC;aACjB;SACD,CAAC;IACF,CAAC,aAAa,EAAE;YACf,EAAE,EAAE,WAAC,CAAC,WAAW;YACjB,QAAQ,EAAE;gBACT,IAAI,WAAW,CAAC,CAAC,CAAC;aAClB;SACD,CAAC;IACF,CAAC,YAAY,EAAE;YACd,EAAE,EAAE,WAAC,CAAC,UAAU;YAChB,QAAQ,EAAE;gBACT,IAAI,UAAU,CAAC,CAAC,CAAC;aACjB;SACD,CAAC;IACF,CAAC,aAAa,EAAE;YACf,EAAE,EAAE,WAAC,CAAC,WAAW;YACjB,QAAQ,EAAE;gBACT,IAAI,WAAW,CAAC,CAAC,CAAC;aAClB;SACD,CAAC;IACF,CAAC,cAAc,EAAE;YAChB,EAAE,EAAE,WAAC,CAAC,YAAY;YAClB,QAAQ,EAAE;gBACT,IAAI,YAAY,CAAC,CAAC,CAAC;aACnB;SACD,CAAC;IACF,CAAC,cAAc,EAAE;YAChB,EAAE,EAAE,WAAC,CAAC,YAAY;YAClB,QAAQ,EAAE;gBACT,IAAI,YAAY,CAAC,CAAC,CAAC;aACnB;SACD,CAAC;IACF,CAAC,aAAa,EAAE;YACf,EAAE,EAAE,WAAC,CAAC,WAAW;YACjB,QAAQ,EAAE;gBACT,IAAI,WAAW,CAAC,EAAE,CAAC;aACnB;SACD,CAAC;IACF,CAAC,KAAK,EAAE;YACP,EAAE,EAAE,WAAC,CAAC,GAAG;YACT,QAAQ,EAAE;gBACT,GAAG;gBACH,MAAM,CAAC,GAAG;aACV;SACD,CAAC;IACF,CAAC,iBAAiB,EAAE;YACnB,EAAE,EAAE,WAAC,CAAC,eAAe;YACrB,QAAQ,EAAE;gBACT,IAAI;gBACJ,SAAS;aACT;SACD,CAAC;IACF,CAAC,aAAa,EAAE;YACf,EAAE,EAAE,WAAC,CAAC,WAAW;YACjB,QAAQ,EAAE;gBACT,EAAC,CAAC,EAAE,CAAC,EAAC;gBACN,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;gBACnB,IAAI,MAAM,EAAE;aACZ;SACD,CAAC;IACF,CAAC,SAAS,EAAE;YACX,EAAE,EAAE,WAAC,CAAC,OAAO;YACb,QAAQ,EAAE;gBACT,CAAC;aACD;SACD,CAAC;IACF,CAAC,aAAa,EAAE;YACf,EAAE,EAAE,WAAC,CAAC,WAAW;YACjB,QAAQ,EAAE;gBACT,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC;gBACnB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC;aACpB;SACD,CAAC;IACF,CAAC,YAAY,EAAE;YACd,EAAE,EAAE,WAAC,CAAC,UAAU;YAChB,QAAQ,EAAE;gBACT,KAAK;gBACL,OAAO;gBACP,MAAM;gBACN,KAAK;gBACL,QAAQ;gBACR,QAAQ;aACR,CAAC,GAAG,CAAC,gBAAgB,CAAC;SAAE;KACzB,EAAE,CAAC,iBAAiB,EAAE;YACtB,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,WAAC,CAAC,UAAU,CAAC,KAAK,CAAC;YACjC,QAAQ,EAAE;gBACT,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC;gBAC/B,QAAQ,CAAC,2BAA2B,CAAC,gBAAgB,EAAE,kCAAkC,CAAC;gBAC1F,QAAQ,CAAC,aAAa,CAAC,mBAAmB,CAAC;gBAC3C,QAAQ;gBACR,QAAQ,CAAC,cAAc,CAAC,kBAAkB,CAAC,SAAS,EAAE,yBAAyB,EAAE,kDAAkD,CAAC;gBACpI,QAAQ,CAAC,sBAAsB,EAAE;aACjC;SACD,CAAC;IACF,CAAC,UAAU,EAAE;YACZ,EAAE,EAAG,WAAC,CAAC,QAAQ;YACf,QAAQ,EAAE;gBACT,QAAQ;gBACR,CAAC,QAAQ;aACT;SACD,CAAC;CACF,CAAC,CAAC;AAGH,MAAM,QAAQ,GAAG,CAAC,CAA6B,EAAE,IAAY,EAAE,OAAkB,EAAE,EAAE;IACpF,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAEjC,EAAE,CAAC,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC;QAC5B,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC;QAEjC,MAAM,CAAC;IACR,CAAC;IAED,MAAM,EAAC,EAAE,EAAC,GAAG,QAAQ,CAAC;IAEtB,GAAG,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,EAAC,QAAQ,EAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC;QAGvC,EAAE,CAAC,CAAC,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5C,QAAQ,CAAC;QACV,CAAC;QAED,MAAM,MAAM,GAAG,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAE/D,GAAG,CAAC,CAAC,MAAM,OAAO,IAAI,QAAQ,CAAC,CAAC,CAAC;YAChC,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,UAAU,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACxD,CAAC;IACF,CAAC;AACF,CAAC,CAAC;AAEF,aAAI,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE;IACd,CAAC,CAAC,EAAE,CAAC,WAAC,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;IACtB,CAAC,CAAC,EAAE,CAAC,WAAC,CAAC,SAAS,CAAC,EAAE,WAAW,CAAC,CAAC;AAGjC,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE;IACxB,QAAQ,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAC/C,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAC1C,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE;IACrB,QAAQ,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE;IACrB,QAAQ,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC;AACtE,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE;IACtB,QAAQ,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;AACxB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE;IACrB,QAAQ,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE;IACpB,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;AACtB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,aAAa,EAAE,CAAC,CAAC,EAAE;IACvB,QAAQ,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,mBAAmB,EAAE,eAAe,CAAC,CAAC,CAAC;AACjE,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE;IACrB,QAAQ,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE;IACrB,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAErC,EAAE,CAAC,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC;QAC5B,CAAC,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;QAEhC,MAAM,CAAC;IACR,CAAC;IAED,GAAG,CAAC,CAAC,MAAM,EAAE,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;QACpC,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;IACtB,CAAC;AACF,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE;IACrB,QAAQ,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;AACrB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE;IACpB,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;AACtB,CAAC,CAAC,CAAC;AAEH,EAAE,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC;IACrB,aAAI,CAAC,kBAAkB,EAAE,CAAC,CAAC,EAAE;QAC5B,QAAQ,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC;IAC9B,CAAC,CAAC,CAAC;IAEH,aAAI,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE;QACtB,QAAQ,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;AAKJ,CAAC;AAED,aAAI,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE;IACxB,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;AAC1B,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,sBAAsB,EAAE,CAAC,CAAC,EAAE;IAChC,QAAQ,CAAC,CAAC,EAAE,mBAAmB,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;AAChD,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE;IAClB,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE;IAClB,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE;IACtB,QAAQ,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;AACxB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE;IACtB,QAAQ,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;AACxB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE;IACxB,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;AAC1B,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,eAAe,EAAE,CAAC,CAAC,EAAE;IACzB,QAAQ,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;AACvC,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,sBAAsB,EAAE,CAAC,CAAC,EAAE;IAChC,QAAQ,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC;AAClC,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,eAAe,EAAE,CAAC,CAAC,EAAE;IACzB,QAAQ,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;AAC3B,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC,EAAE;IAC1B,QAAQ,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC;AAC5B,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,eAAe,EAAE,CAAC,CAAC,EAAE;IACzB,QAAQ,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;AAC3B,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC,EAAE;IAC1B,QAAQ,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC;AAC5B,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC,EAAE;IAC3B,QAAQ,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;AAC7B,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC,EAAE;IAC3B,QAAQ,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;AAC7B,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC,EAAE;IAC1B,QAAQ,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC;AAC5B,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,aAAa,EAAE,CAAC,CAAC,EAAE;IACvB,QAAQ,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC;AAC5B,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE;IACrB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IAC5B,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IACvB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,MAAM,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC;IAC5B,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC/B,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AACxB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE;IACpB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IACvB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACnB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IACpB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IACtB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IAC3B,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;AACtB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE;IAClB,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC,EAAE;IAC9B,QAAQ,CAAC,CAAC,EAAE,iBAAiB,EAAE,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;AACvD,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE;IACxB,MAAM,UAAU,GAAG;QAClB,SAAS;QACT,IAAI;QACJ,IAAI;QACJ,CAAC;QACD,QAAQ;QACR,CAAC,QAAQ;QACT,IAAI;QACJ,KAAK;QACL,MAAM,CAAC,IAAI,CAAC;KACZ,CAAC;IAEF,GAAG,CAAC,CAAC,MAAM,EAAE,IAAI,UAAU,CAAC,CAAC,CAAC;QAC7B,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;IACzB,CAAC;AACF,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE;IACtB,QAAQ,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC;IAClD,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;AACzB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC,EAAE;IAC1B,QAAQ,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;IAClD,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IACxC,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;AAC1C,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC,EAAE;IAC1B,QAAQ,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;AACnD,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,aAAa,EAAE,CAAC,CAAC,EAAE;IACvB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;IACvB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;IACvB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,QAAQ,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC;IAC9B,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;IAC1B,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;IAC/B,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;IACvB,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;IACzB,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC9B,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;AACzB,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE;IACpB;KAAY;IACZ,MAAM,iBAAiB,GAAG;QACzB,GAAG;QACH,SAAU,SAAQ,GAAG;SAAG;KACxB,CAAC;IAEF,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,iBAAiB,CAAC,CAAC,CAAC;QACnC,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IACrB,CAAC;AACF,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,eAAe,EAAE,CAAC,CAAC,EAAE;IAGzB,MAAM,WAAW,GAAG;QACnB,IAAI,SAAS,CAAC,CAAC,CAAC;QAChB,IAAI,UAAU,CAAC,CAAC,CAAC;QACjB,IAAI,iBAAiB,CAAC,CAAC,CAAC;QACxB,IAAI,WAAW,CAAC,CAAC,CAAC;QAClB,IAAI,UAAU,CAAC,CAAC,CAAC;QACjB,IAAI,WAAW,CAAC,CAAC,CAAC;QAClB,IAAI,YAAY,CAAC,CAAC,CAAC;QACnB,IAAI,YAAY,CAAC,CAAC,CAAC;KACnB,CAAC;IAEF,GAAG,CAAC,CAAC,MAAM,EAAE,IAAI,WAAW,CAAC,CAAC,CAAC;QAC9B,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;IAC1B,CAAC;IAED,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,UAAU,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1C,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;IAC1B,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;AAC3B,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE;IACxB,CAAC,GAAG,EAAE;QACL,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;IAChC,CAAC,CAAC,EAAE,CAAC;IACL,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;IACxB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;IAE/B,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;IACzB,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,SAAS,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC,CAAC;IAC/B,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,SAAS,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC;AACjC,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE;IACtB,MAAM,CAAC,GAAG,CAAC,CAAC;IAEZ,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7B,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7B,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9B,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9B,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9B,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAElC,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACzB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACxB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1B,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACzB,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAE3B,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE;QACb,WAAC,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;IAEH,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE;QACb,WAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACnB,CAAC,CAAC,CAAC;IAEH,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE;QACb,WAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACzB,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,eAAe,EAAE,CAAC,CAAC,EAAE;IACzB,QAAQ,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;IAC1B,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,UAAU,CAAC,EAAC,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAC,CAAC,CAAC,CAAC;AACvD,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,aAAa,EAAE,CAAC,CAAC,EAAE;IACvB,QAAQ,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;AACrC,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE;IACnB,GAAG,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7B,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IACpB,CAAC;IAED,GAAG,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7B,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IACrB,CAAC;AACF,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE;IAClB,GAAG,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;QAC9B,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;IACnB,CAAC;IAED,GAAG,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;QAC9B,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;IACpB,CAAC;AACF,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE;IACpB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IACtB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IAE3B,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IACvB,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IAEvB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IACpB,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IAEvB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IACpB,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAEzB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IACpB,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,KAAK,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC,CAAC;IAElC,MAAM,OAAO,GAAG,IAAI,GAAG,EAAE,CAAC;IAC1B,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IAEzB,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAC7B,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IAE1B,MAAM,OAAO,GAAG,IAAI,GAAG,EAAE,CAAC;IAC1B,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IAEzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACf,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AAC3B,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,sBAAsB,EAAE,CAAC,CAAC,EAAE;IAChC,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC,CAAC;IAChC,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC;IAClC,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC;AACzC,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE;IAClB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,GAAG,CAAC,WAAC,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;IACxC,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,GAAG,CAAC,WAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC;IAC/C,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,GAAG,CAAC,WAAC,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IACvC,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,GAAG,CAAC,WAAC,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;IAE3C,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE;QACb,WAAC,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACnB,CAAC,CAAC,CAAC;IAEH,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE;QACb,WAAC,CAAC,GAAG,CAAC,WAAC,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,aAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE;IAClB,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,GAAG,CAAC,WAAC,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,GAAG,EAAE,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC;IAClD,CAAC,CAAC,IAAI,CAAC,WAAC,CAAC,GAAG,CAAC,WAAC,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;IACtC,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,GAAG,CAAC,WAAC,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC,KAAK,CAAC,WAAC,CAAC,GAAG,CAAC,WAAC,CAAC,GAAG,EAAE,IAAI,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IAErC,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE;QACb,WAAC,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACnB,CAAC,CAAC,CAAC;IAEH,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE;QACb,WAAC,CAAC,GAAG,CAAC,WAAC,CAAC,MAAM,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/code/application_liste/app/node_modules/@sindresorhus/is/license b/code/application_liste/app/node_modules/@sindresorhus/is/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/code/application_liste/app/node_modules/@sindresorhus/is/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/@sindresorhus/is/package.json b/code/application_liste/app/node_modules/@sindresorhus/is/package.json new file mode 100644 index 0000000..300d847 --- /dev/null +++ b/code/application_liste/app/node_modules/@sindresorhus/is/package.json @@ -0,0 +1,95 @@ +{ + "_from": "@sindresorhus/is@^0.7.0", + "_id": "@sindresorhus/is@0.7.0", + "_inBundle": false, + "_integrity": "sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==", + "_location": "/@sindresorhus/is", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@sindresorhus/is@^0.7.0", + "name": "@sindresorhus/is", + "escapedName": "@sindresorhus%2fis", + "scope": "@sindresorhus", + "rawSpec": "^0.7.0", + "saveSpec": null, + "fetchSpec": "^0.7.0" + }, + "_requiredBy": [ + "/bin-wrapper/got" + ], + "_resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz", + "_shasum": "9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd", + "_spec": "@sindresorhus/is@^0.7.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\bin-wrapper\\node_modules\\got", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/is/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Type check values: `is.string('🦄') //=> true`", + "devDependencies": { + "@types/jsdom": "^2.0.31", + "@types/node": "^8.0.47", + "@types/tempy": "^0.1.0", + "ava": "*", + "del-cli": "^1.1.0", + "jsdom": "^9.12.0", + "tempy": "^0.2.1", + "tslint": "^5.8.0", + "tslint-xo": "^0.3.0", + "typescript": "^2.6.1" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "dist" + ], + "homepage": "https://github.com/sindresorhus/is#readme", + "keywords": [ + "type", + "types", + "is", + "check", + "checking", + "validate", + "validation", + "utility", + "util", + "typeof", + "instanceof", + "object", + "assert", + "assertion", + "test", + "kind", + "primitive", + "verify", + "compare" + ], + "license": "MIT", + "main": "dist/index.js", + "name": "@sindresorhus/is", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/is.git" + }, + "scripts": { + "build": "tsc", + "lint": "tslint --format stylish --project .", + "prepublish": "npm run build && del dist/tests", + "test": "npm run lint && npm run build && ava dist/tests" + }, + "types": "dist/index.d.ts", + "version": "0.7.0" +} diff --git a/code/application_liste/app/node_modules/@sindresorhus/is/readme.md b/code/application_liste/app/node_modules/@sindresorhus/is/readme.md new file mode 100644 index 0000000..67fad06 --- /dev/null +++ b/code/application_liste/app/node_modules/@sindresorhus/is/readme.md @@ -0,0 +1,323 @@ +# is [![Build Status](https://travis-ci.org/sindresorhus/is.svg?branch=master)](https://travis-ci.org/sindresorhus/is) + +> Type check values: `is.string('🦄') //=> true` + + + + +## Install + +``` +$ npm install @sindresorhus/is +``` + + +## Usage + +```js +const is = require('@sindresorhus/is'); + +is('🦄'); +//=> 'string' + +is(new Map()); +//=> 'Map' + +is.number(6); +//=> true +``` + + +## API + +### is(value) + +Returns the type of `value`. + +Primitives are lowercase and object types are camelcase. + +Example: + +- `'undefined'` +- `'null'` +- `'string'` +- `'symbol'` +- `'Array'` +- `'Function'` +- `'Object'` + +Note: It will throw if you try to feed it object-wrapped primitives, as that's a bad practice. For example `new String('foo')`. + +### is.{method} + +All the below methods accept a value and returns a boolean for whether the value is of the desired type. + +#### Primitives + +##### .undefined(value) +##### .null(value) +##### .string(value) +##### .number(value) +##### .boolean(value) +##### .symbol(value) + +#### Built-in types + +##### .array(value) +##### .function(value) +##### .buffer(value) +##### .object(value) + +Keep in mind that [functions are objects too](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions). + +##### .regExp(value) +##### .date(value) +##### .error(value) +##### .nativePromise(value) +##### .promise(value) + +Returns `true` for any object with a `.then()` and `.catch()` method. Prefer this one over `.nativePromise()` as you usually want to allow userland promise implementations too. + +##### .generator(value) + +Returns `true` for any object that implements its own `.next()` and `.throw()` methods and has a function definition for `Symbol.iterator`. + +##### .generatorFunction(value) + +##### .asyncFunction(value) + +Returns `true` for any `async` function that can be called with the `await` operator. + +```js +is.asyncFunction(async () => {}); +// => true + +is.asyncFunction(() => {}); +// => false +``` + +##### .boundFunction(value) + +Returns `true` for any `bound` function. + +```js +is.boundFunction(() => {}); +// => true + +is.boundFunction(function () {}.bind(null)); +// => true + +is.boundFunction(function () {}); +// => false +``` + +##### .map(value) +##### .set(value) +##### .weakMap(value) +##### .weakSet(value) + +#### Typed arrays + +##### .int8Array(value) +##### .uint8Array(value) +##### .uint8ClampedArray(value) +##### .int16Array(value) +##### .uint16Array(value) +##### .int32Array(value) +##### .uint32Array(value) +##### .float32Array(value) +##### .float64Array(value) + +#### Structured data + +##### .arrayBuffer(value) +##### .sharedArrayBuffer(value) +##### .dataView(value) + +#### Miscellaneous + +##### .directInstanceOf(value, class) + +Returns `true` if `value` is a direct instance of `class`. + +```js +is.directInstanceOf(new Error(), Error); +//=> true + +class UnicornError extends Error {}; + +is.directInstanceOf(new UnicornError(), Error); +//=> false +``` + +##### .truthy(value) + +Returns `true` for all values that evaluate to true in a boolean context: + +```js +is.truthy('🦄'); +//=> true + +is.truthy(undefined); +//=> false +``` + +##### .falsy(value) + +Returns `true` if `value` is one of: `false`, `0`, `''`, `null`, `undefined`, `NaN`. + +##### .nan(value) +##### .nullOrUndefined(value) +##### .primitive(value) + +JavaScript primitives are as follows: `null`, `undefined`, `string`, `number`, `boolean`, `symbol`. + +##### .integer(value) + +##### .safeInteger(value) + +Returns `true` if `value` is a [safe integer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger). + +##### .plainObject(value) + +An object is plain if it's created by either `{}`, `new Object()`, or `Object.create(null)`. + +##### .iterable(value) +##### .class(value) + +Returns `true` for instances created by a ES2015 class. + +##### .typedArray(value) + +##### .arrayLike(value) + +A `value` is array-like if it is not a function and has a `value.length` that is a safe integer greater than or equal to 0. + +```js +is.arrayLike(document.forms); +//=> true + +function () { + is.arrayLike(arguments); + //=> true +} +``` + +##### .inRange(value, range) + +Check if `value` (number) is in the given `range`. The range is an array of two values, lower bound and upper bound, in no specific order. + +```js +is.inRange(3, [0, 5]); +is.inRange(3, [5, 0]); +is.inRange(0, [-2, 2]); +``` + +##### .inRange(value, upperBound) + +Check if `value` (number) is in the range of `0` to `upperBound`. + +```js +is.inRange(3, 10); +``` + +##### .domElement(value) + +Returns `true` if `value` is a DOM Element. + +##### .nodeStream(value) + +Returns `true` if `value` is a Node.js [stream](https://nodejs.org/api/stream.html). + +```js +const fs = require('fs'); +is.nodeStream(fs.createReadStream('unicorn.png')); +//=> true +``` + +##### .infinite(value) + +Check if `value` is `Infinity` or `-Infinity`. + +##### .even(value) + +Returns `true` if `value` is an even integer. + +##### .odd(value) + +Returns `true` if `value` is an odd integer. + +##### .empty(value) + +Returns `true` if `value` is falsy or an empty string, array, object, map, or set. + +##### .emptyOrWhitespace(value) + +Returns `true` if `is.empty(value)` or a string that is all whitespace. + + +##### .any(predicate, ...values) + +Returns `true` if **any** of the input `values` returns true in the `predicate`: + +```js +is.any(is.string, {}, true, '🦄'); +//=> true + +is.any(is.boolean, 'unicorns', [], new Map()); +//=> false +``` + +##### .all(predicate, ...values) + +Returns `true` if **all** of the input `values` returns true in the `predicate`: + +```js +is.all(is.object, {}, new Map(), new Set()); +//=> true + +is.all(is.string, '🦄', [], 'unicorns'); +//=> false +``` + +## FAQ + +### Why yet another type checking module? + +There are hundreds of type checking modules on npm, unfortunately, I couldn't find any that fit my needs: + +- Includes both type methods and ability to get the type +- Types of primitives returned as lowercase and object types as camelcase +- Covers all built-ins +- Unsurprising behavior +- Well-maintained +- Comprehensive test suite + +For the ones I found, pick 3 of these. + +The most common mistakes I noticed in these modules was using `instanceof` for type checking, forgetting that functions are objects, and omitting `symbol` as a primitive. + + +## Related + +- [is-stream](https://github.com/sindresorhus/is-stream) - Check if something is a Node.js stream +- [is-observable](https://github.com/sindresorhus/is-observable) - Check if a value is an Observable +- [file-type](https://github.com/sindresorhus/file-type) - Detect the file type of a Buffer/Uint8Array +- [is-ip](https://github.com/sindresorhus/is-ip) - Check if a string is an IP address +- [is-array-sorted](https://github.com/sindresorhus/is-array-sorted) - Check if an Array is sorted +- [is-error-constructor](https://github.com/sindresorhus/is-error-constructor) - Check if a value is an error constructor +- [is-empty-iterable](https://github.com/sindresorhus/is-empty-iterable) - Check if an Iterable is empty +- [is-blob](https://github.com/sindresorhus/is-blob) - Check if a value is a Blob - File-like object of immutable, raw data +- [has-emoji](https://github.com/sindresorhus/has-emoji) - Check whether a string has any emoji + + +## Created by + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Giora Guttsait](https://github.com/gioragutt) +- [Brandon Smith](https://github.com/brandon93s) + + +## License + +MIT diff --git a/code/application_liste/app/node_modules/@types/q/LICENSE b/code/application_liste/app/node_modules/@types/q/LICENSE new file mode 100644 index 0000000..9e841e7 --- /dev/null +++ b/code/application_liste/app/node_modules/@types/q/LICENSE @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/code/application_liste/app/node_modules/@types/q/README.md b/code/application_liste/app/node_modules/@types/q/README.md new file mode 100644 index 0000000..537777e --- /dev/null +++ b/code/application_liste/app/node_modules/@types/q/README.md @@ -0,0 +1,16 @@ +# Installation +> `npm install --save @types/q` + +# Summary +This package contains type definitions for Q (https://github.com/kriskowal/q). + +# Details +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/q. + +### Additional Details + * Last updated: Fri, 15 May 2020 23:04:11 GMT + * Dependencies: none + * Global values: `Q` + +# Credits +These definitions were written by [Barrie Nemetchek](https://github.com/bnemetchek), [Andrew Gaspar](https://github.com/AndrewGaspar), [John Reilly](https://github.com/johnnyreilly), [Michel Boudreau](https://github.com/mboudreau), and [TeamworkGuy2](https://github.com/TeamworkGuy2). diff --git a/code/application_liste/app/node_modules/@types/q/index.d.ts b/code/application_liste/app/node_modules/@types/q/index.d.ts new file mode 100644 index 0000000..d4f4c52 --- /dev/null +++ b/code/application_liste/app/node_modules/@types/q/index.d.ts @@ -0,0 +1,603 @@ +// Type definitions for Q 1.5 +// Project: https://github.com/kriskowal/q +// Definitions by: Barrie Nemetchek +// Andrew Gaspar +// John Reilly +// Michel Boudreau +// TeamworkGuy2 +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +export = Q; +export as namespace Q; + +/** + * If value is a Q promise, returns the promise. + * If value is a promise from another library it is coerced into a Q promise (where possible). + * If value is not a promise, returns a promise that is fulfilled with value. + */ +declare function Q(promise: PromiseLike | T): Q.Promise; +/** + * Calling with nothing at all creates a void promise + */ +declare function Q(): Q.Promise; + +declare namespace Q { + export type IWhenable = PromiseLike | T; + export type IPromise = PromiseLike; + + export interface Deferred { + promise: Promise; + + /** + * Calling resolve with a pending promise causes promise to wait on the passed promise, becoming fulfilled with its + * fulfillment value or rejected with its rejection reason (or staying pending forever, if the passed promise does). + * Calling resolve with a rejected promise causes promise to be rejected with the passed promise's rejection reason. + * Calling resolve with a fulfilled promise causes promise to be fulfilled with the passed promise's fulfillment value. + * Calling resolve with a non-promise value causes promise to be fulfilled with that value. + */ + resolve(value?: IWhenable): void; + + /** + * Calling reject with a reason causes promise to be rejected with that reason. + */ + reject(reason?: any): void; + + /** + * Calling notify with a value causes promise to be notified of progress with that value. That is, any onProgress + * handlers registered with promise or promises derived from promise will be called with the progress value. + */ + notify(value: any): void; + + /** + * Returns a function suitable for passing to a Node.js API. That is, it has a signature (err, result) and will + * reject deferred.promise with err if err is given, or fulfill it with result if that is given. + */ + makeNodeResolver(): (reason: any, value: T) => void; + } + + export interface Promise { + /** + * The then method from the Promises/A+ specification, with an additional progress handler. + */ + then(onFulfill?: ((value: T) => IWhenable) | null, onReject?: ((error: any) => IWhenable) | null, onProgress?: ((progress: any) => any) | null): Promise; + then(onFulfill?: ((value: T) => IWhenable) | null, onReject?: ((error: any) => IWhenable) | null, onProgress?: ((progress: any) => any) | null): Promise; + /** + * Like a finally clause, allows you to observe either the fulfillment or rejection of a promise, but to do so + * without modifying the final value. This is useful for collecting resources regardless of whether a job succeeded, + * like closing a database connection, shutting a server down, or deleting an unneeded key from an object. + * finally returns a promise, which will become resolved with the same fulfillment value or rejection reason + * as promise. However, if callback returns a promise, the resolution of the returned promise will be delayed + * until the promise returned from callback is finished. Furthermore, if the returned promise rejects, that + * rejection will be passed down the chain instead of the previous result. + */ + finally(finallyCallback: () => any): Promise; + + /** + * Alias for finally() (for non-ES5 browsers) + */ + fin(finallyCallback: () => any): Promise; + + /** + * Like then, but "spreads" the array into a variadic fulfillment handler. If any of the promises in the array are + * rejected, instead calls onRejected with the first rejected promise's rejection reason. + * This is especially useful in conjunction with all + */ + spread(onFulfill: (...args: any[]) => IWhenable, onReject?: (reason: any) => IWhenable): Promise; + + /** + * A sugar method, equivalent to promise.then(undefined, onRejected). + */ + catch(onRejected: (reason: any) => IWhenable): Promise; + + /** + * Alias for catch() (for non-ES5 browsers) + */ + fail(onRejected: (reason: any) => IWhenable): Promise; + + /** + * A sugar method, equivalent to promise.then(undefined, undefined, onProgress). + */ + progress(onProgress: (progress: any) => any): Promise; + + /** + * Much like then, but with different behavior around unhandled rejection. If there is an unhandled rejection, + * either because promise is rejected and no onRejected callback was provided, or because onFulfilled or onRejected + * threw an error or returned a rejected promise, the resulting rejection reason is thrown as an exception in a + * future turn of the event loop. + * This method should be used to terminate chains of promises that will not be passed elsewhere. Since exceptions + * thrown in then callbacks are consumed and transformed into rejections, exceptions at the end of the chain are + * easy to accidentally, silently ignore. By arranging for the exception to be thrown in a future turn of the + * event loop, so that it won't be caught, it causes an onerror event on the browser window, or an uncaughtException + * event on Node.js's process object. + * Exceptions thrown by done will have long stack traces, if Q.longStackSupport is set to true. If Q.onerror is set, + * exceptions will be delivered there instead of thrown in a future turn. + * The Golden Rule of done vs. then usage is: either return your promise to someone else, or if the chain ends + * with you, call done to terminate it. Terminating with catch is not sufficient because the catch handler may + * itself throw an error. + */ + done(onFulfilled?: ((value: T) => any) | null, onRejected?: ((reason: any) => any) | null, onProgress?: ((progress: any) => any) | null): void; + + /** + * If callback is a function, assumes it's a Node.js-style callback, and calls it as either callback(rejectionReason) + * when/if promise becomes rejected, or as callback(null, fulfillmentValue) when/if promise becomes fulfilled. + * If callback is not a function, simply returns promise. + */ + nodeify(callback: (reason: any, value: any) => void): Promise; + + /** + * Returns a promise to get the named property of an object. Essentially equivalent to + * + * @example + * promise.then(function (o) { return o[propertyName]; }); + */ + get(propertyName: string): Promise; + + set(propertyName: string, value: any): Promise; + + delete(propertyName: string): Promise; + + /** + * Returns a promise for the result of calling the named method of an object with the given array of arguments. + * The object itself is this in the function, just like a synchronous method call. Essentially equivalent to + * + * @example + * promise.then(function (o) { return o[methodName].apply(o, args); }); + */ + post(methodName: string, args: any[]): Promise; + + /** + * Returns a promise for the result of calling the named method of an object with the given variadic arguments. + * The object itself is this in the function, just like a synchronous method call. + */ + invoke(methodName: string, ...args: any[]): Promise; + + /** + * Returns a promise for an array of the property names of an object. Essentially equivalent to + * + * @example + * promise.then(function (o) { return Object.keys(o); }); + */ + keys(): Promise; + + /** + * Returns a promise for the result of calling a function, with the given array of arguments. Essentially equivalent to + * + * @example + * promise.then(function (f) { + * return f.apply(undefined, args); + * }); + */ + fapply(args: any[]): Promise; + + /** + * Returns a promise for the result of calling a function, with the given variadic arguments. Has the same return + * value/thrown exception translation as explained above for fbind. + * In its static form, it is aliased as Q.try, since it has semantics similar to a try block (but handling both + * synchronous exceptions and asynchronous rejections). This allows code like + * + * @example + * Q.try(function () { + * if (!isConnectedToCloud()) { + * throw new Error("The cloud is down!"); + * } + * return syncToCloud(); + * }) + * .catch(function (error) { + * console.error("Couldn't sync to the cloud", error); + * }); + */ + fcall(...args: any[]): Promise; + + /** + * A sugar method, equivalent to promise.then(function () { return value; }). + */ + thenResolve(value: U): Promise; + + /** + * A sugar method, equivalent to promise.then(function () { throw reason; }). + */ + thenReject(reason?: any): Promise; + + /** + * Attaches a handler that will observe the value of the promise when it becomes fulfilled, returning a promise for + * that same value, perhaps deferred but not replaced by the promise returned by the onFulfilled handler. + */ + tap(onFulfilled: (value: T) => any): Promise; + + /** + * Returns a promise that will have the same result as promise, except that if promise is not fulfilled or rejected + * before ms milliseconds, the returned promise will be rejected with an Error with the given message. If message + * is not supplied, the message will be "Timed out after " + ms + " ms". + */ + timeout(ms: number, message?: string): Promise; + + /** + * Returns a promise that will have the same result as promise, but will only be fulfilled or rejected after at least + * ms milliseconds have passed. + */ + delay(ms: number): Promise; + + /** + * Returns whether a given promise is in the fulfilled state. When the static version is used on non-promises, the + * result is always true. + */ + isFulfilled(): boolean; + + /** + * Returns whether a given promise is in the rejected state. When the static version is used on non-promises, the + * result is always false. + */ + isRejected(): boolean; + + /** + * Returns whether a given promise is in the pending state. When the static version is used on non-promises, the + * result is always false. + */ + isPending(): boolean; + + valueOf(): any; + + /** + * Returns a "state snapshot" object, which will be in one of three forms: + * + * - { state: "pending" } + * - { state: "fulfilled", value: } + * - { state: "rejected", reason: } + */ + inspect(): PromiseState; + } + + export interface PromiseState { + state: "fulfilled" | "rejected" | "pending"; + value?: T; + reason?: any; + } + + /** + * Returns a "deferred" object with a: + * promise property + * resolve(value) method + * reject(reason) method + * notify(value) method + * makeNodeResolver() method + */ + export function defer(): Deferred; + + /** + * Calling resolve with a pending promise causes promise to wait on the passed promise, becoming fulfilled with its + * fulfillment value or rejected with its rejection reason (or staying pending forever, if the passed promise does). + * Calling resolve with a rejected promise causes promise to be rejected with the passed promise's rejection reason. + * Calling resolve with a fulfilled promise causes promise to be fulfilled with the passed promise's fulfillment value. + * Calling resolve with a non-promise value causes promise to be fulfilled with that value. + */ + export function resolve(object?: IWhenable): Promise; + + /** + * Returns a promise that is rejected with reason. + */ + export function reject(reason?: any): Promise; + + // If no value provided, returned promise will be of void type + export function when(): Promise; + + // if no fulfill, reject, or progress provided, returned promise will be of same type + export function when(value: IWhenable): Promise; + + // If a non-promise value is provided, it will not reject or progress + export function when( + value: IWhenable, + onFulfilled: (val: T) => IWhenable, + onRejected?: ((reason: any) => IWhenable) | null, + onProgress?: ((progress: any) => any) | null + ): Promise; + + /** + * (Deprecated) Returns a new function that calls a function asynchronously with the given variadic arguments, and returns a promise. + * Notably, any synchronous return values or thrown exceptions are transformed, respectively, into fulfillment values + * or rejection reasons for the promise returned by this new function. + * This method is especially useful in its static form for wrapping functions to ensure that they are always + * asynchronous, and that any thrown exceptions (intentional or accidental) are appropriately transformed into a + * returned rejected promise. For example: + * + * @example + * var getUserData = Q.fbind(function (userName) { + * if (!userName) { + * throw new Error("userName must be truthy!"); + * } + * if (localCache.has(userName)) { + * return localCache.get(userName); + * } + * return getUserFromCloud(userName); + * }); + */ + export function fbind(method: (...args: any[]) => IWhenable, ...args: any[]): (...args: any[]) => Promise; + + /** + * Returns a promise for the result of calling a function, with the given variadic arguments. Has the same return + * value/thrown exception translation as explained above for fbind. + * In its static form, it is aliased as Q.try, since it has semantics similar to a try block (but handling both synchronous + * exceptions and asynchronous rejections). This allows code like + * + * @example + * Q.try(function () { + * if (!isConnectedToCloud()) { + * throw new Error("The cloud is down!"); + * } + * return syncToCloud(); + * }) + * .catch(function (error) { + * console.error("Couldn't sync to the cloud", error); + * }); + */ + export function fcall(method: (...args: any[]) => T, ...args: any[]): Promise; + + // but 'try' is a reserved word. This is the only way to get around this + /** + * Alias for fcall() + */ + export { fcall as try }; + + /** + * Returns a promise for the result of calling the named method of an object with the given variadic arguments. + * The object itself is this in the function, just like a synchronous method call. + */ + export function invoke(obj: any, functionName: string, ...args: any[]): Promise; + + /** + * Alias for invoke() + */ + export function send(obj: any, functionName: string, ...args: any[]): Promise; + + /** + * Alias for invoke() + */ + export function mcall(obj: any, functionName: string, ...args: any[]): Promise; + + /** + * Creates a promise-returning function from a Node.js-style function, optionally binding it with the given + * variadic arguments. An example: + * + * @example + * var readFile = Q.nfbind(FS.readFile); + * readFile("foo.txt", "utf-8").done(function (text) { + * //... + * }); + * + * Note that if you have a method that uses the Node.js callback pattern, as opposed to just a function, you will + * need to bind its this value before passing it to nfbind, like so: + * + * @example + * var Kitty = mongoose.model("Kitty"); + * var findKitties = Q.nfbind(Kitty.find.bind(Kitty)); + * + * The better strategy for methods would be to use Q.nbind, as shown below. + */ + export function nfbind(nodeFunction: (...args: any[]) => any, ...args: any[]): (...args: any[]) => Promise; + + /** + * Alias for nfbind() + */ + export function denodeify(nodeFunction: (...args: any[]) => any, ...args: any[]): (...args: any[]) => Promise; + + /** + * Creates a promise-returning function from a Node.js-style method, optionally binding it with the given + * variadic arguments. An example: + * + * @example + * var Kitty = mongoose.model("Kitty"); + * var findKitties = Q.nbind(Kitty.find, Kitty); + * findKitties({ cute: true }).done(function (theKitties) { + * //... + * }); + */ + export function nbind(nodeFunction: (...args: any[]) => any, thisArg: any, ...args: any[]): (...args: any[]) => Promise; + + /** + * Calls a Node.js-style function with the given array of arguments, returning a promise that is fulfilled if the + * Node.js function calls back with a result, or rejected if it calls back with an error + * (or throws one synchronously). An example: + * + * @example + * Q.nfapply(FS.readFile, ["foo.txt", "utf-8"]).done(function (text) { + * }); + * + * Note that this example only works because FS.readFile is a function exported from a module, not a method on + * an object. For methods, e.g. redisClient.get, you must bind the method to an instance before passing it to + * Q.nfapply (or, generally, as an argument to any function call): + * + * @example + * Q.nfapply(redisClient.get.bind(redisClient), ["user:1:id"]).done(function (user) { + * }); + * + * The better strategy for methods would be to use Q.npost, as shown below. + */ + export function nfapply(nodeFunction: (...args: any[]) => any, args: any[]): Promise; + + /** + * Calls a Node.js-style function with the given variadic arguments, returning a promise that is fulfilled if the + * Node.js function calls back with a result, or rejected if it calls back with an error + * (or throws one synchronously). An example: + * + * @example + * Q.nfcall(FS.readFile, "foo.txt", "utf-8").done(function (text) { + * }); + * + * The same warning about functions vs. methods applies for nfcall as it does for nfapply. In this case, the better + * strategy would be to use Q.ninvoke. + */ + export function nfcall(nodeFunction: (...args: any[]) => any, ...args: any[]): Promise; + + /** + * Calls a Node.js-style method with the given arguments array, returning a promise that is fulfilled if the method + * calls back with a result, or rejected if it calls back with an error (or throws one synchronously). An example: + * + * @example + * Q.npost(redisClient, "get", ["user:1:id"]).done(function (user) { + * }); + */ + export function npost(nodeModule: any, functionName: string, args: any[]): Promise; + + /** + * Calls a Node.js-style method with the given variadic arguments, returning a promise that is fulfilled if the + * method calls back with a result, or rejected if it calls back with an error (or throws one synchronously). An example: + * + * @example + * Q.ninvoke(redisClient, "get", "user:1:id").done(function (user) { + * }); + */ + export function ninvoke(nodeModule: any, functionName: string, ...args: any[]): Promise; + + /** + * Alias for ninvoke() + */ + export function nsend(nodeModule: any, functionName: string, ...args: any[]): Promise; + + /** + * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected. + */ + export function all(promises: IWhenable<[IWhenable, IWhenable, IWhenable, IWhenable, IWhenable, IWhenable]>): Promise<[A, B, C, D, E, F]>; + /** + * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected. + */ + export function all(promises: IWhenable<[IWhenable, IWhenable, IWhenable, IWhenable, IWhenable]>): Promise<[A, B, C, D, E]>; + /** + * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected. + */ + export function all(promises: IWhenable<[IWhenable, IWhenable, IWhenable, IWhenable]>): Promise<[A, B, C, D]>; + /** + * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected. + */ + export function all(promises: IWhenable<[IWhenable, IWhenable, IWhenable]>): Promise<[A, B, C]>; + /** + * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected. + */ + export function all(promises: IWhenable<[IPromise, IPromise]>): Promise<[A, B]>; + export function all(promises: IWhenable<[A, IPromise]>): Promise<[A, B]>; + export function all(promises: IWhenable<[IPromise, B]>): Promise<[A, B]>; + export function all(promises: IWhenable<[A, B]>): Promise<[A, B]>; + /** + * Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected. + */ + export function all(promises: IWhenable>>): Promise; + + /** + * Returns a promise for the first of an array of promises to become settled. + */ + export function race(promises: Array>): Promise; + + /** + * Returns a promise that is fulfilled with an array of promise state snapshots, but only after all the original promises + * have settled, i.e. become either fulfilled or rejected. + */ + export function allSettled(promises: IWhenable>>): Promise>>; + + /** + * Deprecated Alias for allSettled() + */ + export function allResolved(promises: IWhenable>>): Promise>>; + + /** + * Like then, but "spreads" the array into a variadic fulfillment handler. If any of the promises in the array are + * rejected, instead calls onRejected with the first rejected promise's rejection reason. This is especially useful + * in conjunction with all. + */ + export function spread(promises: Array>, onFulfilled: (...args: T[]) => IWhenable, onRejected?: (reason: any) => IWhenable): Promise; + + /** + * Returns a promise that will have the same result as promise, except that if promise is not fulfilled or rejected + * before ms milliseconds, the returned promise will be rejected with an Error with the given message. If message + * is not supplied, the message will be "Timed out after " + ms + " ms". + */ + export function timeout(promise: Promise, ms: number, message?: string): Promise; + + /** + * Returns a promise that will have the same result as promise, but will only be fulfilled or rejected after at least ms milliseconds have passed. + */ + export function delay(promiseOrValue: Promise | T, ms: number): Promise; + /** + * Returns a promise that will be fulfilled with undefined after at least ms milliseconds have passed. + */ + export function delay(ms: number): Promise; + + /** + * Returns whether a given promise is in the fulfilled state. When the static version is used on non-promises, the result is always true. + */ + export function isFulfilled(promise: Promise): boolean; + + /** + * Returns whether a given promise is in the rejected state. When the static version is used on non-promises, the result is always false. + */ + export function isRejected(promise: Promise): boolean; + + /** + * Returns whether a given promise is in the pending state. When the static version is used on non-promises, the result is always false. + */ + export function isPending(promiseOrObject: Promise | any): boolean; + + /** + * Synchronously calls resolver(resolve, reject, notify) and returns a promise whose state is controlled by the + * functions passed to resolver. This is an alternative promise-creation API that has the same power as the deferred + * concept, but without introducing another conceptual entity. + * If resolver throws an exception, the returned promise will be rejected with that thrown exception as the rejection reason. + * note: In the latest github, this method is called Q.Promise, but if you are using the npm package version 0.9.7 + * or below, the method is called Q.promise (lowercase vs uppercase p). + */ + export function Promise(resolver: (resolve: (val?: IWhenable) => void, reject: (reason?: any) => void, notify: (progress: any) => void) => void): Promise; + + /** + * Creates a new version of func that accepts any combination of promise and non-promise values, converting them to their + * fulfillment values before calling the original func. The returned version also always returns a promise: if func does + * a return or throw, then Q.promised(func) will return fulfilled or rejected promise, respectively. + * This can be useful for creating functions that accept either promises or non-promise values, and for ensuring that + * the function always returns a promise even in the face of unintentional thrown exceptions. + */ + export function promised(callback: (...args: any[]) => T): (...args: any[]) => Promise; + + /** + * Returns whether the given value is a Q promise. + */ + export function isPromise(object: any): object is Promise; + + /** + * Returns whether the given value is a promise (i.e. it's an object with a then function). + */ + export function isPromiseAlike(object: any): object is IPromise; + + /** + * If an object is not a promise, it is as "near" as possible. + * If a promise is rejected, it is as "near" as possible too. + * If it's a fulfilled promise, the fulfillment value is nearer. + * If it's a deferred promise and the deferred has been resolved, the + * resolution is "nearer". + */ + export function nearer(promise: Promise): T; + + /** + * This is an experimental tool for converting a generator function into a deferred function. This has the potential + * of reducing nested callbacks in engines that support yield. + */ + export function async(generatorFunction: any): (...args: any[]) => Promise; + + export function nextTick(callback: (...args: any[]) => any): void; + + /** + * A settable property that will intercept any uncaught errors that would otherwise be thrown in the next tick of the + * event loop, usually as a result of done. Can be useful for getting the full + * stack trace of an error in browsers, which is not usually possible with window.onerror. + */ + export let onerror: (reason: any) => void; + /** + * A settable property that lets you turn on long stack trace support. If turned on, "stack jumps" will be tracked + * across asynchronous promise operations, so that if an uncaught error is thrown by done or a rejection reason's stack + * property is inspected in a rejection callback, a long stack trace is produced. + */ + export let longStackSupport: boolean; + + /** + * Resets the global "Q" variable to the value it has before Q was loaded. + * This will either be undefined if there was no version or the version of Q which was already loaded before. + * @returns The last version of Q. + */ + export function noConflict(): typeof Q; +} diff --git a/code/application_liste/app/node_modules/@types/q/package.json b/code/application_liste/app/node_modules/@types/q/package.json new file mode 100644 index 0000000..4afb34a --- /dev/null +++ b/code/application_liste/app/node_modules/@types/q/package.json @@ -0,0 +1,69 @@ +{ + "_from": "@types/q@^1.5.1", + "_id": "@types/q@1.5.4", + "_inBundle": false, + "_integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==", + "_location": "/@types/q", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@types/q@^1.5.1", + "name": "@types/q", + "escapedName": "@types%2fq", + "scope": "@types", + "rawSpec": "^1.5.1", + "saveSpec": null, + "fetchSpec": "^1.5.1" + }, + "_requiredBy": [ + "/coa" + ], + "_resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz", + "_shasum": "15925414e0ad2cd765bfef58842f7e26a7accb24", + "_spec": "@types/q@^1.5.1", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\coa", + "bugs": { + "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Barrie Nemetchek", + "url": "https://github.com/bnemetchek" + }, + { + "name": "Andrew Gaspar", + "url": "https://github.com/AndrewGaspar" + }, + { + "name": "John Reilly", + "url": "https://github.com/johnnyreilly" + }, + { + "name": "Michel Boudreau", + "url": "https://github.com/mboudreau" + }, + { + "name": "TeamworkGuy2", + "url": "https://github.com/TeamworkGuy2" + } + ], + "dependencies": {}, + "deprecated": false, + "description": "TypeScript definitions for Q", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", + "license": "MIT", + "main": "", + "name": "@types/q", + "repository": { + "type": "git", + "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", + "directory": "types/q" + }, + "scripts": {}, + "typeScriptVersion": "3.0", + "types": "index.d.ts", + "typesPublisherContentHash": "468c45fb0acfd51599db9fd0186f40568f238a731e9d591452de2c66ac244221", + "version": "1.5.4" +} diff --git a/code/application_liste/app/node_modules/agent-base/.travis.yml b/code/application_liste/app/node_modules/agent-base/.travis.yml new file mode 100644 index 0000000..7620095 --- /dev/null +++ b/code/application_liste/app/node_modules/agent-base/.travis.yml @@ -0,0 +1,24 @@ +sudo: false + +language: node_js + +node_js: + - "4" + - "5" + - "6" + - "7" + - "8" + - "9" + - "10" + +install: + - PATH="`npm bin`:`npm bin -g`:$PATH" + # Install dependencies and build + - npm install + +script: + # Output useful info for debugging + - node --version + - npm --version + # Run tests + - npm test diff --git a/code/application_liste/app/node_modules/agent-base/History.md b/code/application_liste/app/node_modules/agent-base/History.md new file mode 100644 index 0000000..80c88dc --- /dev/null +++ b/code/application_liste/app/node_modules/agent-base/History.md @@ -0,0 +1,113 @@ + +4.2.0 / 2018-01-15 +================== + + * Add support for returning an `http.Agent` instance + * Optimize promisifying logic + * Set `timeout` to null for proper cleanup + * Remove Node.js <= 0.11.3 special-casing from test case + +4.1.2 / 2017-11-20 +================== + + * test Node 9 on Travis + * ensure that `https.get()` uses the patched `https.request()` + +4.1.1 / 2017-07-20 +================== + + * Correct `https.request()` with a String (#9) + +4.1.0 / 2017-06-26 +================== + + * mix in Agent options into Request options + * throw when nothing is returned from agent-base callback + * do not modify the options object for https requests + +4.0.1 / 2017-06-13 +================== + + * add `this` context tests and fixes + +4.0.0 / 2017-06-06 +================== + + * drop support for Node.js < 4 + * drop old versions of Node.js from Travis-CI + * specify Node.js >= 4.0.0 in `engines.node` + * remove more old code + * remove "extend" dependency + * remove "semver" dependency + * make the Promise logic a bit cleaner + * add async function pseudo-example to README + * use direct return in README example + +3.0.0 / 2017-06-02 +================== + + * drop support for Node.js v0.8 and v0.10 + * add support for async, Promises, and direct return + * add a couple `options` test cases + * implement a `"timeout"` option + * rename main file to `index.js` + * test Node 8 on Travis + +2.1.1 / 2017-05-30 +================== + + * Revert [`fe2162e`](https://github.com/TooTallNate/node-agent-base/commit/fe2162e0ba18123f5b301cba4de1e9dd74e437cd) and [`270bdc9`](https://github.com/TooTallNate/node-agent-base/commit/270bdc92eb8e3bd0444d1e5266e8e9390aeb3095) (fixes #7) + +2.1.0 / 2017-05-26 +================== + + * unref is not supported for node < 0.9.1 (@pi0) + * add tests to dangling socket (@pi0) + * check unref() is supported (@pi0) + * fix dangling sockets problem (@pi0) + * add basic "ws" module tests + * make `Agent` be subclassable + * turn `addRequest()` into a named function + * test: Node.js v4 likes to call `cork` on the stream (#3, @tomhughes) + * travis: test node v4, v5, v6 and v7 + +2.0.1 / 2015-09-10 +================== + + * package: update "semver" to v5.0.1 for WebPack (#1, @vhpoet) + +2.0.0 / 2015-07-10 +================== + + * refactor to patch Node.js core for more consistent `opts` values + * ensure that HTTP(s) default port numbers are always given + * test: use ssl-cert-snakeoil SSL certs + * test: add tests for arbitrary options + * README: add API section + * README: make the Agent HTTP/HTTPS generic in the example + * README: use SVG for Travis-CI badge + +1.0.2 / 2015-06-27 +================== + + * agent: set `req._hadError` to true after emitting "error" + * package: update "mocha" to v2 + * test: add artificial HTTP GET request test + * test: add artificial data events test + * test: fix artifical GET response test on node > v0.11.3 + * test: use a real timeout for the async error test + +1.0.1 / 2013-09-09 +================== + + * Fix passing an "error" object to the callback function on the first tick + +1.0.0 / 2013-09-09 +================== + + * New API: now you pass a callback function directly + +0.0.1 / 2013-07-09 +================== + + * Initial release diff --git a/code/application_liste/app/node_modules/agent-base/README.md b/code/application_liste/app/node_modules/agent-base/README.md new file mode 100644 index 0000000..dbeceab --- /dev/null +++ b/code/application_liste/app/node_modules/agent-base/README.md @@ -0,0 +1,145 @@ +agent-base +========== +### Turn a function into an [`http.Agent`][http.Agent] instance +[![Build Status](https://travis-ci.org/TooTallNate/node-agent-base.svg?branch=master)](https://travis-ci.org/TooTallNate/node-agent-base) + +This module provides an `http.Agent` generator. That is, you pass it an async +callback function, and it returns a new `http.Agent` instance that will invoke the +given callback function when sending outbound HTTP requests. + +#### Some subclasses: + +Here's some more interesting uses of `agent-base`. +Send a pull request to list yours! + + * [`http-proxy-agent`][http-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTP endpoints + * [`https-proxy-agent`][https-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTPS endpoints + * [`pac-proxy-agent`][pac-proxy-agent]: A PAC file proxy `http.Agent` implementation for HTTP and HTTPS + * [`socks-proxy-agent`][socks-proxy-agent]: A SOCKS (v4a) proxy `http.Agent` implementation for HTTP and HTTPS + + +Installation +------------ + +Install with `npm`: + +``` bash +$ npm install agent-base +``` + + +Example +------- + +Here's a minimal example that creates a new `net.Socket` connection to the server +for every HTTP request (i.e. the equivalent of `agent: false` option): + +```js +var net = require('net'); +var tls = require('tls'); +var url = require('url'); +var http = require('http'); +var agent = require('agent-base'); + +var endpoint = 'http://nodejs.org/api/'; +var parsed = url.parse(endpoint); + +// This is the important part! +parsed.agent = agent(function (req, opts) { + var socket; + // `secureEndpoint` is true when using the https module + if (opts.secureEndpoint) { + socket = tls.connect(opts); + } else { + socket = net.connect(opts); + } + return socket; +}); + +// Everything else works just like normal... +http.get(parsed, function (res) { + console.log('"response" event!', res.headers); + res.pipe(process.stdout); +}); +``` + +Returning a Promise or using an `async` function is also supported: + +```js +agent(async function (req, opts) { + await sleep(1000); + // etc… +}); +``` + +Return another `http.Agent` instance to "pass through" the responsibility +for that HTTP request to that agent: + +```js +agent(function (req, opts) { + return opts.secureEndpoint ? https.globalAgent : http.globalAgent; +}); +``` + + +API +--- + +## Agent(Function callback[, Object options]) → [http.Agent][] + +Creates a base `http.Agent` that will execute the callback function `callback` +for every HTTP request that it is used as the `agent` for. The callback function +is responsible for creating a `stream.Duplex` instance of some kind that will be +used as the underlying socket in the HTTP request. + +The `options` object accepts the following properties: + + * `timeout` - Number - Timeout for the `callback()` function in milliseconds. Defaults to Infinity (optional). + +The callback function should have the following signature: + +### callback(http.ClientRequest req, Object options, Function cb) → undefined + +The ClientRequest `req` can be accessed to read request headers and +and the path, etc. The `options` object contains the options passed +to the `http.request()`/`https.request()` function call, and is formatted +to be directly passed to `net.connect()`/`tls.connect()`, or however +else you want a Socket to be created. Pass the created socket to +the callback function `cb` once created, and the HTTP request will +continue to proceed. + +If the `https` module is used to invoke the HTTP request, then the +`secureEndpoint` property on `options` _will be set to `true`_. + + +License +------- + +(The MIT License) + +Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +[http-proxy-agent]: https://github.com/TooTallNate/node-http-proxy-agent +[https-proxy-agent]: https://github.com/TooTallNate/node-https-proxy-agent +[pac-proxy-agent]: https://github.com/TooTallNate/node-pac-proxy-agent +[socks-proxy-agent]: https://github.com/TooTallNate/node-socks-proxy-agent +[http.Agent]: https://nodejs.org/api/http.html#http_class_http_agent diff --git a/code/application_liste/app/node_modules/agent-base/index.d.ts b/code/application_liste/app/node_modules/agent-base/index.d.ts new file mode 100644 index 0000000..ff6788b --- /dev/null +++ b/code/application_liste/app/node_modules/agent-base/index.d.ts @@ -0,0 +1,43 @@ +// Type definitions for agent-base 4.2.1 +// Project: https://github.com/TooTallNate/node-agent-base +// Definitions by: Christopher Quadflieg + +/// +import { EventEmitter } from 'events'; + +declare namespace Agent { + export type AgentCallback = ( + req?: any, + opts?: { + secureEndpoint: boolean; + } + ) => void; + + export interface AgentOptions { + timeout?: number; + host?: string; + port?: number; + [key: string]: any; + } + + export interface Agent extends EventEmitter { + _promisifiedCallback: boolean; + timeout: number | null; + options?: AgentOptions; + callback: AgentCallback; + addRequest: (req?: any, opts?: any) => void; + freeSocket: (socket: any, opts: any) => void; + } +} + +/** + * Base `http.Agent` implementation. + * No pooling/keep-alive is implemented by default. + */ +declare function Agent(opts?: Agent.AgentOptions): Agent.Agent; +declare function Agent( + callback: Agent.AgentCallback, + opts?: Agent.AgentOptions +): Agent.Agent; + +export = Agent; diff --git a/code/application_liste/app/node_modules/agent-base/index.js b/code/application_liste/app/node_modules/agent-base/index.js new file mode 100644 index 0000000..0ee6b29 --- /dev/null +++ b/code/application_liste/app/node_modules/agent-base/index.js @@ -0,0 +1,170 @@ +'use strict'; +require('./patch-core'); +const inherits = require('util').inherits; +const promisify = require('es6-promisify'); +const EventEmitter = require('events').EventEmitter; + +module.exports = Agent; + +function isAgent(v) { + return v && typeof v.addRequest === 'function'; +} + +/** + * Base `http.Agent` implementation. + * No pooling/keep-alive is implemented by default. + * + * @param {Function} callback + * @api public + */ +function Agent(callback, _opts) { + if (!(this instanceof Agent)) { + return new Agent(callback, _opts); + } + + EventEmitter.call(this); + + // The callback gets promisified if it has 3 parameters + // (i.e. it has a callback function) lazily + this._promisifiedCallback = false; + + let opts = _opts; + if ('function' === typeof callback) { + this.callback = callback; + } else if (callback) { + opts = callback; + } + + // timeout for the socket to be returned from the callback + this.timeout = (opts && opts.timeout) || null; + + this.options = opts; +} +inherits(Agent, EventEmitter); + +/** + * Override this function in your subclass! + */ +Agent.prototype.callback = function callback(req, opts) { + throw new Error( + '"agent-base" has no default implementation, you must subclass and override `callback()`' + ); +}; + +/** + * Called by node-core's "_http_client.js" module when creating + * a new HTTP request with this Agent instance. + * + * @api public + */ +Agent.prototype.addRequest = function addRequest(req, _opts) { + const ownOpts = Object.assign({}, _opts); + + // Set default `host` for HTTP to localhost + if (null == ownOpts.host) { + ownOpts.host = 'localhost'; + } + + // Set default `port` for HTTP if none was explicitly specified + if (null == ownOpts.port) { + ownOpts.port = ownOpts.secureEndpoint ? 443 : 80; + } + + const opts = Object.assign({}, this.options, ownOpts); + + if (opts.host && opts.path) { + // If both a `host` and `path` are specified then it's most likely the + // result of a `url.parse()` call... we need to remove the `path` portion so + // that `net.connect()` doesn't attempt to open that as a unix socket file. + delete opts.path; + } + + delete opts.agent; + delete opts.hostname; + delete opts._defaultAgent; + delete opts.defaultPort; + delete opts.createConnection; + + // Hint to use "Connection: close" + // XXX: non-documented `http` module API :( + req._last = true; + req.shouldKeepAlive = false; + + // Create the `stream.Duplex` instance + let timeout; + let timedOut = false; + const timeoutMs = this.timeout; + const freeSocket = this.freeSocket; + + function onerror(err) { + if (req._hadError) return; + req.emit('error', err); + // For Safety. Some additional errors might fire later on + // and we need to make sure we don't double-fire the error event. + req._hadError = true; + } + + function ontimeout() { + timeout = null; + timedOut = true; + const err = new Error( + 'A "socket" was not created for HTTP request before ' + timeoutMs + 'ms' + ); + err.code = 'ETIMEOUT'; + onerror(err); + } + + function callbackError(err) { + if (timedOut) return; + if (timeout != null) { + clearTimeout(timeout); + timeout = null; + } + onerror(err); + } + + function onsocket(socket) { + if (timedOut) return; + if (timeout != null) { + clearTimeout(timeout); + timeout = null; + } + if (isAgent(socket)) { + // `socket` is actually an http.Agent instance, so relinquish + // responsibility for this `req` to the Agent from here on + socket.addRequest(req, opts); + } else if (socket) { + function onfree() { + freeSocket(socket, opts); + } + socket.on('free', onfree); + req.onSocket(socket); + } else { + const err = new Error( + 'no Duplex stream was returned to agent-base for `' + req.method + ' ' + req.path + '`' + ); + onerror(err); + } + } + + if (!this._promisifiedCallback && this.callback.length >= 3) { + // Legacy callback function - convert to a Promise + this.callback = promisify(this.callback, this); + this._promisifiedCallback = true; + } + + if (timeoutMs > 0) { + timeout = setTimeout(ontimeout, timeoutMs); + } + + try { + Promise.resolve(this.callback(req, opts)).then(onsocket, callbackError); + } catch (err) { + Promise.reject(err).catch(callbackError); + } +}; + +Agent.prototype.freeSocket = function freeSocket(socket, opts) { + // TODO reuse sockets + socket.destroy(); +}; diff --git a/code/application_liste/app/node_modules/agent-base/package.json b/code/application_liste/app/node_modules/agent-base/package.json new file mode 100644 index 0000000..0c96dee --- /dev/null +++ b/code/application_liste/app/node_modules/agent-base/package.json @@ -0,0 +1,70 @@ +{ + "_from": "agent-base@^4.2.0", + "_id": "agent-base@4.3.0", + "_inBundle": false, + "_integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", + "_location": "/agent-base", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "agent-base@^4.2.0", + "name": "agent-base", + "escapedName": "agent-base", + "rawSpec": "^4.2.0", + "saveSpec": null, + "fetchSpec": "^4.2.0" + }, + "_requiredBy": [ + "/http-proxy-agent", + "/https-proxy-agent", + "/pac-proxy-agent", + "/proxy-agent" + ], + "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", + "_shasum": "8165f01c436009bccad0b1d122f05ed770efc6ee", + "_spec": "agent-base@^4.2.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\proxy-agent", + "author": { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net", + "url": "http://n8.io/" + }, + "bugs": { + "url": "https://github.com/TooTallNate/node-agent-base/issues" + }, + "bundleDependencies": false, + "dependencies": { + "es6-promisify": "^5.0.0" + }, + "deprecated": false, + "description": "Turn a function into an `http.Agent` instance", + "devDependencies": { + "@types/es6-promisify": "^5.0.0", + "@types/node": "^10.5.3", + "mocha": "^3.4.2", + "ws": "^3.0.0" + }, + "engines": { + "node": ">= 4.0.0" + }, + "homepage": "https://github.com/TooTallNate/node-agent-base#readme", + "keywords": [ + "http", + "agent", + "base", + "barebones", + "https" + ], + "license": "MIT", + "main": "./index.js", + "name": "agent-base", + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/node-agent-base.git" + }, + "scripts": { + "test": "mocha --reporter spec" + }, + "version": "4.3.0" +} diff --git a/code/application_liste/app/node_modules/agent-base/patch-core.js b/code/application_liste/app/node_modules/agent-base/patch-core.js new file mode 100644 index 0000000..21cbbb6 --- /dev/null +++ b/code/application_liste/app/node_modules/agent-base/patch-core.js @@ -0,0 +1,51 @@ +'use strict'; +const url = require('url'); +const https = require('https'); + +/** + * This currently needs to be applied to all Node.js versions + * in order to determine if the `req` is an HTTP or HTTPS request. + * + * There is currently no PR attempting to move this property upstream. + */ +const patchMarker = "__agent_base_https_request_patched__"; +if (!https.request[patchMarker]) { + https.request = (function(request) { + return function(_options, cb) { + let options; + if (typeof _options === 'string') { + options = url.parse(_options); + } else { + options = Object.assign({}, _options); + } + if (null == options.port) { + options.port = 443; + } + options.secureEndpoint = true; + return request.call(https, options, cb); + }; + })(https.request); + https.request[patchMarker] = true; +} + +/** + * This is needed for Node.js >= 9.0.0 to make sure `https.get()` uses the + * patched `https.request()`. + * + * Ref: https://github.com/nodejs/node/commit/5118f31 + */ +https.get = function (_url, _options, cb) { + let options; + if (typeof _url === 'string' && _options && typeof _options !== 'function') { + options = Object.assign({}, url.parse(_url), _options); + } else if (!_options && !cb) { + options = _url; + } else if (!cb) { + options = _url; + cb = _options; + } + + const req = https.request(options, cb); + req.end(); + return req; +}; diff --git a/code/application_liste/app/node_modules/agent-base/test/ssl-cert-snakeoil.key b/code/application_liste/app/node_modules/agent-base/test/ssl-cert-snakeoil.key new file mode 100644 index 0000000..fd12501 --- /dev/null +++ b/code/application_liste/app/node_modules/agent-base/test/ssl-cert-snakeoil.key @@ -0,0 +1,15 @@ +-----BEGIN RSA PRIVATE KEY----- +MIICWwIBAAKBgQCzURxIqzer0ACAbX/lHdsn4Gd9PLKrf7EeDYfIdV0HZKPD8WDr +bBx2/fBu0OW2sjnzv/SVZbJ0DAuPE/p0+eT0qb2qC10iz9iTD7ribd7gxhirVb8y +b3fBjXsxc8V8p4Ny1LcvNSqCjwUbJqdRogfoJeTiqPM58z5sNzuv5iq7iwIDAQAB +AoGAPMQy4olrP0UotlzlJ36bowLP70ffgHCwU+/f4NWs5fF78c3du0oSx1w820Dd +Z7E0JF8bgnlJJTxjumPZz0RUCugrEHBKJmzEz3cxF5E3+7NvteZcjKn9D67RrM5x +1/uSZ9cqKE9cYvY4fSuHx18diyZ4axR/wB1Pea2utjjDM+ECQQDb9ZbmmaWMiRpQ +5Up+loxP7BZNPsEVsm+DVJmEFbaFgGfncWBqSIqnPNjMwTwj0OigTwCAEGPkfRVW +T0pbYWCxAkEA0LK7SCTwzyDmhASUalk0x+3uCAA6ryFdwJf/wd8TRAvVOmkTEldX +uJ7ldLvfrONYO3v56uKTU/SoNdZYzKtO+wJAX2KM4ctXYy5BXztPpr2acz4qHa1N +Bh+vBAC34fOYhyQ76r3b1btHhWZ5jbFuZwm9F2erC94Ps5IaoqcX07DSwQJAPKGw +h2U0EPkd/3zVIZCJJQya+vgWFIs9EZcXVtvYXQyTBkVApTN66MhBIYjzkub5205J +bVQmOV37AKklY1DhwQJAA1wos0cYxro02edzatxd0DIR2r4qqOqLkw6BhYHhq6HJ +ZvIcQkHqdSXzdETFc01I1znDGGIrJHcnvKWgBPoEUg== +-----END RSA PRIVATE KEY----- diff --git a/code/application_liste/app/node_modules/agent-base/test/ssl-cert-snakeoil.pem b/code/application_liste/app/node_modules/agent-base/test/ssl-cert-snakeoil.pem new file mode 100644 index 0000000..b115a5e --- /dev/null +++ b/code/application_liste/app/node_modules/agent-base/test/ssl-cert-snakeoil.pem @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIB1TCCAT4CCQDV5mPlzm9+izANBgkqhkiG9w0BAQUFADAvMS0wKwYDVQQDEyQ3 +NTI3YmQ3Ny1hYjNlLTQ3NGItYWNlNy1lZWQ2MDUzOTMxZTcwHhcNMTUwNzA2MjI0 +NTA3WhcNMjUwNzAzMjI0NTA3WjAvMS0wKwYDVQQDEyQ3NTI3YmQ3Ny1hYjNlLTQ3 +NGItYWNlNy1lZWQ2MDUzOTMxZTcwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGB +ALNRHEirN6vQAIBtf+Ud2yfgZ308sqt/sR4Nh8h1XQdko8PxYOtsHHb98G7Q5bay +OfO/9JVlsnQMC48T+nT55PSpvaoLXSLP2JMPuuJt3uDGGKtVvzJvd8GNezFzxXyn +g3LUty81KoKPBRsmp1GiB+gl5OKo8znzPmw3O6/mKruLAgMBAAEwDQYJKoZIhvcN +AQEFBQADgYEACzoHUF8UV2Z6541Q2wKEA0UFUzmUjf/E1XwBO+1P15ZZ64uw34B4 +1RwMPtAo9RY/PmICTWtNxWGxkzwb2JtDWtnxVER/lF8k2XcXPE76fxTHJF/BKk9J +QU8OTD1dd9gHCBviQB9TqntRZ5X7axjtuWjb2umY+owBYzAHZkp1HKI= +-----END CERTIFICATE----- diff --git a/code/application_liste/app/node_modules/agent-base/test/test.js b/code/application_liste/app/node_modules/agent-base/test/test.js new file mode 100644 index 0000000..0f372c0 --- /dev/null +++ b/code/application_liste/app/node_modules/agent-base/test/test.js @@ -0,0 +1,728 @@ +/** + * Module dependencies. + */ + +var fs = require('fs'); +var url = require('url'); +var net = require('net'); +var tls = require('tls'); +var http = require('http'); +var https = require('https'); +var WebSocket = require('ws'); +var assert = require('assert'); +var events = require('events'); +var inherits = require('util').inherits; +var Agent = require('../'); + +var PassthroughAgent = Agent(function(req, opts) { + return opts.secureEndpoint ? https.globalAgent : http.globalAgent; +}); + +describe('Agent', function() { + describe('subclass', function() { + it('should be subclassable', function(done) { + function MyAgent() { + Agent.call(this); + } + inherits(MyAgent, Agent); + + MyAgent.prototype.callback = function(req, opts, fn) { + assert.equal(req.path, '/foo'); + assert.equal(req.getHeader('host'), '127.0.0.1:1234'); + assert.equal(opts.secureEndpoint, true); + done(); + }; + + var info = url.parse('https://127.0.0.1:1234/foo'); + info.agent = new MyAgent(); + https.get(info); + }); + }); + describe('options', function() { + it('should support an options Object as first argument', function() { + var agent = new Agent({ timeout: 1000 }); + assert.equal(1000, agent.timeout); + }); + it('should support an options Object as second argument', function() { + var agent = new Agent(function() {}, { timeout: 1000 }); + assert.equal(1000, agent.timeout); + }); + it('should be mixed in with HTTP request options', function(done) { + var agent = new Agent({ + host: 'my-proxy.com', + port: 3128, + foo: 'bar' + }); + agent.callback = function(req, opts, fn) { + assert.equal('bar', opts.foo); + assert.equal('a', opts.b); + + // `host` and `port` are special-cases, and should always be + // overwritten in the request `opts` inside the agent-base callback + assert.equal('localhost', opts.host); + assert.equal(80, opts.port); + done(); + }; + var opts = { + b: 'a', + agent: agent + }; + http.get(opts); + }); + }); + describe('`this` context', function() { + it('should be the Agent instance', function(done) { + var called = false; + var agent = new Agent(); + agent.callback = function() { + called = true; + assert.equal(this, agent); + }; + var info = url.parse('http://127.0.0.1/foo'); + info.agent = agent; + var req = http.get(info); + req.on('error', function(err) { + assert(/no Duplex stream was returned/.test(err.message)); + done(); + }); + }); + it('should be the Agent instance with callback signature', function(done) { + var called = false; + var agent = new Agent(); + agent.callback = function(req, opts, fn) { + called = true; + assert.equal(this, agent); + fn(); + }; + var info = url.parse('http://127.0.0.1/foo'); + info.agent = agent; + var req = http.get(info); + req.on('error', function(err) { + assert(/no Duplex stream was returned/.test(err.message)); + done(); + }); + }); + }); + describe('"error" event', function() { + it('should be invoked on `http.ClientRequest` instance if `callback()` has not been defined', function( + done + ) { + var agent = new Agent(); + var info = url.parse('http://127.0.0.1/foo'); + info.agent = agent; + var req = http.get(info); + req.on('error', function(err) { + assert.equal( + '"agent-base" has no default implementation, you must subclass and override `callback()`', + err.message + ); + done(); + }); + }); + it('should be invoked on `http.ClientRequest` instance if Error passed to callback function on the first tick', function( + done + ) { + var agent = new Agent(function(req, opts, fn) { + fn(new Error('is this caught?')); + }); + var info = url.parse('http://127.0.0.1/foo'); + info.agent = agent; + var req = http.get(info); + req.on('error', function(err) { + assert.equal('is this caught?', err.message); + done(); + }); + }); + it('should be invoked on `http.ClientRequest` instance if Error passed to callback function after the first tick', function( + done + ) { + var agent = new Agent(function(req, opts, fn) { + setTimeout(function() { + fn(new Error('is this caught?')); + }, 10); + }); + var info = url.parse('http://127.0.0.1/foo'); + info.agent = agent; + var req = http.get(info); + req.on('error', function(err) { + assert.equal('is this caught?', err.message); + done(); + }); + }); + }); + describe('artificial "streams"', function() { + it('should send a GET request', function(done) { + var stream = new events.EventEmitter(); + + // needed for the `http` module to call .write() on the stream + stream.writable = true; + + stream.write = function(str) { + assert(0 == str.indexOf('GET / HTTP/1.1')); + done(); + }; + + // needed for `http` module in Node.js 4 + stream.cork = function() {}; + + var opts = { + method: 'GET', + host: '127.0.0.1', + path: '/', + port: 80, + agent: new Agent(function(req, opts, fn) { + fn(null, stream); + }) + }; + var req = http.request(opts); + req.end(); + }); + it('should receive a GET response', function(done) { + var stream = new events.EventEmitter(); + var opts = { + method: 'GET', + host: '127.0.0.1', + path: '/', + port: 80, + agent: new Agent(function(req, opts, fn) { + fn(null, stream); + }) + }; + var req = http.request(opts, function(res) { + assert.equal('1.0', res.httpVersion); + assert.equal(200, res.statusCode); + assert.equal('bar', res.headers.foo); + assert.deepEqual(['1', '2'], res.headers['set-cookie']); + done(); + }); + + // have to wait for the "socket" event since `http.ClientRequest` + // doesn't *actually* attach the listeners to the "stream" until + // this happens + req.once('socket', function() { + var buf = Buffer.from( + 'HTTP/1.0 200\r\n' + + 'Foo: bar\r\n' + + 'Set-Cookie: 1\r\n' + + 'Set-Cookie: 2\r\n\r\n' + ); + stream.emit('data', buf); + }); + + req.end(); + }); + }); +}); + +describe('"http" module', function() { + var server; + var port; + + // setup test HTTP server + before(function(done) { + server = http.createServer(); + server.listen(0, function() { + port = server.address().port; + done(); + }); + }); + + // shut down test HTTP server + after(function(done) { + server.once('close', function() { + done(); + }); + server.close(); + }); + + it('should work for basic HTTP requests', function(done) { + var called = false; + var agent = new Agent(function(req, opts, fn) { + called = true; + var socket = net.connect(opts); + fn(null, socket); + }); + + // add HTTP server "request" listener + var gotReq = false; + server.once('request', function(req, res) { + gotReq = true; + res.setHeader('X-Foo', 'bar'); + res.setHeader('X-Url', req.url); + res.end(); + }); + + var info = url.parse('http://127.0.0.1:' + port + '/foo'); + info.agent = agent; + http.get(info, function(res) { + assert.equal('bar', res.headers['x-foo']); + assert.equal('/foo', res.headers['x-url']); + assert(gotReq); + assert(called); + done(); + }); + }); + + it('should support direct return in `connect()`', function(done) { + var called = false; + var agent = new Agent(function(req, opts) { + called = true; + return net.connect(opts); + }); + + // add HTTP server "request" listener + var gotReq = false; + server.once('request', function(req, res) { + gotReq = true; + res.setHeader('X-Foo', 'bar'); + res.setHeader('X-Url', req.url); + res.end(); + }); + + var info = url.parse('http://127.0.0.1:' + port + '/foo'); + info.agent = agent; + http.get(info, function(res) { + assert.equal('bar', res.headers['x-foo']); + assert.equal('/foo', res.headers['x-url']); + assert(gotReq); + assert(called); + done(); + }); + }); + + it('should support returning a Promise in `connect()`', function(done) { + var called = false; + var agent = new Agent(function(req, opts) { + return new Promise(function(resolve, reject) { + called = true; + resolve(net.connect(opts)); + }); + }); + + // add HTTP server "request" listener + var gotReq = false; + server.once('request', function(req, res) { + gotReq = true; + res.setHeader('X-Foo', 'bar'); + res.setHeader('X-Url', req.url); + res.end(); + }); + + var info = url.parse('http://127.0.0.1:' + port + '/foo'); + info.agent = agent; + http.get(info, function(res) { + assert.equal('bar', res.headers['x-foo']); + assert.equal('/foo', res.headers['x-url']); + assert(gotReq); + assert(called); + done(); + }); + }); + + it('should set the `Connection: close` response header', function(done) { + var called = false; + var agent = new Agent(function(req, opts, fn) { + called = true; + var socket = net.connect(opts); + fn(null, socket); + }); + + // add HTTP server "request" listener + var gotReq = false; + server.once('request', function(req, res) { + gotReq = true; + res.setHeader('X-Url', req.url); + assert.equal('close', req.headers.connection); + res.end(); + }); + + var info = url.parse('http://127.0.0.1:' + port + '/bar'); + info.agent = agent; + http.get(info, function(res) { + assert.equal('/bar', res.headers['x-url']); + assert.equal('close', res.headers.connection); + assert(gotReq); + assert(called); + done(); + }); + }); + + it('should pass through options from `http.request()`', function(done) { + var agent = new Agent(function(req, opts, fn) { + assert.equal('google.com', opts.host); + assert.equal('bar', opts.foo); + done(); + }); + + http.get({ + host: 'google.com', + foo: 'bar', + agent: agent + }); + }); + + it('should default to port 80', function(done) { + var agent = new Agent(function(req, opts, fn) { + assert.equal(80, opts.port); + done(); + }); + + // (probably) not hitting a real HTTP server here, + // so no need to add a httpServer request listener + http.get({ + host: '127.0.0.1', + path: '/foo', + agent: agent + }); + }); + + it('should support the "timeout" option', function(done) { + // ensure we timeout after the "error" event had a chance to trigger + this.timeout(1000); + this.slow(800); + + var agent = new Agent( + function(req, opts, fn) { + // this function will time out + }, + { timeout: 100 } + ); + + var opts = url.parse('http://nodejs.org'); + opts.agent = agent; + + var req = http.get(opts); + req.once('error', function(err) { + assert.equal('ETIMEOUT', err.code); + req.abort(); + done(); + }); + }); + + it('should free sockets after use', function(done) { + var agent = new Agent(function(req, opts, fn) { + var socket = net.connect(opts); + fn(null, socket); + }); + + // add HTTP server "request" listener + var gotReq = false; + server.once('request', function(req, res) { + gotReq = true; + res.end(); + }); + + var info = url.parse('http://127.0.0.1:' + port + '/foo'); + info.agent = agent; + http.get(info, function(res) { + res.socket.emit('free'); + assert.equal(true, res.socket.destroyed); + assert(gotReq); + done(); + }); + }); + + + describe('PassthroughAgent', function() { + it('should pass through to `http.globalAgent`', function(done) { + // add HTTP server "request" listener + var gotReq = false; + server.once('request', function(req, res) { + gotReq = true; + res.setHeader('X-Foo', 'bar'); + res.setHeader('X-Url', req.url); + res.end(); + }); + + var info = url.parse('http://127.0.0.1:' + port + '/foo'); + info.agent = PassthroughAgent; + http.get(info, function(res) { + assert.equal('bar', res.headers['x-foo']); + assert.equal('/foo', res.headers['x-url']); + assert(gotReq); + done(); + }); + }); + }); +}); + +describe('"https" module', function() { + var server; + var port; + + // setup test HTTPS server + before(function(done) { + var options = { + key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'), + cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem') + }; + server = https.createServer(options); + server.listen(0, function() { + port = server.address().port; + done(); + }); + }); + + // shut down test HTTP server + after(function(done) { + server.once('close', function() { + done(); + }); + server.close(); + }); + + it('should not modify the passed in Options object', function(done) { + var called = false; + var agent = new Agent(function(req, opts, fn) { + called = true; + assert.equal(true, opts.secureEndpoint); + assert.equal(443, opts.port); + assert.equal('localhost', opts.host); + }); + var opts = { agent: agent }; + var req = https.request(opts); + assert.equal(true, called); + assert.equal(false, 'secureEndpoint' in opts); + assert.equal(false, 'port' in opts); + done(); + }); + + it('should work with a String URL', function(done) { + var endpoint = 'https://127.0.0.1:' + port; + var req = https.get(endpoint); + + // it's gonna error out since `rejectUnauthorized` is not being passed in + req.on('error', function(err) { + assert.equal(err.code, 'DEPTH_ZERO_SELF_SIGNED_CERT'); + done(); + }); + }); + + it('should work for basic HTTPS requests', function(done) { + var called = false; + var agent = new Agent(function(req, opts, fn) { + called = true; + assert(opts.secureEndpoint); + var socket = tls.connect(opts); + fn(null, socket); + }); + + // add HTTPS server "request" listener + var gotReq = false; + server.once('request', function(req, res) { + gotReq = true; + res.setHeader('X-Foo', 'bar'); + res.setHeader('X-Url', req.url); + res.end(); + }); + + var info = url.parse('https://127.0.0.1:' + port + '/foo'); + info.agent = agent; + info.rejectUnauthorized = false; + https.get(info, function(res) { + assert.equal('bar', res.headers['x-foo']); + assert.equal('/foo', res.headers['x-url']); + assert(gotReq); + assert(called); + done(); + }); + }); + + it('should pass through options from `https.request()`', function(done) { + var agent = new Agent(function(req, opts, fn) { + assert.equal('google.com', opts.host); + assert.equal('bar', opts.foo); + done(); + }); + + https.get({ + host: 'google.com', + foo: 'bar', + agent: agent + }); + }); + + it('should support the 3-argument `https.get()`', function(done) { + var agent = new Agent(function(req, opts, fn) { + assert.equal('google.com', opts.host); + assert.equal('/q', opts.pathname || opts.path); + assert.equal('881', opts.port); + assert.equal('bar', opts.foo); + done(); + }); + + https.get( + 'https://google.com:881/q', + { + host: 'google.com', + foo: 'bar', + agent: agent + } + ); + }); + + it('should default to port 443', function(done) { + var agent = new Agent(function(req, opts, fn) { + assert.equal(true, opts.secureEndpoint); + assert.equal(false, opts.rejectUnauthorized); + assert.equal(443, opts.port); + done(); + }); + + // (probably) not hitting a real HTTPS server here, + // so no need to add a httpsServer request listener + https.get({ + host: '127.0.0.1', + path: '/foo', + agent: agent, + rejectUnauthorized: false + }); + }); + + it('should not re-patch https.request', () => { + var patchModulePath = "../patch-core"; + var patchedRequest = https.request; + + delete require.cache[require.resolve(patchModulePath)]; + require(patchModulePath); + + assert.equal(patchedRequest, https.request); + assert.equal(true, https.request.__agent_base_https_request_patched__); + }); + + describe('PassthroughAgent', function() { + it('should pass through to `https.globalAgent`', function(done) { + // add HTTP server "request" listener + var gotReq = false; + server.once('request', function(req, res) { + gotReq = true; + res.setHeader('X-Foo', 'bar'); + res.setHeader('X-Url', req.url); + res.end(); + }); + + var info = url.parse('https://127.0.0.1:' + port + '/foo'); + info.agent = PassthroughAgent; + info.rejectUnauthorized = false; + https.get(info, function(res) { + assert.equal('bar', res.headers['x-foo']); + assert.equal('/foo', res.headers['x-url']); + assert(gotReq); + done(); + }); + }); + }); +}); + +describe('"ws" server', function() { + var wss; + var server; + var port; + + // setup test HTTP server + before(function(done) { + server = http.createServer(); + wss = new WebSocket.Server({ server: server }); + server.listen(0, function() { + port = server.address().port; + done(); + }); + }); + + // shut down test HTTP server + after(function(done) { + server.once('close', function() { + done(); + }); + server.close(); + }); + + it('should work for basic WebSocket connections', function(done) { + function onconnection(ws) { + ws.on('message', function(data) { + assert.equal('ping', data); + ws.send('pong'); + }); + } + wss.on('connection', onconnection); + + var agent = new Agent(function(req, opts, fn) { + var socket = net.connect(opts); + fn(null, socket); + }); + + var client = new WebSocket('ws://127.0.0.1:' + port + '/', { + agent: agent + }); + + client.on('open', function() { + client.send('ping'); + }); + + client.on('message', function(data) { + assert.equal('pong', data); + client.close(); + wss.removeListener('connection', onconnection); + done(); + }); + }); +}); + +describe('"wss" server', function() { + var wss; + var server; + var port; + + // setup test HTTP server + before(function(done) { + var options = { + key: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.key'), + cert: fs.readFileSync(__dirname + '/ssl-cert-snakeoil.pem') + }; + server = https.createServer(options); + wss = new WebSocket.Server({ server: server }); + server.listen(0, function() { + port = server.address().port; + done(); + }); + }); + + // shut down test HTTP server + after(function(done) { + server.once('close', function() { + done(); + }); + server.close(); + }); + + it('should work for secure WebSocket connections', function(done) { + function onconnection(ws) { + ws.on('message', function(data) { + assert.equal('ping', data); + ws.send('pong'); + }); + } + wss.on('connection', onconnection); + + var agent = new Agent(function(req, opts, fn) { + var socket = tls.connect(opts); + fn(null, socket); + }); + + var client = new WebSocket('wss://127.0.0.1:' + port + '/', { + agent: agent, + rejectUnauthorized: false + }); + + client.on('open', function() { + client.send('ping'); + }); + + client.on('message', function(data) { + assert.equal('pong', data); + client.close(); + wss.removeListener('connection', onconnection); + done(); + }); + }); +}); diff --git a/code/application_liste/app/node_modules/ansi-colors/LICENSE b/code/application_liste/app/node_modules/ansi-colors/LICENSE new file mode 100644 index 0000000..b70671f --- /dev/null +++ b/code/application_liste/app/node_modules/ansi-colors/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Brian Woodward. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/ansi-colors/README.md b/code/application_liste/app/node_modules/ansi-colors/README.md new file mode 100644 index 0000000..2e669fe --- /dev/null +++ b/code/application_liste/app/node_modules/ansi-colors/README.md @@ -0,0 +1,105 @@ +# ansi-colors [![NPM version](https://img.shields.io/npm/v/ansi-colors.svg?style=flat)](https://www.npmjs.com/package/ansi-colors) [![NPM monthly downloads](https://img.shields.io/npm/dm/ansi-colors.svg?style=flat)](https://npmjs.org/package/ansi-colors) [![NPM total downloads](https://img.shields.io/npm/dt/ansi-colors.svg?style=flat)](https://npmjs.org/package/ansi-colors) [![Linux Build Status](https://img.shields.io/travis/doowb/ansi-colors.svg?style=flat&label=Travis)](https://travis-ci.org/doowb/ansi-colors) [![Windows Build Status](https://img.shields.io/appveyor/ci/doowb/ansi-colors.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/doowb/ansi-colors) + +> Collection of ansi colors and styles. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save ansi-colors +``` + +## Usage + +This module exports an object of functions. Each function wraps a string with the ansi codes used to display the string with that color (or style). Use the wrapped string with `console.log`: + +```js +var colors = require('ansi-colors'); +console.log(colors.bold(colors.cyan('[info]')), colors.cyan('This is some information')); +console.log(colors.bold(colors.yellow('[warning]')), colors.yellow('This is a warning')); +console.error(colors.bold(colors.red('[ERROR]')), colors.red('Danger! There was an error!')); +``` + +![image](https://user-images.githubusercontent.com/995160/34897845-3150daae-f7be-11e7-9706-38c42461e0ee.png) + +## Example + +See the [example](./example.js) for more colors and styles. + +## About + +### Related projects + +* [ansi-bgblack](https://www.npmjs.com/package/ansi-bgblack): The color bgblack, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-bgblack "The color bgblack, in ansi.") +* [ansi-bgblue](https://www.npmjs.com/package/ansi-bgblue): The color bgblue, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-bgblue "The color bgblue, in ansi.") +* [ansi-bgcyan](https://www.npmjs.com/package/ansi-bgcyan): The color bgcyan, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-bgcyan "The color bgcyan, in ansi.") +* [ansi-bggreen](https://www.npmjs.com/package/ansi-bggreen): The color bggreen, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-bggreen "The color bggreen, in ansi.") +* [ansi-bgmagenta](https://www.npmjs.com/package/ansi-bgmagenta): The color bgmagenta, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-bgmagenta "The color bgmagenta, in ansi.") +* [ansi-bgred](https://www.npmjs.com/package/ansi-bgred): The color bgred, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-bgred "The color bgred, in ansi.") +* [ansi-bgwhite](https://www.npmjs.com/package/ansi-bgwhite): The color bgwhite, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-bgwhite "The color bgwhite, in ansi.") +* [ansi-bgyellow](https://www.npmjs.com/package/ansi-bgyellow): The color bgyellow, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-bgyellow "The color bgyellow, in ansi.") +* [ansi-black](https://www.npmjs.com/package/ansi-black): The color black, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-black "The color black, in ansi.") +* [ansi-blue](https://www.npmjs.com/package/ansi-blue): The color blue, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-blue "The color blue, in ansi.") +* [ansi-bold](https://www.npmjs.com/package/ansi-bold): The color bold, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-bold "The color bold, in ansi.") +* [ansi-cyan](https://www.npmjs.com/package/ansi-cyan): The color cyan, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-cyan "The color cyan, in ansi.") +* [ansi-dim](https://www.npmjs.com/package/ansi-dim): The color dim, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-dim "The color dim, in ansi.") +* [ansi-gray](https://www.npmjs.com/package/ansi-gray): The color gray, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-gray "The color gray, in ansi.") +* [ansi-green](https://www.npmjs.com/package/ansi-green): The color green, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-green "The color green, in ansi.") +* [ansi-grey](https://www.npmjs.com/package/ansi-grey): The color grey, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-grey "The color grey, in ansi.") +* [ansi-hidden](https://www.npmjs.com/package/ansi-hidden): The color hidden, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-hidden "The color hidden, in ansi.") +* [ansi-inverse](https://www.npmjs.com/package/ansi-inverse): The color inverse, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-inverse "The color inverse, in ansi.") +* [ansi-italic](https://www.npmjs.com/package/ansi-italic): The color italic, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-italic "The color italic, in ansi.") +* [ansi-magenta](https://www.npmjs.com/package/ansi-magenta): The color magenta, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-magenta "The color magenta, in ansi.") +* [ansi-red](https://www.npmjs.com/package/ansi-red): The color red, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-red "The color red, in ansi.") +* [ansi-reset](https://www.npmjs.com/package/ansi-reset): The color reset, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-reset "The color reset, in ansi.") +* [ansi-strikethrough](https://www.npmjs.com/package/ansi-strikethrough): The color strikethrough, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-strikethrough "The color strikethrough, in ansi.") +* [ansi-underline](https://www.npmjs.com/package/ansi-underline): The color underline, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-underline "The color underline, in ansi.") +* [ansi-white](https://www.npmjs.com/package/ansi-white): The color white, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-white "The color white, in ansi.") +* [ansi-wrap](https://www.npmjs.com/package/ansi-wrap): Create ansi colors by passing the open and close codes. | [homepage](https://github.com/jonschlinkert/ansi-wrap "Create ansi colors by passing the open and close codes.") +* [ansi-yellow](https://www.npmjs.com/package/ansi-yellow): The color yellow, in ansi. | [homepage](https://github.com/jonschlinkert/ansi-yellow "The color yellow, in ansi.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 10 | [doowb](https://github.com/doowb) | +| 3 | [jonschlinkert](https://github.com/jonschlinkert) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Brian Woodward** + +* [github/doowb](https://github.com/doowb) +* [twitter/doowb](https://twitter.com/doowb) + +### License + +Copyright © 2018, [Brian Woodward](https://github.com/doowb). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on January 12, 2018._ \ No newline at end of file diff --git a/code/application_liste/app/node_modules/ansi-colors/index.js b/code/application_liste/app/node_modules/ansi-colors/index.js new file mode 100644 index 0000000..37da67f --- /dev/null +++ b/code/application_liste/app/node_modules/ansi-colors/index.js @@ -0,0 +1,456 @@ +/*! + * ansi-colors + * + * Copyright (c) 2015-2017, Brian Woodward. + * Released under the MIT License. + */ + +'use strict'; + +/** + * Module dependencies + */ + +var wrap = require('ansi-wrap'); + +/** + * Wrap a string with ansi codes to create a black background. + * + * ```js + * console.log(colors.bgblack('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name bgblack + */ + +exports.bgblack = function bgblack(message) { + return wrap(40, 49, message); +}; + +/** + * Wrap a string with ansi codes to create a blue background. + * + * ```js + * console.log(colors.bgblue('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name bgblue + */ + +exports.bgblue = function bgblue(message) { + return wrap(44, 49, message); +}; + +/** + * Wrap a string with ansi codes to create a cyan background. + * + * ```js + * console.log(colors.bgcyan('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name bgcyan + */ + +exports.bgcyan = function bgcyan(message) { + return wrap(46, 49, message); +}; + +/** + * Wrap a string with ansi codes to create a green background. + * + * ```js + * console.log(colors.bggreen('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name bggreen + */ + +exports.bggreen = function bggreen(message) { + return wrap(42, 49, message); +}; + +/** + * Wrap a string with ansi codes to create a magenta background. + * + * ```js + * console.log(colors.bgmagenta('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name bgmagenta + */ + +exports.bgmagenta = function bgmagenta(message) { + return wrap(45, 49, message); +}; + +/** + * Wrap a string with ansi codes to create a red background. + * + * ```js + * console.log(colors.bgred('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name bgred + */ + +exports.bgred = function bgred(message) { + return wrap(41, 49, message); +}; + +/** + * Wrap a string with ansi codes to create a white background. + * + * ```js + * console.log(colors.bgwhite('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name bgwhite + */ + +exports.bgwhite = function bgwhite(message) { + return wrap(47, 49, message); +}; + +/** + * Wrap a string with ansi codes to create a yellow background. + * + * ```js + * console.log(colors.bgyellow('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name bgyellow + */ + +exports.bgyellow = function bgyellow(message) { + return wrap(43, 49, message); +}; + +/** + * Wrap a string with ansi codes to create black text. + * + * ```js + * console.log(colors.black('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name black + */ + +exports.black = function black(message) { + return wrap(30, 39, message); +}; + +/** + * Wrap a string with ansi codes to create blue text. + * + * ```js + * console.log(colors.blue('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name blue + */ + +exports.blue = function blue(message) { + return wrap(34, 39, message); +}; + +/** + * Wrap a string with ansi codes to create bold text. + * + * ```js + * console.log(colors.bold('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name bold + */ + +exports.bold = function bold(message) { + return wrap(1, 22, message); +}; + +/** + * Wrap a string with ansi codes to create cyan text. + * + * ```js + * console.log(colors.cyan('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name cyan + */ + +exports.cyan = function cyan(message) { + return wrap(36, 39, message); +}; + +/** + * Wrap a string with ansi codes to create dim text. + * + * ```js + * console.log(colors.dim('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name dim + */ + +exports.dim = function dim(message) { + return wrap(2, 22, message); +}; + +/** + * Wrap a string with ansi codes to create gray text. + * + * ```js + * console.log(colors.gray('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name gray + */ + +exports.gray = function gray(message) { + return wrap(90, 39, message); +}; + +/** + * Wrap a string with ansi codes to create green text. + * + * ```js + * console.log(colors.green('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name green + */ + +exports.green = function green(message) { + return wrap(32, 39, message); +}; + +/** + * Wrap a string with ansi codes to create grey text. + * + * ```js + * console.log(colors.grey('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name grey + */ + +exports.grey = function grey(message) { + return wrap(90, 39, message); +}; + +/** + * Wrap a string with ansi codes to create hidden text. + * + * ```js + * console.log(colors.hidden('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name hidden + */ + +exports.hidden = function hidden(message) { + return wrap(8, 28, message); +}; + +/** + * Wrap a string with ansi codes to create inverse text. + * + * ```js + * console.log(colors.inverse('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name inverse + */ + +exports.inverse = function inverse(message) { + return wrap(7, 27, message); +}; + +/** + * Wrap a string with ansi codes to create italic text. + * + * ```js + * console.log(colors.italic('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name italic + */ + +exports.italic = function italic(message) { + return wrap(3, 23, message); +}; + +/** + * Wrap a string with ansi codes to create magenta text. + * + * ```js + * console.log(colors.magenta('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name magenta + */ + +exports.magenta = function magenta(message) { + return wrap(35, 39, message); +}; + +/** + * Wrap a string with ansi codes to create red text. + * + * ```js + * console.log(colors.red('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name red + */ + +exports.red = function red(message) { + return wrap(31, 39, message); +}; + +/** + * Wrap a string with ansi codes to reset ansi colors currently on the string. + * + * ```js + * console.log(colors.reset('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name reset + */ + +exports.reset = function reset(message) { + return wrap(0, 0, message); +}; + +/** + * Wrap a string with ansi codes to add a strikethrough to the text. + * + * ```js + * console.log(colors.strikethrough('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name strikethrough + */ + +exports.strikethrough = function strikethrough(message) { + return wrap(9, 29, message); +}; + +/** + * Wrap a string with ansi codes to underline the text. + * + * ```js + * console.log(colors.underline('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name underline + */ + +exports.underline = function underline(message) { + return wrap(4, 24, message); +}; + +/** + * Wrap a string with ansi codes to create white text. + * + * ```js + * console.log(colors.white('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name white + */ + +exports.white = function white(message) { + return wrap(37, 39, message); +}; + +/** + * Wrap a string with ansi codes to create yellow text. + * + * ```js + * console.log(colors.yellow('some string')); + * ``` + * + * @param {string} message String to wrap with ansi codes. + * @return {string} Wrapped string + * @api public + * @name yellow + */ + +exports.yellow = function yellow(message) { + return wrap(33, 39, message); +}; diff --git a/code/application_liste/app/node_modules/ansi-colors/package.json b/code/application_liste/app/node_modules/ansi-colors/package.json new file mode 100644 index 0000000..070bd2d --- /dev/null +++ b/code/application_liste/app/node_modules/ansi-colors/package.json @@ -0,0 +1,175 @@ +{ + "_from": "ansi-colors@^1.0.1", + "_id": "ansi-colors@1.1.0", + "_inBundle": false, + "_integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", + "_location": "/ansi-colors", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ansi-colors@^1.0.1", + "name": "ansi-colors", + "escapedName": "ansi-colors", + "rawSpec": "^1.0.1", + "saveSpec": null, + "fetchSpec": "^1.0.1" + }, + "_requiredBy": [ + "/gulp/gulp-cli" + ], + "_resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", + "_shasum": "6374b4dd5d4718ff3ce27a671a3b1cad077132a9", + "_spec": "ansi-colors@^1.0.1", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\gulp\\node_modules\\gulp-cli", + "author": { + "name": "Brian Woodward", + "url": "https://github.com/doowb" + }, + "bugs": { + "url": "https://github.com/doowb/ansi-colors/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Brian Woodward", + "url": "https://twitter.com/doowb" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + } + ], + "dependencies": { + "ansi-wrap": "^0.1.0" + }, + "deprecated": false, + "description": "Collection of ansi colors and styles.", + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3", + "typescript": "^2.7.1" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js", + "types/index.d.ts" + ], + "homepage": "https://github.com/doowb/ansi-colors", + "keywords": [ + "ansi-bgblack", + "ansi-bgblue", + "ansi-bgcyan", + "ansi-bggreen", + "ansi-bgmagenta", + "ansi-bgred", + "ansi-bgwhite", + "ansi-bgyellow", + "ansi-black", + "ansi-blue", + "ansi-bold", + "ansi-cyan", + "ansi-dim", + "ansi-gray", + "ansi-green", + "ansi-grey", + "ansi-hidden", + "ansi-inverse", + "ansi-italic", + "ansi-magenta", + "ansi-red", + "ansi-reset", + "ansi-strikethrough", + "ansi-underline", + "ansi-white", + "ansi-yellow", + "bgblack", + "bgblue", + "bgcyan", + "bggreen", + "bgmagenta", + "bgred", + "bgwhite", + "bgyellow", + "black", + "blue", + "bold", + "cyan", + "dim", + "gray", + "green", + "grey", + "hidden", + "inverse", + "italic", + "magenta", + "red", + "reset", + "strikethrough", + "underline", + "white", + "yellow" + ], + "license": "MIT", + "main": "index.js", + "name": "ansi-colors", + "repository": { + "type": "git", + "url": "git+https://github.com/doowb/ansi-colors.git" + }, + "scripts": { + "test": "mocha && tsc --project types" + }, + "types": "./types/index.d.ts", + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "verb-readme-generator", + "verb" + ], + "related": { + "list": [ + "ansi-bgblack", + "ansi-bgblue", + "ansi-bgcyan", + "ansi-bggreen", + "ansi-bgmagenta", + "ansi-bgred", + "ansi-bgwhite", + "ansi-bgyellow", + "ansi-black", + "ansi-blue", + "ansi-bold", + "ansi-cyan", + "ansi-dim", + "ansi-gray", + "ansi-green", + "ansi-grey", + "ansi-hidden", + "ansi-inverse", + "ansi-italic", + "ansi-magenta", + "ansi-red", + "ansi-reset", + "ansi-strikethrough", + "ansi-underline", + "ansi-white", + "ansi-wrap", + "ansi-yellow" + ] + } + }, + "version": "1.1.0" +} diff --git a/code/application_liste/app/node_modules/ansi-colors/types/index.d.ts b/code/application_liste/app/node_modules/ansi-colors/types/index.d.ts new file mode 100644 index 0000000..5f216a8 --- /dev/null +++ b/code/application_liste/app/node_modules/ansi-colors/types/index.d.ts @@ -0,0 +1,31 @@ +// Imported from from DefinitelyTyped project. +// TypeScript definitions for ansi-colors +// Definitions by: Rogier Schouten +// Integrated by: Jordan Mele + +export function bgblack(message: string): string; +export function bgblue(message: string): string; +export function bgcyan(message: string): string; +export function bggreen(message: string): string; +export function bgmagenta(message: string): string; +export function bgred(message: string): string; +export function bgwhite(message: string): string; +export function bgyellow(message: string): string; +export function black(message: string): string; +export function blue(message: string): string; +export function bold(message: string): string; +export function cyan(message: string): string; +export function dim(message: string): string; +export function gray(message: string): string; +export function green(message: string): string; +export function grey(message: string): string; +export function hidden(message: string): string; +export function inverse(message: string): string; +export function italic(message: string): string; +export function magenta(message: string): string; +export function red(message: string): string; +export function reset(message: string): string; +export function strikethrough(message: string): string; +export function underline(message: string): string; +export function white(message: string): string; +export function yellow(message: string): string; diff --git a/code/application_liste/app/node_modules/ansi-cyan/LICENSE b/code/application_liste/app/node_modules/ansi-cyan/LICENSE new file mode 100644 index 0000000..41283c9 --- /dev/null +++ b/code/application_liste/app/node_modules/ansi-cyan/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) <%= year() %>, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/ansi-cyan/index.js b/code/application_liste/app/node_modules/ansi-cyan/index.js new file mode 100644 index 0000000..b1e12c5 --- /dev/null +++ b/code/application_liste/app/node_modules/ansi-cyan/index.js @@ -0,0 +1,14 @@ +/*! + * ansi-cyan + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var wrap = require('ansi-wrap'); + +module.exports = function cyan(message) { + return wrap(36, 39, message); +}; diff --git a/code/application_liste/app/node_modules/ansi-cyan/package.json b/code/application_liste/app/node_modules/ansi-cyan/package.json new file mode 100644 index 0000000..7a63c6f --- /dev/null +++ b/code/application_liste/app/node_modules/ansi-cyan/package.json @@ -0,0 +1,86 @@ +{ + "_from": "ansi-cyan@^0.1.1", + "_id": "ansi-cyan@0.1.1", + "_inBundle": false, + "_integrity": "sha1-U4rlKK+JgvKK4w2G8vF0VtJgmHM=", + "_location": "/ansi-cyan", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ansi-cyan@^0.1.1", + "name": "ansi-cyan", + "escapedName": "ansi-cyan", + "rawSpec": "^0.1.1", + "saveSpec": null, + "fetchSpec": "^0.1.1" + }, + "_requiredBy": [ + "/gulp-concat-css/plugin-error" + ], + "_resolved": "https://registry.npmjs.org/ansi-cyan/-/ansi-cyan-0.1.1.tgz", + "_shasum": "538ae528af8982f28ae30d86f2f17456d2609873", + "_spec": "ansi-cyan@^0.1.1", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\gulp-concat-css\\node_modules\\plugin-error", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/ansi-cyan/issues" + }, + "bundleDependencies": false, + "dependencies": { + "ansi-wrap": "0.1.0" + }, + "deprecated": false, + "description": "The color cyan, in ansi.", + "devDependencies": { + "mocha": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/ansi-cyan", + "keywords": [ + "cyan", + "256", + "ansi", + "cli", + "color", + "colors", + "colour", + "command", + "command-line", + "console", + "format", + "formatting", + "iterm", + "log", + "logging", + "rgb", + "shell", + "string", + "style", + "styles", + "styling", + "terminal", + "text", + "tty", + "xterm" + ], + "license": "MIT", + "main": "index.js", + "name": "ansi-cyan", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/ansi-cyan.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "0.1.1" +} diff --git a/code/application_liste/app/node_modules/ansi-cyan/readme.md b/code/application_liste/app/node_modules/ansi-cyan/readme.md new file mode 100644 index 0000000..7b0c214 --- /dev/null +++ b/code/application_liste/app/node_modules/ansi-cyan/readme.md @@ -0,0 +1,74 @@ +# ansi-cyan [![NPM version](https://badge.fury.io/js/ansi-cyan.svg)](http://badge.fury.io/js/ansi-cyan) + +> The color cyan, in ansi. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i ansi-cyan --save +``` + +## Usage + +```js +var cyan = require('ansi-cyan'); +``` + +## Related projects + +* [ansi-reset](https://github.com/jonschlinkert/ansi-reset) +* [ansi-bold](https://github.com/jonschlinkert/ansi-bold) +* [ansi-dim](https://github.com/jonschlinkert/ansi-dim) +* [ansi-italic](https://github.com/jonschlinkert/ansi-italic) +* [ansi-underline](https://github.com/jonschlinkert/ansi-underline) +* [ansi-inverse](https://github.com/jonschlinkert/ansi-inverse) +* [ansi-hidden](https://github.com/jonschlinkert/ansi-hidden) +* [ansi-strikethrough](https://github.com/jonschlinkert/ansi-strikethrough) +* [ansi-black](https://github.com/jonschlinkert/ansi-black) +* [ansi-red](https://github.com/jonschlinkert/ansi-red) +* [ansi-green](https://github.com/jonschlinkert/ansi-green) +* [ansi-yellow](https://github.com/jonschlinkert/ansi-yellow) +* [ansi-blue](https://github.com/jonschlinkert/ansi-blue) +* [ansi-magenta](https://github.com/jonschlinkert/ansi-magenta) +* [ansi-cyan](https://github.com/jonschlinkert/ansi-cyan) +* [ansi-white](https://github.com/jonschlinkert/ansi-white) +* [ansi-gray](https://github.com/jonschlinkert/ansi-gray) +* [ansi-grey](https://github.com/jonschlinkert/ansi-grey) +* [ansi-bgblack](https://github.com/jonschlinkert/ansi-bgblack) +* [ansi-bgred](https://github.com/jonschlinkert/ansi-bgred) +* [ansi-bggreen](https://github.com/jonschlinkert/ansi-bggreen) +* [ansi-bgyellow](https://github.com/jonschlinkert/ansi-bgyellow) +* [ansi-bgblue](https://github.com/jonschlinkert/ansi-bgblue) +* [ansi-bgmagenta](https://github.com/jonschlinkert/ansi-bgmagenta) +* [ansi-bgcyan](https://github.com/jonschlinkert/ansi-bgcyan) +* [ansi-bgwhite](https://github.com/jonschlinkert/ansi-bgwhite) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/ansi-cyan/issues/new) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 21, 2015._ \ No newline at end of file diff --git a/code/application_liste/app/node_modules/ansi-gray/LICENSE b/code/application_liste/app/node_modules/ansi-gray/LICENSE new file mode 100644 index 0000000..41283c9 --- /dev/null +++ b/code/application_liste/app/node_modules/ansi-gray/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) <%= year() %>, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/ansi-gray/index.js b/code/application_liste/app/node_modules/ansi-gray/index.js new file mode 100644 index 0000000..c22176a --- /dev/null +++ b/code/application_liste/app/node_modules/ansi-gray/index.js @@ -0,0 +1,14 @@ +/*! + * ansi-gray + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var wrap = require('ansi-wrap'); + +module.exports = function gray(message) { + return wrap(90, 39, message); +}; diff --git a/code/application_liste/app/node_modules/ansi-gray/package.json b/code/application_liste/app/node_modules/ansi-gray/package.json new file mode 100644 index 0000000..aa7194f --- /dev/null +++ b/code/application_liste/app/node_modules/ansi-gray/package.json @@ -0,0 +1,86 @@ +{ + "_from": "ansi-gray@^0.1.1", + "_id": "ansi-gray@0.1.1", + "_inBundle": false, + "_integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", + "_location": "/ansi-gray", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ansi-gray@^0.1.1", + "name": "ansi-gray", + "escapedName": "ansi-gray", + "rawSpec": "^0.1.1", + "saveSpec": null, + "fetchSpec": "^0.1.1" + }, + "_requiredBy": [ + "/fancy-log" + ], + "_resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", + "_shasum": "2962cf54ec9792c48510a3deb524436861ef7251", + "_spec": "ansi-gray@^0.1.1", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\fancy-log", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/ansi-gray/issues" + }, + "bundleDependencies": false, + "dependencies": { + "ansi-wrap": "0.1.0" + }, + "deprecated": false, + "description": "The color gray, in ansi.", + "devDependencies": { + "mocha": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/ansi-gray", + "keywords": [ + "gray", + "256", + "ansi", + "cli", + "color", + "colors", + "colour", + "command", + "command-line", + "console", + "format", + "formatting", + "iterm", + "log", + "logging", + "rgb", + "shell", + "string", + "style", + "styles", + "styling", + "terminal", + "text", + "tty", + "xterm" + ], + "license": "MIT", + "main": "index.js", + "name": "ansi-gray", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/ansi-gray.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "0.1.1" +} diff --git a/code/application_liste/app/node_modules/ansi-gray/readme.md b/code/application_liste/app/node_modules/ansi-gray/readme.md new file mode 100644 index 0000000..9b59a29 --- /dev/null +++ b/code/application_liste/app/node_modules/ansi-gray/readme.md @@ -0,0 +1,74 @@ +# ansi-gray [![NPM version](https://badge.fury.io/js/ansi-gray.svg)](http://badge.fury.io/js/ansi-gray) + +> The color gray, in ansi. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i ansi-gray --save +``` + +## Usage + +```js +var gray = require('ansi-gray'); +``` + +## Related projects + +* [ansi-reset](https://github.com/jonschlinkert/ansi-reset) +* [ansi-bold](https://github.com/jonschlinkert/ansi-bold) +* [ansi-dim](https://github.com/jonschlinkert/ansi-dim) +* [ansi-italic](https://github.com/jonschlinkert/ansi-italic) +* [ansi-underline](https://github.com/jonschlinkert/ansi-underline) +* [ansi-inverse](https://github.com/jonschlinkert/ansi-inverse) +* [ansi-hidden](https://github.com/jonschlinkert/ansi-hidden) +* [ansi-strikethrough](https://github.com/jonschlinkert/ansi-strikethrough) +* [ansi-black](https://github.com/jonschlinkert/ansi-black) +* [ansi-red](https://github.com/jonschlinkert/ansi-red) +* [ansi-green](https://github.com/jonschlinkert/ansi-green) +* [ansi-yellow](https://github.com/jonschlinkert/ansi-yellow) +* [ansi-blue](https://github.com/jonschlinkert/ansi-blue) +* [ansi-magenta](https://github.com/jonschlinkert/ansi-magenta) +* [ansi-cyan](https://github.com/jonschlinkert/ansi-cyan) +* [ansi-white](https://github.com/jonschlinkert/ansi-white) +* [ansi-gray](https://github.com/jonschlinkert/ansi-gray) +* [ansi-grey](https://github.com/jonschlinkert/ansi-grey) +* [ansi-bgblack](https://github.com/jonschlinkert/ansi-bgblack) +* [ansi-bgred](https://github.com/jonschlinkert/ansi-bgred) +* [ansi-bggreen](https://github.com/jonschlinkert/ansi-bggreen) +* [ansi-bgyellow](https://github.com/jonschlinkert/ansi-bgyellow) +* [ansi-bgblue](https://github.com/jonschlinkert/ansi-bgblue) +* [ansi-bgmagenta](https://github.com/jonschlinkert/ansi-bgmagenta) +* [ansi-bgcyan](https://github.com/jonschlinkert/ansi-bgcyan) +* [ansi-bgwhite](https://github.com/jonschlinkert/ansi-bgwhite) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/ansi-gray/issues/new) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 21, 2015._ \ No newline at end of file diff --git a/code/application_liste/app/node_modules/ansi-red/LICENSE b/code/application_liste/app/node_modules/ansi-red/LICENSE new file mode 100644 index 0000000..41283c9 --- /dev/null +++ b/code/application_liste/app/node_modules/ansi-red/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) <%= year() %>, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/ansi-red/index.js b/code/application_liste/app/node_modules/ansi-red/index.js new file mode 100644 index 0000000..00ea302 --- /dev/null +++ b/code/application_liste/app/node_modules/ansi-red/index.js @@ -0,0 +1,14 @@ +/*! + * ansi-red + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +var wrap = require('ansi-wrap'); + +module.exports = function red(message) { + return wrap(31, 39, message); +}; diff --git a/code/application_liste/app/node_modules/ansi-red/package.json b/code/application_liste/app/node_modules/ansi-red/package.json new file mode 100644 index 0000000..adc5f4e --- /dev/null +++ b/code/application_liste/app/node_modules/ansi-red/package.json @@ -0,0 +1,86 @@ +{ + "_from": "ansi-red@^0.1.1", + "_id": "ansi-red@0.1.1", + "_inBundle": false, + "_integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw=", + "_location": "/ansi-red", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ansi-red@^0.1.1", + "name": "ansi-red", + "escapedName": "ansi-red", + "rawSpec": "^0.1.1", + "saveSpec": null, + "fetchSpec": "^0.1.1" + }, + "_requiredBy": [ + "/gulp-concat-css/plugin-error" + ], + "_resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz", + "_shasum": "8c638f9d1080800a353c9c28c8a81ca4705d946c", + "_spec": "ansi-red@^0.1.1", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\gulp-concat-css\\node_modules\\plugin-error", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/ansi-red/issues" + }, + "bundleDependencies": false, + "dependencies": { + "ansi-wrap": "0.1.0" + }, + "deprecated": false, + "description": "The color red, in ansi.", + "devDependencies": { + "mocha": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/ansi-red", + "keywords": [ + "red", + "256", + "ansi", + "cli", + "color", + "colors", + "colour", + "command", + "command-line", + "console", + "format", + "formatting", + "iterm", + "log", + "logging", + "rgb", + "shell", + "string", + "style", + "styles", + "styling", + "terminal", + "text", + "tty", + "xterm" + ], + "license": "MIT", + "main": "index.js", + "name": "ansi-red", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/ansi-red.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "0.1.1" +} diff --git a/code/application_liste/app/node_modules/ansi-red/readme.md b/code/application_liste/app/node_modules/ansi-red/readme.md new file mode 100644 index 0000000..e09e77b --- /dev/null +++ b/code/application_liste/app/node_modules/ansi-red/readme.md @@ -0,0 +1,74 @@ +# ansi-red [![NPM version](https://badge.fury.io/js/ansi-red.svg)](http://badge.fury.io/js/ansi-red) + +> The color red, in ansi. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i ansi-red --save +``` + +## Usage + +```js +var red = require('ansi-red'); +``` + +## Related projects + +* [ansi-reset](https://github.com/jonschlinkert/ansi-reset) +* [ansi-bold](https://github.com/jonschlinkert/ansi-bold) +* [ansi-dim](https://github.com/jonschlinkert/ansi-dim) +* [ansi-italic](https://github.com/jonschlinkert/ansi-italic) +* [ansi-underline](https://github.com/jonschlinkert/ansi-underline) +* [ansi-inverse](https://github.com/jonschlinkert/ansi-inverse) +* [ansi-hidden](https://github.com/jonschlinkert/ansi-hidden) +* [ansi-strikethrough](https://github.com/jonschlinkert/ansi-strikethrough) +* [ansi-black](https://github.com/jonschlinkert/ansi-black) +* [ansi-red](https://github.com/jonschlinkert/ansi-red) +* [ansi-green](https://github.com/jonschlinkert/ansi-green) +* [ansi-yellow](https://github.com/jonschlinkert/ansi-yellow) +* [ansi-blue](https://github.com/jonschlinkert/ansi-blue) +* [ansi-magenta](https://github.com/jonschlinkert/ansi-magenta) +* [ansi-cyan](https://github.com/jonschlinkert/ansi-cyan) +* [ansi-white](https://github.com/jonschlinkert/ansi-white) +* [ansi-gray](https://github.com/jonschlinkert/ansi-gray) +* [ansi-grey](https://github.com/jonschlinkert/ansi-grey) +* [ansi-bgblack](https://github.com/jonschlinkert/ansi-bgblack) +* [ansi-bgred](https://github.com/jonschlinkert/ansi-bgred) +* [ansi-bggreen](https://github.com/jonschlinkert/ansi-bggreen) +* [ansi-bgyellow](https://github.com/jonschlinkert/ansi-bgyellow) +* [ansi-bgblue](https://github.com/jonschlinkert/ansi-bgblue) +* [ansi-bgmagenta](https://github.com/jonschlinkert/ansi-bgmagenta) +* [ansi-bgcyan](https://github.com/jonschlinkert/ansi-bgcyan) +* [ansi-bgwhite](https://github.com/jonschlinkert/ansi-bgwhite) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/ansi-red/issues/new) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 21, 2015._ \ No newline at end of file diff --git a/code/application_liste/app/node_modules/ansi-regex/index.js b/code/application_liste/app/node_modules/ansi-regex/index.js new file mode 100644 index 0000000..b9574ed --- /dev/null +++ b/code/application_liste/app/node_modules/ansi-regex/index.js @@ -0,0 +1,4 @@ +'use strict'; +module.exports = function () { + return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g; +}; diff --git a/code/application_liste/app/node_modules/ansi-regex/license b/code/application_liste/app/node_modules/ansi-regex/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/code/application_liste/app/node_modules/ansi-regex/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/ansi-regex/package.json b/code/application_liste/app/node_modules/ansi-regex/package.json new file mode 100644 index 0000000..4fc2d37 --- /dev/null +++ b/code/application_liste/app/node_modules/ansi-regex/package.json @@ -0,0 +1,108 @@ +{ + "_from": "ansi-regex@^2.0.0", + "_id": "ansi-regex@2.1.1", + "_inBundle": false, + "_integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "_location": "/ansi-regex", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ansi-regex@^2.0.0", + "name": "ansi-regex", + "escapedName": "ansi-regex", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/strip-ansi" + ], + "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "_shasum": "c3b33ab5ee360d86e0e628f0468ae7ef27d654df", + "_spec": "ansi-regex@^2.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\strip-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/ansi-regex/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Regular expression for matching ANSI escape codes", + "devDependencies": { + "ava": "0.17.0", + "xo": "0.16.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/chalk/ansi-regex#readme", + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "license": "MIT", + "maintainers": [ + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Joshua Appelman", + "email": "jappelman@xebia.com", + "url": "jbnicolai.com" + }, + { + "name": "JD Ballard", + "email": "i.am.qix@gmail.com", + "url": "github.com/qix-" + } + ], + "name": "ansi-regex", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-regex.git" + }, + "scripts": { + "test": "xo && ava --verbose", + "view-supported": "node fixtures/view-codes.js" + }, + "version": "2.1.1", + "xo": { + "rules": { + "guard-for-in": 0, + "no-loop-func": 0 + } + } +} diff --git a/code/application_liste/app/node_modules/ansi-regex/readme.md b/code/application_liste/app/node_modules/ansi-regex/readme.md new file mode 100644 index 0000000..6a928ed --- /dev/null +++ b/code/application_liste/app/node_modules/ansi-regex/readme.md @@ -0,0 +1,39 @@ +# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex) + +> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install --save ansi-regex +``` + + +## Usage + +```js +const ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001b[4mcake\u001b[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001b[4mcake\u001b[0m'.match(ansiRegex()); +//=> ['\u001b[4m', '\u001b[0m'] +``` + +## FAQ + +### Why do you test for codes not in the ECMA 48 standard? + +Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. If I recall correctly, we test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. + +On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/code/application_liste/app/node_modules/ansi-styles/index.js b/code/application_liste/app/node_modules/ansi-styles/index.js new file mode 100644 index 0000000..7894527 --- /dev/null +++ b/code/application_liste/app/node_modules/ansi-styles/index.js @@ -0,0 +1,65 @@ +'use strict'; + +function assembleStyles () { + var styles = { + modifiers: { + reset: [0, 0], + bold: [1, 22], // 21 isn't widely supported and 22 does the same thing + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + colors: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39] + }, + bgColors: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49] + } + }; + + // fix humans + styles.colors.grey = styles.colors.gray; + + Object.keys(styles).forEach(function (groupName) { + var group = styles[groupName]; + + Object.keys(group).forEach(function (styleName) { + var style = group[styleName]; + + styles[styleName] = group[styleName] = { + open: '\u001b[' + style[0] + 'm', + close: '\u001b[' + style[1] + 'm' + }; + }); + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + }); + + return styles; +} + +Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles +}); diff --git a/code/application_liste/app/node_modules/ansi-styles/license b/code/application_liste/app/node_modules/ansi-styles/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/code/application_liste/app/node_modules/ansi-styles/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/ansi-styles/package.json b/code/application_liste/app/node_modules/ansi-styles/package.json new file mode 100644 index 0000000..7cd04a7 --- /dev/null +++ b/code/application_liste/app/node_modules/ansi-styles/package.json @@ -0,0 +1,90 @@ +{ + "_from": "ansi-styles@^2.2.1", + "_id": "ansi-styles@2.2.1", + "_inBundle": false, + "_integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "_location": "/ansi-styles", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ansi-styles@^2.2.1", + "name": "ansi-styles", + "escapedName": "ansi-styles", + "rawSpec": "^2.2.1", + "saveSpec": null, + "fetchSpec": "^2.2.1" + }, + "_requiredBy": [ + "/chalk" + ], + "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "_shasum": "b432dd3358b634cf75e1e4664368240533c1ddbe", + "_spec": "ansi-styles@^2.2.1", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\chalk", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/ansi-styles/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "ANSI escape codes for styling strings in the terminal", + "devDependencies": { + "mocha": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/chalk/ansi-styles#readme", + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "license": "MIT", + "maintainers": [ + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Joshua Appelman", + "email": "jappelman@xebia.com", + "url": "jbnicolai.com" + } + ], + "name": "ansi-styles", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-styles.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "2.2.1" +} diff --git a/code/application_liste/app/node_modules/ansi-styles/readme.md b/code/application_liste/app/node_modules/ansi-styles/readme.md new file mode 100644 index 0000000..3f933f6 --- /dev/null +++ b/code/application_liste/app/node_modules/ansi-styles/readme.md @@ -0,0 +1,86 @@ +# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) + +> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal + +You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. + +![](screenshot.png) + + +## Install + +``` +$ npm install --save ansi-styles +``` + + +## Usage + +```js +var ansi = require('ansi-styles'); + +console.log(ansi.green.open + 'Hello world!' + ansi.green.close); +``` + + +## API + +Each style has an `open` and `close` property. + + +## Styles + +### Modifiers + +- `reset` +- `bold` +- `dim` +- `italic` *(not widely supported)* +- `underline` +- `inverse` +- `hidden` +- `strikethrough` *(not widely supported)* + +### Colors + +- `black` +- `red` +- `green` +- `yellow` +- `blue` +- `magenta` +- `cyan` +- `white` +- `gray` + +### Background colors + +- `bgBlack` +- `bgRed` +- `bgGreen` +- `bgYellow` +- `bgBlue` +- `bgMagenta` +- `bgCyan` +- `bgWhite` + + +## Advanced usage + +By default you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. + +- `ansi.modifiers` +- `ansi.colors` +- `ansi.bgColors` + + +###### Example + +```js +console.log(ansi.colors.green.open); +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/code/application_liste/app/node_modules/ansi-wrap/LICENSE b/code/application_liste/app/node_modules/ansi-wrap/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/code/application_liste/app/node_modules/ansi-wrap/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/ansi-wrap/README.md b/code/application_liste/app/node_modules/ansi-wrap/README.md new file mode 100644 index 0000000..032c1e6 --- /dev/null +++ b/code/application_liste/app/node_modules/ansi-wrap/README.md @@ -0,0 +1,89 @@ +# ansi-wrap [![NPM version](https://badge.fury.io/js/ansi-wrap.svg)](http://badge.fury.io/js/ansi-wrap) + +> Create ansi colors by passing the open and close codes. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i ansi-wrap --save +``` + +## Usage + +```js +var wrap = require('ansi-wrap'); +``` + +**Example** + +Pass codes for [ansi magenta background](https://github.com/jonschlinkert/ansi-bgmagenta): + +```js +console.log(wrap(45, 49, 'This is a message...')); +//=> '\u001b[45mfoo\u001b[49m' +``` + +Which prints out... + +[![screen shot 2015-05-21 at 8 28 32 pm](https://cloud.githubusercontent.com/assets/383994/7761769/12488afa-fff8-11e4-9cc1-71a8a6ec14a4.png)](https://www.npmjs.com/) + +## Related projects + +This is used in these projects: + +* [ansi-reset](https://github.com/jonschlinkert/ansi-reset) +* [ansi-bold](https://github.com/jonschlinkert/ansi-bold) +* [ansi-dim](https://github.com/jonschlinkert/ansi-dim) +* [ansi-italic](https://github.com/jonschlinkert/ansi-italic) +* [ansi-underline](https://github.com/jonschlinkert/ansi-underline) +* [ansi-inverse](https://github.com/jonschlinkert/ansi-inverse) +* [ansi-hidden](https://github.com/jonschlinkert/ansi-hidden) +* [ansi-strikethrough](https://github.com/jonschlinkert/ansi-strikethrough) +* [ansi-black](https://github.com/jonschlinkert/ansi-black) +* [ansi-red](https://github.com/jonschlinkert/ansi-red) +* [ansi-green](https://github.com/jonschlinkert/ansi-green) +* [ansi-yellow](https://github.com/jonschlinkert/ansi-yellow) +* [ansi-blue](https://github.com/jonschlinkert/ansi-blue) +* [ansi-magenta](https://github.com/jonschlinkert/ansi-magenta) +* [ansi-cyan](https://github.com/jonschlinkert/ansi-cyan) +* [ansi-white](https://github.com/jonschlinkert/ansi-white) +* [ansi-gray](https://github.com/jonschlinkert/ansi-gray) +* [ansi-grey](https://github.com/jonschlinkert/ansi-grey) +* [ansi-bgblack](https://github.com/jonschlinkert/ansi-bgblack) +* [ansi-bgred](https://github.com/jonschlinkert/ansi-bgred) +* [ansi-bggreen](https://github.com/jonschlinkert/ansi-bggreen) +* [ansi-bgyellow](https://github.com/jonschlinkert/ansi-bgyellow) +* [ansi-bgblue](https://github.com/jonschlinkert/ansi-bgblue) +* [ansi-bgmagenta](https://github.com/jonschlinkert/ansi-bgmagenta) +* [ansi-bgcyan](https://github.com/jonschlinkert/ansi-bgcyan) +* [ansi-bgwhite](https://github.com/jonschlinkert/ansi-bgwhite) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/ansi-wrap/issues/new) + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on May 21, 2015._ \ No newline at end of file diff --git a/code/application_liste/app/node_modules/ansi-wrap/index.js b/code/application_liste/app/node_modules/ansi-wrap/index.js new file mode 100644 index 0000000..ffc52d7 --- /dev/null +++ b/code/application_liste/app/node_modules/ansi-wrap/index.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function(a, b, msg) { + return '\u001b['+ a + 'm' + msg + '\u001b[' + b + 'm'; +}; diff --git a/code/application_liste/app/node_modules/ansi-wrap/package.json b/code/application_liste/app/node_modules/ansi-wrap/package.json new file mode 100644 index 0000000..efcc8dd --- /dev/null +++ b/code/application_liste/app/node_modules/ansi-wrap/package.json @@ -0,0 +1,60 @@ +{ + "_from": "ansi-wrap@^0.1.0", + "_id": "ansi-wrap@0.1.0", + "_inBundle": false, + "_integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", + "_location": "/ansi-wrap", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ansi-wrap@^0.1.0", + "name": "ansi-wrap", + "escapedName": "ansi-wrap", + "rawSpec": "^0.1.0", + "saveSpec": null, + "fetchSpec": "^0.1.0" + }, + "_requiredBy": [ + "/ansi-colors", + "/ansi-gray" + ], + "_resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "_shasum": "a82250ddb0015e9a27ca82e82ea603bbfa45efaf", + "_spec": "ansi-wrap@^0.1.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\ansi-colors", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/ansi-wrap/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "Create ansi colors by passing the open and close codes.", + "devDependencies": {}, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/ansi-wrap", + "keywords": [], + "license": { + "type": "MIT", + "url": "https://github.com/jonschlinkert/ansi-wrap/blob/master/LICENSE" + }, + "main": "index.js", + "name": "ansi-wrap", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/ansi-wrap.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "0.1.0" +} diff --git a/code/application_liste/app/node_modules/anymatch/LICENSE b/code/application_liste/app/node_modules/anymatch/LICENSE new file mode 100644 index 0000000..bc42470 --- /dev/null +++ b/code/application_liste/app/node_modules/anymatch/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) 2014 Elan Shanker + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/code/application_liste/app/node_modules/anymatch/README.md b/code/application_liste/app/node_modules/anymatch/README.md new file mode 100644 index 0000000..f674f40 --- /dev/null +++ b/code/application_liste/app/node_modules/anymatch/README.md @@ -0,0 +1,99 @@ +anymatch [![Build Status](https://travis-ci.org/micromatch/anymatch.svg?branch=master)](https://travis-ci.org/micromatch/anymatch) [![Coverage Status](https://img.shields.io/coveralls/micromatch/anymatch.svg?branch=master)](https://coveralls.io/r/micromatch/anymatch?branch=master) +====== +Javascript module to match a string against a regular expression, glob, string, +or function that takes the string as an argument and returns a truthy or falsy +value. The matcher can also be an array of any or all of these. Useful for +allowing a very flexible user-defined config to define things like file paths. + +__Note: This module has Bash-parity, please be aware that Windows-style backslashes are not supported as separators. See https://github.com/micromatch/micromatch#backslashes for more information.__ + +[![NPM](https://nodei.co/npm/anymatch.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/anymatch/) +[![NPM](https://nodei.co/npm-dl/anymatch.png?height=3&months=9)](https://nodei.co/npm-dl/anymatch/) + +Usage +----- +```sh +npm install anymatch --save +``` + +#### anymatch (matchers, testString, [returnIndex], [startIndex], [endIndex]) +* __matchers__: (_Array|String|RegExp|Function_) +String to be directly matched, string with glob patterns, regular expression +test, function that takes the testString as an argument and returns a truthy +value if it should be matched, or an array of any number and mix of these types. +* __testString__: (_String|Array_) The string to test against the matchers. If +passed as an array, the first element of the array will be used as the +`testString` for non-function matchers, while the entire array will be applied +as the arguments for function matchers. +* __returnIndex__: (_Boolean [optional]_) If true, return the array index of +the first matcher that that testString matched, or -1 if no match, instead of a +boolean result. +* __startIndex, endIndex__: (_Integer [optional]_) Can be used to define a +subset out of the array of provided matchers to test against. Can be useful +with bound matcher functions (see below). When used with `returnIndex = true` +preserves original indexing. Behaves the same as `Array.prototype.slice` (i.e. +includes array members up to, but not including endIndex). + +```js +var anymatch = require('anymatch'); + +var matchers = [ + 'path/to/file.js', + 'path/anyjs/**/*.js', + /foo\.js$/, + function (string) { + return string.indexOf('bar') !== -1 && string.length > 10 + } +]; + +anymatch(matchers, 'path/to/file.js'); // true +anymatch(matchers, 'path/anyjs/baz.js'); // true +anymatch(matchers, 'path/to/foo.js'); // true +anymatch(matchers, 'path/to/bar.js'); // true +anymatch(matchers, 'bar.js'); // false + +// returnIndex = true +anymatch(matchers, 'foo.js', true); // 2 +anymatch(matchers, 'path/anyjs/foo.js', true); // 1 + +// skip matchers +anymatch(matchers, 'path/to/file.js', false, 1); // false +anymatch(matchers, 'path/anyjs/foo.js', true, 2, 3); // 2 +anymatch(matchers, 'path/to/bar.js', true, 0, 3); // -1 + +// using globs to match directories and their children +anymatch('node_modules', 'node_modules'); // true +anymatch('node_modules', 'node_modules/somelib/index.js'); // false +anymatch('node_modules/**', 'node_modules/somelib/index.js'); // true +anymatch('node_modules/**', '/absolute/path/to/node_modules/somelib/index.js'); // false +anymatch('**/node_modules/**', '/absolute/path/to/node_modules/somelib/index.js'); // true +``` + +#### anymatch (matchers) +You can also pass in only your matcher(s) to get a curried function that has +already been bound to the provided matching criteria. This can be used as an +`Array.prototype.filter` callback. + +```js +var matcher = anymatch(matchers); + +matcher('path/to/file.js'); // true +matcher('path/anyjs/baz.js', true); // 1 +matcher('path/anyjs/baz.js', true, 2); // -1 + +['foo.js', 'bar.js'].filter(matcher); // ['foo.js'] +``` + +Change Log +---------- +[See release notes page on GitHub](https://github.com/micromatch/anymatch/releases) + +NOTE: As of v2.0.0, [micromatch](https://github.com/jonschlinkert/micromatch) moves away from minimatch-parity and inline with Bash. This includes handling backslashes differently (see https://github.com/micromatch/micromatch#backslashes for more information). + +NOTE: As of v1.2.0, anymatch uses [micromatch](https://github.com/jonschlinkert/micromatch) +for glob pattern matching. Issues with glob pattern matching should be +reported directly to the [micromatch issue tracker](https://github.com/jonschlinkert/micromatch/issues). + +License +------- +[ISC](https://raw.github.com/micromatch/anymatch/master/LICENSE) diff --git a/code/application_liste/app/node_modules/anymatch/index.js b/code/application_liste/app/node_modules/anymatch/index.js new file mode 100644 index 0000000..e411618 --- /dev/null +++ b/code/application_liste/app/node_modules/anymatch/index.js @@ -0,0 +1,67 @@ +'use strict'; + +var micromatch = require('micromatch'); +var normalize = require('normalize-path'); +var path = require('path'); // required for tests. +var arrify = function(a) { return a == null ? [] : (Array.isArray(a) ? a : [a]); }; + +var anymatch = function(criteria, value, returnIndex, startIndex, endIndex) { + criteria = arrify(criteria); + value = arrify(value); + if (arguments.length === 1) { + return anymatch.bind(null, criteria.map(function(criterion) { + return typeof criterion === 'string' && criterion[0] !== '!' ? + micromatch.matcher(criterion) : criterion; + })); + } + startIndex = startIndex || 0; + var string = value[0]; + var altString, altValue; + var matched = false; + var matchIndex = -1; + function testCriteria(criterion, index) { + var result; + switch (Object.prototype.toString.call(criterion)) { + case '[object String]': + result = string === criterion || altString && altString === criterion; + result = result || micromatch.isMatch(string, criterion); + break; + case '[object RegExp]': + result = criterion.test(string) || altString && criterion.test(altString); + break; + case '[object Function]': + result = criterion.apply(null, value); + result = result || altValue && criterion.apply(null, altValue); + break; + default: + result = false; + } + if (result) { + matchIndex = index + startIndex; + } + return result; + } + var crit = criteria; + var negGlobs = crit.reduce(function(arr, criterion, index) { + if (typeof criterion === 'string' && criterion[0] === '!') { + if (crit === criteria) { + // make a copy before modifying + crit = crit.slice(); + } + crit[index] = null; + arr.push(criterion.substr(1)); + } + return arr; + }, []); + if (!negGlobs.length || !micromatch.any(string, negGlobs)) { + if (path.sep === '\\' && typeof string === 'string') { + altString = normalize(string); + altString = altString === string ? null : altString; + if (altString) altValue = [altString].concat(value.slice(1)); + } + matched = crit.slice(startIndex, endIndex).some(testCriteria); + } + return returnIndex === true ? matchIndex : matched; +}; + +module.exports = anymatch; diff --git a/code/application_liste/app/node_modules/anymatch/package.json b/code/application_liste/app/node_modules/anymatch/package.json new file mode 100644 index 0000000..ac4a83b --- /dev/null +++ b/code/application_liste/app/node_modules/anymatch/package.json @@ -0,0 +1,73 @@ +{ + "_from": "anymatch@^2.0.0", + "_id": "anymatch@2.0.0", + "_inBundle": false, + "_integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "_location": "/anymatch", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "anymatch@^2.0.0", + "name": "anymatch", + "escapedName": "anymatch", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/chokidar", + "/glob-watcher" + ], + "_resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "_shasum": "bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb", + "_spec": "anymatch@^2.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\glob-watcher", + "author": { + "name": "Elan Shanker", + "url": "http://github.com/es128" + }, + "bugs": { + "url": "https://github.com/micromatch/anymatch/issues" + }, + "bundleDependencies": false, + "dependencies": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "deprecated": false, + "description": "Matches strings against configurable strings, globs, regular expressions, and/or functions", + "devDependencies": { + "coveralls": "^2.7.0", + "istanbul": "^0.4.5", + "mocha": "^3.0.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/micromatch/anymatch", + "keywords": [ + "match", + "any", + "string", + "file", + "fs", + "list", + "glob", + "regex", + "regexp", + "regular", + "expression", + "function" + ], + "license": "ISC", + "name": "anymatch", + "repository": { + "type": "git", + "url": "git+https://github.com/micromatch/anymatch.git" + }, + "scripts": { + "test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls" + }, + "version": "2.0.0" +} diff --git a/code/application_liste/app/node_modules/append-buffer/LICENSE b/code/application_liste/app/node_modules/append-buffer/LICENSE new file mode 100644 index 0000000..ffb7ec5 --- /dev/null +++ b/code/application_liste/app/node_modules/append-buffer/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017, Brian Woodward. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/code/application_liste/app/node_modules/append-buffer/README.md b/code/application_liste/app/node_modules/append-buffer/README.md new file mode 100644 index 0000000..681a3c3 --- /dev/null +++ b/code/application_liste/app/node_modules/append-buffer/README.md @@ -0,0 +1,95 @@ +# append-buffer [![NPM version](https://img.shields.io/npm/v/append-buffer.svg?style=flat)](https://www.npmjs.com/package/append-buffer) [![NPM monthly downloads](https://img.shields.io/npm/dm/append-buffer.svg?style=flat)](https://npmjs.org/package/append-buffer) [![NPM total downloads](https://img.shields.io/npm/dt/append-buffer.svg?style=flat)](https://npmjs.org/package/append-buffer) [![Linux Build Status](https://img.shields.io/travis/doowb/append-buffer.svg?style=flat&label=Travis)](https://travis-ci.org/doowb/append-buffer) [![Windows Build Status](https://img.shields.io/appveyor/ci/doowb/append-buffer.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/doowb/append-buffer) + +> Append a buffer to another buffer ensuring to preserve line ending characters. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save append-buffer +``` + +Install with [yarn](https://yarnpkg.com): + +```sh +$ yarn add append-buffer +``` + +## Usage + +```js +var appendBuffer = require('append-buffer'); +``` + +## API + +### [appendBuffer](index.js#L28) + +Append a buffer to another buffer ensuring to preserve line ending characters. + +**Params** + +* `buf` **{Buffer}**: Buffer that will be used to check for an existing line ending. The suffix is appended to this. +* `suffix` **{Buffer}**: Buffer that will be appended to the buf. +* `returns` **{Buffer}**: Final Buffer + +**Example** + +```js +console.log([appendBuffer(new Buffer('abc\r\n'), new Buffer('def')).toString()]); +//=> [ 'abc\r\ndef\r\n' ] + +console.log([appendBuffer(new Buffer('abc\n'), new Buffer('def')).toString()]); +//=> [ 'abc\ndef\n' ] + +// uses os.EOL when a line ending is not found +console.log([appendBuffer(new Buffer('abc'), new Buffer('def')).toString()]); +//=> [ 'abc\ndef' ] +``` + +## Attribution + +The code in this module was originally added in a [PR](https://github.com/jonschlinkert/file-normalize/pull/3) to [file-normalize](https://github.com/jonschlinkert/file-normalize). It has been split out to allow for standalone use cases. + +## About + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards. + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Brian Woodward** + +* [github/doowb](https://github.com/doowb) +* [twitter/doowb](https://twitter.com/doowb) + +### License + +Copyright © 2017, [Brian Woodward](https://doowb.com). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on August 01, 2017._ \ No newline at end of file diff --git a/code/application_liste/app/node_modules/append-buffer/index.js b/code/application_liste/app/node_modules/append-buffer/index.js new file mode 100644 index 0000000..a385570 --- /dev/null +++ b/code/application_liste/app/node_modules/append-buffer/index.js @@ -0,0 +1,41 @@ +'use strict'; + +var os = require('os'); +var equals = require('buffer-equal'); +var cr = new Buffer('\r\n'); +var nl = new Buffer('\n'); + +/** + * Append a buffer to another buffer ensuring to preserve line ending characters. + * + * ```js + * console.log([appendBuffer(new Buffer('abc\r\n'), new Buffer('def')).toString()]); + * //=> [ 'abc\r\ndef\r\n' ] + * + * console.log([appendBuffer(new Buffer('abc\n'), new Buffer('def')).toString()]); + * //=> [ 'abc\ndef\n' ] + * + * // uses os.EOL when a line ending is not found + * console.log([appendBuffer(new Buffer('abc'), new Buffer('def')).toString()]); + * //=> [ 'abc\ndef' ] + * * ``` + * @param {Buffer} `buf` Buffer that will be used to check for an existing line ending. The suffix is appended to this. + * @param {Buffer} `suffix` Buffer that will be appended to the buf. + * @return {Buffer} Final Buffer + * @api public + */ + +module.exports = function appendBuffer(buf, suffix) { + if (!suffix || !suffix.length) { + return buf; + } + var eol; + if (equals(buf.slice(-2), cr)) { + eol = cr; + } else if (equals(buf.slice(-1), nl)) { + eol = nl; + } else { + return Buffer.concat([buf, new Buffer(os.EOL), new Buffer(suffix)]); + } + return Buffer.concat([buf, new Buffer(suffix), eol]); +}; diff --git a/code/application_liste/app/node_modules/append-buffer/package.json b/code/application_liste/app/node_modules/append-buffer/package.json new file mode 100644 index 0000000..5d8695e --- /dev/null +++ b/code/application_liste/app/node_modules/append-buffer/package.json @@ -0,0 +1,84 @@ +{ + "_from": "append-buffer@^1.0.2", + "_id": "append-buffer@1.0.2", + "_inBundle": false, + "_integrity": "sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE=", + "_location": "/append-buffer", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "append-buffer@^1.0.2", + "name": "append-buffer", + "escapedName": "append-buffer", + "rawSpec": "^1.0.2", + "saveSpec": null, + "fetchSpec": "^1.0.2" + }, + "_requiredBy": [ + "/vinyl-sourcemap" + ], + "_resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz", + "_shasum": "d8220cf466081525efea50614f3de6514dfa58f1", + "_spec": "append-buffer@^1.0.2", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\vinyl-sourcemap", + "author": { + "name": "Brian Woodward", + "url": "https://doowb.com" + }, + "bugs": { + "url": "https://github.com/doowb/append-buffer/issues" + }, + "bundleDependencies": false, + "dependencies": { + "buffer-equal": "^1.0.0" + }, + "deprecated": false, + "description": "Append a buffer to another buffer ensuring to preserve line ending characters.", + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/doowb/append-buffer", + "keywords": [ + "append", + "append-buffer", + "concat", + "concat-buffer", + "eol", + "join", + "join-buffer", + "normalize", + "buffer" + ], + "license": "MIT", + "main": "index.js", + "name": "append-buffer", + "repository": { + "type": "git", + "url": "git+https://github.com/doowb/append-buffer.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + }, + "version": "1.0.2" +} diff --git a/code/application_liste/app/node_modules/arch/LICENSE b/code/application_liste/app/node_modules/arch/LICENSE new file mode 100644 index 0000000..c7e6852 --- /dev/null +++ b/code/application_liste/app/node_modules/arch/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/arch/README.md b/code/application_liste/app/node_modules/arch/README.md new file mode 100644 index 0000000..8ab14a6 --- /dev/null +++ b/code/application_liste/app/node_modules/arch/README.md @@ -0,0 +1,71 @@ +# arch [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] + +[travis-image]: https://img.shields.io/travis/feross/arch/master.svg +[travis-url]: https://travis-ci.org/feross/arch +[npm-image]: https://img.shields.io/npm/v/arch.svg +[npm-url]: https://npmjs.org/package/arch +[downloads-image]: https://img.shields.io/npm/dm/arch.svg +[downloads-url]: https://npmjs.org/package/arch +[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg +[standard-url]: https://standardjs.com + +### Better `os.arch()` for node and the browser -- detect OS architecture + +[![Sauce Test Status](https://saucelabs.com/browser-matrix/arch2.svg)](https://saucelabs.com/u/arch2) + +This module is used by [WebTorrent Desktop](http://webtorrent.io/desktop) to +determine if the user is on a 32-bit vs. 64-bit operating system to offer the +right app installer. + +In Node.js, the `os.arch()` method (and `process.arch` property) returns a string +identifying the operating system CPU architecture **for which the Node.js binary +was compiled**. + +This is not the same as the **operating system CPU architecture**. For example, +you can run Node.js 32-bit on a 64-bit OS. In that situation, `os.arch()` will +return a misleading 'x86' (32-bit) value, instead of 'x64' (64-bit). + +Use this package to get the actual operating system CPU architecture. + +**BONUS: This package works in the browser too.** + +## install + +``` +npm install arch +``` + +## usage + +```js +var arch = require('arch') +console.log(arch()) // always returns 'x64' or 'x86' +``` + +In the browser, there is no spec that defines where this information lives, so we +check all known locations including `navigator.userAgent`, `navigator.platform`, +and `navigator.cpuClass` to make a best guess. + +If there is no *affirmative indication* that the architecture is 64-bit, then +32-bit will be assumed. This makes this package perfect for determining what +installer executable to offer to desktop app users. If there is ambiguity, then +the user will get the 32-bit installer, which will work fine even for a user with +a 64-bit OS. + +For reference, `x64` means 64-bit and `x86` means 32-bit. + +Here is some history behind these naming conventions: + +- https://en.wikipedia.org/wiki/X86 +- https://en.wikipedia.org/wiki/IA-32 +- https://en.wikipedia.org/wiki/X86-64 + +## Node.js proposal - `os.sysarch()` + +Note: There is +[a proposal](https://github.com/nodejs/node-v0.x-archive/issues/2862#issuecomment-103942051) +to add this functionality to Node.js as `os.sysarch()`. + +## license + +MIT. Copyright (c) [Feross Aboukhadijeh](http://feross.org). diff --git a/code/application_liste/app/node_modules/arch/browser.js b/code/application_liste/app/node_modules/arch/browser.js new file mode 100644 index 0000000..eca04d0 --- /dev/null +++ b/code/application_liste/app/node_modules/arch/browser.js @@ -0,0 +1,43 @@ +module.exports = function arch () { + /** + * User agent strings that indicate a 64-bit OS. + * See: http://stackoverflow.com/a/13709431/292185 + */ + var userAgent = navigator.userAgent + if ([ + 'x86_64', + 'x86-64', + 'Win64', + 'x64;', + 'amd64', + 'AMD64', + 'WOW64', + 'x64_64' + ].some(function (str) { + return userAgent.indexOf(str) > -1 + })) { + return 'x64' + } + + /** + * Platform strings that indicate a 64-bit OS. + * See: http://stackoverflow.com/a/19883965/292185 + */ + var platform = navigator.platform + if (platform === 'MacIntel' || platform === 'Linux x86_64') { + return 'x64' + } + + /** + * CPU class strings that indicate a 64-bit OS. + * See: http://stackoverflow.com/a/6267019/292185 + */ + if (navigator.cpuClass === 'x64') { + return 'x64' + } + + /** + * If none of the above, assume the architecture is 32-bit. + */ + return 'x86' +} diff --git a/code/application_liste/app/node_modules/arch/index.js b/code/application_liste/app/node_modules/arch/index.js new file mode 100644 index 0000000..7d90b8a --- /dev/null +++ b/code/application_liste/app/node_modules/arch/index.js @@ -0,0 +1,60 @@ +/*! arch. MIT License. Feross Aboukhadijeh */ +var cp = require('child_process') +var fs = require('fs') +var path = require('path') + +/** + * Returns the operating system's CPU architecture. This is different than + * `process.arch` or `os.arch()` which returns the architecture the Node.js (or + * Electron) binary was compiled for. + */ +module.exports = function arch () { + /** + * The running binary is 64-bit, so the OS is clearly 64-bit. + */ + if (process.arch === 'x64') { + return 'x64' + } + + /** + * All recent versions of Mac OS are 64-bit. + */ + if (process.platform === 'darwin') { + return 'x64' + } + + /** + * On Windows, the most reliable way to detect a 64-bit OS from within a 32-bit + * app is based on the presence of a WOW64 file: %SystemRoot%\SysNative. + * See: https://twitter.com/feross/status/776949077208510464 + */ + if (process.platform === 'win32') { + var useEnv = false + try { + useEnv = !!(process.env.SYSTEMROOT && fs.statSync(process.env.SYSTEMROOT)) + } catch (err) {} + + var sysRoot = useEnv ? process.env.SYSTEMROOT : 'C:\\Windows' + + // If %SystemRoot%\SysNative exists, we are in a WOW64 FS Redirected application. + var isWOW64 = false + try { + isWOW64 = !!fs.statSync(path.join(sysRoot, 'sysnative')) + } catch (err) {} + + return isWOW64 ? 'x64' : 'x86' + } + + /** + * On Linux, use the `getconf` command to get the architecture. + */ + if (process.platform === 'linux') { + var output = cp.execSync('getconf LONG_BIT', { encoding: 'utf8' }) + return output === '64\n' ? 'x64' : 'x86' + } + + /** + * If none of the above, assume the architecture is 32-bit. + */ + return 'x86' +} diff --git a/code/application_liste/app/node_modules/arch/package.json b/code/application_liste/app/node_modules/arch/package.json new file mode 100644 index 0000000..27d162f --- /dev/null +++ b/code/application_liste/app/node_modules/arch/package.json @@ -0,0 +1,84 @@ +{ + "_from": "arch@^2.1.0", + "_id": "arch@2.1.2", + "_inBundle": false, + "_integrity": "sha512-NTBIIbAfkJeIletyABbVtdPgeKfDafR+1mZV/AyyfC1UkVkp9iUjV+wwmqtUgphHYajbI86jejBJp5e+jkGTiQ==", + "_location": "/arch", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "arch@^2.1.0", + "name": "arch", + "escapedName": "arch", + "rawSpec": "^2.1.0", + "saveSpec": null, + "fetchSpec": "^2.1.0" + }, + "_requiredBy": [ + "/os-filter-obj" + ], + "_resolved": "https://registry.npmjs.org/arch/-/arch-2.1.2.tgz", + "_shasum": "0c52bbe7344bb4fa260c443d2cbad9c00ff2f0bf", + "_spec": "arch@^2.1.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\os-filter-obj", + "author": { + "name": "Feross Aboukhadijeh", + "email": "feross@feross.org", + "url": "https://feross.org" + }, + "browser": "browser.js", + "bugs": { + "url": "https://github.com/feross/arch/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Better `os.arch()` for node and the browser -- detect OS architecture", + "devDependencies": { + "airtap": "^3.0.0", + "standard": "*", + "tape": "^5.0.0" + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "homepage": "https://github.com/feross/arch", + "keywords": [ + "browser", + "browserify", + "arch", + "cpu info", + "cpus", + "architecture", + "navigator.platform", + "x64", + "x86", + "64 bit", + "32 bit" + ], + "license": "MIT", + "main": "index.js", + "name": "arch", + "repository": { + "type": "git", + "url": "git://github.com/feross/arch.git" + }, + "scripts": { + "test": "standard && npm run test-node && npm run test-browser", + "test-browser": "airtap -- test/*.js", + "test-browser-local": "airtap --local -- test/*.js", + "test-node": "tape test/*.js" + }, + "version": "2.1.2" +} diff --git a/code/application_liste/app/node_modules/archive-type/index.js b/code/application_liste/app/node_modules/archive-type/index.js new file mode 100644 index 0000000..c8dcd5b --- /dev/null +++ b/code/application_liste/app/node_modules/archive-type/index.js @@ -0,0 +1,18 @@ +'use strict'; +const fileType = require('file-type'); + +const exts = new Set([ + '7z', + 'bz2', + 'gz', + 'rar', + 'tar', + 'zip', + 'xz', + 'gz' +]); + +module.exports = input => { + const ret = fileType(input); + return exts.has(ret && ret.ext) ? ret : null; +}; diff --git a/code/application_liste/app/node_modules/archive-type/license b/code/application_liste/app/node_modules/archive-type/license new file mode 100644 index 0000000..a8ecbbe --- /dev/null +++ b/code/application_liste/app/node_modules/archive-type/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Kevin Mårtensson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/archive-type/node_modules/file-type/index.js b/code/application_liste/app/node_modules/archive-type/node_modules/file-type/index.js new file mode 100644 index 0000000..66f2c44 --- /dev/null +++ b/code/application_liste/app/node_modules/archive-type/node_modules/file-type/index.js @@ -0,0 +1,545 @@ +'use strict'; + +module.exports = input => { + const buf = new Uint8Array(input); + + if (!(buf && buf.length > 1)) { + return null; + } + + const check = (header, opts) => { + opts = Object.assign({ + offset: 0 + }, opts); + + for (let i = 0; i < header.length; i++) { + if (header[i] !== buf[i + opts.offset]) { + return false; + } + } + + return true; + }; + + if (check([0xFF, 0xD8, 0xFF])) { + return { + ext: 'jpg', + mime: 'image/jpeg' + }; + } + + if (check([0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A])) { + return { + ext: 'png', + mime: 'image/png' + }; + } + + if (check([0x47, 0x49, 0x46])) { + return { + ext: 'gif', + mime: 'image/gif' + }; + } + + if (check([0x57, 0x45, 0x42, 0x50], {offset: 8})) { + return { + ext: 'webp', + mime: 'image/webp' + }; + } + + if (check([0x46, 0x4C, 0x49, 0x46])) { + return { + ext: 'flif', + mime: 'image/flif' + }; + } + + // Needs to be before `tif` check + if ( + (check([0x49, 0x49, 0x2A, 0x0]) || check([0x4D, 0x4D, 0x0, 0x2A])) && + check([0x43, 0x52], {offset: 8}) + ) { + return { + ext: 'cr2', + mime: 'image/x-canon-cr2' + }; + } + + if ( + check([0x49, 0x49, 0x2A, 0x0]) || + check([0x4D, 0x4D, 0x0, 0x2A]) + ) { + return { + ext: 'tif', + mime: 'image/tiff' + }; + } + + if (check([0x42, 0x4D])) { + return { + ext: 'bmp', + mime: 'image/bmp' + }; + } + + if (check([0x49, 0x49, 0xBC])) { + return { + ext: 'jxr', + mime: 'image/vnd.ms-photo' + }; + } + + if (check([0x38, 0x42, 0x50, 0x53])) { + return { + ext: 'psd', + mime: 'image/vnd.adobe.photoshop' + }; + } + + // Needs to be before the `zip` check + if ( + check([0x50, 0x4B, 0x3, 0x4]) && + check([0x6D, 0x69, 0x6D, 0x65, 0x74, 0x79, 0x70, 0x65, 0x61, 0x70, 0x70, 0x6C, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x2F, 0x65, 0x70, 0x75, 0x62, 0x2B, 0x7A, 0x69, 0x70], {offset: 30}) + ) { + return { + ext: 'epub', + mime: 'application/epub+zip' + }; + } + + // Needs to be before `zip` check + // Assumes signed `.xpi` from addons.mozilla.org + if ( + check([0x50, 0x4B, 0x3, 0x4]) && + check([0x4D, 0x45, 0x54, 0x41, 0x2D, 0x49, 0x4E, 0x46, 0x2F, 0x6D, 0x6F, 0x7A, 0x69, 0x6C, 0x6C, 0x61, 0x2E, 0x72, 0x73, 0x61], {offset: 30}) + ) { + return { + ext: 'xpi', + mime: 'application/x-xpinstall' + }; + } + + if ( + check([0x50, 0x4B]) && + (buf[2] === 0x3 || buf[2] === 0x5 || buf[2] === 0x7) && + (buf[3] === 0x4 || buf[3] === 0x6 || buf[3] === 0x8) + ) { + return { + ext: 'zip', + mime: 'application/zip' + }; + } + + if (check([0x75, 0x73, 0x74, 0x61, 0x72], {offset: 257})) { + return { + ext: 'tar', + mime: 'application/x-tar' + }; + } + + if ( + check([0x52, 0x61, 0x72, 0x21, 0x1A, 0x7]) && + (buf[6] === 0x0 || buf[6] === 0x1) + ) { + return { + ext: 'rar', + mime: 'application/x-rar-compressed' + }; + } + + if (check([0x1F, 0x8B, 0x8])) { + return { + ext: 'gz', + mime: 'application/gzip' + }; + } + + if (check([0x42, 0x5A, 0x68])) { + return { + ext: 'bz2', + mime: 'application/x-bzip2' + }; + } + + if (check([0x37, 0x7A, 0xBC, 0xAF, 0x27, 0x1C])) { + return { + ext: '7z', + mime: 'application/x-7z-compressed' + }; + } + + if (check([0x78, 0x01])) { + return { + ext: 'dmg', + mime: 'application/x-apple-diskimage' + }; + } + + if ( + ( + check([0x0, 0x0, 0x0]) && + (buf[3] === 0x18 || buf[3] === 0x20) && + check([0x66, 0x74, 0x79, 0x70], {offset: 4}) + ) || + check([0x33, 0x67, 0x70, 0x35]) || + ( + check([0x0, 0x0, 0x0, 0x1C, 0x66, 0x74, 0x79, 0x70, 0x6D, 0x70, 0x34, 0x32]) && + check([0x6D, 0x70, 0x34, 0x31, 0x6D, 0x70, 0x34, 0x32, 0x69, 0x73, 0x6F, 0x6D], {offset: 16}) + ) || + check([0x0, 0x0, 0x0, 0x1C, 0x66, 0x74, 0x79, 0x70, 0x69, 0x73, 0x6F, 0x6D]) || + check([0x0, 0x0, 0x0, 0x1C, 0x66, 0x74, 0x79, 0x70, 0x6D, 0x70, 0x34, 0x32, 0x0, 0x0, 0x0, 0x0]) + ) { + return { + ext: 'mp4', + mime: 'video/mp4' + }; + } + + if (check([0x0, 0x0, 0x0, 0x1C, 0x66, 0x74, 0x79, 0x70, 0x4D, 0x34, 0x56])) { + return { + ext: 'm4v', + mime: 'video/x-m4v' + }; + } + + if (check([0x4D, 0x54, 0x68, 0x64])) { + return { + ext: 'mid', + mime: 'audio/midi' + }; + } + + // https://github.com/threatstack/libmagic/blob/master/magic/Magdir/matroska + if (check([0x1A, 0x45, 0xDF, 0xA3])) { + const sliced = buf.subarray(4, 4 + 4096); + const idPos = sliced.findIndex((el, i, arr) => arr[i] === 0x42 && arr[i + 1] === 0x82); + + if (idPos >= 0) { + const docTypePos = idPos + 3; + const findDocType = type => Array.from(type).every((c, i) => sliced[docTypePos + i] === c.charCodeAt(0)); + + if (findDocType('matroska')) { + return { + ext: 'mkv', + mime: 'video/x-matroska' + }; + } + + if (findDocType('webm')) { + return { + ext: 'webm', + mime: 'video/webm' + }; + } + } + } + + if (check([0x0, 0x0, 0x0, 0x14, 0x66, 0x74, 0x79, 0x70, 0x71, 0x74, 0x20, 0x20]) || + check([0x66, 0x72, 0x65, 0x65], {offset: 4}) || + check([0x66, 0x74, 0x79, 0x70, 0x71, 0x74, 0x20, 0x20], {offset: 4}) || + check([0x6D, 0x64, 0x61, 0x74], {offset: 4}) || // MJPEG + check([0x77, 0x69, 0x64, 0x65], {offset: 4})) { + return { + ext: 'mov', + mime: 'video/quicktime' + }; + } + + if ( + check([0x52, 0x49, 0x46, 0x46]) && + check([0x41, 0x56, 0x49], {offset: 8}) + ) { + return { + ext: 'avi', + mime: 'video/x-msvideo' + }; + } + + if (check([0x30, 0x26, 0xB2, 0x75, 0x8E, 0x66, 0xCF, 0x11, 0xA6, 0xD9])) { + return { + ext: 'wmv', + mime: 'video/x-ms-wmv' + }; + } + + if (check([0x0, 0x0, 0x1, 0xBA])) { + return { + ext: 'mpg', + mime: 'video/mpeg' + }; + } + + if ( + check([0x49, 0x44, 0x33]) || + check([0xFF, 0xFB]) + ) { + return { + ext: 'mp3', + mime: 'audio/mpeg' + }; + } + + if ( + check([0x66, 0x74, 0x79, 0x70, 0x4D, 0x34, 0x41], {offset: 4}) || + check([0x4D, 0x34, 0x41, 0x20]) + ) { + return { + ext: 'm4a', + mime: 'audio/m4a' + }; + } + + // Needs to be before `ogg` check + if (check([0x4F, 0x70, 0x75, 0x73, 0x48, 0x65, 0x61, 0x64], {offset: 28})) { + return { + ext: 'opus', + mime: 'audio/opus' + }; + } + + if (check([0x4F, 0x67, 0x67, 0x53])) { + return { + ext: 'ogg', + mime: 'audio/ogg' + }; + } + + if (check([0x66, 0x4C, 0x61, 0x43])) { + return { + ext: 'flac', + mime: 'audio/x-flac' + }; + } + + if ( + check([0x52, 0x49, 0x46, 0x46]) && + check([0x57, 0x41, 0x56, 0x45], {offset: 8}) + ) { + return { + ext: 'wav', + mime: 'audio/x-wav' + }; + } + + if (check([0x23, 0x21, 0x41, 0x4D, 0x52, 0x0A])) { + return { + ext: 'amr', + mime: 'audio/amr' + }; + } + + if (check([0x25, 0x50, 0x44, 0x46])) { + return { + ext: 'pdf', + mime: 'application/pdf' + }; + } + + if (check([0x4D, 0x5A])) { + return { + ext: 'exe', + mime: 'application/x-msdownload' + }; + } + + if ( + (buf[0] === 0x43 || buf[0] === 0x46) && + check([0x57, 0x53], {offset: 1}) + ) { + return { + ext: 'swf', + mime: 'application/x-shockwave-flash' + }; + } + + if (check([0x7B, 0x5C, 0x72, 0x74, 0x66])) { + return { + ext: 'rtf', + mime: 'application/rtf' + }; + } + + if (check([0x00, 0x61, 0x73, 0x6D])) { + return { + ext: 'wasm', + mime: 'application/wasm' + }; + } + + if ( + check([0x77, 0x4F, 0x46, 0x46]) && + ( + check([0x00, 0x01, 0x00, 0x00], {offset: 4}) || + check([0x4F, 0x54, 0x54, 0x4F], {offset: 4}) + ) + ) { + return { + ext: 'woff', + mime: 'application/font-woff' + }; + } + + if ( + check([0x77, 0x4F, 0x46, 0x32]) && + ( + check([0x00, 0x01, 0x00, 0x00], {offset: 4}) || + check([0x4F, 0x54, 0x54, 0x4F], {offset: 4}) + ) + ) { + return { + ext: 'woff2', + mime: 'application/font-woff' + }; + } + + if ( + check([0x4C, 0x50], {offset: 34}) && + ( + check([0x00, 0x00, 0x01], {offset: 8}) || + check([0x01, 0x00, 0x02], {offset: 8}) || + check([0x02, 0x00, 0x02], {offset: 8}) + ) + ) { + return { + ext: 'eot', + mime: 'application/octet-stream' + }; + } + + if (check([0x00, 0x01, 0x00, 0x00, 0x00])) { + return { + ext: 'ttf', + mime: 'application/font-sfnt' + }; + } + + if (check([0x4F, 0x54, 0x54, 0x4F, 0x00])) { + return { + ext: 'otf', + mime: 'application/font-sfnt' + }; + } + + if (check([0x00, 0x00, 0x01, 0x00])) { + return { + ext: 'ico', + mime: 'image/x-icon' + }; + } + + if (check([0x46, 0x4C, 0x56, 0x01])) { + return { + ext: 'flv', + mime: 'video/x-flv' + }; + } + + if (check([0x25, 0x21])) { + return { + ext: 'ps', + mime: 'application/postscript' + }; + } + + if (check([0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00])) { + return { + ext: 'xz', + mime: 'application/x-xz' + }; + } + + if (check([0x53, 0x51, 0x4C, 0x69])) { + return { + ext: 'sqlite', + mime: 'application/x-sqlite3' + }; + } + + if (check([0x4E, 0x45, 0x53, 0x1A])) { + return { + ext: 'nes', + mime: 'application/x-nintendo-nes-rom' + }; + } + + if (check([0x43, 0x72, 0x32, 0x34])) { + return { + ext: 'crx', + mime: 'application/x-google-chrome-extension' + }; + } + + if ( + check([0x4D, 0x53, 0x43, 0x46]) || + check([0x49, 0x53, 0x63, 0x28]) + ) { + return { + ext: 'cab', + mime: 'application/vnd.ms-cab-compressed' + }; + } + + // Needs to be before `ar` check + if (check([0x21, 0x3C, 0x61, 0x72, 0x63, 0x68, 0x3E, 0x0A, 0x64, 0x65, 0x62, 0x69, 0x61, 0x6E, 0x2D, 0x62, 0x69, 0x6E, 0x61, 0x72, 0x79])) { + return { + ext: 'deb', + mime: 'application/x-deb' + }; + } + + if (check([0x21, 0x3C, 0x61, 0x72, 0x63, 0x68, 0x3E])) { + return { + ext: 'ar', + mime: 'application/x-unix-archive' + }; + } + + if (check([0xED, 0xAB, 0xEE, 0xDB])) { + return { + ext: 'rpm', + mime: 'application/x-rpm' + }; + } + + if ( + check([0x1F, 0xA0]) || + check([0x1F, 0x9D]) + ) { + return { + ext: 'Z', + mime: 'application/x-compress' + }; + } + + if (check([0x4C, 0x5A, 0x49, 0x50])) { + return { + ext: 'lz', + mime: 'application/x-lzip' + }; + } + + if (check([0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1])) { + return { + ext: 'msi', + mime: 'application/x-msi' + }; + } + + if (check([0x06, 0x0E, 0x2B, 0x34, 0x02, 0x05, 0x01, 0x01, 0x0D, 0x01, 0x02, 0x01, 0x01, 0x02])) { + return { + ext: 'mxf', + mime: 'application/mxf' + }; + } + + if (check([0x42, 0x4C, 0x45, 0x4E, 0x44, 0x45, 0x52])) { + return { + ext: 'blend', + mime: 'application/x-blender' + }; + } + + return null; +}; diff --git a/code/application_liste/app/node_modules/archive-type/node_modules/file-type/license b/code/application_liste/app/node_modules/archive-type/node_modules/file-type/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/code/application_liste/app/node_modules/archive-type/node_modules/file-type/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/archive-type/node_modules/file-type/package.json b/code/application_liste/app/node_modules/archive-type/node_modules/file-type/package.json new file mode 100644 index 0000000..9658d67 --- /dev/null +++ b/code/application_liste/app/node_modules/archive-type/node_modules/file-type/package.json @@ -0,0 +1,139 @@ +{ + "_from": "file-type@^4.2.0", + "_id": "file-type@4.4.0", + "_inBundle": false, + "_integrity": "sha1-G2AOX8ofvcboDApwxxyNul95BsU=", + "_location": "/archive-type/file-type", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "file-type@^4.2.0", + "name": "file-type", + "escapedName": "file-type", + "rawSpec": "^4.2.0", + "saveSpec": null, + "fetchSpec": "^4.2.0" + }, + "_requiredBy": [ + "/archive-type" + ], + "_resolved": "https://registry.npmjs.org/file-type/-/file-type-4.4.0.tgz", + "_shasum": "1b600e5fca1fbdc6e80c0a70c71c8dba5f7906c5", + "_spec": "file-type@^4.2.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\archive-type", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/file-type/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Detect the file type of a Buffer/Uint8Array", + "devDependencies": { + "ava": "*", + "read-chunk": "^2.0.0", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/file-type#readme", + "keywords": [ + "mime", + "file", + "type", + "archive", + "image", + "img", + "pic", + "picture", + "flash", + "photo", + "video", + "type", + "detect", + "check", + "is", + "exif", + "exe", + "binary", + "buffer", + "uint8array", + "jpg", + "png", + "gif", + "webp", + "flif", + "cr2", + "tif", + "bmp", + "jxr", + "psd", + "zip", + "tar", + "rar", + "gz", + "bz2", + "7z", + "dmg", + "mp4", + "m4v", + "mid", + "mkv", + "webm", + "mov", + "avi", + "mpg", + "mp3", + "m4a", + "ogg", + "opus", + "flac", + "wav", + "amr", + "pdf", + "epub", + "exe", + "swf", + "rtf", + "woff", + "woff2", + "eot", + "ttf", + "otf", + "ico", + "flv", + "ps", + "xz", + "sqlite", + "xpi", + "cab", + "deb", + "ar", + "rpm", + "Z", + "lz", + "msi", + "mxf", + "wasm", + "webassembly", + "blend" + ], + "license": "MIT", + "name": "file-type", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/file-type.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "4.4.0" +} diff --git a/code/application_liste/app/node_modules/archive-type/node_modules/file-type/readme.md b/code/application_liste/app/node_modules/archive-type/node_modules/file-type/readme.md new file mode 100644 index 0000000..d09f1de --- /dev/null +++ b/code/application_liste/app/node_modules/archive-type/node_modules/file-type/readme.md @@ -0,0 +1,154 @@ +# file-type [![Build Status](https://travis-ci.org/sindresorhus/file-type.svg?branch=master)](https://travis-ci.org/sindresorhus/file-type) + +> Detect the file type of a Buffer/Uint8Array + +The file type is detected by checking the [magic number](http://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files) of the buffer. + + +## Install + +``` +$ npm install --save file-type +``` + + +## Usage + +##### Node.js + +```js +const readChunk = require('read-chunk'); +const fileType = require('file-type'); +const buffer = readChunk.sync('unicorn.png', 0, 4100); + +fileType(buffer); +//=> {ext: 'png', mime: 'image/png'} +``` + +Or from a remote location: + +```js +const http = require('http'); +const fileType = require('file-type'); +const url = 'http://assets-cdn.github.com/images/spinners/octocat-spinner-32.gif'; + +http.get(url, res => { + res.once('data', chunk => { + res.destroy(); + console.log(fileType(chunk)); + //=> {ext: 'gif', mime: 'image/gif'} + }); +}); +``` + +##### Browser + +```js +const xhr = new XMLHttpRequest(); +xhr.open('GET', 'unicorn.png'); +xhr.responseType = 'arraybuffer'; + +xhr.onload = () => { + fileType(new Uint8Array(this.response)); + //=> {ext: 'png', mime: 'image/png'} +}; + +xhr.send(); +``` + + +## API + +### fileType(input) + +Returns an `Object` with: + +- `ext` - One of the [supported file types](#supported-file-types) +- `mime` - The [MIME type](http://en.wikipedia.org/wiki/Internet_media_type) + +Or `null` when no match. + +#### input + +Type: `Buffer` `Uint8Array` + +It only needs the first 4100 bytes. + + +## Supported file types + +- [`jpg`](https://en.wikipedia.org/wiki/JPEG) +- [`png`](https://en.wikipedia.org/wiki/Portable_Network_Graphics) +- [`gif`](https://en.wikipedia.org/wiki/GIF) +- [`webp`](https://en.wikipedia.org/wiki/WebP) +- [`flif`](https://en.wikipedia.org/wiki/Free_Lossless_Image_Format) +- [`cr2`](http://fileinfo.com/extension/cr2) +- [`tif`](https://en.wikipedia.org/wiki/Tagged_Image_File_Format) +- [`bmp`](https://en.wikipedia.org/wiki/BMP_file_format) +- [`jxr`](https://en.wikipedia.org/wiki/JPEG_XR) +- [`psd`](https://en.wikipedia.org/wiki/Adobe_Photoshop#File_format) +- [`zip`](https://en.wikipedia.org/wiki/Zip_(file_format)) +- [`tar`](https://en.wikipedia.org/wiki/Tar_(computing)#File_format) +- [`rar`](https://en.wikipedia.org/wiki/RAR_(file_format)) +- [`gz`](https://en.wikipedia.org/wiki/Gzip) +- [`bz2`](https://en.wikipedia.org/wiki/Bzip2) +- [`7z`](https://en.wikipedia.org/wiki/7z) +- [`dmg`](https://en.wikipedia.org/wiki/Apple_Disk_Image) +- [`mp4`](https://en.wikipedia.org/wiki/MPEG-4_Part_14#Filename_extensions) +- [`m4v`](https://en.wikipedia.org/wiki/M4V) +- [`mid`](https://en.wikipedia.org/wiki/MIDI) +- [`mkv`](https://en.wikipedia.org/wiki/Matroska) +- [`webm`](https://en.wikipedia.org/wiki/WebM) +- [`mov`](https://en.wikipedia.org/wiki/QuickTime_File_Format) +- [`avi`](https://en.wikipedia.org/wiki/Audio_Video_Interleave) +- [`wmv`](https://en.wikipedia.org/wiki/Windows_Media_Video) +- [`mpg`](https://en.wikipedia.org/wiki/MPEG-1) +- [`mp3`](https://en.wikipedia.org/wiki/MP3) +- [`m4a`](https://en.wikipedia.org/wiki/MPEG-4_Part_14#.MP4_versus_.M4A) +- [`ogg`](https://en.wikipedia.org/wiki/Ogg) +- [`opus`](https://en.wikipedia.org/wiki/Opus_(audio_format)) +- [`flac`](https://en.wikipedia.org/wiki/FLAC) +- [`wav`](https://en.wikipedia.org/wiki/WAV) +- [`amr`](https://en.wikipedia.org/wiki/Adaptive_Multi-Rate_audio_codec) +- [`pdf`](https://en.wikipedia.org/wiki/Portable_Document_Format) +- [`epub`](https://en.wikipedia.org/wiki/EPUB) +- [`exe`](https://en.wikipedia.org/wiki/.exe) +- [`swf`](https://en.wikipedia.org/wiki/SWF) +- [`rtf`](https://en.wikipedia.org/wiki/Rich_Text_Format) +- [`woff`](https://en.wikipedia.org/wiki/Web_Open_Font_Format) +- [`woff2`](https://en.wikipedia.org/wiki/Web_Open_Font_Format) +- [`eot`](https://en.wikipedia.org/wiki/Embedded_OpenType) +- [`ttf`](https://en.wikipedia.org/wiki/TrueType) +- [`otf`](https://en.wikipedia.org/wiki/OpenType) +- [`ico`](https://en.wikipedia.org/wiki/ICO_(file_format)) +- [`flv`](https://en.wikipedia.org/wiki/Flash_Video) +- [`ps`](https://en.wikipedia.org/wiki/Postscript) +- [`xz`](https://en.wikipedia.org/wiki/Xz) +- [`sqlite`](https://www.sqlite.org/fileformat2.html) +- [`nes`](http://fileinfo.com/extension/nes) +- [`crx`](https://developer.chrome.com/extensions/crx) +- [`xpi`](https://en.wikipedia.org/wiki/XPInstall) +- [`cab`](https://en.wikipedia.org/wiki/Cabinet_(file_format)) +- [`deb`](https://en.wikipedia.org/wiki/Deb_(file_format)) +- [`ar`](https://en.wikipedia.org/wiki/Ar_(Unix)) +- [`rpm`](http://fileinfo.com/extension/rpm) +- [`Z`](http://fileinfo.com/extension/z) +- [`lz`](https://en.wikipedia.org/wiki/Lzip) +- [`msi`](https://en.wikipedia.org/wiki/Windows_Installer) +- [`mxf`](https://en.wikipedia.org/wiki/Material_Exchange_Format) +- [`wasm`](https://en.wikipedia.org/wiki/WebAssembly) +- [`blend`](https://wiki.blender.org/index.php/Dev:Source/Architecture/File_Format) + +*SVG isn't included as it requires the whole file to be read, but you can get it [here](https://github.com/sindresorhus/is-svg).* + +*Pull request welcome for additional commonly used file types.* + + +## Related + +- [file-type-cli](https://github.com/sindresorhus/file-type-cli) - CLI for this module + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/code/application_liste/app/node_modules/archive-type/package.json b/code/application_liste/app/node_modules/archive-type/package.json new file mode 100644 index 0000000..6ab2bac --- /dev/null +++ b/code/application_liste/app/node_modules/archive-type/package.json @@ -0,0 +1,77 @@ +{ + "_from": "archive-type@^4.0.0", + "_id": "archive-type@4.0.0", + "_inBundle": false, + "_integrity": "sha1-+S5yIzBW38aWlHJ0nCZ72wRrHXA=", + "_location": "/archive-type", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "archive-type@^4.0.0", + "name": "archive-type", + "escapedName": "archive-type", + "rawSpec": "^4.0.0", + "saveSpec": null, + "fetchSpec": "^4.0.0" + }, + "_requiredBy": [ + "/bin-wrapper/download" + ], + "_resolved": "https://registry.npmjs.org/archive-type/-/archive-type-4.0.0.tgz", + "_shasum": "f92e72233056dfc6969472749c267bdb046b1d70", + "_spec": "archive-type@^4.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\bin-wrapper\\node_modules\\download", + "author": { + "name": "Kevin Mårtensson", + "email": "kevinmartensson@gmail.com", + "url": "https://github.com/kevva" + }, + "bugs": { + "url": "https://github.com/kevva/archive-type/issues" + }, + "bundleDependencies": false, + "dependencies": { + "file-type": "^4.2.0" + }, + "deprecated": false, + "description": "Detect the archive type of a Buffer/Uint8Array", + "devDependencies": { + "ava": "*", + "pify": "^2.3.0", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/kevva/archive-type#readme", + "keywords": [ + "7zip", + "archive", + "buffer", + "bz2", + "bzip2", + "check", + "detect", + "gz", + "gzip", + "mime", + "rar", + "zip", + "file", + "type" + ], + "license": "MIT", + "name": "archive-type", + "repository": { + "type": "git", + "url": "git+https://github.com/kevva/archive-type.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "4.0.0" +} diff --git a/code/application_liste/app/node_modules/archive-type/readme.md b/code/application_liste/app/node_modules/archive-type/readme.md new file mode 100644 index 0000000..7549511 --- /dev/null +++ b/code/application_liste/app/node_modules/archive-type/readme.md @@ -0,0 +1,62 @@ +# archive-type [![Build Status](https://travis-ci.org/kevva/archive-type.svg?branch=master)](https://travis-ci.org/kevva/archive-type) + +> Detect the archive type of a Buffer/Uint8Array + + +## Install + +``` +$ npm install --save archive-type +``` + + +## Usage + +```js +const archiveType = require('archive-type'); +const readChunk = require('read-chunk'); +const buffer = readChunk.sync('unicorn.zip', 0, 262); + +archiveType(buffer); +//=> {ext: 'zip', mime: 'application/zip'} +``` + + +## API + +### archiveType(input) + +Returns an `Object` with: + +- `ext` - One of the [supported file types](#supported-file-types) +- `mime` - The [MIME type](http://en.wikipedia.org/wiki/Internet_media_type) + +Or `null` when no match. + +#### input + +Type: `Buffer` `Uint8Array` + +It only needs the first 262 bytes. + + +## Supported file types + +- `7z` +- `bz2` +- `gz` +- `rar` +- `tar` +- `zip` +- `xz` +- `gz` + + +## Related + +- [archive-type-cli](https://github.com/kevva/archive-type-cli) - CLI for this module + + +## License + +MIT © [Kevin Mårtensson](https://github.com/kevva) diff --git a/code/application_liste/app/node_modules/archy/.travis.yml b/code/application_liste/app/node_modules/archy/.travis.yml new file mode 100644 index 0000000..895dbd3 --- /dev/null +++ b/code/application_liste/app/node_modules/archy/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.6 + - 0.8 diff --git a/code/application_liste/app/node_modules/archy/LICENSE b/code/application_liste/app/node_modules/archy/LICENSE new file mode 100644 index 0000000..ee27ba4 --- /dev/null +++ b/code/application_liste/app/node_modules/archy/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/archy/examples/beep.js b/code/application_liste/app/node_modules/archy/examples/beep.js new file mode 100644 index 0000000..9c07047 --- /dev/null +++ b/code/application_liste/app/node_modules/archy/examples/beep.js @@ -0,0 +1,24 @@ +var archy = require('../'); +var s = archy({ + label : 'beep', + nodes : [ + 'ity', + { + label : 'boop', + nodes : [ + { + label : 'o_O', + nodes : [ + { + label : 'oh', + nodes : [ 'hello', 'puny' ] + }, + 'human' + ] + }, + 'party\ntime!' + ] + } + ] +}); +console.log(s); diff --git a/code/application_liste/app/node_modules/archy/examples/multi_line.js b/code/application_liste/app/node_modules/archy/examples/multi_line.js new file mode 100644 index 0000000..8afdfad --- /dev/null +++ b/code/application_liste/app/node_modules/archy/examples/multi_line.js @@ -0,0 +1,25 @@ +var archy = require('../'); + +var s = archy({ + label : 'beep\none\ntwo', + nodes : [ + 'ity', + { + label : 'boop', + nodes : [ + { + label : 'o_O\nwheee', + nodes : [ + { + label : 'oh', + nodes : [ 'hello', 'puny\nmeat' ] + }, + 'creature' + ] + }, + 'party\ntime!' + ] + } + ] +}); +console.log(s); diff --git a/code/application_liste/app/node_modules/archy/index.js b/code/application_liste/app/node_modules/archy/index.js new file mode 100644 index 0000000..869d64e --- /dev/null +++ b/code/application_liste/app/node_modules/archy/index.js @@ -0,0 +1,35 @@ +module.exports = function archy (obj, prefix, opts) { + if (prefix === undefined) prefix = ''; + if (!opts) opts = {}; + var chr = function (s) { + var chars = { + '│' : '|', + '└' : '`', + '├' : '+', + '─' : '-', + '┬' : '-' + }; + return opts.unicode === false ? chars[s] : s; + }; + + if (typeof obj === 'string') obj = { label : obj }; + + var nodes = obj.nodes || []; + var lines = (obj.label || '').split('\n'); + var splitter = '\n' + prefix + (nodes.length ? chr('│') : ' ') + ' '; + + return prefix + + lines.join(splitter) + '\n' + + nodes.map(function (node, ix) { + var last = ix === nodes.length - 1; + var more = node.nodes && node.nodes.length; + var prefix_ = prefix + (last ? ' ' : chr('│')) + ' '; + + return prefix + + (last ? chr('└') : chr('├')) + chr('─') + + (more ? chr('┬') : chr('─')) + ' ' + + archy(node, prefix_, opts).slice(prefix.length + 2) + ; + }).join('') + ; +}; diff --git a/code/application_liste/app/node_modules/archy/package.json b/code/application_liste/app/node_modules/archy/package.json new file mode 100644 index 0000000..2df1fb3 --- /dev/null +++ b/code/application_liste/app/node_modules/archy/package.json @@ -0,0 +1,83 @@ +{ + "_from": "archy@^1.0.0", + "_id": "archy@1.0.0", + "_inBundle": false, + "_integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "_location": "/archy", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "archy@^1.0.0", + "name": "archy", + "escapedName": "archy", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/gulp/gulp-cli" + ], + "_resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "_shasum": "f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40", + "_spec": "archy@^1.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\gulp\\node_modules\\gulp-cli", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/node-archy/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "render nested hierarchies `npm ls` style with unicode pipes", + "devDependencies": { + "tap": "~0.3.3", + "tape": "~0.1.1" + }, + "homepage": "https://github.com/substack/node-archy#readme", + "keywords": [ + "hierarchy", + "npm ls", + "unicode", + "pretty", + "print" + ], + "license": "MIT", + "main": "index.js", + "name": "archy", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/substack/node-archy.git" + }, + "scripts": { + "test": "tap test" + }, + "testling": { + "files": "test/*.js", + "browsers": { + "iexplore": [ + "6.0", + "7.0", + "8.0", + "9.0" + ], + "chrome": [ + "20.0" + ], + "firefox": [ + "10.0", + "15.0" + ], + "safari": [ + "5.1" + ], + "opera": [ + "12.0" + ] + } + }, + "version": "1.0.0" +} diff --git a/code/application_liste/app/node_modules/archy/readme.markdown b/code/application_liste/app/node_modules/archy/readme.markdown new file mode 100644 index 0000000..ef7a5cf --- /dev/null +++ b/code/application_liste/app/node_modules/archy/readme.markdown @@ -0,0 +1,88 @@ +# archy + +Render nested hierarchies `npm ls` style with unicode pipes. + +[![browser support](http://ci.testling.com/substack/node-archy.png)](http://ci.testling.com/substack/node-archy) + +[![build status](https://secure.travis-ci.org/substack/node-archy.png)](http://travis-ci.org/substack/node-archy) + +# example + +``` js +var archy = require('archy'); +var s = archy({ + label : 'beep', + nodes : [ + 'ity', + { + label : 'boop', + nodes : [ + { + label : 'o_O', + nodes : [ + { + label : 'oh', + nodes : [ 'hello', 'puny' ] + }, + 'human' + ] + }, + 'party\ntime!' + ] + } + ] +}); +console.log(s); +``` + +output + +``` +beep +├── ity +└─┬ boop + ├─┬ o_O + │ ├─┬ oh + │ │ ├── hello + │ │ └── puny + │ └── human + └── party + time! +``` + +# methods + +var archy = require('archy') + +## archy(obj, prefix='', opts={}) + +Return a string representation of `obj` with unicode pipe characters like how +`npm ls` looks. + +`obj` should be a tree of nested objects with `'label'` and `'nodes'` fields. +`'label'` is a string of text to display at a node level and `'nodes'` is an +array of the descendents of the current node. + +If a node is a string, that string will be used as the `'label'` and an empty +array of `'nodes'` will be used. + +`prefix` gets prepended to all the lines and is used by the algorithm to +recursively update. + +If `'label'` has newlines they will be indented at the present indentation level +with the current prefix. + +To disable unicode results in favor of all-ansi output set `opts.unicode` to +`false`. + +# install + +With [npm](http://npmjs.org) do: + +``` +npm install archy +``` + +# license + +MIT diff --git a/code/application_liste/app/node_modules/archy/test/beep.js b/code/application_liste/app/node_modules/archy/test/beep.js new file mode 100644 index 0000000..4ea74f9 --- /dev/null +++ b/code/application_liste/app/node_modules/archy/test/beep.js @@ -0,0 +1,40 @@ +var test = require('tape'); +var archy = require('../'); + +test('beep', function (t) { + var s = archy({ + label : 'beep', + nodes : [ + 'ity', + { + label : 'boop', + nodes : [ + { + label : 'o_O', + nodes : [ + { + label : 'oh', + nodes : [ 'hello', 'puny' ] + }, + 'human' + ] + }, + 'party!' + ] + } + ] + }); + t.equal(s, [ + 'beep', + '├── ity', + '└─┬ boop', + ' ├─┬ o_O', + ' │ ├─┬ oh', + ' │ │ ├── hello', + ' │ │ └── puny', + ' │ └── human', + ' └── party!', + '' + ].join('\n')); + t.end(); +}); diff --git a/code/application_liste/app/node_modules/archy/test/multi_line.js b/code/application_liste/app/node_modules/archy/test/multi_line.js new file mode 100644 index 0000000..2cf2154 --- /dev/null +++ b/code/application_liste/app/node_modules/archy/test/multi_line.js @@ -0,0 +1,45 @@ +var test = require('tape'); +var archy = require('../'); + +test('multi-line', function (t) { + var s = archy({ + label : 'beep\none\ntwo', + nodes : [ + 'ity', + { + label : 'boop', + nodes : [ + { + label : 'o_O\nwheee', + nodes : [ + { + label : 'oh', + nodes : [ 'hello', 'puny\nmeat' ] + }, + 'creature' + ] + }, + 'party\ntime!' + ] + } + ] + }); + t.equal(s, [ + 'beep', + '│ one', + '│ two', + '├── ity', + '└─┬ boop', + ' ├─┬ o_O', + ' │ │ wheee', + ' │ ├─┬ oh', + ' │ │ ├── hello', + ' │ │ └── puny', + ' │ │ meat', + ' │ └── creature', + ' └── party', + ' time!', + '' + ].join('\n')); + t.end(); +}); diff --git a/code/application_liste/app/node_modules/archy/test/non_unicode.js b/code/application_liste/app/node_modules/archy/test/non_unicode.js new file mode 100644 index 0000000..7204d33 --- /dev/null +++ b/code/application_liste/app/node_modules/archy/test/non_unicode.js @@ -0,0 +1,40 @@ +var test = require('tape'); +var archy = require('../'); + +test('beep', function (t) { + var s = archy({ + label : 'beep', + nodes : [ + 'ity', + { + label : 'boop', + nodes : [ + { + label : 'o_O', + nodes : [ + { + label : 'oh', + nodes : [ 'hello', 'puny' ] + }, + 'human' + ] + }, + 'party!' + ] + } + ] + }, '', { unicode : false }); + t.equal(s, [ + 'beep', + '+-- ity', + '`-- boop', + ' +-- o_O', + ' | +-- oh', + ' | | +-- hello', + ' | | `-- puny', + ' | `-- human', + ' `-- party!', + '' + ].join('\n')); + t.end(); +}); diff --git a/code/application_liste/app/node_modules/argparse/CHANGELOG.md b/code/application_liste/app/node_modules/argparse/CHANGELOG.md new file mode 100644 index 0000000..a43c628 --- /dev/null +++ b/code/application_liste/app/node_modules/argparse/CHANGELOG.md @@ -0,0 +1,185 @@ +1.0.10 / 2018-02-15 +------------------ + +- Use .concat instead of + for arrays, #122. + + +1.0.9 / 2016-09-29 +------------------ + +- Rerelease after 1.0.8 - deps cleanup. + + +1.0.8 / 2016-09-29 +------------------ + +- Maintenance (deps bump, fix node 6.5+ tests, coverage report). + + +1.0.7 / 2016-03-17 +------------------ + +- Teach `addArgument` to accept string arg names. #97, @tomxtobin. + + +1.0.6 / 2016-02-06 +------------------ + +- Maintenance: moved to eslint & updated CS. + + +1.0.5 / 2016-02-05 +------------------ + +- Removed lodash dependency to significantly reduce install size. + Thanks to @mourner. + + +1.0.4 / 2016-01-17 +------------------ + +- Maintenance: lodash update to 4.0.0. + + +1.0.3 / 2015-10-27 +------------------ + +- Fix parse `=` in args: `--examplepath="C:\myfolder\env=x64"`. #84, @CatWithApple. + + +1.0.2 / 2015-03-22 +------------------ + +- Relaxed lodash version dependency. + + +1.0.1 / 2015-02-20 +------------------ + +- Changed dependencies to be compatible with ancient nodejs. + + +1.0.0 / 2015-02-19 +------------------ + +- Maintenance release. +- Replaced `underscore` with `lodash`. +- Bumped version to 1.0.0 to better reflect semver meaning. +- HISTORY.md -> CHANGELOG.md + + +0.1.16 / 2013-12-01 +------------------- + +- Maintenance release. Updated dependencies and docs. + + +0.1.15 / 2013-05-13 +------------------- + +- Fixed #55, @trebor89 + + +0.1.14 / 2013-05-12 +------------------- + +- Fixed #62, @maxtaco + + +0.1.13 / 2013-04-08 +------------------- + +- Added `.npmignore` to reduce package size + + +0.1.12 / 2013-02-10 +------------------- + +- Fixed conflictHandler (#46), @hpaulj + + +0.1.11 / 2013-02-07 +------------------- + +- Multiple bugfixes, @hpaulj +- Added 70+ tests (ported from python), @hpaulj +- Added conflictHandler, @applepicke +- Added fromfilePrefixChar, @hpaulj + + +0.1.10 / 2012-12-30 +------------------- + +- Added [mutual exclusion](http://docs.python.org/dev/library/argparse.html#mutual-exclusion) + support, thanks to @hpaulj +- Fixed options check for `storeConst` & `appendConst` actions, thanks to @hpaulj + + +0.1.9 / 2012-12-27 +------------------ + +- Fixed option dest interferens with other options (issue #23), thanks to @hpaulj +- Fixed default value behavior with `*` positionals, thanks to @hpaulj +- Improve `getDefault()` behavior, thanks to @hpaulj +- Imrove negative argument parsing, thanks to @hpaulj + + +0.1.8 / 2012-12-01 +------------------ + +- Fixed parser parents (issue #19), thanks to @hpaulj +- Fixed negative argument parse (issue #20), thanks to @hpaulj + + +0.1.7 / 2012-10-14 +------------------ + +- Fixed 'choices' argument parse (issue #16) +- Fixed stderr output (issue #15) + + +0.1.6 / 2012-09-09 +------------------ + +- Fixed check for conflict of options (thanks to @tomxtobin) + + +0.1.5 / 2012-09-03 +------------------ + +- Fix parser #setDefaults method (thanks to @tomxtobin) + + +0.1.4 / 2012-07-30 +------------------ + +- Fixed pseudo-argument support (thanks to @CGamesPlay) +- Fixed addHelp default (should be true), if not set (thanks to @benblank) + + +0.1.3 / 2012-06-27 +------------------ + +- Fixed formatter api name: Formatter -> HelpFormatter + + +0.1.2 / 2012-05-29 +------------------ + +- Added basic tests +- Removed excess whitespace in help +- Fixed error reporting, when parcer with subcommands + called with empty arguments + + +0.1.1 / 2012-05-23 +------------------ + +- Fixed line wrapping in help formatter +- Added better error reporting on invalid arguments + + +0.1.0 / 2012-05-16 +------------------ + +- First release. diff --git a/code/application_liste/app/node_modules/argparse/LICENSE b/code/application_liste/app/node_modules/argparse/LICENSE new file mode 100644 index 0000000..1afdae5 --- /dev/null +++ b/code/application_liste/app/node_modules/argparse/LICENSE @@ -0,0 +1,21 @@ +(The MIT License) + +Copyright (C) 2012 by Vitaly Puzrin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/argparse/README.md b/code/application_liste/app/node_modules/argparse/README.md new file mode 100644 index 0000000..7fa6c40 --- /dev/null +++ b/code/application_liste/app/node_modules/argparse/README.md @@ -0,0 +1,257 @@ +argparse +======== + +[![Build Status](https://secure.travis-ci.org/nodeca/argparse.svg?branch=master)](http://travis-ci.org/nodeca/argparse) +[![NPM version](https://img.shields.io/npm/v/argparse.svg)](https://www.npmjs.org/package/argparse) + +CLI arguments parser for node.js. Javascript port of python's +[argparse](http://docs.python.org/dev/library/argparse.html) module +(original version 3.2). That's a full port, except some very rare options, +recorded in issue tracker. + +**NB. Difference with original.** + +- Method names changed to camelCase. See [generated docs](http://nodeca.github.com/argparse/). +- Use `defaultValue` instead of `default`. +- Use `argparse.Const.REMAINDER` instead of `argparse.REMAINDER`, and + similarly for constant values `OPTIONAL`, `ZERO_OR_MORE`, and `ONE_OR_MORE` + (aliases for `nargs` values `'?'`, `'*'`, `'+'`, respectively), and + `SUPPRESS`. + + +Example +======= + +test.js file: + +```javascript +#!/usr/bin/env node +'use strict'; + +var ArgumentParser = require('../lib/argparse').ArgumentParser; +var parser = new ArgumentParser({ + version: '0.0.1', + addHelp:true, + description: 'Argparse example' +}); +parser.addArgument( + [ '-f', '--foo' ], + { + help: 'foo bar' + } +); +parser.addArgument( + [ '-b', '--bar' ], + { + help: 'bar foo' + } +); +parser.addArgument( + '--baz', + { + help: 'baz bar' + } +); +var args = parser.parseArgs(); +console.dir(args); +``` + +Display help: + +``` +$ ./test.js -h +usage: example.js [-h] [-v] [-f FOO] [-b BAR] [--baz BAZ] + +Argparse example + +Optional arguments: + -h, --help Show this help message and exit. + -v, --version Show program's version number and exit. + -f FOO, --foo FOO foo bar + -b BAR, --bar BAR bar foo + --baz BAZ baz bar +``` + +Parse arguments: + +``` +$ ./test.js -f=3 --bar=4 --baz 5 +{ foo: '3', bar: '4', baz: '5' } +``` + +More [examples](https://github.com/nodeca/argparse/tree/master/examples). + + +ArgumentParser objects +====================== + +``` +new ArgumentParser({parameters hash}); +``` + +Creates a new ArgumentParser object. + +**Supported params:** + +- ```description``` - Text to display before the argument help. +- ```epilog``` - Text to display after the argument help. +- ```addHelp``` - Add a -h/–help option to the parser. (default: true) +- ```argumentDefault``` - Set the global default value for arguments. (default: null) +- ```parents``` - A list of ArgumentParser objects whose arguments should also be included. +- ```prefixChars``` - The set of characters that prefix optional arguments. (default: ‘-‘) +- ```formatterClass``` - A class for customizing the help output. +- ```prog``` - The name of the program (default: `path.basename(process.argv[1])`) +- ```usage``` - The string describing the program usage (default: generated) +- ```conflictHandler``` - Usually unnecessary, defines strategy for resolving conflicting optionals. + +**Not supported yet** + +- ```fromfilePrefixChars``` - The set of characters that prefix files from which additional arguments should be read. + + +Details in [original ArgumentParser guide](http://docs.python.org/dev/library/argparse.html#argumentparser-objects) + + +addArgument() method +==================== + +``` +ArgumentParser.addArgument(name or flag or [name] or [flags...], {options}) +``` + +Defines how a single command-line argument should be parsed. + +- ```name or flag or [name] or [flags...]``` - Either a positional name + (e.g., `'foo'`), a single option (e.g., `'-f'` or `'--foo'`), an array + of a single positional name (e.g., `['foo']`), or an array of options + (e.g., `['-f', '--foo']`). + +Options: + +- ```action``` - The basic type of action to be taken when this argument is encountered at the command line. +- ```nargs```- The number of command-line arguments that should be consumed. +- ```constant``` - A constant value required by some action and nargs selections. +- ```defaultValue``` - The value produced if the argument is absent from the command line. +- ```type``` - The type to which the command-line argument should be converted. +- ```choices``` - A container of the allowable values for the argument. +- ```required``` - Whether or not the command-line option may be omitted (optionals only). +- ```help``` - A brief description of what the argument does. +- ```metavar``` - A name for the argument in usage messages. +- ```dest``` - The name of the attribute to be added to the object returned by parseArgs(). + +Details in [original add_argument guide](http://docs.python.org/dev/library/argparse.html#the-add-argument-method) + + +Action (some details) +================ + +ArgumentParser objects associate command-line arguments with actions. +These actions can do just about anything with the command-line arguments associated +with them, though most actions simply add an attribute to the object returned by +parseArgs(). The action keyword argument specifies how the command-line arguments +should be handled. The supported actions are: + +- ```store``` - Just stores the argument’s value. This is the default action. +- ```storeConst``` - Stores value, specified by the const keyword argument. + (Note that the const keyword argument defaults to the rather unhelpful None.) + The 'storeConst' action is most commonly used with optional arguments, that + specify some sort of flag. +- ```storeTrue``` and ```storeFalse``` - Stores values True and False + respectively. These are special cases of 'storeConst'. +- ```append``` - Stores a list, and appends each argument value to the list. + This is useful to allow an option to be specified multiple times. +- ```appendConst``` - Stores a list, and appends value, specified by the + const keyword argument to the list. (Note, that the const keyword argument defaults + is None.) The 'appendConst' action is typically used when multiple arguments need + to store constants to the same list. +- ```count``` - Counts the number of times a keyword argument occurs. For example, + used for increasing verbosity levels. +- ```help``` - Prints a complete help message for all the options in the current + parser and then exits. By default a help action is automatically added to the parser. + See ArgumentParser for details of how the output is created. +- ```version``` - Prints version information and exit. Expects a `version=` + keyword argument in the addArgument() call. + +Details in [original action guide](http://docs.python.org/dev/library/argparse.html#action) + + +Sub-commands +============ + +ArgumentParser.addSubparsers() + +Many programs split their functionality into a number of sub-commands, for +example, the svn program can invoke sub-commands like `svn checkout`, `svn update`, +and `svn commit`. Splitting up functionality this way can be a particularly good +idea when a program performs several different functions which require different +kinds of command-line arguments. `ArgumentParser` supports creation of such +sub-commands with `addSubparsers()` method. The `addSubparsers()` method is +normally called with no arguments and returns an special action object. +This object has a single method `addParser()`, which takes a command name and +any `ArgumentParser` constructor arguments, and returns an `ArgumentParser` object +that can be modified as usual. + +Example: + +sub_commands.js +```javascript +#!/usr/bin/env node +'use strict'; + +var ArgumentParser = require('../lib/argparse').ArgumentParser; +var parser = new ArgumentParser({ + version: '0.0.1', + addHelp:true, + description: 'Argparse examples: sub-commands', +}); + +var subparsers = parser.addSubparsers({ + title:'subcommands', + dest:"subcommand_name" +}); + +var bar = subparsers.addParser('c1', {addHelp:true}); +bar.addArgument( + [ '-f', '--foo' ], + { + action: 'store', + help: 'foo3 bar3' + } +); +var bar = subparsers.addParser( + 'c2', + {aliases:['co'], addHelp:true} +); +bar.addArgument( + [ '-b', '--bar' ], + { + action: 'store', + type: 'int', + help: 'foo3 bar3' + } +); + +var args = parser.parseArgs(); +console.dir(args); + +``` + +Details in [original sub-commands guide](http://docs.python.org/dev/library/argparse.html#sub-commands) + + +Contributors +============ + +- [Eugene Shkuropat](https://github.com/shkuropat) +- [Paul Jacobson](https://github.com/hpaulj) + +[others](https://github.com/nodeca/argparse/graphs/contributors) + +License +======= + +Copyright (c) 2012 [Vitaly Puzrin](https://github.com/puzrin). +Released under the MIT license. See +[LICENSE](https://github.com/nodeca/argparse/blob/master/LICENSE) for details. + + diff --git a/code/application_liste/app/node_modules/argparse/index.js b/code/application_liste/app/node_modules/argparse/index.js new file mode 100644 index 0000000..3bbc143 --- /dev/null +++ b/code/application_liste/app/node_modules/argparse/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./lib/argparse'); diff --git a/code/application_liste/app/node_modules/argparse/lib/action.js b/code/application_liste/app/node_modules/argparse/lib/action.js new file mode 100644 index 0000000..1483c79 --- /dev/null +++ b/code/application_liste/app/node_modules/argparse/lib/action.js @@ -0,0 +1,146 @@ +/** + * class Action + * + * Base class for all actions + * Do not call in your code, use this class only for inherits your own action + * + * Information about how to convert command line strings to Javascript objects. + * Action objects are used by an ArgumentParser to represent the information + * needed to parse a single argument from one or more strings from the command + * line. The keyword arguments to the Action constructor are also all attributes + * of Action instances. + * + * ##### Allowed keywords: + * + * - `store` + * - `storeConstant` + * - `storeTrue` + * - `storeFalse` + * - `append` + * - `appendConstant` + * - `count` + * - `help` + * - `version` + * + * Information about action options see [[Action.new]] + * + * See also [original guide](http://docs.python.org/dev/library/argparse.html#action) + * + **/ + +'use strict'; + + +// Constants +var c = require('./const'); + + +/** + * new Action(options) + * + * Base class for all actions. Used only for inherits + * + * + * ##### Options: + * + * - `optionStrings` A list of command-line option strings for the action. + * - `dest` Attribute to hold the created object(s) + * - `nargs` The number of command-line arguments that should be consumed. + * By default, one argument will be consumed and a single value will be + * produced. + * - `constant` Default value for an action with no value. + * - `defaultValue` The value to be produced if the option is not specified. + * - `type` Cast to 'string'|'int'|'float'|'complex'|function (string). If + * None, 'string'. + * - `choices` The choices available. + * - `required` True if the action must always be specified at the command + * line. + * - `help` The help describing the argument. + * - `metavar` The name to be used for the option's argument with the help + * string. If None, the 'dest' value will be used as the name. + * + * ##### nargs supported values: + * + * - `N` (an integer) consumes N arguments (and produces a list) + * - `?` consumes zero or one arguments + * - `*` consumes zero or more arguments (and produces a list) + * - `+` consumes one or more arguments (and produces a list) + * + * Note: that the difference between the default and nargs=1 is that with the + * default, a single value will be produced, while with nargs=1, a list + * containing a single value will be produced. + **/ +var Action = module.exports = function Action(options) { + options = options || {}; + this.optionStrings = options.optionStrings || []; + this.dest = options.dest; + this.nargs = typeof options.nargs !== 'undefined' ? options.nargs : null; + this.constant = typeof options.constant !== 'undefined' ? options.constant : null; + this.defaultValue = options.defaultValue; + this.type = typeof options.type !== 'undefined' ? options.type : null; + this.choices = typeof options.choices !== 'undefined' ? options.choices : null; + this.required = typeof options.required !== 'undefined' ? options.required : false; + this.help = typeof options.help !== 'undefined' ? options.help : null; + this.metavar = typeof options.metavar !== 'undefined' ? options.metavar : null; + + if (!(this.optionStrings instanceof Array)) { + throw new Error('optionStrings should be an array'); + } + if (typeof this.required !== 'undefined' && typeof this.required !== 'boolean') { + throw new Error('required should be a boolean'); + } +}; + +/** + * Action#getName -> String + * + * Tells action name + **/ +Action.prototype.getName = function () { + if (this.optionStrings.length > 0) { + return this.optionStrings.join('/'); + } else if (this.metavar !== null && this.metavar !== c.SUPPRESS) { + return this.metavar; + } else if (typeof this.dest !== 'undefined' && this.dest !== c.SUPPRESS) { + return this.dest; + } + return null; +}; + +/** + * Action#isOptional -> Boolean + * + * Return true if optional + **/ +Action.prototype.isOptional = function () { + return !this.isPositional(); +}; + +/** + * Action#isPositional -> Boolean + * + * Return true if positional + **/ +Action.prototype.isPositional = function () { + return (this.optionStrings.length === 0); +}; + +/** + * Action#call(parser, namespace, values, optionString) -> Void + * - parser (ArgumentParser): current parser + * - namespace (Namespace): namespace for output data + * - values (Array): parsed values + * - optionString (Array): input option string(not parsed) + * + * Call the action. Should be implemented in inherited classes + * + * ##### Example + * + * ActionCount.prototype.call = function (parser, namespace, values, optionString) { + * namespace.set(this.dest, (namespace[this.dest] || 0) + 1); + * }; + * + **/ +Action.prototype.call = function () { + throw new Error('.call() not defined');// Not Implemented error +}; diff --git a/code/application_liste/app/node_modules/argparse/lib/action/append.js b/code/application_liste/app/node_modules/argparse/lib/action/append.js new file mode 100644 index 0000000..b5da0de --- /dev/null +++ b/code/application_liste/app/node_modules/argparse/lib/action/append.js @@ -0,0 +1,53 @@ +/*:nodoc:* + * class ActionAppend + * + * This action stores a list, and appends each argument value to the list. + * This is useful to allow an option to be specified multiple times. + * This class inherided from [[Action]] + * + **/ + +'use strict'; + +var util = require('util'); + +var Action = require('../action'); + +// Constants +var c = require('../const'); + +/*:nodoc:* + * new ActionAppend(options) + * - options (object): options hash see [[Action.new]] + * + * Note: options.nargs should be optional for constants + * and more then zero for other + **/ +var ActionAppend = module.exports = function ActionAppend(options) { + options = options || {}; + if (this.nargs <= 0) { + throw new Error('nargs for append actions must be > 0; if arg ' + + 'strings are not supplying the value to append, ' + + 'the append const action may be more appropriate'); + } + if (!!this.constant && this.nargs !== c.OPTIONAL) { + throw new Error('nargs must be OPTIONAL to supply const'); + } + Action.call(this, options); +}; +util.inherits(ActionAppend, Action); + +/*:nodoc:* + * ActionAppend#call(parser, namespace, values, optionString) -> Void + * - parser (ArgumentParser): current parser + * - namespace (Namespace): namespace for output data + * - values (Array): parsed values + * - optionString (Array): input option string(not parsed) + * + * Call the action. Save result in namespace object + **/ +ActionAppend.prototype.call = function (parser, namespace, values) { + var items = (namespace[this.dest] || []).slice(); + items.push(values); + namespace.set(this.dest, items); +}; diff --git a/code/application_liste/app/node_modules/argparse/lib/action/append/constant.js b/code/application_liste/app/node_modules/argparse/lib/action/append/constant.js new file mode 100644 index 0000000..313f5d2 --- /dev/null +++ b/code/application_liste/app/node_modules/argparse/lib/action/append/constant.js @@ -0,0 +1,47 @@ +/*:nodoc:* + * class ActionAppendConstant + * + * This stores a list, and appends the value specified by + * the const keyword argument to the list. + * (Note that the const keyword argument defaults to null.) + * The 'appendConst' action is typically useful when multiple + * arguments need to store constants to the same list. + * + * This class inherited from [[Action]] + **/ + +'use strict'; + +var util = require('util'); + +var Action = require('../../action'); + +/*:nodoc:* + * new ActionAppendConstant(options) + * - options (object): options hash see [[Action.new]] + * + **/ +var ActionAppendConstant = module.exports = function ActionAppendConstant(options) { + options = options || {}; + options.nargs = 0; + if (typeof options.constant === 'undefined') { + throw new Error('constant option is required for appendAction'); + } + Action.call(this, options); +}; +util.inherits(ActionAppendConstant, Action); + +/*:nodoc:* + * ActionAppendConstant#call(parser, namespace, values, optionString) -> Void + * - parser (ArgumentParser): current parser + * - namespace (Namespace): namespace for output data + * - values (Array): parsed values + * - optionString (Array): input option string(not parsed) + * + * Call the action. Save result in namespace object + **/ +ActionAppendConstant.prototype.call = function (parser, namespace) { + var items = [].concat(namespace[this.dest] || []); + items.push(this.constant); + namespace.set(this.dest, items); +}; diff --git a/code/application_liste/app/node_modules/argparse/lib/action/count.js b/code/application_liste/app/node_modules/argparse/lib/action/count.js new file mode 100644 index 0000000..d6a5899 --- /dev/null +++ b/code/application_liste/app/node_modules/argparse/lib/action/count.js @@ -0,0 +1,40 @@ +/*:nodoc:* + * class ActionCount + * + * This counts the number of times a keyword argument occurs. + * For example, this is useful for increasing verbosity levels + * + * This class inherided from [[Action]] + * + **/ +'use strict'; + +var util = require('util'); + +var Action = require('../action'); + +/*:nodoc:* + * new ActionCount(options) + * - options (object): options hash see [[Action.new]] + * + **/ +var ActionCount = module.exports = function ActionCount(options) { + options = options || {}; + options.nargs = 0; + + Action.call(this, options); +}; +util.inherits(ActionCount, Action); + +/*:nodoc:* + * ActionCount#call(parser, namespace, values, optionString) -> Void + * - parser (ArgumentParser): current parser + * - namespace (Namespace): namespace for output data + * - values (Array): parsed values + * - optionString (Array): input option string(not parsed) + * + * Call the action. Save result in namespace object + **/ +ActionCount.prototype.call = function (parser, namespace) { + namespace.set(this.dest, (namespace[this.dest] || 0) + 1); +}; diff --git a/code/application_liste/app/node_modules/argparse/lib/action/help.js b/code/application_liste/app/node_modules/argparse/lib/action/help.js new file mode 100644 index 0000000..b40e05a --- /dev/null +++ b/code/application_liste/app/node_modules/argparse/lib/action/help.js @@ -0,0 +1,47 @@ +/*:nodoc:* + * class ActionHelp + * + * Support action for printing help + * This class inherided from [[Action]] + **/ +'use strict'; + +var util = require('util'); + +var Action = require('../action'); + +// Constants +var c = require('../const'); + +/*:nodoc:* + * new ActionHelp(options) + * - options (object): options hash see [[Action.new]] + * + **/ +var ActionHelp = module.exports = function ActionHelp(options) { + options = options || {}; + if (options.defaultValue !== null) { + options.defaultValue = options.defaultValue; + } else { + options.defaultValue = c.SUPPRESS; + } + options.dest = (options.dest !== null ? options.dest : c.SUPPRESS); + options.nargs = 0; + Action.call(this, options); + +}; +util.inherits(ActionHelp, Action); + +/*:nodoc:* + * ActionHelp#call(parser, namespace, values, optionString) + * - parser (ArgumentParser): current parser + * - namespace (Namespace): namespace for output data + * - values (Array): parsed values + * - optionString (Array): input option string(not parsed) + * + * Print help and exit + **/ +ActionHelp.prototype.call = function (parser) { + parser.printHelp(); + parser.exit(); +}; diff --git a/code/application_liste/app/node_modules/argparse/lib/action/store.js b/code/application_liste/app/node_modules/argparse/lib/action/store.js new file mode 100644 index 0000000..283b860 --- /dev/null +++ b/code/application_liste/app/node_modules/argparse/lib/action/store.js @@ -0,0 +1,50 @@ +/*:nodoc:* + * class ActionStore + * + * This action just stores the argument’s value. This is the default action. + * + * This class inherited from [[Action]] + * + **/ +'use strict'; + +var util = require('util'); + +var Action = require('../action'); + +// Constants +var c = require('../const'); + + +/*:nodoc:* + * new ActionStore(options) + * - options (object): options hash see [[Action.new]] + * + **/ +var ActionStore = module.exports = function ActionStore(options) { + options = options || {}; + if (this.nargs <= 0) { + throw new Error('nargs for store actions must be > 0; if you ' + + 'have nothing to store, actions such as store ' + + 'true or store const may be more appropriate'); + + } + if (typeof this.constant !== 'undefined' && this.nargs !== c.OPTIONAL) { + throw new Error('nargs must be OPTIONAL to supply const'); + } + Action.call(this, options); +}; +util.inherits(ActionStore, Action); + +/*:nodoc:* + * ActionStore#call(parser, namespace, values, optionString) -> Void + * - parser (ArgumentParser): current parser + * - namespace (Namespace): namespace for output data + * - values (Array): parsed values + * - optionString (Array): input option string(not parsed) + * + * Call the action. Save result in namespace object + **/ +ActionStore.prototype.call = function (parser, namespace, values) { + namespace.set(this.dest, values); +}; diff --git a/code/application_liste/app/node_modules/argparse/lib/action/store/constant.js b/code/application_liste/app/node_modules/argparse/lib/action/store/constant.js new file mode 100644 index 0000000..23caa89 --- /dev/null +++ b/code/application_liste/app/node_modules/argparse/lib/action/store/constant.js @@ -0,0 +1,43 @@ +/*:nodoc:* + * class ActionStoreConstant + * + * This action stores the value specified by the const keyword argument. + * (Note that the const keyword argument defaults to the rather unhelpful null.) + * The 'store_const' action is most commonly used with optional + * arguments that specify some sort of flag. + * + * This class inherited from [[Action]] + **/ +'use strict'; + +var util = require('util'); + +var Action = require('../../action'); + +/*:nodoc:* + * new ActionStoreConstant(options) + * - options (object): options hash see [[Action.new]] + * + **/ +var ActionStoreConstant = module.exports = function ActionStoreConstant(options) { + options = options || {}; + options.nargs = 0; + if (typeof options.constant === 'undefined') { + throw new Error('constant option is required for storeAction'); + } + Action.call(this, options); +}; +util.inherits(ActionStoreConstant, Action); + +/*:nodoc:* + * ActionStoreConstant#call(parser, namespace, values, optionString) -> Void + * - parser (ArgumentParser): current parser + * - namespace (Namespace): namespace for output data + * - values (Array): parsed values + * - optionString (Array): input option string(not parsed) + * + * Call the action. Save result in namespace object + **/ +ActionStoreConstant.prototype.call = function (parser, namespace) { + namespace.set(this.dest, this.constant); +}; diff --git a/code/application_liste/app/node_modules/argparse/lib/action/store/false.js b/code/application_liste/app/node_modules/argparse/lib/action/store/false.js new file mode 100644 index 0000000..9924f46 --- /dev/null +++ b/code/application_liste/app/node_modules/argparse/lib/action/store/false.js @@ -0,0 +1,27 @@ +/*:nodoc:* + * class ActionStoreFalse + * + * This action store the values False respectively. + * This is special cases of 'storeConst' + * + * This class inherited from [[Action]] + **/ + +'use strict'; + +var util = require('util'); + +var ActionStoreConstant = require('./constant'); + +/*:nodoc:* + * new ActionStoreFalse(options) + * - options (object): hash of options see [[Action.new]] + * + **/ +var ActionStoreFalse = module.exports = function ActionStoreFalse(options) { + options = options || {}; + options.constant = false; + options.defaultValue = options.defaultValue !== null ? options.defaultValue : true; + ActionStoreConstant.call(this, options); +}; +util.inherits(ActionStoreFalse, ActionStoreConstant); diff --git a/code/application_liste/app/node_modules/argparse/lib/action/store/true.js b/code/application_liste/app/node_modules/argparse/lib/action/store/true.js new file mode 100644 index 0000000..9e22f7d --- /dev/null +++ b/code/application_liste/app/node_modules/argparse/lib/action/store/true.js @@ -0,0 +1,26 @@ +/*:nodoc:* + * class ActionStoreTrue + * + * This action store the values True respectively. + * This isspecial cases of 'storeConst' + * + * This class inherited from [[Action]] + **/ +'use strict'; + +var util = require('util'); + +var ActionStoreConstant = require('./constant'); + +/*:nodoc:* + * new ActionStoreTrue(options) + * - options (object): options hash see [[Action.new]] + * + **/ +var ActionStoreTrue = module.exports = function ActionStoreTrue(options) { + options = options || {}; + options.constant = true; + options.defaultValue = options.defaultValue !== null ? options.defaultValue : false; + ActionStoreConstant.call(this, options); +}; +util.inherits(ActionStoreTrue, ActionStoreConstant); diff --git a/code/application_liste/app/node_modules/argparse/lib/action/subparsers.js b/code/application_liste/app/node_modules/argparse/lib/action/subparsers.js new file mode 100644 index 0000000..99dfedd --- /dev/null +++ b/code/application_liste/app/node_modules/argparse/lib/action/subparsers.js @@ -0,0 +1,149 @@ +/** internal + * class ActionSubparsers + * + * Support the creation of such sub-commands with the addSubparsers() + * + * This class inherited from [[Action]] + **/ +'use strict'; + +var util = require('util'); +var format = require('util').format; + + +var Action = require('../action'); + +// Constants +var c = require('../const'); + +// Errors +var argumentErrorHelper = require('../argument/error'); + + +/*:nodoc:* + * new ChoicesPseudoAction(name, help) + * + * Create pseudo action for correct help text + * + **/ +function ChoicesPseudoAction(name, help) { + var options = { + optionStrings: [], + dest: name, + help: help + }; + + Action.call(this, options); +} + +util.inherits(ChoicesPseudoAction, Action); + +/** + * new ActionSubparsers(options) + * - options (object): options hash see [[Action.new]] + * + **/ +function ActionSubparsers(options) { + options = options || {}; + options.dest = options.dest || c.SUPPRESS; + options.nargs = c.PARSER; + + this.debug = (options.debug === true); + + this._progPrefix = options.prog; + this._parserClass = options.parserClass; + this._nameParserMap = {}; + this._choicesActions = []; + + options.choices = this._nameParserMap; + Action.call(this, options); +} + +util.inherits(ActionSubparsers, Action); + +/*:nodoc:* + * ActionSubparsers#addParser(name, options) -> ArgumentParser + * - name (string): sub-command name + * - options (object): see [[ArgumentParser.new]] + * + * Note: + * addParser supports an additional aliases option, + * which allows multiple strings to refer to the same subparser. + * This example, like svn, aliases co as a shorthand for checkout + * + **/ +ActionSubparsers.prototype.addParser = function (name, options) { + var parser; + + var self = this; + + options = options || {}; + + options.debug = (this.debug === true); + + // set program from the existing prefix + if (!options.prog) { + options.prog = this._progPrefix + ' ' + name; + } + + var aliases = options.aliases || []; + + // create a pseudo-action to hold the choice help + if (!!options.help || typeof options.help === 'string') { + var help = options.help; + delete options.help; + + var choiceAction = new ChoicesPseudoAction(name, help); + this._choicesActions.push(choiceAction); + } + + // create the parser and add it to the map + parser = new this._parserClass(options); + this._nameParserMap[name] = parser; + + // make parser available under aliases also + aliases.forEach(function (alias) { + self._nameParserMap[alias] = parser; + }); + + return parser; +}; + +ActionSubparsers.prototype._getSubactions = function () { + return this._choicesActions; +}; + +/*:nodoc:* + * ActionSubparsers#call(parser, namespace, values, optionString) -> Void + * - parser (ArgumentParser): current parser + * - namespace (Namespace): namespace for output data + * - values (Array): parsed values + * - optionString (Array): input option string(not parsed) + * + * Call the action. Parse input aguments + **/ +ActionSubparsers.prototype.call = function (parser, namespace, values) { + var parserName = values[0]; + var argStrings = values.slice(1); + + // set the parser name if requested + if (this.dest !== c.SUPPRESS) { + namespace[this.dest] = parserName; + } + + // select the parser + if (this._nameParserMap[parserName]) { + parser = this._nameParserMap[parserName]; + } else { + throw argumentErrorHelper(format( + 'Unknown parser "%s" (choices: [%s]).', + parserName, + Object.keys(this._nameParserMap).join(', ') + )); + } + + // parse all the remaining options into the namespace + parser.parseArgs(argStrings, namespace); +}; + +module.exports = ActionSubparsers; diff --git a/code/application_liste/app/node_modules/argparse/lib/action/version.js b/code/application_liste/app/node_modules/argparse/lib/action/version.js new file mode 100644 index 0000000..8053328 --- /dev/null +++ b/code/application_liste/app/node_modules/argparse/lib/action/version.js @@ -0,0 +1,47 @@ +/*:nodoc:* + * class ActionVersion + * + * Support action for printing program version + * This class inherited from [[Action]] + **/ +'use strict'; + +var util = require('util'); + +var Action = require('../action'); + +// +// Constants +// +var c = require('../const'); + +/*:nodoc:* + * new ActionVersion(options) + * - options (object): options hash see [[Action.new]] + * + **/ +var ActionVersion = module.exports = function ActionVersion(options) { + options = options || {}; + options.defaultValue = (options.defaultValue ? options.defaultValue : c.SUPPRESS); + options.dest = (options.dest || c.SUPPRESS); + options.nargs = 0; + this.version = options.version; + Action.call(this, options); +}; +util.inherits(ActionVersion, Action); + +/*:nodoc:* + * ActionVersion#call(parser, namespace, values, optionString) -> Void + * - parser (ArgumentParser): current parser + * - namespace (Namespace): namespace for output data + * - values (Array): parsed values + * - optionString (Array): input option string(not parsed) + * + * Print version and exit + **/ +ActionVersion.prototype.call = function (parser) { + var version = this.version || parser.version; + var formatter = parser._getFormatter(); + formatter.addText(version); + parser.exit(0, formatter.formatHelp()); +}; diff --git a/code/application_liste/app/node_modules/argparse/lib/action_container.js b/code/application_liste/app/node_modules/argparse/lib/action_container.js new file mode 100644 index 0000000..6f1237b --- /dev/null +++ b/code/application_liste/app/node_modules/argparse/lib/action_container.js @@ -0,0 +1,482 @@ +/** internal + * class ActionContainer + * + * Action container. Parent for [[ArgumentParser]] and [[ArgumentGroup]] + **/ + +'use strict'; + +var format = require('util').format; + +// Constants +var c = require('./const'); + +var $$ = require('./utils'); + +//Actions +var ActionHelp = require('./action/help'); +var ActionAppend = require('./action/append'); +var ActionAppendConstant = require('./action/append/constant'); +var ActionCount = require('./action/count'); +var ActionStore = require('./action/store'); +var ActionStoreConstant = require('./action/store/constant'); +var ActionStoreTrue = require('./action/store/true'); +var ActionStoreFalse = require('./action/store/false'); +var ActionVersion = require('./action/version'); +var ActionSubparsers = require('./action/subparsers'); + +// Errors +var argumentErrorHelper = require('./argument/error'); + +/** + * new ActionContainer(options) + * + * Action container. Parent for [[ArgumentParser]] and [[ArgumentGroup]] + * + * ##### Options: + * + * - `description` -- A description of what the program does + * - `prefixChars` -- Characters that prefix optional arguments + * - `argumentDefault` -- The default value for all arguments + * - `conflictHandler` -- The conflict handler to use for duplicate arguments + **/ +var ActionContainer = module.exports = function ActionContainer(options) { + options = options || {}; + + this.description = options.description; + this.argumentDefault = options.argumentDefault; + this.prefixChars = options.prefixChars || ''; + this.conflictHandler = options.conflictHandler; + + // set up registries + this._registries = {}; + + // register actions + this.register('action', null, ActionStore); + this.register('action', 'store', ActionStore); + this.register('action', 'storeConst', ActionStoreConstant); + this.register('action', 'storeTrue', ActionStoreTrue); + this.register('action', 'storeFalse', ActionStoreFalse); + this.register('action', 'append', ActionAppend); + this.register('action', 'appendConst', ActionAppendConstant); + this.register('action', 'count', ActionCount); + this.register('action', 'help', ActionHelp); + this.register('action', 'version', ActionVersion); + this.register('action', 'parsers', ActionSubparsers); + + // raise an exception if the conflict handler is invalid + this._getHandler(); + + // action storage + this._actions = []; + this._optionStringActions = {}; + + // groups + this._actionGroups = []; + this._mutuallyExclusiveGroups = []; + + // defaults storage + this._defaults = {}; + + // determines whether an "option" looks like a negative number + // -1, -1.5 -5e+4 + this._regexpNegativeNumber = new RegExp('^[-]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?$'); + + // whether or not there are any optionals that look like negative + // numbers -- uses a list so it can be shared and edited + this._hasNegativeNumberOptionals = []; +}; + +// Groups must be required, then ActionContainer already defined +var ArgumentGroup = require('./argument/group'); +var MutuallyExclusiveGroup = require('./argument/exclusive'); + +// +// Registration methods +// + +/** + * ActionContainer#register(registryName, value, object) -> Void + * - registryName (String) : object type action|type + * - value (string) : keyword + * - object (Object|Function) : handler + * + * Register handlers + **/ +ActionContainer.prototype.register = function (registryName, value, object) { + this._registries[registryName] = this._registries[registryName] || {}; + this._registries[registryName][value] = object; +}; + +ActionContainer.prototype._registryGet = function (registryName, value, defaultValue) { + if (arguments.length < 3) { + defaultValue = null; + } + return this._registries[registryName][value] || defaultValue; +}; + +// +// Namespace default accessor methods +// + +/** + * ActionContainer#setDefaults(options) -> Void + * - options (object):hash of options see [[Action.new]] + * + * Set defaults + **/ +ActionContainer.prototype.setDefaults = function (options) { + options = options || {}; + for (var property in options) { + if ($$.has(options, property)) { + this._defaults[property] = options[property]; + } + } + + // if these defaults match any existing arguments, replace the previous + // default on the object with the new one + this._actions.forEach(function (action) { + if ($$.has(options, action.dest)) { + action.defaultValue = options[action.dest]; + } + }); +}; + +/** + * ActionContainer#getDefault(dest) -> Mixed + * - dest (string): action destination + * + * Return action default value + **/ +ActionContainer.prototype.getDefault = function (dest) { + var result = $$.has(this._defaults, dest) ? this._defaults[dest] : null; + + this._actions.forEach(function (action) { + if (action.dest === dest && $$.has(action, 'defaultValue')) { + result = action.defaultValue; + } + }); + + return result; +}; +// +// Adding argument actions +// + +/** + * ActionContainer#addArgument(args, options) -> Object + * - args (String|Array): argument key, or array of argument keys + * - options (Object): action objects see [[Action.new]] + * + * #### Examples + * - addArgument([ '-f', '--foo' ], { action: 'store', defaultValue: 1, ... }) + * - addArgument([ 'bar' ], { action: 'store', nargs: 1, ... }) + * - addArgument('--baz', { action: 'store', nargs: 1, ... }) + **/ +ActionContainer.prototype.addArgument = function (args, options) { + args = args; + options = options || {}; + + if (typeof args === 'string') { + args = [ args ]; + } + if (!Array.isArray(args)) { + throw new TypeError('addArgument first argument should be a string or an array'); + } + if (typeof options !== 'object' || Array.isArray(options)) { + throw new TypeError('addArgument second argument should be a hash'); + } + + // if no positional args are supplied or only one is supplied and + // it doesn't look like an option string, parse a positional argument + if (!args || args.length === 1 && this.prefixChars.indexOf(args[0][0]) < 0) { + if (args && !!options.dest) { + throw new Error('dest supplied twice for positional argument'); + } + options = this._getPositional(args, options); + + // otherwise, we're adding an optional argument + } else { + options = this._getOptional(args, options); + } + + // if no default was supplied, use the parser-level default + if (typeof options.defaultValue === 'undefined') { + var dest = options.dest; + if ($$.has(this._defaults, dest)) { + options.defaultValue = this._defaults[dest]; + } else if (typeof this.argumentDefault !== 'undefined') { + options.defaultValue = this.argumentDefault; + } + } + + // create the action object, and add it to the parser + var ActionClass = this._popActionClass(options); + if (typeof ActionClass !== 'function') { + throw new Error(format('Unknown action "%s".', ActionClass)); + } + var action = new ActionClass(options); + + // throw an error if the action type is not callable + var typeFunction = this._registryGet('type', action.type, action.type); + if (typeof typeFunction !== 'function') { + throw new Error(format('"%s" is not callable', typeFunction)); + } + + return this._addAction(action); +}; + +/** + * ActionContainer#addArgumentGroup(options) -> ArgumentGroup + * - options (Object): hash of options see [[ArgumentGroup.new]] + * + * Create new arguments groups + **/ +ActionContainer.prototype.addArgumentGroup = function (options) { + var group = new ArgumentGroup(this, options); + this._actionGroups.push(group); + return group; +}; + +/** + * ActionContainer#addMutuallyExclusiveGroup(options) -> ArgumentGroup + * - options (Object): {required: false} + * + * Create new mutual exclusive groups + **/ +ActionContainer.prototype.addMutuallyExclusiveGroup = function (options) { + var group = new MutuallyExclusiveGroup(this, options); + this._mutuallyExclusiveGroups.push(group); + return group; +}; + +ActionContainer.prototype._addAction = function (action) { + var self = this; + + // resolve any conflicts + this._checkConflict(action); + + // add to actions list + this._actions.push(action); + action.container = this; + + // index the action by any option strings it has + action.optionStrings.forEach(function (optionString) { + self._optionStringActions[optionString] = action; + }); + + // set the flag if any option strings look like negative numbers + action.optionStrings.forEach(function (optionString) { + if (optionString.match(self._regexpNegativeNumber)) { + if (!self._hasNegativeNumberOptionals.some(Boolean)) { + self._hasNegativeNumberOptionals.push(true); + } + } + }); + + // return the created action + return action; +}; + +ActionContainer.prototype._removeAction = function (action) { + var actionIndex = this._actions.indexOf(action); + if (actionIndex >= 0) { + this._actions.splice(actionIndex, 1); + } +}; + +ActionContainer.prototype._addContainerActions = function (container) { + // collect groups by titles + var titleGroupMap = {}; + this._actionGroups.forEach(function (group) { + if (titleGroupMap[group.title]) { + throw new Error(format('Cannot merge actions - two groups are named "%s".', group.title)); + } + titleGroupMap[group.title] = group; + }); + + // map each action to its group + var groupMap = {}; + function actionHash(action) { + // unique (hopefully?) string suitable as dictionary key + return action.getName(); + } + container._actionGroups.forEach(function (group) { + // if a group with the title exists, use that, otherwise + // create a new group matching the container's group + if (!titleGroupMap[group.title]) { + titleGroupMap[group.title] = this.addArgumentGroup({ + title: group.title, + description: group.description + }); + } + + // map the actions to their new group + group._groupActions.forEach(function (action) { + groupMap[actionHash(action)] = titleGroupMap[group.title]; + }); + }, this); + + // add container's mutually exclusive groups + // NOTE: if add_mutually_exclusive_group ever gains title= and + // description= then this code will need to be expanded as above + var mutexGroup; + container._mutuallyExclusiveGroups.forEach(function (group) { + mutexGroup = this.addMutuallyExclusiveGroup({ + required: group.required + }); + // map the actions to their new mutex group + group._groupActions.forEach(function (action) { + groupMap[actionHash(action)] = mutexGroup; + }); + }, this); // forEach takes a 'this' argument + + // add all actions to this container or their group + container._actions.forEach(function (action) { + var key = actionHash(action); + if (groupMap[key]) { + groupMap[key]._addAction(action); + } else { + this._addAction(action); + } + }); +}; + +ActionContainer.prototype._getPositional = function (dest, options) { + if (Array.isArray(dest)) { + dest = dest[0]; + } + // make sure required is not specified + if (options.required) { + throw new Error('"required" is an invalid argument for positionals.'); + } + + // mark positional arguments as required if at least one is + // always required + if (options.nargs !== c.OPTIONAL && options.nargs !== c.ZERO_OR_MORE) { + options.required = true; + } + if (options.nargs === c.ZERO_OR_MORE && typeof options.defaultValue === 'undefined') { + options.required = true; + } + + // return the keyword arguments with no option strings + options.dest = dest; + options.optionStrings = []; + return options; +}; + +ActionContainer.prototype._getOptional = function (args, options) { + var prefixChars = this.prefixChars; + var optionStrings = []; + var optionStringsLong = []; + + // determine short and long option strings + args.forEach(function (optionString) { + // error on strings that don't start with an appropriate prefix + if (prefixChars.indexOf(optionString[0]) < 0) { + throw new Error(format('Invalid option string "%s": must start with a "%s".', + optionString, + prefixChars + )); + } + + // strings starting with two prefix characters are long options + optionStrings.push(optionString); + if (optionString.length > 1 && prefixChars.indexOf(optionString[1]) >= 0) { + optionStringsLong.push(optionString); + } + }); + + // infer dest, '--foo-bar' -> 'foo_bar' and '-x' -> 'x' + var dest = options.dest || null; + delete options.dest; + + if (!dest) { + var optionStringDest = optionStringsLong.length ? optionStringsLong[0] : optionStrings[0]; + dest = $$.trimChars(optionStringDest, this.prefixChars); + + if (dest.length === 0) { + throw new Error( + format('dest= is required for options like "%s"', optionStrings.join(', ')) + ); + } + dest = dest.replace(/-/g, '_'); + } + + // return the updated keyword arguments + options.dest = dest; + options.optionStrings = optionStrings; + + return options; +}; + +ActionContainer.prototype._popActionClass = function (options, defaultValue) { + defaultValue = defaultValue || null; + + var action = (options.action || defaultValue); + delete options.action; + + var actionClass = this._registryGet('action', action, action); + return actionClass; +}; + +ActionContainer.prototype._getHandler = function () { + var handlerString = this.conflictHandler; + var handlerFuncName = '_handleConflict' + $$.capitalize(handlerString); + var func = this[handlerFuncName]; + if (typeof func === 'undefined') { + var msg = 'invalid conflict resolution value: ' + handlerString; + throw new Error(msg); + } else { + return func; + } +}; + +ActionContainer.prototype._checkConflict = function (action) { + var optionStringActions = this._optionStringActions; + var conflictOptionals = []; + + // find all options that conflict with this option + // collect pairs, the string, and an existing action that it conflicts with + action.optionStrings.forEach(function (optionString) { + var conflOptional = optionStringActions[optionString]; + if (typeof conflOptional !== 'undefined') { + conflictOptionals.push([ optionString, conflOptional ]); + } + }); + + if (conflictOptionals.length > 0) { + var conflictHandler = this._getHandler(); + conflictHandler.call(this, action, conflictOptionals); + } +}; + +ActionContainer.prototype._handleConflictError = function (action, conflOptionals) { + var conflicts = conflOptionals.map(function (pair) { return pair[0]; }); + conflicts = conflicts.join(', '); + throw argumentErrorHelper( + action, + format('Conflicting option string(s): %s', conflicts) + ); +}; + +ActionContainer.prototype._handleConflictResolve = function (action, conflOptionals) { + // remove all conflicting options + var self = this; + conflOptionals.forEach(function (pair) { + var optionString = pair[0]; + var conflictingAction = pair[1]; + // remove the conflicting option string + var i = conflictingAction.optionStrings.indexOf(optionString); + if (i >= 0) { + conflictingAction.optionStrings.splice(i, 1); + } + delete self._optionStringActions[optionString]; + // if the option now has no option string, remove it from the + // container holding it + if (conflictingAction.optionStrings.length === 0) { + conflictingAction.container._removeAction(conflictingAction); + } + }); +}; diff --git a/code/application_liste/app/node_modules/argparse/lib/argparse.js b/code/application_liste/app/node_modules/argparse/lib/argparse.js new file mode 100644 index 0000000..f2a2c51 --- /dev/null +++ b/code/application_liste/app/node_modules/argparse/lib/argparse.js @@ -0,0 +1,14 @@ +'use strict'; + +module.exports.ArgumentParser = require('./argument_parser.js'); +module.exports.Namespace = require('./namespace'); +module.exports.Action = require('./action'); +module.exports.HelpFormatter = require('./help/formatter.js'); +module.exports.Const = require('./const.js'); + +module.exports.ArgumentDefaultsHelpFormatter = + require('./help/added_formatters.js').ArgumentDefaultsHelpFormatter; +module.exports.RawDescriptionHelpFormatter = + require('./help/added_formatters.js').RawDescriptionHelpFormatter; +module.exports.RawTextHelpFormatter = + require('./help/added_formatters.js').RawTextHelpFormatter; diff --git a/code/application_liste/app/node_modules/argparse/lib/argument/error.js b/code/application_liste/app/node_modules/argparse/lib/argument/error.js new file mode 100644 index 0000000..c8a02a0 --- /dev/null +++ b/code/application_liste/app/node_modules/argparse/lib/argument/error.js @@ -0,0 +1,50 @@ +'use strict'; + + +var format = require('util').format; + + +var ERR_CODE = 'ARGError'; + +/*:nodoc:* + * argumentError(argument, message) -> TypeError + * - argument (Object): action with broken argument + * - message (String): error message + * + * Error format helper. An error from creating or using an argument + * (optional or positional). The string value of this exception + * is the message, augmented with information + * about the argument that caused it. + * + * #####Example + * + * var argumentErrorHelper = require('./argument/error'); + * if (conflictOptionals.length > 0) { + * throw argumentErrorHelper( + * action, + * format('Conflicting option string(s): %s', conflictOptionals.join(', ')) + * ); + * } + * + **/ +module.exports = function (argument, message) { + var argumentName = null; + var errMessage; + var err; + + if (argument.getName) { + argumentName = argument.getName(); + } else { + argumentName = '' + argument; + } + + if (!argumentName) { + errMessage = message; + } else { + errMessage = format('argument "%s": %s', argumentName, message); + } + + err = new TypeError(errMessage); + err.code = ERR_CODE; + return err; +}; diff --git a/code/application_liste/app/node_modules/argparse/lib/argument/exclusive.js b/code/application_liste/app/node_modules/argparse/lib/argument/exclusive.js new file mode 100644 index 0000000..8287e00 --- /dev/null +++ b/code/application_liste/app/node_modules/argparse/lib/argument/exclusive.js @@ -0,0 +1,54 @@ +/** internal + * class MutuallyExclusiveGroup + * + * Group arguments. + * By default, ArgumentParser groups command-line arguments + * into “positional arguments” and “optional arguments” + * when displaying help messages. When there is a better + * conceptual grouping of arguments than this default one, + * appropriate groups can be created using the addArgumentGroup() method + * + * This class inherited from [[ArgumentContainer]] + **/ +'use strict'; + +var util = require('util'); + +var ArgumentGroup = require('./group'); + +/** + * new MutuallyExclusiveGroup(container, options) + * - container (object): main container + * - options (object): options.required -> true/false + * + * `required` could be an argument itself, but making it a property of + * the options argument is more consistent with the JS adaptation of the Python) + **/ +var MutuallyExclusiveGroup = module.exports = function MutuallyExclusiveGroup(container, options) { + var required; + options = options || {}; + required = options.required || false; + ArgumentGroup.call(this, container); + this.required = required; + +}; +util.inherits(MutuallyExclusiveGroup, ArgumentGroup); + + +MutuallyExclusiveGroup.prototype._addAction = function (action) { + var msg; + if (action.required) { + msg = 'mutually exclusive arguments must be optional'; + throw new Error(msg); + } + action = this._container._addAction(action); + this._groupActions.push(action); + return action; +}; + + +MutuallyExclusiveGroup.prototype._removeAction = function (action) { + this._container._removeAction(action); + this._groupActions.remove(action); +}; + diff --git a/code/application_liste/app/node_modules/argparse/lib/argument/group.js b/code/application_liste/app/node_modules/argparse/lib/argument/group.js new file mode 100644 index 0000000..58b271f --- /dev/null +++ b/code/application_liste/app/node_modules/argparse/lib/argument/group.js @@ -0,0 +1,75 @@ +/** internal + * class ArgumentGroup + * + * Group arguments. + * By default, ArgumentParser groups command-line arguments + * into “positional arguments” and “optional arguments” + * when displaying help messages. When there is a better + * conceptual grouping of arguments than this default one, + * appropriate groups can be created using the addArgumentGroup() method + * + * This class inherited from [[ArgumentContainer]] + **/ +'use strict'; + +var util = require('util'); + +var ActionContainer = require('../action_container'); + + +/** + * new ArgumentGroup(container, options) + * - container (object): main container + * - options (object): hash of group options + * + * #### options + * - **prefixChars** group name prefix + * - **argumentDefault** default argument value + * - **title** group title + * - **description** group description + * + **/ +var ArgumentGroup = module.exports = function ArgumentGroup(container, options) { + + options = options || {}; + + // add any missing keyword arguments by checking the container + options.conflictHandler = (options.conflictHandler || container.conflictHandler); + options.prefixChars = (options.prefixChars || container.prefixChars); + options.argumentDefault = (options.argumentDefault || container.argumentDefault); + + ActionContainer.call(this, options); + + // group attributes + this.title = options.title; + this._groupActions = []; + + // share most attributes with the container + this._container = container; + this._registries = container._registries; + this._actions = container._actions; + this._optionStringActions = container._optionStringActions; + this._defaults = container._defaults; + this._hasNegativeNumberOptionals = container._hasNegativeNumberOptionals; + this._mutuallyExclusiveGroups = container._mutuallyExclusiveGroups; +}; +util.inherits(ArgumentGroup, ActionContainer); + + +ArgumentGroup.prototype._addAction = function (action) { + // Parent add action + action = ActionContainer.prototype._addAction.call(this, action); + this._groupActions.push(action); + return action; +}; + + +ArgumentGroup.prototype._removeAction = function (action) { + // Parent remove action + ActionContainer.prototype._removeAction.call(this, action); + var actionIndex = this._groupActions.indexOf(action); + if (actionIndex >= 0) { + this._groupActions.splice(actionIndex, 1); + } +}; + diff --git a/code/application_liste/app/node_modules/argparse/lib/argument_parser.js b/code/application_liste/app/node_modules/argparse/lib/argument_parser.js new file mode 100644 index 0000000..bd9a59a --- /dev/null +++ b/code/application_liste/app/node_modules/argparse/lib/argument_parser.js @@ -0,0 +1,1161 @@ +/** + * class ArgumentParser + * + * Object for parsing command line strings into js objects. + * + * Inherited from [[ActionContainer]] + **/ +'use strict'; + +var util = require('util'); +var format = require('util').format; +var Path = require('path'); +var sprintf = require('sprintf-js').sprintf; + +// Constants +var c = require('./const'); + +var $$ = require('./utils'); + +var ActionContainer = require('./action_container'); + +// Errors +var argumentErrorHelper = require('./argument/error'); + +var HelpFormatter = require('./help/formatter'); + +var Namespace = require('./namespace'); + + +/** + * new ArgumentParser(options) + * + * Create a new ArgumentParser object. + * + * ##### Options: + * - `prog` The name of the program (default: Path.basename(process.argv[1])) + * - `usage` A usage message (default: auto-generated from arguments) + * - `description` A description of what the program does + * - `epilog` Text following the argument descriptions + * - `parents` Parsers whose arguments should be copied into this one + * - `formatterClass` HelpFormatter class for printing help messages + * - `prefixChars` Characters that prefix optional arguments + * - `fromfilePrefixChars` Characters that prefix files containing additional arguments + * - `argumentDefault` The default value for all arguments + * - `addHelp` Add a -h/-help option + * - `conflictHandler` Specifies how to handle conflicting argument names + * - `debug` Enable debug mode. Argument errors throw exception in + * debug mode and process.exit in normal. Used for development and + * testing (default: false) + * + * See also [original guide][1] + * + * [1]:http://docs.python.org/dev/library/argparse.html#argumentparser-objects + **/ +function ArgumentParser(options) { + if (!(this instanceof ArgumentParser)) { + return new ArgumentParser(options); + } + var self = this; + options = options || {}; + + options.description = (options.description || null); + options.argumentDefault = (options.argumentDefault || null); + options.prefixChars = (options.prefixChars || '-'); + options.conflictHandler = (options.conflictHandler || 'error'); + ActionContainer.call(this, options); + + options.addHelp = typeof options.addHelp === 'undefined' || !!options.addHelp; + options.parents = options.parents || []; + // default program name + options.prog = (options.prog || Path.basename(process.argv[1])); + this.prog = options.prog; + this.usage = options.usage; + this.epilog = options.epilog; + this.version = options.version; + + this.debug = (options.debug === true); + + this.formatterClass = (options.formatterClass || HelpFormatter); + this.fromfilePrefixChars = options.fromfilePrefixChars || null; + this._positionals = this.addArgumentGroup({ title: 'Positional arguments' }); + this._optionals = this.addArgumentGroup({ title: 'Optional arguments' }); + this._subparsers = null; + + // register types + function FUNCTION_IDENTITY(o) { + return o; + } + this.register('type', 'auto', FUNCTION_IDENTITY); + this.register('type', null, FUNCTION_IDENTITY); + this.register('type', 'int', function (x) { + var result = parseInt(x, 10); + if (isNaN(result)) { + throw new Error(x + ' is not a valid integer.'); + } + return result; + }); + this.register('type', 'float', function (x) { + var result = parseFloat(x); + if (isNaN(result)) { + throw new Error(x + ' is not a valid float.'); + } + return result; + }); + this.register('type', 'string', function (x) { + return '' + x; + }); + + // add help and version arguments if necessary + var defaultPrefix = (this.prefixChars.indexOf('-') > -1) ? '-' : this.prefixChars[0]; + if (options.addHelp) { + this.addArgument( + [ defaultPrefix + 'h', defaultPrefix + defaultPrefix + 'help' ], + { + action: 'help', + defaultValue: c.SUPPRESS, + help: 'Show this help message and exit.' + } + ); + } + if (typeof this.version !== 'undefined') { + this.addArgument( + [ defaultPrefix + 'v', defaultPrefix + defaultPrefix + 'version' ], + { + action: 'version', + version: this.version, + defaultValue: c.SUPPRESS, + help: "Show program's version number and exit." + } + ); + } + + // add parent arguments and defaults + options.parents.forEach(function (parent) { + self._addContainerActions(parent); + if (typeof parent._defaults !== 'undefined') { + for (var defaultKey in parent._defaults) { + if (parent._defaults.hasOwnProperty(defaultKey)) { + self._defaults[defaultKey] = parent._defaults[defaultKey]; + } + } + } + }); +} + +util.inherits(ArgumentParser, ActionContainer); + +/** + * ArgumentParser#addSubparsers(options) -> [[ActionSubparsers]] + * - options (object): hash of options see [[ActionSubparsers.new]] + * + * See also [subcommands][1] + * + * [1]:http://docs.python.org/dev/library/argparse.html#sub-commands + **/ +ArgumentParser.prototype.addSubparsers = function (options) { + if (this._subparsers) { + this.error('Cannot have multiple subparser arguments.'); + } + + options = options || {}; + options.debug = (this.debug === true); + options.optionStrings = []; + options.parserClass = (options.parserClass || ArgumentParser); + + + if (!!options.title || !!options.description) { + + this._subparsers = this.addArgumentGroup({ + title: (options.title || 'subcommands'), + description: options.description + }); + delete options.title; + delete options.description; + + } else { + this._subparsers = this._positionals; + } + + // prog defaults to the usage message of this parser, skipping + // optional arguments and with no "usage:" prefix + if (!options.prog) { + var formatter = this._getFormatter(); + var positionals = this._getPositionalActions(); + var groups = this._mutuallyExclusiveGroups; + formatter.addUsage(this.usage, positionals, groups, ''); + options.prog = formatter.formatHelp().trim(); + } + + // create the parsers action and add it to the positionals list + var ParsersClass = this._popActionClass(options, 'parsers'); + var action = new ParsersClass(options); + this._subparsers._addAction(action); + + // return the created parsers action + return action; +}; + +ArgumentParser.prototype._addAction = function (action) { + if (action.isOptional()) { + this._optionals._addAction(action); + } else { + this._positionals._addAction(action); + } + return action; +}; + +ArgumentParser.prototype._getOptionalActions = function () { + return this._actions.filter(function (action) { + return action.isOptional(); + }); +}; + +ArgumentParser.prototype._getPositionalActions = function () { + return this._actions.filter(function (action) { + return action.isPositional(); + }); +}; + + +/** + * ArgumentParser#parseArgs(args, namespace) -> Namespace|Object + * - args (array): input elements + * - namespace (Namespace|Object): result object + * + * Parsed args and throws error if some arguments are not recognized + * + * See also [original guide][1] + * + * [1]:http://docs.python.org/dev/library/argparse.html#the-parse-args-method + **/ +ArgumentParser.prototype.parseArgs = function (args, namespace) { + var argv; + var result = this.parseKnownArgs(args, namespace); + + args = result[0]; + argv = result[1]; + if (argv && argv.length > 0) { + this.error( + format('Unrecognized arguments: %s.', argv.join(' ')) + ); + } + return args; +}; + +/** + * ArgumentParser#parseKnownArgs(args, namespace) -> array + * - args (array): input options + * - namespace (Namespace|Object): result object + * + * Parse known arguments and return tuple of result object + * and unknown args + * + * See also [original guide][1] + * + * [1]:http://docs.python.org/dev/library/argparse.html#partial-parsing + **/ +ArgumentParser.prototype.parseKnownArgs = function (args, namespace) { + var self = this; + + // args default to the system args + args = args || process.argv.slice(2); + + // default Namespace built from parser defaults + namespace = namespace || new Namespace(); + + self._actions.forEach(function (action) { + if (action.dest !== c.SUPPRESS) { + if (!$$.has(namespace, action.dest)) { + if (action.defaultValue !== c.SUPPRESS) { + var defaultValue = action.defaultValue; + if (typeof action.defaultValue === 'string') { + defaultValue = self._getValue(action, defaultValue); + } + namespace[action.dest] = defaultValue; + } + } + } + }); + + Object.keys(self._defaults).forEach(function (dest) { + namespace[dest] = self._defaults[dest]; + }); + + // parse the arguments and exit if there are any errors + try { + var res = this._parseKnownArgs(args, namespace); + + namespace = res[0]; + args = res[1]; + if ($$.has(namespace, c._UNRECOGNIZED_ARGS_ATTR)) { + args = $$.arrayUnion(args, namespace[c._UNRECOGNIZED_ARGS_ATTR]); + delete namespace[c._UNRECOGNIZED_ARGS_ATTR]; + } + return [ namespace, args ]; + } catch (e) { + this.error(e); + } +}; + +ArgumentParser.prototype._parseKnownArgs = function (argStrings, namespace) { + var self = this; + + var extras = []; + + // replace arg strings that are file references + if (this.fromfilePrefixChars !== null) { + argStrings = this._readArgsFromFiles(argStrings); + } + // map all mutually exclusive arguments to the other arguments + // they can't occur with + // Python has 'conflicts = action_conflicts.setdefault(mutex_action, [])' + // though I can't conceive of a way in which an action could be a member + // of two different mutually exclusive groups. + + function actionHash(action) { + // some sort of hashable key for this action + // action itself cannot be a key in actionConflicts + // I think getName() (join of optionStrings) is unique enough + return action.getName(); + } + + var conflicts, key; + var actionConflicts = {}; + + this._mutuallyExclusiveGroups.forEach(function (mutexGroup) { + mutexGroup._groupActions.forEach(function (mutexAction, i, groupActions) { + key = actionHash(mutexAction); + if (!$$.has(actionConflicts, key)) { + actionConflicts[key] = []; + } + conflicts = actionConflicts[key]; + conflicts.push.apply(conflicts, groupActions.slice(0, i)); + conflicts.push.apply(conflicts, groupActions.slice(i + 1)); + }); + }); + + // find all option indices, and determine the arg_string_pattern + // which has an 'O' if there is an option at an index, + // an 'A' if there is an argument, or a '-' if there is a '--' + var optionStringIndices = {}; + + var argStringPatternParts = []; + + argStrings.forEach(function (argString, argStringIndex) { + if (argString === '--') { + argStringPatternParts.push('-'); + while (argStringIndex < argStrings.length) { + argStringPatternParts.push('A'); + argStringIndex++; + } + } else { + // otherwise, add the arg to the arg strings + // and note the index if it was an option + var pattern; + var optionTuple = self._parseOptional(argString); + if (!optionTuple) { + pattern = 'A'; + } else { + optionStringIndices[argStringIndex] = optionTuple; + pattern = 'O'; + } + argStringPatternParts.push(pattern); + } + }); + var argStringsPattern = argStringPatternParts.join(''); + + var seenActions = []; + var seenNonDefaultActions = []; + + + function takeAction(action, argumentStrings, optionString) { + seenActions.push(action); + var argumentValues = self._getValues(action, argumentStrings); + + // error if this argument is not allowed with other previously + // seen arguments, assuming that actions that use the default + // value don't really count as "present" + if (argumentValues !== action.defaultValue) { + seenNonDefaultActions.push(action); + if (actionConflicts[actionHash(action)]) { + actionConflicts[actionHash(action)].forEach(function (actionConflict) { + if (seenNonDefaultActions.indexOf(actionConflict) >= 0) { + throw argumentErrorHelper( + action, + format('Not allowed with argument "%s".', actionConflict.getName()) + ); + } + }); + } + } + + if (argumentValues !== c.SUPPRESS) { + action.call(self, namespace, argumentValues, optionString); + } + } + + function consumeOptional(startIndex) { + // get the optional identified at this index + var optionTuple = optionStringIndices[startIndex]; + var action = optionTuple[0]; + var optionString = optionTuple[1]; + var explicitArg = optionTuple[2]; + + // identify additional optionals in the same arg string + // (e.g. -xyz is the same as -x -y -z if no args are required) + var actionTuples = []; + + var args, argCount, start, stop; + + for (;;) { + if (!action) { + extras.push(argStrings[startIndex]); + return startIndex + 1; + } + if (explicitArg) { + argCount = self._matchArgument(action, 'A'); + + // if the action is a single-dash option and takes no + // arguments, try to parse more single-dash options out + // of the tail of the option string + var chars = self.prefixChars; + if (argCount === 0 && chars.indexOf(optionString[1]) < 0) { + actionTuples.push([ action, [], optionString ]); + optionString = optionString[0] + explicitArg[0]; + var newExplicitArg = explicitArg.slice(1) || null; + var optionalsMap = self._optionStringActions; + + if (Object.keys(optionalsMap).indexOf(optionString) >= 0) { + action = optionalsMap[optionString]; + explicitArg = newExplicitArg; + } else { + throw argumentErrorHelper(action, sprintf('ignored explicit argument %r', explicitArg)); + } + } else if (argCount === 1) { + // if the action expect exactly one argument, we've + // successfully matched the option; exit the loop + stop = startIndex + 1; + args = [ explicitArg ]; + actionTuples.push([ action, args, optionString ]); + break; + } else { + // error if a double-dash option did not use the + // explicit argument + throw argumentErrorHelper(action, sprintf('ignored explicit argument %r', explicitArg)); + } + } else { + // if there is no explicit argument, try to match the + // optional's string arguments with the following strings + // if successful, exit the loop + + start = startIndex + 1; + var selectedPatterns = argStringsPattern.substr(start); + + argCount = self._matchArgument(action, selectedPatterns); + stop = start + argCount; + + + args = argStrings.slice(start, stop); + + actionTuples.push([ action, args, optionString ]); + break; + } + + } + + // add the Optional to the list and return the index at which + // the Optional's string args stopped + if (actionTuples.length < 1) { + throw new Error('length should be > 0'); + } + for (var i = 0; i < actionTuples.length; i++) { + takeAction.apply(self, actionTuples[i]); + } + return stop; + } + + // the list of Positionals left to be parsed; this is modified + // by consume_positionals() + var positionals = self._getPositionalActions(); + + function consumePositionals(startIndex) { + // match as many Positionals as possible + var selectedPattern = argStringsPattern.substr(startIndex); + var argCounts = self._matchArgumentsPartial(positionals, selectedPattern); + + // slice off the appropriate arg strings for each Positional + // and add the Positional and its args to the list + for (var i = 0; i < positionals.length; i++) { + var action = positionals[i]; + var argCount = argCounts[i]; + if (typeof argCount === 'undefined') { + continue; + } + var args = argStrings.slice(startIndex, startIndex + argCount); + + startIndex += argCount; + takeAction(action, args); + } + + // slice off the Positionals that we just parsed and return the + // index at which the Positionals' string args stopped + positionals = positionals.slice(argCounts.length); + return startIndex; + } + + // consume Positionals and Optionals alternately, until we have + // passed the last option string + var startIndex = 0; + var position; + + var maxOptionStringIndex = -1; + + Object.keys(optionStringIndices).forEach(function (position) { + maxOptionStringIndex = Math.max(maxOptionStringIndex, parseInt(position, 10)); + }); + + var positionalsEndIndex, nextOptionStringIndex; + + while (startIndex <= maxOptionStringIndex) { + // consume any Positionals preceding the next option + nextOptionStringIndex = null; + for (position in optionStringIndices) { + if (!optionStringIndices.hasOwnProperty(position)) { continue; } + + position = parseInt(position, 10); + if (position >= startIndex) { + if (nextOptionStringIndex !== null) { + nextOptionStringIndex = Math.min(nextOptionStringIndex, position); + } else { + nextOptionStringIndex = position; + } + } + } + + if (startIndex !== nextOptionStringIndex) { + positionalsEndIndex = consumePositionals(startIndex); + // only try to parse the next optional if we didn't consume + // the option string during the positionals parsing + if (positionalsEndIndex > startIndex) { + startIndex = positionalsEndIndex; + continue; + } else { + startIndex = positionalsEndIndex; + } + } + + // if we consumed all the positionals we could and we're not + // at the index of an option string, there were extra arguments + if (!optionStringIndices[startIndex]) { + var strings = argStrings.slice(startIndex, nextOptionStringIndex); + extras = extras.concat(strings); + startIndex = nextOptionStringIndex; + } + // consume the next optional and any arguments for it + startIndex = consumeOptional(startIndex); + } + + // consume any positionals following the last Optional + var stopIndex = consumePositionals(startIndex); + + // if we didn't consume all the argument strings, there were extras + extras = extras.concat(argStrings.slice(stopIndex)); + + // if we didn't use all the Positional objects, there were too few + // arg strings supplied. + if (positionals.length > 0) { + self.error('too few arguments'); + } + + // make sure all required actions were present + self._actions.forEach(function (action) { + if (action.required) { + if (seenActions.indexOf(action) < 0) { + self.error(format('Argument "%s" is required', action.getName())); + } + } + }); + + // make sure all required groups have one option present + var actionUsed = false; + self._mutuallyExclusiveGroups.forEach(function (group) { + if (group.required) { + actionUsed = group._groupActions.some(function (action) { + return seenNonDefaultActions.indexOf(action) !== -1; + }); + + // if no actions were used, report the error + if (!actionUsed) { + var names = []; + group._groupActions.forEach(function (action) { + if (action.help !== c.SUPPRESS) { + names.push(action.getName()); + } + }); + names = names.join(' '); + var msg = 'one of the arguments ' + names + ' is required'; + self.error(msg); + } + } + }); + + // return the updated namespace and the extra arguments + return [ namespace, extras ]; +}; + +ArgumentParser.prototype._readArgsFromFiles = function (argStrings) { + // expand arguments referencing files + var self = this; + var fs = require('fs'); + var newArgStrings = []; + argStrings.forEach(function (argString) { + if (self.fromfilePrefixChars.indexOf(argString[0]) < 0) { + // for regular arguments, just add them back into the list + newArgStrings.push(argString); + } else { + // replace arguments referencing files with the file content + try { + var argstrs = []; + var filename = argString.slice(1); + var content = fs.readFileSync(filename, 'utf8'); + content = content.trim().split('\n'); + content.forEach(function (argLine) { + self.convertArgLineToArgs(argLine).forEach(function (arg) { + argstrs.push(arg); + }); + argstrs = self._readArgsFromFiles(argstrs); + }); + newArgStrings.push.apply(newArgStrings, argstrs); + } catch (error) { + return self.error(error.message); + } + } + }); + return newArgStrings; +}; + +ArgumentParser.prototype.convertArgLineToArgs = function (argLine) { + return [ argLine ]; +}; + +ArgumentParser.prototype._matchArgument = function (action, regexpArgStrings) { + + // match the pattern for this action to the arg strings + var regexpNargs = new RegExp('^' + this._getNargsPattern(action)); + var matches = regexpArgStrings.match(regexpNargs); + var message; + + // throw an exception if we weren't able to find a match + if (!matches) { + switch (action.nargs) { + /*eslint-disable no-undefined*/ + case undefined: + case null: + message = 'Expected one argument.'; + break; + case c.OPTIONAL: + message = 'Expected at most one argument.'; + break; + case c.ONE_OR_MORE: + message = 'Expected at least one argument.'; + break; + default: + message = 'Expected %s argument(s)'; + } + + throw argumentErrorHelper( + action, + format(message, action.nargs) + ); + } + // return the number of arguments matched + return matches[1].length; +}; + +ArgumentParser.prototype._matchArgumentsPartial = function (actions, regexpArgStrings) { + // progressively shorten the actions list by slicing off the + // final actions until we find a match + var self = this; + var result = []; + var actionSlice, pattern, matches; + var i, j; + + function getLength(string) { + return string.length; + } + + for (i = actions.length; i > 0; i--) { + pattern = ''; + actionSlice = actions.slice(0, i); + for (j = 0; j < actionSlice.length; j++) { + pattern += self._getNargsPattern(actionSlice[j]); + } + + pattern = new RegExp('^' + pattern); + matches = regexpArgStrings.match(pattern); + + if (matches && matches.length > 0) { + // need only groups + matches = matches.splice(1); + result = result.concat(matches.map(getLength)); + break; + } + } + + // return the list of arg string counts + return result; +}; + +ArgumentParser.prototype._parseOptional = function (argString) { + var action, optionString, argExplicit, optionTuples; + + // if it's an empty string, it was meant to be a positional + if (!argString) { + return null; + } + + // if it doesn't start with a prefix, it was meant to be positional + if (this.prefixChars.indexOf(argString[0]) < 0) { + return null; + } + + // if the option string is present in the parser, return the action + if (this._optionStringActions[argString]) { + return [ this._optionStringActions[argString], argString, null ]; + } + + // if it's just a single character, it was meant to be positional + if (argString.length === 1) { + return null; + } + + // if the option string before the "=" is present, return the action + if (argString.indexOf('=') >= 0) { + optionString = argString.split('=', 1)[0]; + argExplicit = argString.slice(optionString.length + 1); + + if (this._optionStringActions[optionString]) { + action = this._optionStringActions[optionString]; + return [ action, optionString, argExplicit ]; + } + } + + // search through all possible prefixes of the option string + // and all actions in the parser for possible interpretations + optionTuples = this._getOptionTuples(argString); + + // if multiple actions match, the option string was ambiguous + if (optionTuples.length > 1) { + var optionStrings = optionTuples.map(function (optionTuple) { + return optionTuple[1]; + }); + this.error(format( + 'Ambiguous option: "%s" could match %s.', + argString, optionStrings.join(', ') + )); + // if exactly one action matched, this segmentation is good, + // so return the parsed action + } else if (optionTuples.length === 1) { + return optionTuples[0]; + } + + // if it was not found as an option, but it looks like a negative + // number, it was meant to be positional + // unless there are negative-number-like options + if (argString.match(this._regexpNegativeNumber)) { + if (!this._hasNegativeNumberOptionals.some(Boolean)) { + return null; + } + } + // if it contains a space, it was meant to be a positional + if (argString.search(' ') >= 0) { + return null; + } + + // it was meant to be an optional but there is no such option + // in this parser (though it might be a valid option in a subparser) + return [ null, argString, null ]; +}; + +ArgumentParser.prototype._getOptionTuples = function (optionString) { + var result = []; + var chars = this.prefixChars; + var optionPrefix; + var argExplicit; + var action; + var actionOptionString; + + // option strings starting with two prefix characters are only split at + // the '=' + if (chars.indexOf(optionString[0]) >= 0 && chars.indexOf(optionString[1]) >= 0) { + if (optionString.indexOf('=') >= 0) { + var optionStringSplit = optionString.split('=', 1); + + optionPrefix = optionStringSplit[0]; + argExplicit = optionStringSplit[1]; + } else { + optionPrefix = optionString; + argExplicit = null; + } + + for (actionOptionString in this._optionStringActions) { + if (actionOptionString.substr(0, optionPrefix.length) === optionPrefix) { + action = this._optionStringActions[actionOptionString]; + result.push([ action, actionOptionString, argExplicit ]); + } + } + + // single character options can be concatenated with their arguments + // but multiple character options always have to have their argument + // separate + } else if (chars.indexOf(optionString[0]) >= 0 && chars.indexOf(optionString[1]) < 0) { + optionPrefix = optionString; + argExplicit = null; + var optionPrefixShort = optionString.substr(0, 2); + var argExplicitShort = optionString.substr(2); + + for (actionOptionString in this._optionStringActions) { + if (!$$.has(this._optionStringActions, actionOptionString)) continue; + + action = this._optionStringActions[actionOptionString]; + if (actionOptionString === optionPrefixShort) { + result.push([ action, actionOptionString, argExplicitShort ]); + } else if (actionOptionString.substr(0, optionPrefix.length) === optionPrefix) { + result.push([ action, actionOptionString, argExplicit ]); + } + } + + // shouldn't ever get here + } else { + throw new Error(format('Unexpected option string: %s.', optionString)); + } + // return the collected option tuples + return result; +}; + +ArgumentParser.prototype._getNargsPattern = function (action) { + // in all examples below, we have to allow for '--' args + // which are represented as '-' in the pattern + var regexpNargs; + + switch (action.nargs) { + // the default (null) is assumed to be a single argument + case undefined: + case null: + regexpNargs = '(-*A-*)'; + break; + // allow zero or more arguments + case c.OPTIONAL: + regexpNargs = '(-*A?-*)'; + break; + // allow zero or more arguments + case c.ZERO_OR_MORE: + regexpNargs = '(-*[A-]*)'; + break; + // allow one or more arguments + case c.ONE_OR_MORE: + regexpNargs = '(-*A[A-]*)'; + break; + // allow any number of options or arguments + case c.REMAINDER: + regexpNargs = '([-AO]*)'; + break; + // allow one argument followed by any number of options or arguments + case c.PARSER: + regexpNargs = '(-*A[-AO]*)'; + break; + // all others should be integers + default: + regexpNargs = '(-*' + $$.repeat('-*A', action.nargs) + '-*)'; + } + + // if this is an optional action, -- is not allowed + if (action.isOptional()) { + regexpNargs = regexpNargs.replace(/-\*/g, ''); + regexpNargs = regexpNargs.replace(/-/g, ''); + } + + // return the pattern + return regexpNargs; +}; + +// +// Value conversion methods +// + +ArgumentParser.prototype._getValues = function (action, argStrings) { + var self = this; + + // for everything but PARSER args, strip out '--' + if (action.nargs !== c.PARSER && action.nargs !== c.REMAINDER) { + argStrings = argStrings.filter(function (arrayElement) { + return arrayElement !== '--'; + }); + } + + var value, argString; + + // optional argument produces a default when not present + if (argStrings.length === 0 && action.nargs === c.OPTIONAL) { + + value = (action.isOptional()) ? action.constant : action.defaultValue; + + if (typeof (value) === 'string') { + value = this._getValue(action, value); + this._checkValue(action, value); + } + + // when nargs='*' on a positional, if there were no command-line + // args, use the default if it is anything other than None + } else if (argStrings.length === 0 && action.nargs === c.ZERO_OR_MORE && + action.optionStrings.length === 0) { + + value = (action.defaultValue || argStrings); + this._checkValue(action, value); + + // single argument or optional argument produces a single value + } else if (argStrings.length === 1 && + (!action.nargs || action.nargs === c.OPTIONAL)) { + + argString = argStrings[0]; + value = this._getValue(action, argString); + this._checkValue(action, value); + + // REMAINDER arguments convert all values, checking none + } else if (action.nargs === c.REMAINDER) { + value = argStrings.map(function (v) { + return self._getValue(action, v); + }); + + // PARSER arguments convert all values, but check only the first + } else if (action.nargs === c.PARSER) { + value = argStrings.map(function (v) { + return self._getValue(action, v); + }); + this._checkValue(action, value[0]); + + // all other types of nargs produce a list + } else { + value = argStrings.map(function (v) { + return self._getValue(action, v); + }); + value.forEach(function (v) { + self._checkValue(action, v); + }); + } + + // return the converted value + return value; +}; + +ArgumentParser.prototype._getValue = function (action, argString) { + var result; + + var typeFunction = this._registryGet('type', action.type, action.type); + if (typeof typeFunction !== 'function') { + var message = format('%s is not callable', typeFunction); + throw argumentErrorHelper(action, message); + } + + // convert the value to the appropriate type + try { + result = typeFunction(argString); + + // ArgumentTypeErrors indicate errors + // If action.type is not a registered string, it is a function + // Try to deduce its name for inclusion in the error message + // Failing that, include the error message it raised. + } catch (e) { + var name = null; + if (typeof action.type === 'string') { + name = action.type; + } else { + name = action.type.name || action.type.displayName || ''; + } + var msg = format('Invalid %s value: %s', name, argString); + if (name === '') { msg += '\n' + e.message; } + throw argumentErrorHelper(action, msg); + } + // return the converted value + return result; +}; + +ArgumentParser.prototype._checkValue = function (action, value) { + // converted value must be one of the choices (if specified) + var choices = action.choices; + if (choices) { + // choise for argument can by array or string + if ((typeof choices === 'string' || Array.isArray(choices)) && + choices.indexOf(value) !== -1) { + return; + } + // choise for subparsers can by only hash + if (typeof choices === 'object' && !Array.isArray(choices) && choices[value]) { + return; + } + + if (typeof choices === 'string') { + choices = choices.split('').join(', '); + } else if (Array.isArray(choices)) { + choices = choices.join(', '); + } else { + choices = Object.keys(choices).join(', '); + } + var message = format('Invalid choice: %s (choose from [%s])', value, choices); + throw argumentErrorHelper(action, message); + } +}; + +// +// Help formatting methods +// + +/** + * ArgumentParser#formatUsage -> string + * + * Return usage string + * + * See also [original guide][1] + * + * [1]:http://docs.python.org/dev/library/argparse.html#printing-help + **/ +ArgumentParser.prototype.formatUsage = function () { + var formatter = this._getFormatter(); + formatter.addUsage(this.usage, this._actions, this._mutuallyExclusiveGroups); + return formatter.formatHelp(); +}; + +/** + * ArgumentParser#formatHelp -> string + * + * Return help + * + * See also [original guide][1] + * + * [1]:http://docs.python.org/dev/library/argparse.html#printing-help + **/ +ArgumentParser.prototype.formatHelp = function () { + var formatter = this._getFormatter(); + + // usage + formatter.addUsage(this.usage, this._actions, this._mutuallyExclusiveGroups); + + // description + formatter.addText(this.description); + + // positionals, optionals and user-defined groups + this._actionGroups.forEach(function (actionGroup) { + formatter.startSection(actionGroup.title); + formatter.addText(actionGroup.description); + formatter.addArguments(actionGroup._groupActions); + formatter.endSection(); + }); + + // epilog + formatter.addText(this.epilog); + + // determine help from format above + return formatter.formatHelp(); +}; + +ArgumentParser.prototype._getFormatter = function () { + var FormatterClass = this.formatterClass; + var formatter = new FormatterClass({ prog: this.prog }); + return formatter; +}; + +// +// Print functions +// + +/** + * ArgumentParser#printUsage() -> Void + * + * Print usage + * + * See also [original guide][1] + * + * [1]:http://docs.python.org/dev/library/argparse.html#printing-help + **/ +ArgumentParser.prototype.printUsage = function () { + this._printMessage(this.formatUsage()); +}; + +/** + * ArgumentParser#printHelp() -> Void + * + * Print help + * + * See also [original guide][1] + * + * [1]:http://docs.python.org/dev/library/argparse.html#printing-help + **/ +ArgumentParser.prototype.printHelp = function () { + this._printMessage(this.formatHelp()); +}; + +ArgumentParser.prototype._printMessage = function (message, stream) { + if (!stream) { + stream = process.stdout; + } + if (message) { + stream.write('' + message); + } +}; + +// +// Exit functions +// + +/** + * ArgumentParser#exit(status=0, message) -> Void + * - status (int): exit status + * - message (string): message + * + * Print message in stderr/stdout and exit program + **/ +ArgumentParser.prototype.exit = function (status, message) { + if (message) { + if (status === 0) { + this._printMessage(message); + } else { + this._printMessage(message, process.stderr); + } + } + + process.exit(status); +}; + +/** + * ArgumentParser#error(message) -> Void + * - err (Error|string): message + * + * Error method Prints a usage message incorporating the message to stderr and + * exits. If you override this in a subclass, + * it should not return -- it should + * either exit or throw an exception. + * + **/ +ArgumentParser.prototype.error = function (err) { + var message; + if (err instanceof Error) { + if (this.debug === true) { + throw err; + } + message = err.message; + } else { + message = err; + } + var msg = format('%s: error: %s', this.prog, message) + c.EOL; + + if (this.debug === true) { + throw new Error(msg); + } + + this.printUsage(process.stderr); + + return this.exit(2, msg); +}; + +module.exports = ArgumentParser; diff --git a/code/application_liste/app/node_modules/argparse/lib/const.js b/code/application_liste/app/node_modules/argparse/lib/const.js new file mode 100644 index 0000000..b1fd4ce --- /dev/null +++ b/code/application_liste/app/node_modules/argparse/lib/const.js @@ -0,0 +1,21 @@ +// +// Constants +// + +'use strict'; + +module.exports.EOL = '\n'; + +module.exports.SUPPRESS = '==SUPPRESS=='; + +module.exports.OPTIONAL = '?'; + +module.exports.ZERO_OR_MORE = '*'; + +module.exports.ONE_OR_MORE = '+'; + +module.exports.PARSER = 'A...'; + +module.exports.REMAINDER = '...'; + +module.exports._UNRECOGNIZED_ARGS_ATTR = '_unrecognized_args'; diff --git a/code/application_liste/app/node_modules/argparse/lib/help/added_formatters.js b/code/application_liste/app/node_modules/argparse/lib/help/added_formatters.js new file mode 100644 index 0000000..f8e4299 --- /dev/null +++ b/code/application_liste/app/node_modules/argparse/lib/help/added_formatters.js @@ -0,0 +1,87 @@ +'use strict'; + +var util = require('util'); + +// Constants +var c = require('../const'); + +var $$ = require('../utils'); +var HelpFormatter = require('./formatter.js'); + +/** + * new RawDescriptionHelpFormatter(options) + * new ArgumentParser({formatterClass: argparse.RawDescriptionHelpFormatter, ...}) + * + * Help message formatter which adds default values to argument help. + * + * Only the name of this class is considered a public API. All the methods + * provided by the class are considered an implementation detail. + **/ + +function ArgumentDefaultsHelpFormatter(options) { + HelpFormatter.call(this, options); +} + +util.inherits(ArgumentDefaultsHelpFormatter, HelpFormatter); + +ArgumentDefaultsHelpFormatter.prototype._getHelpString = function (action) { + var help = action.help; + if (action.help.indexOf('%(defaultValue)s') === -1) { + if (action.defaultValue !== c.SUPPRESS) { + var defaulting_nargs = [ c.OPTIONAL, c.ZERO_OR_MORE ]; + if (action.isOptional() || (defaulting_nargs.indexOf(action.nargs) >= 0)) { + help += ' (default: %(defaultValue)s)'; + } + } + } + return help; +}; + +module.exports.ArgumentDefaultsHelpFormatter = ArgumentDefaultsHelpFormatter; + +/** + * new RawDescriptionHelpFormatter(options) + * new ArgumentParser({formatterClass: argparse.RawDescriptionHelpFormatter, ...}) + * + * Help message formatter which retains any formatting in descriptions. + * + * Only the name of this class is considered a public API. All the methods + * provided by the class are considered an implementation detail. + **/ + +function RawDescriptionHelpFormatter(options) { + HelpFormatter.call(this, options); +} + +util.inherits(RawDescriptionHelpFormatter, HelpFormatter); + +RawDescriptionHelpFormatter.prototype._fillText = function (text, width, indent) { + var lines = text.split('\n'); + lines = lines.map(function (line) { + return $$.trimEnd(indent + line); + }); + return lines.join('\n'); +}; +module.exports.RawDescriptionHelpFormatter = RawDescriptionHelpFormatter; + +/** + * new RawTextHelpFormatter(options) + * new ArgumentParser({formatterClass: argparse.RawTextHelpFormatter, ...}) + * + * Help message formatter which retains formatting of all help text. + * + * Only the name of this class is considered a public API. All the methods + * provided by the class are considered an implementation detail. + **/ + +function RawTextHelpFormatter(options) { + RawDescriptionHelpFormatter.call(this, options); +} + +util.inherits(RawTextHelpFormatter, RawDescriptionHelpFormatter); + +RawTextHelpFormatter.prototype._splitLines = function (text) { + return text.split('\n'); +}; + +module.exports.RawTextHelpFormatter = RawTextHelpFormatter; diff --git a/code/application_liste/app/node_modules/argparse/lib/help/formatter.js b/code/application_liste/app/node_modules/argparse/lib/help/formatter.js new file mode 100644 index 0000000..29036c1 --- /dev/null +++ b/code/application_liste/app/node_modules/argparse/lib/help/formatter.js @@ -0,0 +1,795 @@ +/** + * class HelpFormatter + * + * Formatter for generating usage messages and argument help strings. Only the + * name of this class is considered a public API. All the methods provided by + * the class are considered an implementation detail. + * + * Do not call in your code, use this class only for inherits your own forvatter + * + * ToDo add [additonal formatters][1] + * + * [1]:http://docs.python.org/dev/library/argparse.html#formatter-class + **/ +'use strict'; + +var sprintf = require('sprintf-js').sprintf; + +// Constants +var c = require('../const'); + +var $$ = require('../utils'); + + +/*:nodoc:* internal + * new Support(parent, heding) + * - parent (object): parent section + * - heading (string): header string + * + **/ +function Section(parent, heading) { + this._parent = parent; + this._heading = heading; + this._items = []; +} + +/*:nodoc:* internal + * Section#addItem(callback) -> Void + * - callback (array): tuple with function and args + * + * Add function for single element + **/ +Section.prototype.addItem = function (callback) { + this._items.push(callback); +}; + +/*:nodoc:* internal + * Section#formatHelp(formatter) -> string + * - formatter (HelpFormatter): current formatter + * + * Form help section string + * + **/ +Section.prototype.formatHelp = function (formatter) { + var itemHelp, heading; + + // format the indented section + if (this._parent) { + formatter._indent(); + } + + itemHelp = this._items.map(function (item) { + var obj, func, args; + + obj = formatter; + func = item[0]; + args = item[1]; + return func.apply(obj, args); + }); + itemHelp = formatter._joinParts(itemHelp); + + if (this._parent) { + formatter._dedent(); + } + + // return nothing if the section was empty + if (!itemHelp) { + return ''; + } + + // add the heading if the section was non-empty + heading = ''; + if (this._heading && this._heading !== c.SUPPRESS) { + var currentIndent = formatter.currentIndent; + heading = $$.repeat(' ', currentIndent) + this._heading + ':' + c.EOL; + } + + // join the section-initialize newline, the heading and the help + return formatter._joinParts([ c.EOL, heading, itemHelp, c.EOL ]); +}; + +/** + * new HelpFormatter(options) + * + * #### Options: + * - `prog`: program name + * - `indentIncriment`: indent step, default value 2 + * - `maxHelpPosition`: max help position, default value = 24 + * - `width`: line width + * + **/ +var HelpFormatter = module.exports = function HelpFormatter(options) { + options = options || {}; + + this._prog = options.prog; + + this._maxHelpPosition = options.maxHelpPosition || 24; + this._width = (options.width || ((process.env.COLUMNS || 80) - 2)); + + this._currentIndent = 0; + this._indentIncriment = options.indentIncriment || 2; + this._level = 0; + this._actionMaxLength = 0; + + this._rootSection = new Section(null); + this._currentSection = this._rootSection; + + this._whitespaceMatcher = new RegExp('\\s+', 'g'); + this._longBreakMatcher = new RegExp(c.EOL + c.EOL + c.EOL + '+', 'g'); +}; + +HelpFormatter.prototype._indent = function () { + this._currentIndent += this._indentIncriment; + this._level += 1; +}; + +HelpFormatter.prototype._dedent = function () { + this._currentIndent -= this._indentIncriment; + this._level -= 1; + if (this._currentIndent < 0) { + throw new Error('Indent decreased below 0.'); + } +}; + +HelpFormatter.prototype._addItem = function (func, args) { + this._currentSection.addItem([ func, args ]); +}; + +// +// Message building methods +// + +/** + * HelpFormatter#startSection(heading) -> Void + * - heading (string): header string + * + * Start new help section + * + * See alse [code example][1] + * + * ##### Example + * + * formatter.startSection(actionGroup.title); + * formatter.addText(actionGroup.description); + * formatter.addArguments(actionGroup._groupActions); + * formatter.endSection(); + * + **/ +HelpFormatter.prototype.startSection = function (heading) { + this._indent(); + var section = new Section(this._currentSection, heading); + var func = section.formatHelp.bind(section); + this._addItem(func, [ this ]); + this._currentSection = section; +}; + +/** + * HelpFormatter#endSection -> Void + * + * End help section + * + * ##### Example + * + * formatter.startSection(actionGroup.title); + * formatter.addText(actionGroup.description); + * formatter.addArguments(actionGroup._groupActions); + * formatter.endSection(); + **/ +HelpFormatter.prototype.endSection = function () { + this._currentSection = this._currentSection._parent; + this._dedent(); +}; + +/** + * HelpFormatter#addText(text) -> Void + * - text (string): plain text + * + * Add plain text into current section + * + * ##### Example + * + * formatter.startSection(actionGroup.title); + * formatter.addText(actionGroup.description); + * formatter.addArguments(actionGroup._groupActions); + * formatter.endSection(); + * + **/ +HelpFormatter.prototype.addText = function (text) { + if (text && text !== c.SUPPRESS) { + this._addItem(this._formatText, [ text ]); + } +}; + +/** + * HelpFormatter#addUsage(usage, actions, groups, prefix) -> Void + * - usage (string): usage text + * - actions (array): actions list + * - groups (array): groups list + * - prefix (string): usage prefix + * + * Add usage data into current section + * + * ##### Example + * + * formatter.addUsage(this.usage, this._actions, []); + * return formatter.formatHelp(); + * + **/ +HelpFormatter.prototype.addUsage = function (usage, actions, groups, prefix) { + if (usage !== c.SUPPRESS) { + this._addItem(this._formatUsage, [ usage, actions, groups, prefix ]); + } +}; + +/** + * HelpFormatter#addArgument(action) -> Void + * - action (object): action + * + * Add argument into current section + * + * Single variant of [[HelpFormatter#addArguments]] + **/ +HelpFormatter.prototype.addArgument = function (action) { + if (action.help !== c.SUPPRESS) { + var self = this; + + // find all invocations + var invocations = [ this._formatActionInvocation(action) ]; + var invocationLength = invocations[0].length; + + var actionLength; + + if (action._getSubactions) { + this._indent(); + action._getSubactions().forEach(function (subaction) { + + var invocationNew = self._formatActionInvocation(subaction); + invocations.push(invocationNew); + invocationLength = Math.max(invocationLength, invocationNew.length); + + }); + this._dedent(); + } + + // update the maximum item length + actionLength = invocationLength + this._currentIndent; + this._actionMaxLength = Math.max(this._actionMaxLength, actionLength); + + // add the item to the list + this._addItem(this._formatAction, [ action ]); + } +}; + +/** + * HelpFormatter#addArguments(actions) -> Void + * - actions (array): actions list + * + * Mass add arguments into current section + * + * ##### Example + * + * formatter.startSection(actionGroup.title); + * formatter.addText(actionGroup.description); + * formatter.addArguments(actionGroup._groupActions); + * formatter.endSection(); + * + **/ +HelpFormatter.prototype.addArguments = function (actions) { + var self = this; + actions.forEach(function (action) { + self.addArgument(action); + }); +}; + +// +// Help-formatting methods +// + +/** + * HelpFormatter#formatHelp -> string + * + * Format help + * + * ##### Example + * + * formatter.addText(this.epilog); + * return formatter.formatHelp(); + * + **/ +HelpFormatter.prototype.formatHelp = function () { + var help = this._rootSection.formatHelp(this); + if (help) { + help = help.replace(this._longBreakMatcher, c.EOL + c.EOL); + help = $$.trimChars(help, c.EOL) + c.EOL; + } + return help; +}; + +HelpFormatter.prototype._joinParts = function (partStrings) { + return partStrings.filter(function (part) { + return (part && part !== c.SUPPRESS); + }).join(''); +}; + +HelpFormatter.prototype._formatUsage = function (usage, actions, groups, prefix) { + if (!prefix && typeof prefix !== 'string') { + prefix = 'usage: '; + } + + actions = actions || []; + groups = groups || []; + + + // if usage is specified, use that + if (usage) { + usage = sprintf(usage, { prog: this._prog }); + + // if no optionals or positionals are available, usage is just prog + } else if (!usage && actions.length === 0) { + usage = this._prog; + + // if optionals and positionals are available, calculate usage + } else if (!usage) { + var prog = this._prog; + var optionals = []; + var positionals = []; + var actionUsage; + var textWidth; + + // split optionals from positionals + actions.forEach(function (action) { + if (action.isOptional()) { + optionals.push(action); + } else { + positionals.push(action); + } + }); + + // build full usage string + actionUsage = this._formatActionsUsage([].concat(optionals, positionals), groups); + usage = [ prog, actionUsage ].join(' '); + + // wrap the usage parts if it's too long + textWidth = this._width - this._currentIndent; + if ((prefix.length + usage.length) > textWidth) { + + // break usage into wrappable parts + var regexpPart = new RegExp('\\(.*?\\)+|\\[.*?\\]+|\\S+', 'g'); + var optionalUsage = this._formatActionsUsage(optionals, groups); + var positionalUsage = this._formatActionsUsage(positionals, groups); + + + var optionalParts = optionalUsage.match(regexpPart); + var positionalParts = positionalUsage.match(regexpPart) || []; + + if (optionalParts.join(' ') !== optionalUsage) { + throw new Error('assert "optionalParts.join(\' \') === optionalUsage"'); + } + if (positionalParts.join(' ') !== positionalUsage) { + throw new Error('assert "positionalParts.join(\' \') === positionalUsage"'); + } + + // helper for wrapping lines + /*eslint-disable func-style*/ // node 0.10 compat + var _getLines = function (parts, indent, prefix) { + var lines = []; + var line = []; + + var lineLength = prefix ? prefix.length - 1 : indent.length - 1; + + parts.forEach(function (part) { + if (lineLength + 1 + part.length > textWidth) { + lines.push(indent + line.join(' ')); + line = []; + lineLength = indent.length - 1; + } + line.push(part); + lineLength += part.length + 1; + }); + + if (line) { + lines.push(indent + line.join(' ')); + } + if (prefix) { + lines[0] = lines[0].substr(indent.length); + } + return lines; + }; + + var lines, indent, parts; + // if prog is short, follow it with optionals or positionals + if (prefix.length + prog.length <= 0.75 * textWidth) { + indent = $$.repeat(' ', (prefix.length + prog.length + 1)); + if (optionalParts) { + lines = [].concat( + _getLines([ prog ].concat(optionalParts), indent, prefix), + _getLines(positionalParts, indent) + ); + } else if (positionalParts) { + lines = _getLines([ prog ].concat(positionalParts), indent, prefix); + } else { + lines = [ prog ]; + } + + // if prog is long, put it on its own line + } else { + indent = $$.repeat(' ', prefix.length); + parts = optionalParts.concat(positionalParts); + lines = _getLines(parts, indent); + if (lines.length > 1) { + lines = [].concat( + _getLines(optionalParts, indent), + _getLines(positionalParts, indent) + ); + } + lines = [ prog ].concat(lines); + } + // join lines into usage + usage = lines.join(c.EOL); + } + } + + // prefix with 'usage:' + return prefix + usage + c.EOL + c.EOL; +}; + +HelpFormatter.prototype._formatActionsUsage = function (actions, groups) { + // find group indices and identify actions in groups + var groupActions = []; + var inserts = []; + var self = this; + + groups.forEach(function (group) { + var end; + var i; + + var start = actions.indexOf(group._groupActions[0]); + if (start >= 0) { + end = start + group._groupActions.length; + + //if (actions.slice(start, end) === group._groupActions) { + if ($$.arrayEqual(actions.slice(start, end), group._groupActions)) { + group._groupActions.forEach(function (action) { + groupActions.push(action); + }); + + if (!group.required) { + if (inserts[start]) { + inserts[start] += ' ['; + } else { + inserts[start] = '['; + } + inserts[end] = ']'; + } else { + if (inserts[start]) { + inserts[start] += ' ('; + } else { + inserts[start] = '('; + } + inserts[end] = ')'; + } + for (i = start + 1; i < end; i += 1) { + inserts[i] = '|'; + } + } + } + }); + + // collect all actions format strings + var parts = []; + + actions.forEach(function (action, actionIndex) { + var part; + var optionString; + var argsDefault; + var argsString; + + // suppressed arguments are marked with None + // remove | separators for suppressed arguments + if (action.help === c.SUPPRESS) { + parts.push(null); + if (inserts[actionIndex] === '|') { + inserts.splice(actionIndex, actionIndex); + } else if (inserts[actionIndex + 1] === '|') { + inserts.splice(actionIndex + 1, actionIndex + 1); + } + + // produce all arg strings + } else if (!action.isOptional()) { + part = self._formatArgs(action, action.dest); + + // if it's in a group, strip the outer [] + if (groupActions.indexOf(action) >= 0) { + if (part[0] === '[' && part[part.length - 1] === ']') { + part = part.slice(1, -1); + } + } + // add the action string to the list + parts.push(part); + + // produce the first way to invoke the option in brackets + } else { + optionString = action.optionStrings[0]; + + // if the Optional doesn't take a value, format is: -s or --long + if (action.nargs === 0) { + part = '' + optionString; + + // if the Optional takes a value, format is: -s ARGS or --long ARGS + } else { + argsDefault = action.dest.toUpperCase(); + argsString = self._formatArgs(action, argsDefault); + part = optionString + ' ' + argsString; + } + // make it look optional if it's not required or in a group + if (!action.required && groupActions.indexOf(action) < 0) { + part = '[' + part + ']'; + } + // add the action string to the list + parts.push(part); + } + }); + + // insert things at the necessary indices + for (var i = inserts.length - 1; i >= 0; --i) { + if (inserts[i] !== null) { + parts.splice(i, 0, inserts[i]); + } + } + + // join all the action items with spaces + var text = parts.filter(function (part) { + return !!part; + }).join(' '); + + // clean up separators for mutually exclusive groups + text = text.replace(/([\[(]) /g, '$1'); // remove spaces + text = text.replace(/ ([\])])/g, '$1'); + text = text.replace(/\[ *\]/g, ''); // remove empty groups + text = text.replace(/\( *\)/g, ''); + text = text.replace(/\(([^|]*)\)/g, '$1'); // remove () from single action groups + + text = text.trim(); + + // return the text + return text; +}; + +HelpFormatter.prototype._formatText = function (text) { + text = sprintf(text, { prog: this._prog }); + var textWidth = this._width - this._currentIndent; + var indentIncriment = $$.repeat(' ', this._currentIndent); + return this._fillText(text, textWidth, indentIncriment) + c.EOL + c.EOL; +}; + +HelpFormatter.prototype._formatAction = function (action) { + var self = this; + + var helpText; + var helpLines; + var parts; + var indentFirst; + + // determine the required width and the entry label + var helpPosition = Math.min(this._actionMaxLength + 2, this._maxHelpPosition); + var helpWidth = this._width - helpPosition; + var actionWidth = helpPosition - this._currentIndent - 2; + var actionHeader = this._formatActionInvocation(action); + + // no help; start on same line and add a final newline + if (!action.help) { + actionHeader = $$.repeat(' ', this._currentIndent) + actionHeader + c.EOL; + + // short action name; start on the same line and pad two spaces + } else if (actionHeader.length <= actionWidth) { + actionHeader = $$.repeat(' ', this._currentIndent) + + actionHeader + + ' ' + + $$.repeat(' ', actionWidth - actionHeader.length); + indentFirst = 0; + + // long action name; start on the next line + } else { + actionHeader = $$.repeat(' ', this._currentIndent) + actionHeader + c.EOL; + indentFirst = helpPosition; + } + + // collect the pieces of the action help + parts = [ actionHeader ]; + + // if there was help for the action, add lines of help text + if (action.help) { + helpText = this._expandHelp(action); + helpLines = this._splitLines(helpText, helpWidth); + parts.push($$.repeat(' ', indentFirst) + helpLines[0] + c.EOL); + helpLines.slice(1).forEach(function (line) { + parts.push($$.repeat(' ', helpPosition) + line + c.EOL); + }); + + // or add a newline if the description doesn't end with one + } else if (actionHeader.charAt(actionHeader.length - 1) !== c.EOL) { + parts.push(c.EOL); + } + // if there are any sub-actions, add their help as well + if (action._getSubactions) { + this._indent(); + action._getSubactions().forEach(function (subaction) { + parts.push(self._formatAction(subaction)); + }); + this._dedent(); + } + // return a single string + return this._joinParts(parts); +}; + +HelpFormatter.prototype._formatActionInvocation = function (action) { + if (!action.isOptional()) { + var format_func = this._metavarFormatter(action, action.dest); + var metavars = format_func(1); + return metavars[0]; + } + + var parts = []; + var argsDefault; + var argsString; + + // if the Optional doesn't take a value, format is: -s, --long + if (action.nargs === 0) { + parts = parts.concat(action.optionStrings); + + // if the Optional takes a value, format is: -s ARGS, --long ARGS + } else { + argsDefault = action.dest.toUpperCase(); + argsString = this._formatArgs(action, argsDefault); + action.optionStrings.forEach(function (optionString) { + parts.push(optionString + ' ' + argsString); + }); + } + return parts.join(', '); +}; + +HelpFormatter.prototype._metavarFormatter = function (action, metavarDefault) { + var result; + + if (action.metavar || action.metavar === '') { + result = action.metavar; + } else if (action.choices) { + var choices = action.choices; + + if (typeof choices === 'string') { + choices = choices.split('').join(', '); + } else if (Array.isArray(choices)) { + choices = choices.join(','); + } else { + choices = Object.keys(choices).join(','); + } + result = '{' + choices + '}'; + } else { + result = metavarDefault; + } + + return function (size) { + if (Array.isArray(result)) { + return result; + } + + var metavars = []; + for (var i = 0; i < size; i += 1) { + metavars.push(result); + } + return metavars; + }; +}; + +HelpFormatter.prototype._formatArgs = function (action, metavarDefault) { + var result; + var metavars; + + var buildMetavar = this._metavarFormatter(action, metavarDefault); + + switch (action.nargs) { + /*eslint-disable no-undefined*/ + case undefined: + case null: + metavars = buildMetavar(1); + result = '' + metavars[0]; + break; + case c.OPTIONAL: + metavars = buildMetavar(1); + result = '[' + metavars[0] + ']'; + break; + case c.ZERO_OR_MORE: + metavars = buildMetavar(2); + result = '[' + metavars[0] + ' [' + metavars[1] + ' ...]]'; + break; + case c.ONE_OR_MORE: + metavars = buildMetavar(2); + result = '' + metavars[0] + ' [' + metavars[1] + ' ...]'; + break; + case c.REMAINDER: + result = '...'; + break; + case c.PARSER: + metavars = buildMetavar(1); + result = metavars[0] + ' ...'; + break; + default: + metavars = buildMetavar(action.nargs); + result = metavars.join(' '); + } + return result; +}; + +HelpFormatter.prototype._expandHelp = function (action) { + var params = { prog: this._prog }; + + Object.keys(action).forEach(function (actionProperty) { + var actionValue = action[actionProperty]; + + if (actionValue !== c.SUPPRESS) { + params[actionProperty] = actionValue; + } + }); + + if (params.choices) { + if (typeof params.choices === 'string') { + params.choices = params.choices.split('').join(', '); + } else if (Array.isArray(params.choices)) { + params.choices = params.choices.join(', '); + } else { + params.choices = Object.keys(params.choices).join(', '); + } + } + + return sprintf(this._getHelpString(action), params); +}; + +HelpFormatter.prototype._splitLines = function (text, width) { + var lines = []; + var delimiters = [ ' ', '.', ',', '!', '?' ]; + var re = new RegExp('[' + delimiters.join('') + '][^' + delimiters.join('') + ']*$'); + + text = text.replace(/[\n\|\t]/g, ' '); + + text = text.trim(); + text = text.replace(this._whitespaceMatcher, ' '); + + // Wraps the single paragraph in text (a string) so every line + // is at most width characters long. + text.split(c.EOL).forEach(function (line) { + if (width >= line.length) { + lines.push(line); + return; + } + + var wrapStart = 0; + var wrapEnd = width; + var delimiterIndex = 0; + while (wrapEnd <= line.length) { + if (wrapEnd !== line.length && delimiters.indexOf(line[wrapEnd] < -1)) { + delimiterIndex = (re.exec(line.substring(wrapStart, wrapEnd)) || {}).index; + wrapEnd = wrapStart + delimiterIndex + 1; + } + lines.push(line.substring(wrapStart, wrapEnd)); + wrapStart = wrapEnd; + wrapEnd += width; + } + if (wrapStart < line.length) { + lines.push(line.substring(wrapStart, wrapEnd)); + } + }); + + return lines; +}; + +HelpFormatter.prototype._fillText = function (text, width, indent) { + var lines = this._splitLines(text, width); + lines = lines.map(function (line) { + return indent + line; + }); + return lines.join(c.EOL); +}; + +HelpFormatter.prototype._getHelpString = function (action) { + return action.help; +}; diff --git a/code/application_liste/app/node_modules/argparse/lib/namespace.js b/code/application_liste/app/node_modules/argparse/lib/namespace.js new file mode 100644 index 0000000..a860de9 --- /dev/null +++ b/code/application_liste/app/node_modules/argparse/lib/namespace.js @@ -0,0 +1,76 @@ +/** + * class Namespace + * + * Simple object for storing attributes. Implements equality by attribute names + * and values, and provides a simple string representation. + * + * See also [original guide][1] + * + * [1]:http://docs.python.org/dev/library/argparse.html#the-namespace-object + **/ +'use strict'; + +var $$ = require('./utils'); + +/** + * new Namespace(options) + * - options(object): predefined propertis for result object + * + **/ +var Namespace = module.exports = function Namespace(options) { + $$.extend(this, options); +}; + +/** + * Namespace#isset(key) -> Boolean + * - key (string|number): property name + * + * Tells whenever `namespace` contains given `key` or not. + **/ +Namespace.prototype.isset = function (key) { + return $$.has(this, key); +}; + +/** + * Namespace#set(key, value) -> self + * -key (string|number|object): propery name + * -value (mixed): new property value + * + * Set the property named key with value. + * If key object then set all key properties to namespace object + **/ +Namespace.prototype.set = function (key, value) { + if (typeof (key) === 'object') { + $$.extend(this, key); + } else { + this[key] = value; + } + return this; +}; + +/** + * Namespace#get(key, defaultValue) -> mixed + * - key (string|number): property name + * - defaultValue (mixed): default value + * + * Return the property key or defaulValue if not set + **/ +Namespace.prototype.get = function (key, defaultValue) { + return !this[key] ? defaultValue : this[key]; +}; + +/** + * Namespace#unset(key, defaultValue) -> mixed + * - key (string|number): property name + * - defaultValue (mixed): default value + * + * Return data[key](and delete it) or defaultValue + **/ +Namespace.prototype.unset = function (key, defaultValue) { + var value = this[key]; + if (value !== null) { + delete this[key]; + return value; + } + return defaultValue; +}; diff --git a/code/application_liste/app/node_modules/argparse/lib/utils.js b/code/application_liste/app/node_modules/argparse/lib/utils.js new file mode 100644 index 0000000..4a9cf3e --- /dev/null +++ b/code/application_liste/app/node_modules/argparse/lib/utils.js @@ -0,0 +1,57 @@ +'use strict'; + +exports.repeat = function (str, num) { + var result = ''; + for (var i = 0; i < num; i++) { result += str; } + return result; +}; + +exports.arrayEqual = function (a, b) { + if (a.length !== b.length) { return false; } + for (var i = 0; i < a.length; i++) { + if (a[i] !== b[i]) { return false; } + } + return true; +}; + +exports.trimChars = function (str, chars) { + var start = 0; + var end = str.length - 1; + while (chars.indexOf(str.charAt(start)) >= 0) { start++; } + while (chars.indexOf(str.charAt(end)) >= 0) { end--; } + return str.slice(start, end + 1); +}; + +exports.capitalize = function (str) { + return str.charAt(0).toUpperCase() + str.slice(1); +}; + +exports.arrayUnion = function () { + var result = []; + for (var i = 0, values = {}; i < arguments.length; i++) { + var arr = arguments[i]; + for (var j = 0; j < arr.length; j++) { + if (!values[arr[j]]) { + values[arr[j]] = true; + result.push(arr[j]); + } + } + } + return result; +}; + +function has(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +exports.has = has; + +exports.extend = function (dest, src) { + for (var i in src) { + if (has(src, i)) { dest[i] = src[i]; } + } +}; + +exports.trimEnd = function (str) { + return str.replace(/\s+$/g, ''); +}; diff --git a/code/application_liste/app/node_modules/argparse/package.json b/code/application_liste/app/node_modules/argparse/package.json new file mode 100644 index 0000000..d563764 --- /dev/null +++ b/code/application_liste/app/node_modules/argparse/package.json @@ -0,0 +1,70 @@ +{ + "_from": "argparse@^1.0.7", + "_id": "argparse@1.0.10", + "_inBundle": false, + "_integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "_location": "/argparse", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "argparse@^1.0.7", + "name": "argparse", + "escapedName": "argparse", + "rawSpec": "^1.0.7", + "saveSpec": null, + "fetchSpec": "^1.0.7" + }, + "_requiredBy": [ + "/js-yaml" + ], + "_resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "_shasum": "bcd6791ea5ae09725e17e5ad988134cd40b3d911", + "_spec": "argparse@^1.0.7", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\js-yaml", + "bugs": { + "url": "https://github.com/nodeca/argparse/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Eugene Shkuropat" + }, + { + "name": "Paul Jacobson" + } + ], + "dependencies": { + "sprintf-js": "~1.0.2" + }, + "deprecated": false, + "description": "Very powerful CLI arguments parser. Native port of argparse - python's options parsing library", + "devDependencies": { + "eslint": "^2.13.1", + "istanbul": "^0.4.5", + "mocha": "^3.1.0", + "ndoc": "^5.0.1" + }, + "files": [ + "index.js", + "lib/" + ], + "homepage": "https://github.com/nodeca/argparse#readme", + "keywords": [ + "cli", + "parser", + "argparse", + "option", + "args" + ], + "license": "MIT", + "name": "argparse", + "repository": { + "type": "git", + "url": "git+https://github.com/nodeca/argparse.git" + }, + "scripts": { + "test": "make test" + }, + "version": "1.0.10" +} diff --git a/code/application_liste/app/node_modules/arr-diff/LICENSE b/code/application_liste/app/node_modules/arr-diff/LICENSE new file mode 100644 index 0000000..d734237 --- /dev/null +++ b/code/application_liste/app/node_modules/arr-diff/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/arr-diff/README.md b/code/application_liste/app/node_modules/arr-diff/README.md new file mode 100644 index 0000000..961f5c3 --- /dev/null +++ b/code/application_liste/app/node_modules/arr-diff/README.md @@ -0,0 +1,130 @@ +# arr-diff [![NPM version](https://img.shields.io/npm/v/arr-diff.svg?style=flat)](https://www.npmjs.com/package/arr-diff) [![NPM monthly downloads](https://img.shields.io/npm/dm/arr-diff.svg?style=flat)](https://npmjs.org/package/arr-diff) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/arr-diff.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/arr-diff) + +> Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save arr-diff +``` + +Install with [yarn](https://yarnpkg.com): + +```sh +$ yarn add arr-diff +``` + +Install with [bower](https://bower.io/) + +```sh +$ bower install arr-diff --save +``` + +## Usage + +Returns the difference between the first array and additional arrays. + +```js +var diff = require('arr-diff'); + +var a = ['a', 'b', 'c', 'd']; +var b = ['b', 'c']; + +console.log(diff(a, b)) +//=> ['a', 'd'] +``` + +## Benchmarks + +This library versus [array-differ](https://github.com/sindresorhus/array-differ), on April 14, 2017: + +``` +Benchmarking: (4 of 4) + · long-dupes + · long + · med + · short + +# benchmark/fixtures/long-dupes.js (100804 bytes) + arr-diff-3.0.0 x 822 ops/sec ±0.67% (86 runs sampled) + arr-diff-4.0.0 x 2,141 ops/sec ±0.42% (89 runs sampled) + array-differ x 708 ops/sec ±0.70% (89 runs sampled) + + fastest is arr-diff-4.0.0 + +# benchmark/fixtures/long.js (94529 bytes) + arr-diff-3.0.0 x 882 ops/sec ±0.60% (87 runs sampled) + arr-diff-4.0.0 x 2,329 ops/sec ±0.97% (83 runs sampled) + array-differ x 769 ops/sec ±0.61% (90 runs sampled) + + fastest is arr-diff-4.0.0 + +# benchmark/fixtures/med.js (708 bytes) + arr-diff-3.0.0 x 856,150 ops/sec ±0.42% (89 runs sampled) + arr-diff-4.0.0 x 4,665,249 ops/sec ±1.06% (89 runs sampled) + array-differ x 653,888 ops/sec ±1.02% (86 runs sampled) + + fastest is arr-diff-4.0.0 + +# benchmark/fixtures/short.js (60 bytes) + arr-diff-3.0.0 x 3,078,467 ops/sec ±0.77% (93 runs sampled) + arr-diff-4.0.0 x 9,213,296 ops/sec ±0.65% (89 runs sampled) + array-differ x 1,337,051 ops/sec ±0.91% (92 runs sampled) + + fastest is arr-diff-4.0.0 +``` + +## About + +### Related projects + +* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.") +* [array-filter](https://www.npmjs.com/package/array-filter): Array#filter for older browsers. | [homepage](https://github.com/juliangruber/array-filter "Array#filter for older browsers.") +* [array-intersection](https://www.npmjs.com/package/array-intersection): Return an array with the unique values present in _all_ given arrays using strict equality… [more](https://github.com/jonschlinkert/array-intersection) | [homepage](https://github.com/jonschlinkert/array-intersection "Return an array with the unique values present in _all_ given arrays using strict equality for comparisons.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 33 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [paulmillr](https://github.com/paulmillr) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 14, 2017._ \ No newline at end of file diff --git a/code/application_liste/app/node_modules/arr-diff/index.js b/code/application_liste/app/node_modules/arr-diff/index.js new file mode 100644 index 0000000..90f2807 --- /dev/null +++ b/code/application_liste/app/node_modules/arr-diff/index.js @@ -0,0 +1,47 @@ +/*! + * arr-diff + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +module.exports = function diff(arr/*, arrays*/) { + var len = arguments.length; + var idx = 0; + while (++idx < len) { + arr = diffArray(arr, arguments[idx]); + } + return arr; +}; + +function diffArray(one, two) { + if (!Array.isArray(two)) { + return one.slice(); + } + + var tlen = two.length + var olen = one.length; + var idx = -1; + var arr = []; + + while (++idx < olen) { + var ele = one[idx]; + + var hasEle = false; + for (var i = 0; i < tlen; i++) { + var val = two[i]; + + if (ele === val) { + hasEle = true; + break; + } + } + + if (hasEle === false) { + arr.push(ele); + } + } + return arr; +} diff --git a/code/application_liste/app/node_modules/arr-diff/package.json b/code/application_liste/app/node_modules/arr-diff/package.json new file mode 100644 index 0000000..e1850cd --- /dev/null +++ b/code/application_liste/app/node_modules/arr-diff/package.json @@ -0,0 +1,109 @@ +{ + "_from": "arr-diff@^4.0.0", + "_id": "arr-diff@4.0.0", + "_inBundle": false, + "_integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "_location": "/arr-diff", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "arr-diff@^4.0.0", + "name": "arr-diff", + "escapedName": "arr-diff", + "rawSpec": "^4.0.0", + "saveSpec": null, + "fetchSpec": "^4.0.0" + }, + "_requiredBy": [ + "/micromatch", + "/nanomatch" + ], + "_resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "_shasum": "d6461074febfec71e7e15235761a329a5dc7c520", + "_spec": "arr-diff@^4.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\micromatch", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/arr-diff/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Jon Schlinkert", + "email": "jon.schlinkert@sellside.com", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Paul Miller", + "email": "paul+gh@paulmillr.com", + "url": "paulmillr.com" + } + ], + "dependencies": {}, + "deprecated": false, + "description": "Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.", + "devDependencies": { + "ansi-bold": "^0.1.1", + "arr-flatten": "^1.0.1", + "array-differ": "^1.0.0", + "benchmarked": "^0.2.4", + "gulp-format-md": "^0.1.9", + "minimist": "^1.2.0", + "mocha": "^2.4.5" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/arr-diff", + "keywords": [ + "arr", + "array", + "array differ", + "array-differ", + "diff", + "differ", + "difference" + ], + "license": "MIT", + "main": "index.js", + "name": "arr-diff", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/arr-diff.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "arr-flatten", + "array-filter", + "array-intersection" + ] + }, + "reflinks": [ + "array-differ", + "verb" + ], + "lint": { + "reflinks": true + } + }, + "version": "4.0.0" +} diff --git a/code/application_liste/app/node_modules/arr-filter/LICENSE b/code/application_liste/app/node_modules/arr-filter/LICENSE new file mode 100644 index 0000000..d290fe0 --- /dev/null +++ b/code/application_liste/app/node_modules/arr-filter/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, 2017, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/arr-filter/README.md b/code/application_liste/app/node_modules/arr-filter/README.md new file mode 100644 index 0000000..96435ae --- /dev/null +++ b/code/application_liste/app/node_modules/arr-filter/README.md @@ -0,0 +1,72 @@ +# arr-filter [![NPM version](https://img.shields.io/npm/v/arr-filter.svg?style=flat)](https://www.npmjs.com/package/arr-filter) [![NPM monthly downloads](https://img.shields.io/npm/dm/arr-filter.svg?style=flat)](https://npmjs.org/package/arr-filter) [![NPM total downloads](https://img.shields.io/npm/dt/arr-filter.svg?style=flat)](https://npmjs.org/package/arr-filter) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/arr-filter.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/arr-filter) + +> Faster alternative to javascript's native filter method. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save arr-filter +``` + +## Usage + +```js +var filter = require('arr-filter'); + +filter(['a', {a: 'b'}, 1, 'b', 2, {c: 'd'}, 'c'], function (ele) { + return typeof ele === 'string'; +}); +//=> ['a', 'b', 'c'] +``` + +## Why another array filter? + +[array-filter](https://github.com/juliangruber/array-filter) is pretty popular, but it's tuned to be used in older browsers and it falls back on native `.filter()` when available, which is much slower. See [jsperf results](http://jsperf.com/array-filter-while-vs-for/2). The functions used in the benchmarks are the top performers from a dozen or so other functions. + +## About + +### Related projects + +* [arr-map](https://www.npmjs.com/package/arr-map): Faster, node.js focused alternative to JavaScript's native array map. | [homepage](https://github.com/jonschlinkert/arr-map "Faster, node.js focused alternative to JavaScript's native array map.") +* [array-each](https://www.npmjs.com/package/array-each): Loop over each item in an array and call the given function on every element. | [homepage](https://github.com/jonschlinkert/array-each "Loop over each item in an array and call the given function on every element.") +* [collection-map](https://www.npmjs.com/package/collection-map): Returns an array of mapped values from an array or object. | [homepage](https://github.com/jonschlinkert/collection-map "Returns an array of mapped values from an array or object.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.2, on February 26, 2017._ \ No newline at end of file diff --git a/code/application_liste/app/node_modules/arr-filter/index.js b/code/application_liste/app/node_modules/arr-filter/index.js new file mode 100644 index 0000000..29b8c3c --- /dev/null +++ b/code/application_liste/app/node_modules/arr-filter/index.js @@ -0,0 +1,33 @@ +/*! + * arr-filter + * + * Copyright (c) 2014-2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var makeIterator = require('make-iterator'); + +module.exports = function filter(arr, fn, thisArg) { + if (arr == null) { + return []; + } + + if (typeof fn !== 'function') { + throw new TypeError('expected callback to be a function'); + } + + var iterator = makeIterator(fn, thisArg); + var len = arr.length; + var res = arr.slice(); + var i = -1; + + while (len--) { + if (!iterator(arr[len], i++)) { + res.splice(len, 1); + } + } + return res; +}; + diff --git a/code/application_liste/app/node_modules/arr-filter/package.json b/code/application_liste/app/node_modules/arr-filter/package.json new file mode 100644 index 0000000..cefbf87 --- /dev/null +++ b/code/application_liste/app/node_modules/arr-filter/package.json @@ -0,0 +1,92 @@ +{ + "_from": "arr-filter@^1.1.1", + "_id": "arr-filter@1.1.2", + "_inBundle": false, + "_integrity": "sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4=", + "_location": "/arr-filter", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "arr-filter@^1.1.1", + "name": "arr-filter", + "escapedName": "arr-filter", + "rawSpec": "^1.1.1", + "saveSpec": null, + "fetchSpec": "^1.1.1" + }, + "_requiredBy": [ + "/bach" + ], + "_resolved": "https://registry.npmjs.org/arr-filter/-/arr-filter-1.1.2.tgz", + "_shasum": "43fdddd091e8ef11aa4c45d9cdc18e2dff1711ee", + "_spec": "arr-filter@^1.1.1", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\bach", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/arr-filter/issues" + }, + "bundleDependencies": false, + "dependencies": { + "make-iterator": "^1.0.0" + }, + "deprecated": false, + "description": "Faster alternative to javascript's native filter method.", + "devDependencies": { + "array-filter": "^1.0.0", + "benchmarked": "^0.2.5", + "chalk": "^1.1.3", + "gulp-format-md": "^0.1.11", + "micromatch": "^2.3.11", + "minimist": "^1.2.0", + "mocha": "^3.2.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/arr-filter", + "keywords": [ + "arr", + "array", + "collection", + "filter", + "util" + ], + "license": "MIT", + "main": "index.js", + "name": "arr-filter", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/arr-filter.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "collection-map", + "arr-map", + "array-each" + ] + }, + "lint": { + "reflinks": true + } + }, + "version": "1.1.2" +} diff --git a/code/application_liste/app/node_modules/arr-flatten/LICENSE b/code/application_liste/app/node_modules/arr-flatten/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/code/application_liste/app/node_modules/arr-flatten/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/arr-flatten/README.md b/code/application_liste/app/node_modules/arr-flatten/README.md new file mode 100644 index 0000000..7dc7a97 --- /dev/null +++ b/code/application_liste/app/node_modules/arr-flatten/README.md @@ -0,0 +1,86 @@ +# arr-flatten [![NPM version](https://img.shields.io/npm/v/arr-flatten.svg?style=flat)](https://www.npmjs.com/package/arr-flatten) [![NPM monthly downloads](https://img.shields.io/npm/dm/arr-flatten.svg?style=flat)](https://npmjs.org/package/arr-flatten) [![NPM total downloads](https://img.shields.io/npm/dt/arr-flatten.svg?style=flat)](https://npmjs.org/package/arr-flatten) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/arr-flatten.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/arr-flatten) [![Windows Build Status](https://img.shields.io/appveyor/ci/jonschlinkert/arr-flatten.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/jonschlinkert/arr-flatten) + +> Recursively flatten an array or arrays. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save arr-flatten +``` + +## Install + +Install with [bower](https://bower.io/) + +```sh +$ bower install arr-flatten --save +``` + +## Usage + +```js +var flatten = require('arr-flatten'); + +flatten(['a', ['b', ['c']], 'd', ['e']]); +//=> ['a', 'b', 'c', 'd', 'e'] +``` + +## Why another flatten utility? + +I wanted the fastest implementation I could find, with implementation choices that should work for 95% of use cases, but no cruft to cover the other 5%. + +## About + +### Related projects + +* [arr-filter](https://www.npmjs.com/package/arr-filter): Faster alternative to javascript's native filter method. | [homepage](https://github.com/jonschlinkert/arr-filter "Faster alternative to javascript's native filter method.") +* [arr-union](https://www.npmjs.com/package/arr-union): Combines a list of arrays, returning a single array with unique values, using strict equality… [more](https://github.com/jonschlinkert/arr-union) | [homepage](https://github.com/jonschlinkert/arr-union "Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.") +* [array-each](https://www.npmjs.com/package/array-each): Loop over each item in an array and call the given function on every element. | [homepage](https://github.com/jonschlinkert/array-each "Loop over each item in an array and call the given function on every element.") +* [array-unique](https://www.npmjs.com/package/array-unique): Remove duplicate values from an array. Fastest ES5 implementation. | [homepage](https://github.com/jonschlinkert/array-unique "Remove duplicate values from an array. Fastest ES5 implementation.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 20 | [jonschlinkert](https://github.com/jonschlinkert) | +| 1 | [lukeed](https://github.com/lukeed) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 05, 2017._ \ No newline at end of file diff --git a/code/application_liste/app/node_modules/arr-flatten/index.js b/code/application_liste/app/node_modules/arr-flatten/index.js new file mode 100644 index 0000000..0cb4ea4 --- /dev/null +++ b/code/application_liste/app/node_modules/arr-flatten/index.js @@ -0,0 +1,22 @@ +/*! + * arr-flatten + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +module.exports = function (arr) { + return flat(arr, []); +}; + +function flat(arr, res) { + var i = 0, cur; + var len = arr.length; + for (; i < len; i++) { + cur = arr[i]; + Array.isArray(cur) ? flat(cur, res) : res.push(cur); + } + return res; +} diff --git a/code/application_liste/app/node_modules/arr-flatten/package.json b/code/application_liste/app/node_modules/arr-flatten/package.json new file mode 100644 index 0000000..57c05b5 --- /dev/null +++ b/code/application_liste/app/node_modules/arr-flatten/package.json @@ -0,0 +1,115 @@ +{ + "_from": "arr-flatten@^1.1.0", + "_id": "arr-flatten@1.1.0", + "_inBundle": false, + "_integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "_location": "/arr-flatten", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "arr-flatten@^1.1.0", + "name": "arr-flatten", + "escapedName": "arr-flatten", + "rawSpec": "^1.1.0", + "saveSpec": null, + "fetchSpec": "^1.1.0" + }, + "_requiredBy": [ + "/bach", + "/braces", + "/undertaker" + ], + "_resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "_shasum": "36048bbff4e7b47e136644316c99669ea5ae91f1", + "_spec": "arr-flatten@^1.1.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\braces", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/arr-flatten/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Luke Edwards", + "url": "https://lukeed.com" + } + ], + "deprecated": false, + "description": "Recursively flatten an array or arrays.", + "devDependencies": { + "ansi-bold": "^0.1.1", + "array-flatten": "^2.1.1", + "array-slice": "^1.0.0", + "benchmarked": "^1.0.0", + "compute-flatten": "^1.0.0", + "flatit": "^1.1.1", + "flatten": "^1.0.2", + "flatten-array": "^1.0.0", + "glob": "^7.1.1", + "gulp-format-md": "^0.1.12", + "just-flatten-it": "^1.1.23", + "lodash.flattendeep": "^4.4.0", + "m_flattened": "^1.0.1", + "mocha": "^3.2.0", + "utils-flatten": "^1.0.0", + "write": "^0.3.3" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/arr-flatten", + "keywords": [ + "arr", + "array", + "elements", + "flat", + "flatten", + "nested", + "recurse", + "recursive", + "recursively" + ], + "license": "MIT", + "main": "index.js", + "name": "arr-flatten", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/arr-flatten.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "arr-filter", + "arr-union", + "array-each", + "array-unique" + ] + }, + "lint": { + "reflinks": true + } + }, + "version": "1.1.0" +} diff --git a/code/application_liste/app/node_modules/arr-map/LICENSE b/code/application_liste/app/node_modules/arr-map/LICENSE new file mode 100644 index 0000000..ec85897 --- /dev/null +++ b/code/application_liste/app/node_modules/arr-map/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, 2017, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/arr-map/README.md b/code/application_liste/app/node_modules/arr-map/README.md new file mode 100644 index 0000000..04e9910 --- /dev/null +++ b/code/application_liste/app/node_modules/arr-map/README.md @@ -0,0 +1,78 @@ +# arr-map [![NPM version](https://img.shields.io/npm/v/arr-map.svg?style=flat)](https://www.npmjs.com/package/arr-map) [![NPM monthly downloads](https://img.shields.io/npm/dm/arr-map.svg?style=flat)](https://npmjs.org/package/arr-map) [![NPM total downloads](https://img.shields.io/npm/dt/arr-map.svg?style=flat)](https://npmjs.org/package/arr-map) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/arr-map.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/arr-map) + +> Faster, node.js focused alternative to JavaScript's native array map. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save arr-map +``` + +## Why use this? + +JavaScript's native `Array.map()` is slow, and other popular array map libraries are focused on browser compatibility, which makes them bloated or less than idea for non-browser usage. This implementation is focused on node.js usage keeping it light and fast. + +## Usage + +```js +var map = require('arr-map'); + +map(['a', 'b', 'c'], function(ele) { + return ele + ele; +}); +//=> ['aa', 'bb', 'cc'] + +map(['a', 'b', 'c'], function(ele, i) { + return i + ele; +}); +//=> ['0a', '1b', '2c'] +``` + +## About + +### Related projects + +* [arr-diff](https://www.npmjs.com/package/arr-diff): Returns an array with only the unique values from the first array, by excluding all… [more](https://github.com/jonschlinkert/arr-diff) | [homepage](https://github.com/jonschlinkert/arr-diff "Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.") +* [arr-filter](https://www.npmjs.com/package/arr-filter): Faster alternative to javascript's native filter method. | [homepage](https://github.com/jonschlinkert/arr-filter "Faster alternative to javascript's native filter method.") +* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.") +* [arr-reduce](https://www.npmjs.com/package/arr-reduce): Fast array reduce that also loops over sparse elements. | [homepage](https://github.com/jonschlinkert/arr-reduce "Fast array reduce that also loops over sparse elements.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.2, on February 28, 2017._ \ No newline at end of file diff --git a/code/application_liste/app/node_modules/arr-map/index.js b/code/application_liste/app/node_modules/arr-map/index.js new file mode 100644 index 0000000..8bfb360 --- /dev/null +++ b/code/application_liste/app/node_modules/arr-map/index.js @@ -0,0 +1,23 @@ +/*! + * arr-map + * + * Copyright (c) 2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var iterator = require('make-iterator'); + +module.exports = function map(arr, fn, thisArg) { + if (arr == null) return []; + fn = iterator(fn, thisArg); + + var len = arr.length; + var res = new Array(len); + + for (var i = 0; i < len; i++) { + res[i] = fn(arr[i], i, arr); + } + return res; +}; diff --git a/code/application_liste/app/node_modules/arr-map/package.json b/code/application_liste/app/node_modules/arr-map/package.json new file mode 100644 index 0000000..2a257aa --- /dev/null +++ b/code/application_liste/app/node_modules/arr-map/package.json @@ -0,0 +1,95 @@ +{ + "_from": "arr-map@^2.0.0", + "_id": "arr-map@2.0.2", + "_inBundle": false, + "_integrity": "sha1-Onc0X/wc814qkYJWAfnljy4kysQ=", + "_location": "/arr-map", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "arr-map@^2.0.0", + "name": "arr-map", + "escapedName": "arr-map", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/bach", + "/collection-map", + "/undertaker" + ], + "_resolved": "https://registry.npmjs.org/arr-map/-/arr-map-2.0.2.tgz", + "_shasum": "3a77345ffc1cf35e2a91825601f9e58f2e24cac4", + "_spec": "arr-map@^2.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\undertaker", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/arr-map/issues" + }, + "bundleDependencies": false, + "dependencies": { + "make-iterator": "^1.0.0" + }, + "deprecated": false, + "description": "Faster, node.js focused alternative to JavaScript's native array map.", + "devDependencies": { + "array-map": "^0.0.0", + "benchmarked": "^0.2.5", + "braces": "^2.0.3", + "chalk": "^1.1.3", + "glob": "^7.1.1", + "gulp-format-md": "^0.1.11", + "micromatch": "^2.3.11", + "mocha": "^3.2.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/arr-map", + "keywords": [ + "arr", + "array", + "map" + ], + "license": "MIT", + "main": "index.js", + "name": "arr-map", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/arr-map.git" + }, + "scripts": { + "benchmark": "node benchmark", + "test": "mocha" + }, + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "related": { + "list": [ + "arr-diff", + "arr-filter", + "arr-flatten", + "arr-reduce" + ] + }, + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + }, + "version": "2.0.2" +} diff --git a/code/application_liste/app/node_modules/arr-union/LICENSE b/code/application_liste/app/node_modules/arr-union/LICENSE new file mode 100644 index 0000000..39245ac --- /dev/null +++ b/code/application_liste/app/node_modules/arr-union/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/arr-union/README.md b/code/application_liste/app/node_modules/arr-union/README.md new file mode 100644 index 0000000..b3cd4f4 --- /dev/null +++ b/code/application_liste/app/node_modules/arr-union/README.md @@ -0,0 +1,99 @@ +# arr-union [![NPM version](https://img.shields.io/npm/v/arr-union.svg)](https://www.npmjs.com/package/arr-union) [![Build Status](https://img.shields.io/travis/jonschlinkert/arr-union.svg)](https://travis-ci.org/jonschlinkert/arr-union) + +> Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm i arr-union --save +``` + +## Benchmarks + +This library is **10-20 times faster** and more performant than [array-union](https://github.com/sindresorhus/array-union). + +See the [benchmarks](./benchmark). + +```sh +#1: five-arrays + array-union x 511,121 ops/sec ±0.80% (96 runs sampled) + arr-union x 5,716,039 ops/sec ±0.86% (93 runs sampled) + +#2: ten-arrays + array-union x 245,196 ops/sec ±0.69% (94 runs sampled) + arr-union x 1,850,786 ops/sec ±0.84% (97 runs sampled) + +#3: two-arrays + array-union x 563,869 ops/sec ±0.97% (94 runs sampled) + arr-union x 9,602,852 ops/sec ±0.87% (92 runs sampled) +``` + +## Usage + +```js +var union = require('arr-union'); + +union(['a'], ['b', 'c'], ['d', 'e', 'f']); +//=> ['a', 'b', 'c', 'd', 'e', 'f'] +``` + +Returns only unique elements: + +```js +union(['a', 'a'], ['b', 'c']); +//=> ['a', 'b', 'c'] +``` + +## Related projects + +* [arr-diff](https://www.npmjs.com/package/arr-diff): Returns an array with only the unique values from the first array, by excluding all… [more](https://www.npmjs.com/package/arr-diff) | [homepage](https://github.com/jonschlinkert/arr-diff) +* [arr-filter](https://www.npmjs.com/package/arr-filter): Faster alternative to javascript's native filter method. | [homepage](https://github.com/jonschlinkert/arr-filter) +* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten) +* [arr-map](https://www.npmjs.com/package/arr-map): Faster, node.js focused alternative to JavaScript's native array map. | [homepage](https://github.com/jonschlinkert/arr-map) +* [arr-pluck](https://www.npmjs.com/package/arr-pluck): Retrieves the value of a specified property from all elements in the collection. | [homepage](https://github.com/jonschlinkert/arr-pluck) +* [arr-reduce](https://www.npmjs.com/package/arr-reduce): Fast array reduce that also loops over sparse elements. | [homepage](https://github.com/jonschlinkert/arr-reduce) +* [array-unique](https://www.npmjs.com/package/array-unique): Return an array free of duplicate values. Fastest ES5 implementation. | [homepage](https://github.com/jonschlinkert/array-unique) + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/arr-union/issues/new). + +## Building docs + +Generate readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm i verb && npm run docs +``` + +Or, if [verb](https://github.com/verbose/verb) is installed globally: + +```sh +$ verb +``` + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2016 [Jon Schlinkert](https://github.com/jonschlinkert) +Released under the [MIT license](https://github.com/jonschlinkert/arr-union/blob/master/LICENSE). + +*** + +_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on February 23, 2016._ \ No newline at end of file diff --git a/code/application_liste/app/node_modules/arr-union/index.js b/code/application_liste/app/node_modules/arr-union/index.js new file mode 100644 index 0000000..5ae6c4a --- /dev/null +++ b/code/application_liste/app/node_modules/arr-union/index.js @@ -0,0 +1,29 @@ +'use strict'; + +module.exports = function union(init) { + if (!Array.isArray(init)) { + throw new TypeError('arr-union expects the first argument to be an array.'); + } + + var len = arguments.length; + var i = 0; + + while (++i < len) { + var arg = arguments[i]; + if (!arg) continue; + + if (!Array.isArray(arg)) { + arg = [arg]; + } + + for (var j = 0; j < arg.length; j++) { + var ele = arg[j]; + + if (init.indexOf(ele) >= 0) { + continue; + } + init.push(ele); + } + } + return init; +}; diff --git a/code/application_liste/app/node_modules/arr-union/package.json b/code/application_liste/app/node_modules/arr-union/package.json new file mode 100644 index 0000000..fe74653 --- /dev/null +++ b/code/application_liste/app/node_modules/arr-union/package.json @@ -0,0 +1,108 @@ +{ + "_from": "arr-union@^3.1.0", + "_id": "arr-union@3.1.0", + "_inBundle": false, + "_integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "_location": "/arr-union", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "arr-union@^3.1.0", + "name": "arr-union", + "escapedName": "arr-union", + "rawSpec": "^3.1.0", + "saveSpec": null, + "fetchSpec": "^3.1.0" + }, + "_requiredBy": [ + "/class-utils", + "/union-value" + ], + "_resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "_shasum": "e39b09aea9def866a8f206e288af63919bae39c4", + "_spec": "arr-union@^3.1.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\union-value", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/arr-union/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.", + "devDependencies": { + "ansi-bold": "^0.1.1", + "array-union": "^1.0.1", + "array-unique": "^0.2.1", + "benchmarked": "^0.1.4", + "gulp-format-md": "^0.1.7", + "minimist": "^1.1.1", + "mocha": "*", + "should": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/arr-union", + "keywords": [ + "add", + "append", + "array", + "arrays", + "combine", + "concat", + "extend", + "union", + "uniq", + "unique", + "util", + "utility", + "utils" + ], + "license": "MIT", + "main": "index.js", + "name": "arr-union", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/arr-union.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "arr-diff", + "arr-flatten", + "arr-filter", + "arr-map", + "arr-pluck", + "arr-reduce", + "array-unique" + ] + }, + "reflinks": [ + "verb", + "array-union" + ], + "lint": { + "reflinks": true + } + }, + "version": "3.1.0" +} diff --git a/code/application_liste/app/node_modules/array-each/LICENSE b/code/application_liste/app/node_modules/array-each/LICENSE new file mode 100644 index 0000000..ec85897 --- /dev/null +++ b/code/application_liste/app/node_modules/array-each/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, 2017, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/array-each/README.md b/code/application_liste/app/node_modules/array-each/README.md new file mode 100644 index 0000000..e8602a1 --- /dev/null +++ b/code/application_liste/app/node_modules/array-each/README.md @@ -0,0 +1,84 @@ +# array-each [![NPM version](https://img.shields.io/npm/v/array-each.svg?style=flat)](https://www.npmjs.com/package/array-each) [![NPM monthly downloads](https://img.shields.io/npm/dm/array-each.svg?style=flat)](https://npmjs.org/package/array-each) [![NPM total downloads](https://img.shields.io/npm/dt/array-each.svg?style=flat)](https://npmjs.org/package/array-each) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/array-each.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/array-each) + +> Loop over each item in an array and call the given function on every element. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save array-each +``` + +## Usage + +### [each](index.js#L34) + +Loop over each item in an array and call the given function on every element. + +**Params** + +* `array` **{Array}** +* `fn` **{Function}** +* `thisArg` **{Object}**: (optional) pass a `thisArg` to be used as the context in which to call the function. +* `returns` **{undefined}** + +**Example** + +```js +each(['a', 'b', 'c'], function(ele) { + return ele + ele; +}); +//=> ['aa', 'bb', 'cc'] + +each(['a', 'b', 'c'], function(ele, i) { + return i + ele; +}); +//=> ['0a', '1b', '2c'] +``` + +## About + +### Related projects + +* [arr-filter](https://www.npmjs.com/package/arr-filter): Faster alternative to javascript's native filter method. | [homepage](https://github.com/jonschlinkert/arr-filter "Faster alternative to javascript's native filter method.") +* [arr-map](https://www.npmjs.com/package/arr-map): Faster, node.js focused alternative to JavaScript's native array map. | [homepage](https://github.com/jonschlinkert/arr-map "Faster, node.js focused alternative to JavaScript's native array map.") +* [collection-map](https://www.npmjs.com/package/collection-map): Returns an array of mapped values from an array or object. | [homepage](https://github.com/jonschlinkert/collection-map "Returns an array of mapped values from an array or object.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.2, on February 26, 2017._ \ No newline at end of file diff --git a/code/application_liste/app/node_modules/array-each/index.js b/code/application_liste/app/node_modules/array-each/index.js new file mode 100644 index 0000000..12afef4 --- /dev/null +++ b/code/application_liste/app/node_modules/array-each/index.js @@ -0,0 +1,46 @@ +/*! + * array-each + * + * Copyright (c) 2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +/** + * Loop over each item in an array and call the given function on every element. + * + * ```js + * each(['a', 'b', 'c'], function(ele) { + * return ele + ele; + * }); + * //=> ['aa', 'bb', 'cc'] + * + * each(['a', 'b', 'c'], function(ele, i) { + * return i + ele; + * }); + * //=> ['0a', '1b', '2c'] + * ``` + * + * @name each + * @alias forEach + * @param {Array} `array` + * @param {Function} `fn` + * @param {Object} `thisArg` (optional) pass a `thisArg` to be used as the context in which to call the function. + * @return {undefined} + * @api public + */ + +module.exports = function each(arr, cb, thisArg) { + if (arr == null) return; + + var len = arr.length; + var idx = -1; + + while (++idx < len) { + var ele = arr[idx]; + if (cb.call(thisArg, ele, idx, arr) === false) { + break; + } + } +}; diff --git a/code/application_liste/app/node_modules/array-each/package.json b/code/application_liste/app/node_modules/array-each/package.json new file mode 100644 index 0000000..d344642 --- /dev/null +++ b/code/application_liste/app/node_modules/array-each/package.json @@ -0,0 +1,82 @@ +{ + "_from": "array-each@^1.0.1", + "_id": "array-each@1.0.1", + "_inBundle": false, + "_integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", + "_location": "/array-each", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "array-each@^1.0.1", + "name": "array-each", + "escapedName": "array-each", + "rawSpec": "^1.0.1", + "saveSpec": null, + "fetchSpec": "^1.0.1" + }, + "_requiredBy": [ + "/bach", + "/object.defaults" + ], + "_resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "_shasum": "a794af0c05ab1752846ee753a1f211a05ba0c44f", + "_spec": "array-each@^1.0.1", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\object.defaults", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/array-each/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Loop over each item in an array and call the given function on every element.", + "devDependencies": { + "gulp-format-md": "^0.1.11", + "mocha": "^3.2.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/array-each", + "keywords": [ + "array", + "each" + ], + "license": "MIT", + "main": "index.js", + "name": "array-each", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/array-each.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "collection-map", + "arr-filter", + "arr-map" + ] + }, + "lint": { + "reflinks": true + } + }, + "version": "1.0.1" +} diff --git a/code/application_liste/app/node_modules/array-find-index/index.js b/code/application_liste/app/node_modules/array-find-index/index.js new file mode 100644 index 0000000..e2dcd9a --- /dev/null +++ b/code/application_liste/app/node_modules/array-find-index/index.js @@ -0,0 +1,25 @@ +'use strict'; +module.exports = function (arr, predicate, ctx) { + if (typeof Array.prototype.findIndex === 'function') { + return arr.findIndex(predicate, ctx); + } + + if (typeof predicate !== 'function') { + throw new TypeError('predicate must be a function'); + } + + var list = Object(arr); + var len = list.length; + + if (len === 0) { + return -1; + } + + for (var i = 0; i < len; i++) { + if (predicate.call(ctx, list[i], i, list)) { + return i; + } + } + + return -1; +}; diff --git a/code/application_liste/app/node_modules/array-find-index/license b/code/application_liste/app/node_modules/array-find-index/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/code/application_liste/app/node_modules/array-find-index/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/array-find-index/package.json b/code/application_liste/app/node_modules/array-find-index/package.json new file mode 100644 index 0000000..53526c2 --- /dev/null +++ b/code/application_liste/app/node_modules/array-find-index/package.json @@ -0,0 +1,67 @@ +{ + "_from": "array-find-index@^1.0.1", + "_id": "array-find-index@1.0.2", + "_inBundle": false, + "_integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "_location": "/array-find-index", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "array-find-index@^1.0.1", + "name": "array-find-index", + "escapedName": "array-find-index", + "rawSpec": "^1.0.1", + "saveSpec": null, + "fetchSpec": "^1.0.1" + }, + "_requiredBy": [ + "/currently-unhandled" + ], + "_resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "_shasum": "df010aa1287e164bbda6f9723b0a96a1ec4187a1", + "_spec": "array-find-index@^1.0.1", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\currently-unhandled", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/array-find-index/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "ES2015 `Array#findIndex()` ponyfill", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/array-find-index#readme", + "keywords": [ + "es2015", + "ponyfill", + "polyfill", + "shim", + "find", + "index", + "findindex", + "array" + ], + "license": "MIT", + "name": "array-find-index", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/array-find-index.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.2" +} diff --git a/code/application_liste/app/node_modules/array-find-index/readme.md b/code/application_liste/app/node_modules/array-find-index/readme.md new file mode 100644 index 0000000..3166341 --- /dev/null +++ b/code/application_liste/app/node_modules/array-find-index/readme.md @@ -0,0 +1,30 @@ +# array-find-index [![Build Status](https://travis-ci.org/sindresorhus/array-find-index.svg?branch=master)](https://travis-ci.org/sindresorhus/array-find-index) + +> ES2015 [`Array#findIndex()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex) [ponyfill](https://ponyfill.com) + + +## Install + +``` +$ npm install --save array-find-index +``` + + +## Usage + +```js +const arrayFindIndex = require('array-find-index'); + +arrayFindIndex(['rainbow', 'unicorn', 'pony'], x => x === 'unicorn'); +//=> 1 +``` + + +## API + +Same as `Array#findIndex()`, but with the input array as the first argument. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/code/application_liste/app/node_modules/array-initial/.jshintrc b/code/application_liste/app/node_modules/array-initial/.jshintrc new file mode 100644 index 0000000..ffd6173 --- /dev/null +++ b/code/application_liste/app/node_modules/array-initial/.jshintrc @@ -0,0 +1,17 @@ +{ + "esnext": true, + "boss": true, + "curly": true, + "eqeqeq": true, + "eqnull": true, + "immed": true, + "indent": 2, + "latedef": true, + "newcap": true, + "noarg": true, + "node": true, + "sub": true, + "undef": true, + "unused": true, + "mocha": true +} diff --git a/code/application_liste/app/node_modules/array-initial/.npmignore b/code/application_liste/app/node_modules/array-initial/.npmignore new file mode 100644 index 0000000..cbe37ae --- /dev/null +++ b/code/application_liste/app/node_modules/array-initial/.npmignore @@ -0,0 +1,59 @@ +# Numerous always-ignore extensions +*.csv +*.dat +*.diff +*.err +*.gz +*.log +*.orig +*.out +*.pid +*.rar +*.rej +*.seed +*.swo +*.swp +*.vi +*.yo-rc.json +*.zip +*~ +.ruby-version +lib-cov +npm-debug.log + +# Always-ignore dirs +/bower_components/ +/node_modules/ +/temp/ +/tmp/ +/vendor/ +_gh_pages + +# OS or Editor folders +*.esproj +*.komodoproject +.komodotools +*.sublime-* +._* +.cache +.DS_Store +.idea +.project +.settings +.tmproj +nbproject +Thumbs.db + +# grunt-html-validation +validation-status.json +validation-report.json + +# misc +TODO.md + +# npmignore +test +test.js +.verb.md +.gitattributes +.editorconfig diff --git a/code/application_liste/app/node_modules/array-initial/.travis.yml b/code/application_liste/app/node_modules/array-initial/.travis.yml new file mode 100644 index 0000000..67decb2 --- /dev/null +++ b/code/application_liste/app/node_modules/array-initial/.travis.yml @@ -0,0 +1,14 @@ +sudo: false +os: + - linux + - osx +language: node_js +node_js: + - node + - '8' + - '7' + - '6' + - '5' + - '4' + - '0.12' + - '0.10' diff --git a/code/application_liste/app/node_modules/array-initial/LICENSE-MIT b/code/application_liste/app/node_modules/array-initial/LICENSE-MIT new file mode 100644 index 0000000..f8c06df --- /dev/null +++ b/code/application_liste/app/node_modules/array-initial/LICENSE-MIT @@ -0,0 +1,24 @@ +The MIT License (MIT) + +Copyright (c) 2014 Jon Schlinkert, contributors. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/array-initial/README.md b/code/application_liste/app/node_modules/array-initial/README.md new file mode 100644 index 0000000..5b95675 --- /dev/null +++ b/code/application_liste/app/node_modules/array-initial/README.md @@ -0,0 +1,39 @@ +# array-initial [![NPM version](https://badge.fury.io/js/array-initial.svg)](http://badge.fury.io/js/array-initial) + +> Get all but the last element or last n elements of an array. + +## Install with [npm](npmjs.org) + +```bash +npm i array-initial --save +``` + +## Usage + +```js +var initial = require('array-initial'); + +initial(['a', 'b', 'c', 'd', 'e', 'f']); +//=> ['a', 'b', 'c', 'd', 'e'] + +initial(['a', 'b', 'c', 'd', 'e', 'f'], 1); +//=> ['a', 'b', 'c', 'd', 'e'] + +initial(['a', 'b', 'c', 'd', 'e', 'f'], 2); +//=> ['a', 'b', 'c', 'd'] +``` + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License +Copyright (c) 2014 Jon Schlinkert +Released under the MIT license + +*** + +_This file was generated by [verb](https://github.com/assemble/verb) on December 12, 2014. To update, run `npm i -g verb && verb`._ diff --git a/code/application_liste/app/node_modules/array-initial/index.js b/code/application_liste/app/node_modules/array-initial/index.js new file mode 100644 index 0000000..239e8c6 --- /dev/null +++ b/code/application_liste/app/node_modules/array-initial/index.js @@ -0,0 +1,21 @@ +/*! + * array-initial + * + * Copyright (c) 2014 Jon Schlinkert, contributors. + * Licensed under the MIT license. + */ + +var isNumber = require('is-number'); +var slice = require('array-slice'); + +module.exports = function arrayInitial(arr, num) { + if (!Array.isArray(arr)) { + throw new Error('array-initial expects an array as the first argument.'); + } + + if (arr.length === 0) { + return null; + } + + return slice(arr, 0, arr.length - (isNumber(num) ? num : 1)); +}; diff --git a/code/application_liste/app/node_modules/array-initial/node_modules/is-number/LICENSE b/code/application_liste/app/node_modules/array-initial/node_modules/is-number/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/code/application_liste/app/node_modules/array-initial/node_modules/is-number/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/array-initial/node_modules/is-number/README.md b/code/application_liste/app/node_modules/array-initial/node_modules/is-number/README.md new file mode 100644 index 0000000..6436992 --- /dev/null +++ b/code/application_liste/app/node_modules/array-initial/node_modules/is-number/README.md @@ -0,0 +1,135 @@ +# is-number [![NPM version](https://img.shields.io/npm/v/is-number.svg?style=flat)](https://www.npmjs.com/package/is-number) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![NPM total downloads](https://img.shields.io/npm/dt/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-number.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-number) + +> Returns true if the value is a number. comprehensive tests. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-number +``` + +## Usage + +To understand some of the rationale behind the decisions made in this library (and to learn about some oddities of number evaluation in JavaScript), [see this gist](https://gist.github.com/jonschlinkert/e30c70c713da325d0e81). + +```js +var isNumber = require('is-number'); +``` + +### true + +See the [tests](./test.js) for more examples. + +```js +isNumber(5e3) //=> 'true' +isNumber(0xff) //=> 'true' +isNumber(-1.1) //=> 'true' +isNumber(0) //=> 'true' +isNumber(1) //=> 'true' +isNumber(1.1) //=> 'true' +isNumber(10) //=> 'true' +isNumber(10.10) //=> 'true' +isNumber(100) //=> 'true' +isNumber('-1.1') //=> 'true' +isNumber('0') //=> 'true' +isNumber('012') //=> 'true' +isNumber('0xff') //=> 'true' +isNumber('1') //=> 'true' +isNumber('1.1') //=> 'true' +isNumber('10') //=> 'true' +isNumber('10.10') //=> 'true' +isNumber('100') //=> 'true' +isNumber('5e3') //=> 'true' +isNumber(parseInt('012')) //=> 'true' +isNumber(parseFloat('012')) //=> 'true' +``` + +### False + +See the [tests](./test.js) for more examples. + +```js +isNumber('foo') //=> 'false' +isNumber([1]) //=> 'false' +isNumber([]) //=> 'false' +isNumber(function () {}) //=> 'false' +isNumber(Infinity) //=> 'false' +isNumber(NaN) //=> 'false' +isNumber(new Array('abc')) //=> 'false' +isNumber(new Array(2)) //=> 'false' +isNumber(new Buffer('abc')) //=> 'false' +isNumber(null) //=> 'false' +isNumber(undefined) //=> 'false' +isNumber({abc: 'abc'}) //=> 'false' +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [even](https://www.npmjs.com/package/even): Get the even numbered items from an array. | [homepage](https://github.com/jonschlinkert/even "Get the even numbered items from an array.") +* [is-even](https://www.npmjs.com/package/is-even): Return true if the given number is even. | [homepage](https://github.com/jonschlinkert/is-even "Return true if the given number is even.") +* [is-odd](https://www.npmjs.com/package/is-odd): Returns true if the given number is odd. | [homepage](https://github.com/jonschlinkert/is-odd "Returns true if the given number is odd.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") +* [odd](https://www.npmjs.com/package/odd): Get the odd numbered items from an array. | [homepage](https://github.com/jonschlinkert/odd "Get the odd numbered items from an array.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 38 | [jonschlinkert](https://github.com/jonschlinkert) | +| 5 | [charlike](https://github.com/charlike) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on October 17, 2017._ \ No newline at end of file diff --git a/code/application_liste/app/node_modules/array-initial/node_modules/is-number/index.js b/code/application_liste/app/node_modules/array-initial/node_modules/is-number/index.js new file mode 100644 index 0000000..5221f40 --- /dev/null +++ b/code/application_liste/app/node_modules/array-initial/node_modules/is-number/index.js @@ -0,0 +1,21 @@ +/*! + * is-number + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +module.exports = function isNumber(num) { + var type = typeof num; + + if (type === 'string' || num instanceof String) { + // an empty string would be coerced to true with the below logic + if (!num.trim()) return false; + } else if (type !== 'number' && !(num instanceof Number)) { + return false; + } + + return (num - num + 1) >= 0; +}; diff --git a/code/application_liste/app/node_modules/array-initial/node_modules/is-number/package.json b/code/application_liste/app/node_modules/array-initial/node_modules/is-number/package.json new file mode 100644 index 0000000..a6dcb31 --- /dev/null +++ b/code/application_liste/app/node_modules/array-initial/node_modules/is-number/package.json @@ -0,0 +1,113 @@ +{ + "_from": "is-number@^4.0.0", + "_id": "is-number@4.0.0", + "_inBundle": false, + "_integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "_location": "/array-initial/is-number", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-number@^4.0.0", + "name": "is-number", + "escapedName": "is-number", + "rawSpec": "^4.0.0", + "saveSpec": null, + "fetchSpec": "^4.0.0" + }, + "_requiredBy": [ + "/array-initial" + ], + "_resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "_shasum": "0026e37f5454d73e356dfe6564699867c6a7f0ff", + "_spec": "is-number@^4.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\array-initial", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-number/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "tunnckoCore", + "url": "https://i.am.charlike.online" + } + ], + "deprecated": false, + "description": "Returns true if the value is a number. comprehensive tests.", + "devDependencies": { + "benchmarked": "^2.0.0", + "chalk": "^2.1.0", + "gulp-format-md": "^1.0.0", + "mocha": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/is-number", + "keywords": [ + "check", + "coerce", + "coercion", + "integer", + "is", + "is-nan", + "is-num", + "is-number", + "istype", + "kind", + "math", + "nan", + "num", + "number", + "numeric", + "test", + "type", + "typeof", + "value" + ], + "license": "MIT", + "main": "index.js", + "name": "is-number", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-number.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "even", + "is-even", + "is-odd", + "is-primitive", + "kind-of", + "odd" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + }, + "version": "4.0.0" +} diff --git a/code/application_liste/app/node_modules/array-initial/package.json b/code/application_liste/app/node_modules/array-initial/package.json new file mode 100644 index 0000000..bc96841 --- /dev/null +++ b/code/application_liste/app/node_modules/array-initial/package.json @@ -0,0 +1,71 @@ +{ + "_from": "array-initial@^1.0.0", + "_id": "array-initial@1.1.0", + "_inBundle": false, + "_integrity": "sha1-L6dLJnOTccOUe9enrcc74zSz15U=", + "_location": "/array-initial", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "array-initial@^1.0.0", + "name": "array-initial", + "escapedName": "array-initial", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/bach" + ], + "_resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz", + "_shasum": "2fa74b26739371c3947bd7a7adc73be334b3d795", + "_spec": "array-initial@^1.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\bach", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/array-initial/issues" + }, + "bundleDependencies": false, + "dependencies": { + "array-slice": "^1.0.0", + "is-number": "^4.0.0" + }, + "deprecated": false, + "description": "Get all but the last element or last n elements of an array.", + "devDependencies": { + "mocha": "^2.0.0", + "should": "^11.2.1" + }, + "engines": { + "node": ">=0.10.0" + }, + "homepage": "https://github.com/jonschlinkert/array-initial", + "keywords": [ + "array", + "fast", + "first", + "initial", + "javascript", + "js", + "last", + "rest", + "util", + "utility", + "utils" + ], + "license": "MIT", + "main": "index.js", + "name": "array-initial", + "repository": { + "type": "git", + "url": "git://github.com/jonschlinkert/array-initial.git" + }, + "scripts": { + "test": "mocha -R spec" + }, + "version": "1.1.0" +} diff --git a/code/application_liste/app/node_modules/array-last/LICENSE b/code/application_liste/app/node_modules/array-last/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/code/application_liste/app/node_modules/array-last/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/array-last/README.md b/code/application_liste/app/node_modules/array-last/README.md new file mode 100644 index 0000000..d976c93 --- /dev/null +++ b/code/application_liste/app/node_modules/array-last/README.md @@ -0,0 +1,94 @@ +# array-last [![NPM version](https://img.shields.io/npm/v/array-last.svg?style=flat)](https://www.npmjs.com/package/array-last) [![NPM monthly downloads](https://img.shields.io/npm/dm/array-last.svg?style=flat)](https://npmjs.org/package/array-last) [![NPM total downloads](https://img.shields.io/npm/dt/array-last.svg?style=flat)](https://npmjs.org/package/array-last) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/array-last.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/array-last) + +> Get the last or last n elements in an array. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save array-last +``` + +## Usage + +```js +var last = require('array-last'); + +last(['a', 'b', 'c', 'd', 'e', 'f']); +//=> 'f' + +last(['a', 'b', 'c', 'd', 'e', 'f'], 1); +//=> 'f' + +last(['a', 'b', 'c', 'd', 'e', 'f'], 3); +//=> ['d', 'e', 'f'] +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [arr-union](https://www.npmjs.com/package/arr-union): Combines a list of arrays, returning a single array with unique values, using strict equality… [more](https://github.com/jonschlinkert/arr-union) | [homepage](https://github.com/jonschlinkert/arr-union) +* [array-unique](https://www.npmjs.com/package/array-unique): Remove duplicate values from an array. Fastest ES5 implementation. | [homepage](https://github.com/jonschlinkert/array-unique) +* [array-xor](https://www.npmjs.com/package/array-xor): Returns the symmetric difference (exclusive-or) of an array of elements (elements that are present in… [more](https://github.com/jonschlinkert/array-xor) | [homepage](https://github.com/jonschlinkert/array-xor) + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 19 | [jonschlinkert](https://github.com/jonschlinkert) | +| 3 | [SpyMaster356](https://github.com/SpyMaster356) | +| 2 | [bendrucker](https://github.com/bendrucker) | +| 2 | [phated](https://github.com/phated) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 30, 2017._ \ No newline at end of file diff --git a/code/application_liste/app/node_modules/array-last/index.js b/code/application_liste/app/node_modules/array-last/index.js new file mode 100644 index 0000000..5b02f18 --- /dev/null +++ b/code/application_liste/app/node_modules/array-last/index.js @@ -0,0 +1,30 @@ +/*! + * array-last + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +var isNumber = require('is-number'); + +module.exports = function last(arr, n) { + if (!Array.isArray(arr)) { + throw new Error('expected the first argument to be an array'); + } + + var len = arr.length; + if (len === 0) { + return null; + } + + n = isNumber(n) ? +n : 1; + if (n === 1) { + return arr[len - 1]; + } + + var res = new Array(n); + while (n--) { + res[n] = arr[--len]; + } + return res; +}; diff --git a/code/application_liste/app/node_modules/array-last/node_modules/is-number/LICENSE b/code/application_liste/app/node_modules/array-last/node_modules/is-number/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/code/application_liste/app/node_modules/array-last/node_modules/is-number/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/array-last/node_modules/is-number/README.md b/code/application_liste/app/node_modules/array-last/node_modules/is-number/README.md new file mode 100644 index 0000000..6436992 --- /dev/null +++ b/code/application_liste/app/node_modules/array-last/node_modules/is-number/README.md @@ -0,0 +1,135 @@ +# is-number [![NPM version](https://img.shields.io/npm/v/is-number.svg?style=flat)](https://www.npmjs.com/package/is-number) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![NPM total downloads](https://img.shields.io/npm/dt/is-number.svg?style=flat)](https://npmjs.org/package/is-number) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-number.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-number) + +> Returns true if the value is a number. comprehensive tests. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-number +``` + +## Usage + +To understand some of the rationale behind the decisions made in this library (and to learn about some oddities of number evaluation in JavaScript), [see this gist](https://gist.github.com/jonschlinkert/e30c70c713da325d0e81). + +```js +var isNumber = require('is-number'); +``` + +### true + +See the [tests](./test.js) for more examples. + +```js +isNumber(5e3) //=> 'true' +isNumber(0xff) //=> 'true' +isNumber(-1.1) //=> 'true' +isNumber(0) //=> 'true' +isNumber(1) //=> 'true' +isNumber(1.1) //=> 'true' +isNumber(10) //=> 'true' +isNumber(10.10) //=> 'true' +isNumber(100) //=> 'true' +isNumber('-1.1') //=> 'true' +isNumber('0') //=> 'true' +isNumber('012') //=> 'true' +isNumber('0xff') //=> 'true' +isNumber('1') //=> 'true' +isNumber('1.1') //=> 'true' +isNumber('10') //=> 'true' +isNumber('10.10') //=> 'true' +isNumber('100') //=> 'true' +isNumber('5e3') //=> 'true' +isNumber(parseInt('012')) //=> 'true' +isNumber(parseFloat('012')) //=> 'true' +``` + +### False + +See the [tests](./test.js) for more examples. + +```js +isNumber('foo') //=> 'false' +isNumber([1]) //=> 'false' +isNumber([]) //=> 'false' +isNumber(function () {}) //=> 'false' +isNumber(Infinity) //=> 'false' +isNumber(NaN) //=> 'false' +isNumber(new Array('abc')) //=> 'false' +isNumber(new Array(2)) //=> 'false' +isNumber(new Buffer('abc')) //=> 'false' +isNumber(null) //=> 'false' +isNumber(undefined) //=> 'false' +isNumber({abc: 'abc'}) //=> 'false' +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [even](https://www.npmjs.com/package/even): Get the even numbered items from an array. | [homepage](https://github.com/jonschlinkert/even "Get the even numbered items from an array.") +* [is-even](https://www.npmjs.com/package/is-even): Return true if the given number is even. | [homepage](https://github.com/jonschlinkert/is-even "Return true if the given number is even.") +* [is-odd](https://www.npmjs.com/package/is-odd): Returns true if the given number is odd. | [homepage](https://github.com/jonschlinkert/is-odd "Returns true if the given number is odd.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") +* [odd](https://www.npmjs.com/package/odd): Get the odd numbered items from an array. | [homepage](https://github.com/jonschlinkert/odd "Get the odd numbered items from an array.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 38 | [jonschlinkert](https://github.com/jonschlinkert) | +| 5 | [charlike](https://github.com/charlike) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on October 17, 2017._ \ No newline at end of file diff --git a/code/application_liste/app/node_modules/array-last/node_modules/is-number/index.js b/code/application_liste/app/node_modules/array-last/node_modules/is-number/index.js new file mode 100644 index 0000000..5221f40 --- /dev/null +++ b/code/application_liste/app/node_modules/array-last/node_modules/is-number/index.js @@ -0,0 +1,21 @@ +/*! + * is-number + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +module.exports = function isNumber(num) { + var type = typeof num; + + if (type === 'string' || num instanceof String) { + // an empty string would be coerced to true with the below logic + if (!num.trim()) return false; + } else if (type !== 'number' && !(num instanceof Number)) { + return false; + } + + return (num - num + 1) >= 0; +}; diff --git a/code/application_liste/app/node_modules/array-last/node_modules/is-number/package.json b/code/application_liste/app/node_modules/array-last/node_modules/is-number/package.json new file mode 100644 index 0000000..cbbdb5c --- /dev/null +++ b/code/application_liste/app/node_modules/array-last/node_modules/is-number/package.json @@ -0,0 +1,113 @@ +{ + "_from": "is-number@^4.0.0", + "_id": "is-number@4.0.0", + "_inBundle": false, + "_integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "_location": "/array-last/is-number", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-number@^4.0.0", + "name": "is-number", + "escapedName": "is-number", + "rawSpec": "^4.0.0", + "saveSpec": null, + "fetchSpec": "^4.0.0" + }, + "_requiredBy": [ + "/array-last" + ], + "_resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "_shasum": "0026e37f5454d73e356dfe6564699867c6a7f0ff", + "_spec": "is-number@^4.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\array-last", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/is-number/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "tunnckoCore", + "url": "https://i.am.charlike.online" + } + ], + "deprecated": false, + "description": "Returns true if the value is a number. comprehensive tests.", + "devDependencies": { + "benchmarked": "^2.0.0", + "chalk": "^2.1.0", + "gulp-format-md": "^1.0.0", + "mocha": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/is-number", + "keywords": [ + "check", + "coerce", + "coercion", + "integer", + "is", + "is-nan", + "is-num", + "is-number", + "istype", + "kind", + "math", + "nan", + "num", + "number", + "numeric", + "test", + "type", + "typeof", + "value" + ], + "license": "MIT", + "main": "index.js", + "name": "is-number", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/is-number.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "even", + "is-even", + "is-odd", + "is-primitive", + "kind-of", + "odd" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + }, + "version": "4.0.0" +} diff --git a/code/application_liste/app/node_modules/array-last/package.json b/code/application_liste/app/node_modules/array-last/package.json new file mode 100644 index 0000000..ece1e4d --- /dev/null +++ b/code/application_liste/app/node_modules/array-last/package.json @@ -0,0 +1,119 @@ +{ + "_from": "array-last@^1.1.1", + "_id": "array-last@1.3.0", + "_inBundle": false, + "_integrity": "sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg==", + "_location": "/array-last", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "array-last@^1.1.1", + "name": "array-last", + "escapedName": "array-last", + "rawSpec": "^1.1.1", + "saveSpec": null, + "fetchSpec": "^1.1.1" + }, + "_requiredBy": [ + "/bach" + ], + "_resolved": "https://registry.npmjs.org/array-last/-/array-last-1.3.0.tgz", + "_shasum": "7aa77073fec565ddab2493f5f88185f404a9d336", + "_spec": "array-last@^1.1.1", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\bach", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/array-last/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Ben Drucker", + "url": "http://www.bendrucker.me" + }, + { + "name": "Blaine Bublitz", + "url": "https://twitter.com/BlaineBublitz" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Stephen A. Wilson", + "url": "https://github.com/SpyMaster356" + } + ], + "dependencies": { + "is-number": "^4.0.0" + }, + "deprecated": false, + "description": "Get the last or last n elements in an array.", + "devDependencies": { + "ansi-bold": "^0.1.1", + "array-slice": "^1.0.0", + "benchmarked": "^1.1.1", + "gulp-format-md": "^1.0.0", + "matched": "^1.0.2", + "mocha": "^3.5.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/array-last", + "keywords": [ + "array", + "fast", + "first", + "initial", + "javascript", + "js", + "last", + "rest", + "util", + "utility", + "utils" + ], + "license": "MIT", + "main": "index.js", + "name": "array-last", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/array-last.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "arr-union", + "array-unique", + "array-xor" + ] + }, + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + }, + "version": "1.3.0" +} diff --git a/code/application_liste/app/node_modules/array-slice/LICENSE b/code/application_liste/app/node_modules/array-slice/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/code/application_liste/app/node_modules/array-slice/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/array-slice/README.md b/code/application_liste/app/node_modules/array-slice/README.md new file mode 100644 index 0000000..e175ca0 --- /dev/null +++ b/code/application_liste/app/node_modules/array-slice/README.md @@ -0,0 +1,82 @@ +# array-slice [![NPM version](https://img.shields.io/npm/v/array-slice.svg?style=flat)](https://www.npmjs.com/package/array-slice) [![NPM monthly downloads](https://img.shields.io/npm/dm/array-slice.svg?style=flat)](https://npmjs.org/package/array-slice) [![NPM total downloads](https://img.shields.io/npm/dt/array-slice.svg?style=flat)](https://npmjs.org/package/array-slice) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/array-slice.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/array-slice) + +> Array-slice method. Slices `array` from the `start` index up to, but not including, the `end` index. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save array-slice +``` + +This function is used instead of `Array#slice` to support node lists in IE < 9 and to ensure dense arrays are returned. This is also faster than native slice in some cases. + +## Usage + +```js +var slice = require('array-slice'); +var arr = ['a', 'b', 'd', 'e', 'f', 'g', 'h', 'i', 'j']; + +slice(arr, 3, 6); +//=> ['e', 'f', 'g'] +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. | [homepage](https://github.com/jonschlinkert/arr-flatten "Recursively flatten an array or arrays.") +* [array-unique](https://www.npmjs.com/package/array-unique): Remove duplicate values from an array. Fastest ES5 implementation. | [homepage](https://github.com/jonschlinkert/array-unique "Remove duplicate values from an array. Fastest ES5 implementation.") +* [array-xor](https://www.npmjs.com/package/array-xor): Returns the symmetric difference (exclusive-or) of an array of elements (elements that are present in… [more](https://github.com/jonschlinkert/array-xor) | [homepage](https://github.com/jonschlinkert/array-xor "Returns the symmetric difference (exclusive-or) of an array of elements (elements that are present in all given arrays and not in their intersections).") + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on November 30, 2017._ \ No newline at end of file diff --git a/code/application_liste/app/node_modules/array-slice/index.js b/code/application_liste/app/node_modules/array-slice/index.js new file mode 100644 index 0000000..15cdb77 --- /dev/null +++ b/code/application_liste/app/node_modules/array-slice/index.js @@ -0,0 +1,33 @@ +/*! + * array-slice + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +module.exports = function slice(arr, start, end) { + var len = arr.length; + var range = []; + + start = idx(len, start); + end = idx(len, end, len); + + while (start < end) { + range.push(arr[start++]); + } + return range; +}; + +function idx(len, pos, end) { + if (pos == null) { + pos = end || 0; + } else if (pos < 0) { + pos = Math.max(len + pos, 0); + } else { + pos = Math.min(pos, len); + } + + return pos; +} diff --git a/code/application_liste/app/node_modules/array-slice/package.json b/code/application_liste/app/node_modules/array-slice/package.json new file mode 100644 index 0000000..e94864f --- /dev/null +++ b/code/application_liste/app/node_modules/array-slice/package.json @@ -0,0 +1,86 @@ +{ + "_from": "array-slice@^1.0.0", + "_id": "array-slice@1.1.0", + "_inBundle": false, + "_integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", + "_location": "/array-slice", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "array-slice@^1.0.0", + "name": "array-slice", + "escapedName": "array-slice", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/array-initial", + "/object.defaults" + ], + "_resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", + "_shasum": "e368ea15f89bc7069f7ffb89aec3a6c7d4ac22d4", + "_spec": "array-slice@^1.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\object.defaults", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/array-slice/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Array-slice method. Slices `array` from the `start` index up to, but not including, the `end` index.", + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.5.3" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/array-slice", + "keywords": [ + "array", + "javascript", + "js", + "slice", + "util", + "utils" + ], + "license": "MIT", + "main": "index.js", + "name": "array-slice", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/array-slice.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "arr-flatten", + "array-unique", + "array-xor" + ] + }, + "lint": { + "reflinks": true + } + }, + "version": "1.1.0" +} diff --git a/code/application_liste/app/node_modules/array-sort/LICENSE b/code/application_liste/app/node_modules/array-sort/LICENSE new file mode 100644 index 0000000..c0d7f13 --- /dev/null +++ b/code/application_liste/app/node_modules/array-sort/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/code/application_liste/app/node_modules/array-sort/README.md b/code/application_liste/app/node_modules/array-sort/README.md new file mode 100644 index 0000000..94d9ba7 --- /dev/null +++ b/code/application_liste/app/node_modules/array-sort/README.md @@ -0,0 +1,203 @@ +# array-sort [![NPM version](https://img.shields.io/npm/v/array-sort.svg?style=flat)](https://www.npmjs.com/package/array-sort) [![NPM monthly downloads](https://img.shields.io/npm/dm/array-sort.svg?style=flat)](https://npmjs.org/package/array-sort) [![NPM total downloads](https://img.shields.io/npm/dt/array-sort.svg?style=flat)](https://npmjs.org/package/array-sort) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/array-sort.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/array-sort) [![Windows Build Status](https://img.shields.io/appveyor/ci/jonschlinkert/array-sort.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/jonschlinkert/array-sort) + +> Fast and powerful array sorting. Sort an array of objects by one or more properties. Any number of nested properties or custom comparison functions may be used. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save array-sort +``` + +Install with [yarn](https://yarnpkg.com): + +```sh +$ yarn add array-sort +``` + +## Usage + +Sort an array by the given object property: + +```js +var arraySort = require('array-sort'); + +arraySort([{foo: 'y'}, {foo: 'z'}, {foo: 'x'}], 'foo'); +//=> [{foo: 'x'}, {foo: 'y'}, {foo: 'z'}] +``` + +**Reverse order** + +```js +arraySort([{foo: 'y'}, {foo: 'z'}, {foo: 'x'}], 'foo', {reverse: true}); +//=> [{foo: 'z'}, {foo: 'y'}, {foo: 'x'}] +``` + +## Params + +```js +arraySort(array, comparisonArgs); +``` + +* `array`: **{Array}** The array to sort +* `comparisonArgs`: **{Function|String|Array}**: One or more functions or object paths to use for sorting. + +## Examples + +**[Sort blog posts](examples/blog-posts.js)** + +```js +var arraySort = require('array-sort'); + +var posts = [ + { path: 'c.md', locals: { date: '2014-01-09' } }, + { path: 'a.md', locals: { date: '2014-01-02' } }, + { path: 'b.md', locals: { date: '2013-05-06' } }, +]; + +// sort by `locals.date` +console.log(arraySort(posts, 'locals.date')); + +// sort by `path` +console.log(arraySort(posts, 'path')); +``` + +**[Sort by multiple properties](examples/multiple-props.js)** + +```js +var arraySort = require('array-sort'); + +var posts = [ + { locals: { foo: 'bbb', date: '2013-05-06' }}, + { locals: { foo: 'aaa', date: '2012-01-02' }}, + { locals: { foo: 'ccc', date: '2014-01-02' }}, + { locals: { foo: 'ccc', date: '2015-01-02' }}, + { locals: { foo: 'bbb', date: '2014-06-01' }}, + { locals: { foo: 'aaa', date: '2014-02-02' }}, +]; + +// sort by `locals.foo`, then `locals.date` +var result = arraySort(posts, ['locals.foo', 'locals.date']); + +console.log(result); +// [ { locals: { foo: 'aaa', date: '2012-01-02' } }, +// { locals: { foo: 'aaa', date: '2014-02-02' } }, +// { locals: { foo: 'bbb', date: '2013-05-06' } }, +// { locals: { foo: 'bbb', date: '2014-06-01' } }, +// { locals: { foo: 'ccc', date: '2014-01-02' } }, +// { locals: { foo: 'ccc', date: '2015-01-02' } } ] +``` + +**[Custom function](examples/custom-function.js)** + +If custom functions are supplied, array elements are sorted according to the return value of the compare function. See the [docs for ](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort)`Array.sort()` for more details. + +```js +var arr = [ + {one: 'w', two: 'b'}, + {one: 'z', two: 'a'}, + {one: 'x', two: 'c'}, + {one: 'y', two: 'd'}, +]; + +function compare(prop) { + return function (a, b) { + return a[prop].localeCompare(b[prop]); + }; +} + +var result = arraySort(arr, function (a, b) { + return a.two.localeCompare(b.two); +}); + +console.log(result); +// [ { one: 'z', two: 'a' }, +// { one: 'w', two: 'b' }, +// { one: 'x', two: 'c' }, +// { one: 'y', two: 'd' } ] +``` + +**[Multiple custom functions](examples/custom-functions.js)** + +```js +var arr = [ + {foo: 'w', bar: 'y', baz: 'w'}, + {foo: 'x', bar: 'y', baz: 'w'}, + {foo: 'x', bar: 'y', baz: 'z'}, + {foo: 'x', bar: 'x', baz: 'w'}, +]; + +// reusable compare function +function compare(prop) { + return function (a, b) { + return a[prop].localeCompare(b[prop]); + }; +} + +// the `compare` functions can be a list or array +var result = arraySort(arr, compare('foo'), compare('bar'), compare('baz')); + +console.log(result); +// [ { foo: 'w', bar: 'y', baz: 'w' }, +// { foo: 'x', bar: 'x', baz: 'w' }, +// { foo: 'x', bar: 'y', baz: 'w' }, +// { foo: 'x', bar: 'y', baz: 'z' } ] +``` + +## About + +### Related projects + +* [get-value](https://www.npmjs.com/package/get-value): Use property paths (`a.b.c`) to get a nested value from an object. | [homepage](https://github.com/jonschlinkert/get-value "Use property paths (`a.b.c`) to get a nested value from an object.") +* [set-value](https://www.npmjs.com/package/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/jonschlinkert/set-value "Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.") +* [sort-asc](https://www.npmjs.com/package/sort-asc): Sort array elements in ascending order. | [homepage](https://github.com/jonschlinkert/sort-asc "Sort array elements in ascending order.") +* [sort-desc](https://www.npmjs.com/package/sort-desc): Sort array elements in descending order. | [homepage](https://github.com/jonschlinkert/sort-desc "Sort array elements in descending order.") +* [sort-object](https://www.npmjs.com/package/sort-object): Sort the keys in an object. | [homepage](https://github.com/doowb/sort-object "Sort the keys in an object.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 10 | [jonschlinkert](https://github.com/jonschlinkert) | +| 4 | [doowb](https://github.com/doowb) | +| 1 | [iamstolis](https://github.com/iamstolis) | +| 1 | [wkevina](https://github.com/wkevina) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on September 11, 2017._ \ No newline at end of file diff --git a/code/application_liste/app/node_modules/array-sort/index.js b/code/application_liste/app/node_modules/array-sort/index.js new file mode 100644 index 0000000..01880e1 --- /dev/null +++ b/code/application_liste/app/node_modules/array-sort/index.js @@ -0,0 +1,105 @@ +/*! + * array-sort + * + * Copyright (c) 2015-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +var defaultCompare = require('default-compare'); +var typeOf = require('kind-of'); +var get = require('get-value'); + +/** + * Sort an array of objects by one or more properties. + * + * @param {Array} `arr` The Array to sort. + * @param {String|Array|Function} `props` One or more object paths or comparison functions. + * @param {Object} `opts` Pass `{ reverse: true }` to reverse the sort order. + * @return {Array} Returns a sorted array. + * @api public + */ + +function arraySort(arr, props, opts) { + if (arr == null) { + return []; + } + + if (!Array.isArray(arr)) { + throw new TypeError('array-sort expects an array.'); + } + + if (arguments.length === 1) { + return arr.sort(); + } + + var args = flatten([].slice.call(arguments, 1)); + + // if the last argument appears to be a plain object, + // it's not a valid `compare` arg, so it must be options. + if (typeOf(args[args.length - 1]) === 'object') { + opts = args.pop(); + } + return arr.sort(sortBy(args, opts)); +} + +/** + * Iterate over each comparison property or function until `1` or `-1` + * is returned. + * + * @param {String|Array|Function} `props` One or more object paths or comparison functions. + * @param {Object} `opts` Pass `{ reverse: true }` to reverse the sort order. + * @return {Array} + */ + +function sortBy(props, opts) { + opts = opts || {}; + + return function compareFn(a, b) { + var len = props.length, i = -1; + var result; + + while (++i < len) { + result = compare(props[i], a, b); + if (result !== 0) { + break; + } + } + if (opts.reverse === true) { + return result * -1; + } + return result; + }; +} + +/** + * Compare `a` to `b`. If an object `prop` is passed, then + * `a[prop]` is compared to `b[prop]` + */ + +function compare(prop, a, b) { + if (typeof prop === 'function') { + // expose `compare` to custom function + return prop(a, b, compare.bind(null, null)); + } + // compare object values + if (prop && typeof a === 'object' && typeof b === 'object') { + return compare(null, get(a, prop), get(b, prop)); + } + return defaultCompare(a, b); +} + +/** + * Flatten the given array. + */ + +function flatten(arr) { + return [].concat.apply([], arr); +} + +/** + * Expose `arraySort` + */ + +module.exports = arraySort; diff --git a/code/application_liste/app/node_modules/array-sort/node_modules/kind-of/LICENSE b/code/application_liste/app/node_modules/array-sort/node_modules/kind-of/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/code/application_liste/app/node_modules/array-sort/node_modules/kind-of/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/array-sort/node_modules/kind-of/README.md b/code/application_liste/app/node_modules/array-sort/node_modules/kind-of/README.md new file mode 100644 index 0000000..170bf30 --- /dev/null +++ b/code/application_liste/app/node_modules/array-sort/node_modules/kind-of/README.md @@ -0,0 +1,342 @@ +# kind-of [![NPM version](https://img.shields.io/npm/v/kind-of.svg?style=flat)](https://www.npmjs.com/package/kind-of) [![NPM monthly downloads](https://img.shields.io/npm/dm/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![NPM total downloads](https://img.shields.io/npm/dt/kind-of.svg?style=flat)](https://npmjs.org/package/kind-of) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/kind-of.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/kind-of) + +> Get the native type of a value. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save kind-of +``` + +Install with [bower](https://bower.io/) + +```sh +$ bower install kind-of --save +``` + +## Why use this? + +1. [it's fast](#benchmarks) | [optimizations](#optimizations) +2. [better type checking](#better-type-checking) + +## Usage + +> es5, browser and es6 ready + +```js +var kindOf = require('kind-of'); + +kindOf(undefined); +//=> 'undefined' + +kindOf(null); +//=> 'null' + +kindOf(true); +//=> 'boolean' + +kindOf(false); +//=> 'boolean' + +kindOf(new Boolean(true)); +//=> 'boolean' + +kindOf(new Buffer('')); +//=> 'buffer' + +kindOf(42); +//=> 'number' + +kindOf(new Number(42)); +//=> 'number' + +kindOf('str'); +//=> 'string' + +kindOf(new String('str')); +//=> 'string' + +kindOf(arguments); +//=> 'arguments' + +kindOf({}); +//=> 'object' + +kindOf(Object.create(null)); +//=> 'object' + +kindOf(new Test()); +//=> 'object' + +kindOf(new Date()); +//=> 'date' + +kindOf([]); +//=> 'array' + +kindOf([1, 2, 3]); +//=> 'array' + +kindOf(new Array()); +//=> 'array' + +kindOf(/foo/); +//=> 'regexp' + +kindOf(new RegExp('foo')); +//=> 'regexp' + +kindOf(function () {}); +//=> 'function' + +kindOf(function * () {}); +//=> 'function' + +kindOf(new Function()); +//=> 'function' + +kindOf(new Map()); +//=> 'map' + +kindOf(new WeakMap()); +//=> 'weakmap' + +kindOf(new Set()); +//=> 'set' + +kindOf(new WeakSet()); +//=> 'weakset' + +kindOf(Symbol('str')); +//=> 'symbol' + +kindOf(new Int8Array()); +//=> 'int8array' + +kindOf(new Uint8Array()); +//=> 'uint8array' + +kindOf(new Uint8ClampedArray()); +//=> 'uint8clampedarray' + +kindOf(new Int16Array()); +//=> 'int16array' + +kindOf(new Uint16Array()); +//=> 'uint16array' + +kindOf(new Int32Array()); +//=> 'int32array' + +kindOf(new Uint32Array()); +//=> 'uint32array' + +kindOf(new Float32Array()); +//=> 'float32array' + +kindOf(new Float64Array()); +//=> 'float64array' +``` + +## Release history + +### v4.0.0 + +**Added** + +* `promise` support + +### v5.0.0 + +**Added** + +* `Set Iterator` and `Map Iterator` support + +**Fixed** + +* Now returns `generatorfunction` for generator functions + +## Benchmarks + +Benchmarked against [typeof](http://github.com/CodingFu/typeof) and [type-of](https://github.com/ForbesLindesay/type-of). +Note that performaces is slower for es6 features `Map`, `WeakMap`, `Set` and `WeakSet`. + +```bash +#1: array + current x 23,329,397 ops/sec ±0.82% (94 runs sampled) + lib-type-of x 4,170,273 ops/sec ±0.55% (94 runs sampled) + lib-typeof x 9,686,935 ops/sec ±0.59% (98 runs sampled) + +#2: boolean + current x 27,197,115 ops/sec ±0.85% (94 runs sampled) + lib-type-of x 3,145,791 ops/sec ±0.73% (97 runs sampled) + lib-typeof x 9,199,562 ops/sec ±0.44% (99 runs sampled) + +#3: date + current x 20,190,117 ops/sec ±0.86% (92 runs sampled) + lib-type-of x 5,166,970 ops/sec ±0.74% (94 runs sampled) + lib-typeof x 9,610,821 ops/sec ±0.50% (96 runs sampled) + +#4: function + current x 23,855,460 ops/sec ±0.60% (97 runs sampled) + lib-type-of x 5,667,740 ops/sec ±0.54% (100 runs sampled) + lib-typeof x 10,010,644 ops/sec ±0.44% (100 runs sampled) + +#5: null + current x 27,061,047 ops/sec ±0.97% (96 runs sampled) + lib-type-of x 13,965,573 ops/sec ±0.62% (97 runs sampled) + lib-typeof x 8,460,194 ops/sec ±0.61% (97 runs sampled) + +#6: number + current x 25,075,682 ops/sec ±0.53% (99 runs sampled) + lib-type-of x 2,266,405 ops/sec ±0.41% (98 runs sampled) + lib-typeof x 9,821,481 ops/sec ±0.45% (99 runs sampled) + +#7: object + current x 3,348,980 ops/sec ±0.49% (99 runs sampled) + lib-type-of x 3,245,138 ops/sec ±0.60% (94 runs sampled) + lib-typeof x 9,262,952 ops/sec ±0.59% (99 runs sampled) + +#8: regex + current x 21,284,827 ops/sec ±0.72% (96 runs sampled) + lib-type-of x 4,689,241 ops/sec ±0.43% (100 runs sampled) + lib-typeof x 8,957,593 ops/sec ±0.62% (98 runs sampled) + +#9: string + current x 25,379,234 ops/sec ±0.58% (96 runs sampled) + lib-type-of x 3,635,148 ops/sec ±0.76% (93 runs sampled) + lib-typeof x 9,494,134 ops/sec ±0.49% (98 runs sampled) + +#10: undef + current x 27,459,221 ops/sec ±1.01% (93 runs sampled) + lib-type-of x 14,360,433 ops/sec ±0.52% (99 runs sampled) + lib-typeof x 23,202,868 ops/sec ±0.59% (94 runs sampled) + +``` + +## Optimizations + +In 7 out of 8 cases, this library is 2x-10x faster than other top libraries included in the benchmarks. There are a few things that lead to this performance advantage, none of them hard and fast rules, but all of them simple and repeatable in almost any code library: + +1. Optimize around the fastest and most common use cases first. Of course, this will change from project-to-project, but I took some time to understand how and why `typeof` checks were being used in my own libraries and other libraries I use a lot. +2. Optimize around bottlenecks - In other words, the order in which conditionals are implemented is significant, because each check is only as fast as the failing checks that came before it. Here, the biggest bottleneck by far is checking for plain objects (an object that was created by the `Object` constructor). I opted to make this check happen by process of elimination rather than brute force up front (e.g. by using something like `val.constructor.name`), so that every other type check would not be penalized it. +3. Don't do uneccessary processing - why do `.slice(8, -1).toLowerCase();` just to get the word `regex`? It's much faster to do `if (type === '[object RegExp]') return 'regex'` +4. There is no reason to make the code in a microlib as terse as possible, just to win points for making it shorter. It's always better to favor performant code over terse code. You will always only be using a single `require()` statement to use the library anyway, regardless of how the code is written. + +## Better type checking + +kind-of is more correct than other type checking libs I've looked at. For example, here are some differing results from other popular libs: + +### [typeof](https://github.com/CodingFu/typeof) lib + +Incorrectly tests instances of custom constructors (pretty common): + +```js +var typeOf = require('typeof'); +function Test() {} +console.log(typeOf(new Test())); +//=> 'test' +``` + +Returns `object` instead of `arguments`: + +```js +function foo() { + console.log(typeOf(arguments)) //=> 'object' +} +foo(); +``` + +### [type-of](https://github.com/ForbesLindesay/type-of) lib + +Incorrectly returns `object` for generator functions, buffers, `Map`, `Set`, `WeakMap` and `WeakSet`: + +```js +function * foo() {} +console.log(typeOf(foo)); +//=> 'object' +console.log(typeOf(new Buffer(''))); +//=> 'object' +console.log(typeOf(new Map())); +//=> 'object' +console.log(typeOf(new Set())); +//=> 'object' +console.log(typeOf(new WeakMap())); +//=> 'object' +console.log(typeOf(new WeakSet())); +//=> 'object' +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet") +* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.") +* [is-primitive](https://www.npmjs.com/package/is-primitive): Returns `true` if the value is a primitive. | [homepage](https://github.com/jonschlinkert/is-primitive "Returns `true` if the value is a primitive. ") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 82 | [jonschlinkert](https://github.com/jonschlinkert) | +| 3 | [aretecode](https://github.com/aretecode) | +| 2 | [miguelmota](https://github.com/miguelmota) | +| 1 | [dtothefp](https://github.com/dtothefp) | +| 1 | [ksheedlo](https://github.com/ksheedlo) | +| 1 | [pdehaan](https://github.com/pdehaan) | +| 1 | [laggingreflex](https://github.com/laggingreflex) | +| 1 | [charlike](https://github.com/charlike) | + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on October 13, 2017._ \ No newline at end of file diff --git a/code/application_liste/app/node_modules/array-sort/node_modules/kind-of/index.js b/code/application_liste/app/node_modules/array-sort/node_modules/kind-of/index.js new file mode 100644 index 0000000..fc5cde9 --- /dev/null +++ b/code/application_liste/app/node_modules/array-sort/node_modules/kind-of/index.js @@ -0,0 +1,147 @@ +var toString = Object.prototype.toString; + +/** + * Get the native `typeof` a value. + * + * @param {*} `val` + * @return {*} Native javascript type + */ + +module.exports = function kindOf(val) { + var type = typeof val; + + // primitivies + if (type === 'undefined') { + return 'undefined'; + } + if (val === null) { + return 'null'; + } + if (val === true || val === false || val instanceof Boolean) { + return 'boolean'; + } + if (type === 'string' || val instanceof String) { + return 'string'; + } + if (type === 'number' || val instanceof Number) { + return 'number'; + } + + // functions + if (type === 'function' || val instanceof Function) { + if (typeof val.constructor.name !== 'undefined' && val.constructor.name.slice(0, 9) === 'Generator') { + return 'generatorfunction'; + } + return 'function'; + } + + // array + if (typeof Array.isArray !== 'undefined' && Array.isArray(val)) { + return 'array'; + } + + // check for instances of RegExp and Date before calling `toString` + if (val instanceof RegExp) { + return 'regexp'; + } + if (val instanceof Date) { + return 'date'; + } + + // other objects + type = toString.call(val); + + if (type === '[object RegExp]') { + return 'regexp'; + } + if (type === '[object Date]') { + return 'date'; + } + if (type === '[object Arguments]') { + return 'arguments'; + } + if (type === '[object Error]') { + return 'error'; + } + if (type === '[object Promise]') { + return 'promise'; + } + + // buffer + if (isBuffer(val)) { + return 'buffer'; + } + + // es6: Map, WeakMap, Set, WeakSet + if (type === '[object Set]') { + return 'set'; + } + if (type === '[object WeakSet]') { + return 'weakset'; + } + if (type === '[object Map]') { + return 'map'; + } + if (type === '[object WeakMap]') { + return 'weakmap'; + } + if (type === '[object Symbol]') { + return 'symbol'; + } + + if (type === '[object Map Iterator]') { + return 'mapiterator'; + } + if (type === '[object Set Iterator]') { + return 'setiterator'; + } + if (type === '[object String Iterator]') { + return 'stringiterator'; + } + if (type === '[object Array Iterator]') { + return 'arrayiterator'; + } + + // typed arrays + if (type === '[object Int8Array]') { + return 'int8array'; + } + if (type === '[object Uint8Array]') { + return 'uint8array'; + } + if (type === '[object Uint8ClampedArray]') { + return 'uint8clampedarray'; + } + if (type === '[object Int16Array]') { + return 'int16array'; + } + if (type === '[object Uint16Array]') { + return 'uint16array'; + } + if (type === '[object Int32Array]') { + return 'int32array'; + } + if (type === '[object Uint32Array]') { + return 'uint32array'; + } + if (type === '[object Float32Array]') { + return 'float32array'; + } + if (type === '[object Float64Array]') { + return 'float64array'; + } + + // must be a plain object + return 'object'; +}; + +/** + * If you need to support Safari 5-7 (8-10 yr-old browser), + * take a look at https://github.com/feross/is-buffer + */ + +function isBuffer(val) { + return val.constructor + && typeof val.constructor.isBuffer === 'function' + && val.constructor.isBuffer(val); +} diff --git a/code/application_liste/app/node_modules/array-sort/node_modules/kind-of/package.json b/code/application_liste/app/node_modules/array-sort/node_modules/kind-of/package.json new file mode 100644 index 0000000..762f99a --- /dev/null +++ b/code/application_liste/app/node_modules/array-sort/node_modules/kind-of/package.json @@ -0,0 +1,146 @@ +{ + "_from": "kind-of@^5.0.2", + "_id": "kind-of@5.1.0", + "_inBundle": false, + "_integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "_location": "/array-sort/kind-of", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "kind-of@^5.0.2", + "name": "kind-of", + "escapedName": "kind-of", + "rawSpec": "^5.0.2", + "saveSpec": null, + "fetchSpec": "^5.0.2" + }, + "_requiredBy": [ + "/array-sort" + ], + "_resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "_shasum": "729c91e2d857b7a419a1f9aa65685c4c33f5845d", + "_spec": "kind-of@^5.0.2", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\array-sort", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/kind-of/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "David Fox-Powell", + "url": "https://dtothefp.github.io/me" + }, + { + "name": "James", + "url": "https://twitter.com/aretecode" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Ken Sheedlo", + "url": "kensheedlo.com" + }, + { + "name": "laggingreflex", + "url": "https://github.com/laggingreflex" + }, + { + "name": "Miguel Mota", + "url": "https://miguelmota.com" + }, + { + "name": "Peter deHaan", + "url": "http://about.me/peterdehaan" + }, + { + "name": "tunnckoCore", + "url": "https://i.am.charlike.online" + } + ], + "deprecated": false, + "description": "Get the native type of a value.", + "devDependencies": { + "ansi-bold": "^0.1.1", + "benchmarked": "^1.1.1", + "browserify": "^14.4.0", + "gulp-format-md": "^0.1.12", + "matched": "^0.4.4", + "mocha": "^3.4.2", + "type-of": "^2.0.1", + "typeof": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/kind-of", + "keywords": [ + "arguments", + "array", + "boolean", + "check", + "date", + "function", + "is", + "is-type", + "is-type-of", + "kind", + "kind-of", + "number", + "object", + "of", + "regexp", + "string", + "test", + "type", + "type-of", + "typeof", + "types" + ], + "license": "MIT", + "main": "index.js", + "name": "kind-of", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/kind-of.git" + }, + "scripts": { + "prepublish": "browserify -o browser.js -e index.js -s index --bare", + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "is-glob", + "is-number", + "is-primitive" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "reflinks": [ + "type-of", + "typeof", + "verb" + ] + }, + "version": "5.1.0" +} diff --git a/code/application_liste/app/node_modules/array-sort/package.json b/code/application_liste/app/node_modules/array-sort/package.json new file mode 100644 index 0000000..7eff467 --- /dev/null +++ b/code/application_liste/app/node_modules/array-sort/package.json @@ -0,0 +1,137 @@ +{ + "_from": "array-sort@^1.0.0", + "_id": "array-sort@1.0.0", + "_inBundle": false, + "_integrity": "sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg==", + "_location": "/array-sort", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "array-sort@^1.0.0", + "name": "array-sort", + "escapedName": "array-sort", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/gulp/gulp-cli" + ], + "_resolved": "https://registry.npmjs.org/array-sort/-/array-sort-1.0.0.tgz", + "_shasum": "e4c05356453f56f53512a7d1d6123f2c54c0a88a", + "_spec": "array-sort@^1.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\gulp\\node_modules\\gulp-cli", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/array-sort/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Brian Woodward", + "url": "https://twitter.com/doowb" + }, + { + "name": "Jan Stola", + "url": "https://github.com/iamstolis" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "name": "Kevin Ward", + "url": "https://github.com/wkevina" + } + ], + "dependencies": { + "default-compare": "^1.0.0", + "get-value": "^2.0.6", + "kind-of": "^5.0.2" + }, + "deprecated": false, + "description": "Fast and powerful array sorting. Sort an array of objects by one or more properties. Any number of nested properties or custom comparison functions may be used.", + "devDependencies": { + "ansi-bold": "^0.1.1", + "benchmarked": "^0.1.5", + "glob": "^7.0.3", + "gulp-format-md": "^0.1.8", + "lodash.sortbyorder": "^3.4.4", + "mocha": "^2.4.5", + "should": "^8.3.1" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/array-sort", + "keywords": [ + "arr", + "array", + "asc", + "ascend", + "ascending", + "desc", + "descend", + "descending", + "dot", + "element", + "elements", + "get", + "multiple", + "nested", + "obj", + "object", + "order", + "ordered", + "path", + "prop", + "properties", + "property", + "sort", + "sorted", + "sorting" + ], + "license": "MIT", + "main": "index.js", + "name": "array-sort", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/array-sort.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "reflinks": [ + "verb" + ], + "related": { + "list": [ + "get-value", + "set-value", + "sort-asc", + "sort-desc", + "sort-object" + ] + }, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + } + }, + "version": "1.0.0" +} diff --git a/code/application_liste/app/node_modules/array-union/index.js b/code/application_liste/app/node_modules/array-union/index.js new file mode 100644 index 0000000..e33f38a --- /dev/null +++ b/code/application_liste/app/node_modules/array-union/index.js @@ -0,0 +1,6 @@ +'use strict'; +var arrayUniq = require('array-uniq'); + +module.exports = function () { + return arrayUniq([].concat.apply([], arguments)); +}; diff --git a/code/application_liste/app/node_modules/array-union/license b/code/application_liste/app/node_modules/array-union/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/code/application_liste/app/node_modules/array-union/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/array-union/package.json b/code/application_liste/app/node_modules/array-union/package.json new file mode 100644 index 0000000..0010700 --- /dev/null +++ b/code/application_liste/app/node_modules/array-union/package.json @@ -0,0 +1,72 @@ +{ + "_from": "array-union@^1.0.1", + "_id": "array-union@1.0.2", + "_inBundle": false, + "_integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "_location": "/array-union", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "array-union@^1.0.1", + "name": "array-union", + "escapedName": "array-union", + "rawSpec": "^1.0.1", + "saveSpec": null, + "fetchSpec": "^1.0.1" + }, + "_requiredBy": [ + "/globby" + ], + "_resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "_shasum": "9a34410e4f4e3da23dea375be5be70f24778ec39", + "_spec": "array-union@^1.0.1", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\globby", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/array-union/issues" + }, + "bundleDependencies": false, + "dependencies": { + "array-uniq": "^1.0.1" + }, + "deprecated": false, + "description": "Create an array of unique values, in order, from the input arrays", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/array-union#readme", + "keywords": [ + "array", + "arr", + "set", + "uniq", + "unique", + "duplicate", + "remove", + "union", + "combine", + "merge" + ], + "license": "MIT", + "name": "array-union", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/array-union.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.2" +} diff --git a/code/application_liste/app/node_modules/array-union/readme.md b/code/application_liste/app/node_modules/array-union/readme.md new file mode 100644 index 0000000..ea472dd --- /dev/null +++ b/code/application_liste/app/node_modules/array-union/readme.md @@ -0,0 +1,28 @@ +# array-union [![Build Status](https://travis-ci.org/sindresorhus/array-union.svg?branch=master)](https://travis-ci.org/sindresorhus/array-union) + +> Create an array of unique values, in order, from the input arrays + + +## Install + +``` +$ npm install --save array-union +``` + + +## Usage + +```js +const arrayUnion = require('array-union'); + +arrayUnion([1, 1, 2, 3], [2, 3]); +//=> [1, 2, 3] + +arrayUnion(['foo', 'foo', 'bar'], ['foo']); +//=> ['foo', 'bar'] +``` + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/code/application_liste/app/node_modules/array-uniq/index.js b/code/application_liste/app/node_modules/array-uniq/index.js new file mode 100644 index 0000000..edd09f8 --- /dev/null +++ b/code/application_liste/app/node_modules/array-uniq/index.js @@ -0,0 +1,62 @@ +'use strict'; + +// there's 3 implementations written in increasing order of efficiency + +// 1 - no Set type is defined +function uniqNoSet(arr) { + var ret = []; + + for (var i = 0; i < arr.length; i++) { + if (ret.indexOf(arr[i]) === -1) { + ret.push(arr[i]); + } + } + + return ret; +} + +// 2 - a simple Set type is defined +function uniqSet(arr) { + var seen = new Set(); + return arr.filter(function (el) { + if (!seen.has(el)) { + seen.add(el); + return true; + } + + return false; + }); +} + +// 3 - a standard Set type is defined and it has a forEach method +function uniqSetWithForEach(arr) { + var ret = []; + + (new Set(arr)).forEach(function (el) { + ret.push(el); + }); + + return ret; +} + +// V8 currently has a broken implementation +// https://github.com/joyent/node/issues/8449 +function doesForEachActuallyWork() { + var ret = false; + + (new Set([true])).forEach(function (el) { + ret = el; + }); + + return ret === true; +} + +if ('Set' in global) { + if (typeof Set.prototype.forEach === 'function' && doesForEachActuallyWork()) { + module.exports = uniqSetWithForEach; + } else { + module.exports = uniqSet; + } +} else { + module.exports = uniqNoSet; +} diff --git a/code/application_liste/app/node_modules/array-uniq/license b/code/application_liste/app/node_modules/array-uniq/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/code/application_liste/app/node_modules/array-uniq/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/array-uniq/package.json b/code/application_liste/app/node_modules/array-uniq/package.json new file mode 100644 index 0000000..fe92b2e --- /dev/null +++ b/code/application_liste/app/node_modules/array-uniq/package.json @@ -0,0 +1,70 @@ +{ + "_from": "array-uniq@^1.0.1", + "_id": "array-uniq@1.0.3", + "_inBundle": false, + "_integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "_location": "/array-uniq", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "array-uniq@^1.0.1", + "name": "array-uniq", + "escapedName": "array-uniq", + "rawSpec": "^1.0.1", + "saveSpec": null, + "fetchSpec": "^1.0.1" + }, + "_requiredBy": [ + "/array-union", + "/get-imports" + ], + "_resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "_shasum": "af6ac877a25cc7f74e058894753858dfdb24fdb6", + "_spec": "array-uniq@^1.0.1", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\get-imports", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/array-uniq/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Create an array without duplicates", + "devDependencies": { + "ava": "*", + "es6-set": "^0.1.0", + "require-uncached": "^1.0.2", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/array-uniq#readme", + "keywords": [ + "array", + "arr", + "set", + "uniq", + "unique", + "es6", + "duplicate", + "remove" + ], + "license": "MIT", + "name": "array-uniq", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/array-uniq.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.3" +} diff --git a/code/application_liste/app/node_modules/array-uniq/readme.md b/code/application_liste/app/node_modules/array-uniq/readme.md new file mode 100644 index 0000000..f0bd98c --- /dev/null +++ b/code/application_liste/app/node_modules/array-uniq/readme.md @@ -0,0 +1,30 @@ +# array-uniq [![Build Status](https://travis-ci.org/sindresorhus/array-uniq.svg?branch=master)](https://travis-ci.org/sindresorhus/array-uniq) + +> Create an array without duplicates + +It's already pretty fast, but will be much faster when [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) becomes available in V8 (especially with large arrays). + + +## Install + +``` +$ npm install --save array-uniq +``` + + +## Usage + +```js +const arrayUniq = require('array-uniq'); + +arrayUniq([1, 1, 2, 3, 3]); +//=> [1, 2, 3] + +arrayUniq(['foo', 'foo', 'bar', 'foo']); +//=> ['foo', 'bar'] +``` + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/code/application_liste/app/node_modules/array-unique/LICENSE b/code/application_liste/app/node_modules/array-unique/LICENSE new file mode 100644 index 0000000..842218c --- /dev/null +++ b/code/application_liste/app/node_modules/array-unique/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2016, Jon Schlinkert + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/array-unique/README.md b/code/application_liste/app/node_modules/array-unique/README.md new file mode 100644 index 0000000..41c8c90 --- /dev/null +++ b/code/application_liste/app/node_modules/array-unique/README.md @@ -0,0 +1,77 @@ +# array-unique [![NPM version](https://img.shields.io/npm/v/array-unique.svg?style=flat)](https://www.npmjs.com/package/array-unique) [![NPM downloads](https://img.shields.io/npm/dm/array-unique.svg?style=flat)](https://npmjs.org/package/array-unique) [![Build Status](https://img.shields.io/travis/jonschlinkert/array-unique.svg?style=flat)](https://travis-ci.org/jonschlinkert/array-unique) + +Remove duplicate values from an array. Fastest ES5 implementation. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save array-unique +``` + +## Usage + +```js +var unique = require('array-unique'); + +var arr = ['a', 'b', 'c', 'c']; +console.log(unique(arr)) //=> ['a', 'b', 'c'] +console.log(arr) //=> ['a', 'b', 'c'] + +/* The above modifies the input array. To prevent that at a slight performance cost: */ +var unique = require("array-unique").immutable; + +var arr = ['a', 'b', 'c', 'c']; +console.log(unique(arr)) //=> ['a', 'b', 'c'] +console.log(arr) //=> ['a', 'b', 'c', 'c'] +``` + +## About + +### Related projects + +* [arr-diff](https://www.npmjs.com/package/arr-diff): Returns an array with only the unique values from the first array, by excluding all… [more](https://github.com/jonschlinkert/arr-diff) | [homepage](https://github.com/jonschlinkert/arr-diff "Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.") +* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.") +* [arr-map](https://www.npmjs.com/package/arr-map): Faster, node.js focused alternative to JavaScript's native array map. | [homepage](https://github.com/jonschlinkert/arr-map "Faster, node.js focused alternative to JavaScript's native array map.") +* [arr-pluck](https://www.npmjs.com/package/arr-pluck): Retrieves the value of a specified property from all elements in the collection. | [homepage](https://github.com/jonschlinkert/arr-pluck "Retrieves the value of a specified property from all elements in the collection.") +* [arr-reduce](https://www.npmjs.com/package/arr-reduce): Fast array reduce that also loops over sparse elements. | [homepage](https://github.com/jonschlinkert/arr-reduce "Fast array reduce that also loops over sparse elements.") +* [arr-union](https://www.npmjs.com/package/arr-union): Combines a list of arrays, returning a single array with unique values, using strict equality… [more](https://github.com/jonschlinkert/arr-union) | [homepage](https://github.com/jonschlinkert/arr-union "Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Building docs + +_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ + +To generate the readme and API documentation with [verb](https://github.com/verbose/verb): + +```sh +$ npm install -g verb verb-generate-readme && verb +``` + +### Running tests + +Install dev dependencies: + +```sh +$ npm install -d && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +### License + +Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT license](https://github.com/jonschlinkert/array-unique/blob/master/LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.28, on July 31, 2016._ \ No newline at end of file diff --git a/code/application_liste/app/node_modules/array-unique/index.js b/code/application_liste/app/node_modules/array-unique/index.js new file mode 100644 index 0000000..7e481e0 --- /dev/null +++ b/code/application_liste/app/node_modules/array-unique/index.js @@ -0,0 +1,43 @@ +/*! + * array-unique + * + * Copyright (c) 2014-2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +module.exports = function unique(arr) { + if (!Array.isArray(arr)) { + throw new TypeError('array-unique expects an array.'); + } + + var len = arr.length; + var i = -1; + + while (i++ < len) { + var j = i + 1; + + for (; j < arr.length; ++j) { + if (arr[i] === arr[j]) { + arr.splice(j--, 1); + } + } + } + return arr; +}; + +module.exports.immutable = function uniqueImmutable(arr) { + if (!Array.isArray(arr)) { + throw new TypeError('array-unique expects an array.'); + } + + var arrLen = arr.length; + var newArr = new Array(arrLen); + + for (var i = 0; i < arrLen; i++) { + newArr[i] = arr[i]; + } + + return module.exports(newArr); +}; diff --git a/code/application_liste/app/node_modules/array-unique/package.json b/code/application_liste/app/node_modules/array-unique/package.json new file mode 100644 index 0000000..a8de302 --- /dev/null +++ b/code/application_liste/app/node_modules/array-unique/package.json @@ -0,0 +1,96 @@ +{ + "_from": "array-unique@^0.3.2", + "_id": "array-unique@0.3.2", + "_inBundle": false, + "_integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "_location": "/array-unique", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "array-unique@^0.3.2", + "name": "array-unique", + "escapedName": "array-unique", + "rawSpec": "^0.3.2", + "saveSpec": null, + "fetchSpec": "^0.3.2" + }, + "_requiredBy": [ + "/braces", + "/extglob", + "/micromatch", + "/nanomatch" + ], + "_resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "_shasum": "a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428", + "_spec": "array-unique@^0.3.2", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\micromatch", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/array-unique/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Remove duplicate values from an array. Fastest ES5 implementation.", + "devDependencies": { + "array-uniq": "^1.0.2", + "benchmarked": "^0.1.3", + "gulp-format-md": "^0.1.9", + "mocha": "^2.5.3", + "should": "^10.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js", + "LICENSE", + "README.md" + ], + "homepage": "https://github.com/jonschlinkert/array-unique", + "keywords": [ + "array", + "unique" + ], + "license": "MIT", + "main": "index.js", + "name": "array-unique", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/array-unique.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "arr-diff", + "arr-union", + "arr-flatten", + "arr-reduce", + "arr-map", + "arr-pluck" + ] + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ], + "lint": { + "reflinks": true + } + }, + "version": "0.3.2" +} diff --git a/code/application_liste/app/node_modules/assign-symbols/LICENSE b/code/application_liste/app/node_modules/assign-symbols/LICENSE new file mode 100644 index 0000000..65f90ac --- /dev/null +++ b/code/application_liste/app/node_modules/assign-symbols/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/assign-symbols/README.md b/code/application_liste/app/node_modules/assign-symbols/README.md new file mode 100644 index 0000000..422729d --- /dev/null +++ b/code/application_liste/app/node_modules/assign-symbols/README.md @@ -0,0 +1,73 @@ +# assign-symbols [![NPM version](https://badge.fury.io/js/assign-symbols.svg)](http://badge.fury.io/js/assign-symbols) + +> Assign the enumerable es6 Symbol properties from an object (or objects) to the first object passed on the arguments. Can be used as a supplement to other extend, assign or merge methods as a polyfill for the Symbols part of the es6 Object.assign method. + +From the [Mozilla Developer docs for Symbol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol): + +> A symbol is a unique and immutable data type and may be used as an identifier for object properties. The symbol object is an implicit object wrapper for the symbol primitive data type. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i assign-symbols --save +``` + +## Usage + +```js +var assignSymbols = require('assign-symbols'); +var obj = {}; + +var one = {}; +var symbolOne = Symbol('aaa'); +one[symbolOne] = 'bbb'; + +var two = {}; +var symbolTwo = Symbol('ccc'); +two[symbolTwo] = 'ddd'; + +assignSymbols(obj, one, two); + +console.log(obj[symbolOne]); +//=> 'bbb' +console.log(obj[symbolTwo]); +//=> 'ddd' +``` + +## Similar projects + +* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties of source objects to a destination object. | [homepage](https://github.com/jonschlinkert/assign-deep) +* [clone-deep](https://www.npmjs.com/package/clone-deep): Recursively (deep) clone JavaScript native types, like Object, Array, RegExp, Date as well as primitives. | [homepage](https://github.com/jonschlinkert/clone-deep) +* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow) +* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep) +* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep) + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/assign-symbols/issues/new). + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on November 06, 2015._ \ No newline at end of file diff --git a/code/application_liste/app/node_modules/assign-symbols/index.js b/code/application_liste/app/node_modules/assign-symbols/index.js new file mode 100644 index 0000000..c08a232 --- /dev/null +++ b/code/application_liste/app/node_modules/assign-symbols/index.js @@ -0,0 +1,40 @@ +/*! + * assign-symbols + * + * Copyright (c) 2015, Jon Schlinkert. + * Licensed under the MIT License. + */ + +'use strict'; + +module.exports = function(receiver, objects) { + if (receiver === null || typeof receiver === 'undefined') { + throw new TypeError('expected first argument to be an object.'); + } + + if (typeof objects === 'undefined' || typeof Symbol === 'undefined') { + return receiver; + } + + if (typeof Object.getOwnPropertySymbols !== 'function') { + return receiver; + } + + var isEnumerable = Object.prototype.propertyIsEnumerable; + var target = Object(receiver); + var len = arguments.length, i = 0; + + while (++i < len) { + var provider = Object(arguments[i]); + var names = Object.getOwnPropertySymbols(provider); + + for (var j = 0; j < names.length; j++) { + var key = names[j]; + + if (isEnumerable.call(provider, key)) { + target[key] = provider[key]; + } + } + } + return target; +}; diff --git a/code/application_liste/app/node_modules/assign-symbols/package.json b/code/application_liste/app/node_modules/assign-symbols/package.json new file mode 100644 index 0000000..98a6d6a --- /dev/null +++ b/code/application_liste/app/node_modules/assign-symbols/package.json @@ -0,0 +1,71 @@ +{ + "_from": "assign-symbols@^1.0.0", + "_id": "assign-symbols@1.0.0", + "_inBundle": false, + "_integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "_location": "/assign-symbols", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "assign-symbols@^1.0.0", + "name": "assign-symbols", + "escapedName": "assign-symbols", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/extend-shallow" + ], + "_resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "_shasum": "59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367", + "_spec": "assign-symbols@^1.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\extend-shallow", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/assign-symbols/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Assign the enumerable es6 Symbol properties from an object (or objects) to the first object passed on the arguments. Can be used as a supplement to other extend, assign or merge methods as a polyfill for the Symbols part of the es6 Object.assign method.", + "devDependencies": { + "mocha": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/assign-symbols", + "keywords": [ + "assign", + "symbols" + ], + "license": "MIT", + "main": "index.js", + "name": "assign-symbols", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/assign-symbols.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "related": { + "list": [ + "assign-deep", + "mixin-deep", + "merge-deep", + "extend-shallow", + "clone-deep" + ] + } + }, + "version": "1.0.0" +} diff --git a/code/application_liste/app/node_modules/ast-types/.travis.yml b/code/application_liste/app/node_modules/ast-types/.travis.yml new file mode 100644 index 0000000..68c03c4 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/.travis.yml @@ -0,0 +1,11 @@ +language: node_js +node_js: + - "12" + - "11" + - "10" + - "9" + - "8" + - "7" + - "6" + +sudo: false diff --git a/code/application_liste/app/node_modules/ast-types/LICENSE b/code/application_liste/app/node_modules/ast-types/LICENSE new file mode 100644 index 0000000..3f9d40b --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2013 Ben Newman + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/ast-types/README.md b/code/application_liste/app/node_modules/ast-types/README.md new file mode 100644 index 0000000..a21bdc6 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/README.md @@ -0,0 +1,512 @@ +# AST Types [![Build Status](https://travis-ci.org/benjamn/ast-types.svg?branch=master)](https://travis-ci.org/benjamn/ast-types) [![Greenkeeper badge](https://badges.greenkeeper.io/benjamn/ast-types.svg)](https://greenkeeper.io/) + +This module provides an efficient, modular, +[Esprima](https://github.com/ariya/esprima)-compatible implementation of +the [abstract syntax +tree](http://en.wikipedia.org/wiki/Abstract_syntax_tree) type hierarchy +pioneered by the [Mozilla Parser +API](https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API). + +Installation +--- + +From NPM: + + npm install ast-types + +From GitHub: + + cd path/to/node_modules + git clone git://github.com/benjamn/ast-types.git + cd ast-types + npm install . + +Basic Usage +--- +```js +import assert from "assert"; +import { + namedTypes as n, + builders as b, +} from "ast-types"; + +var fooId = b.identifier("foo"); +var ifFoo = b.ifStatement(fooId, b.blockStatement([ + b.expressionStatement(b.callExpression(fooId, [])) +])); + +assert.ok(n.IfStatement.check(ifFoo)); +assert.ok(n.Statement.check(ifFoo)); +assert.ok(n.Node.check(ifFoo)); + +assert.ok(n.BlockStatement.check(ifFoo.consequent)); +assert.strictEqual( + ifFoo.consequent.body[0].expression.arguments.length, + 0, +); + +assert.strictEqual(ifFoo.test, fooId); +assert.ok(n.Expression.check(ifFoo.test)); +assert.ok(n.Identifier.check(ifFoo.test)); +assert.ok(!n.Statement.check(ifFoo.test)); +``` + +AST Traversal +--- + +Because it understands the AST type system so thoroughly, this library +is able to provide excellent node iteration and traversal mechanisms. + +If you want complete control over the traversal, and all you need is a way +of enumerating the known fields of your AST nodes and getting their +values, you may be interested in the primitives `getFieldNames` and +`getFieldValue`: +```js +import { + getFieldNames, + getFieldValue, +} from "ast-types"; + +const partialFunExpr = { type: "FunctionExpression" }; + +// Even though partialFunExpr doesn't actually contain all the fields that +// are expected for a FunctionExpression, types.getFieldNames knows: +console.log(getFieldNames(partialFunExpr)); +// [ 'type', 'id', 'params', 'body', 'generator', 'expression', +// 'defaults', 'rest', 'async' ] + +// For fields that have default values, types.getFieldValue will return +// the default if the field is not actually defined. +console.log(getFieldValue(partialFunExpr, "generator")); +// false +``` + +Two more low-level helper functions, `eachField` and `someField`, are +defined in terms of `getFieldNames` and `getFieldValue`: +```js +// Iterate over all defined fields of an object, including those missing +// or undefined, passing each field name and effective value (as returned +// by getFieldValue) to the callback. If the object has no corresponding +// Def, the callback will never be called. +export function eachField(object, callback, context) { + getFieldNames(object).forEach(function(name) { + callback.call(this, name, getFieldValue(object, name)); + }, context); +} + +// Similar to eachField, except that iteration stops as soon as the +// callback returns a truthy value. Like Array.prototype.some, the final +// result is either true or false to indicates whether the callback +// returned true for any element or not. +export function someField(object, callback, context) { + return getFieldNames(object).some(function(name) { + return callback.call(this, name, getFieldValue(object, name)); + }, context); +} +``` + +So here's how you might make a copy of an AST node: +```js +import { eachField } from "ast-types"; +const copy = {}; +eachField(node, function(name, value) { + // Note that undefined fields will be visited too, according to + // the rules associated with node.type, and default field values + // will be substituted if appropriate. + copy[name] = value; +}) +``` + +But that's not all! You can also easily visit entire syntax trees using +the powerful `types.visit` abstraction. + +Here's a trivial example of how you might assert that `arguments.callee` +is never used in `ast`: +```js +import assert from "assert"; +import { + visit, + namedTypes as n, +} from "ast-types"; + +visit(ast, { + // This method will be called for any node with .type "MemberExpression": + visitMemberExpression(path) { + // Visitor methods receive a single argument, a NodePath object + // wrapping the node of interest. + var node = path.node; + + if ( + n.Identifier.check(node.object) && + node.object.name === "arguments" && + n.Identifier.check(node.property) + ) { + assert.notStrictEqual(node.property.name, "callee"); + } + + // It's your responsibility to call this.traverse with some + // NodePath object (usually the one passed into the visitor + // method) before the visitor method returns, or return false to + // indicate that the traversal need not continue any further down + // this subtree. + this.traverse(path); + } +}); +``` + +Here's a slightly more involved example of transforming `...rest` +parameters into browser-runnable ES5 JavaScript: + +```js +import { builders as b, visit } from "ast-types"; + +// Reuse the same AST structure for Array.prototype.slice.call. +var sliceExpr = b.memberExpression( + b.memberExpression( + b.memberExpression( + b.identifier("Array"), + b.identifier("prototype"), + false + ), + b.identifier("slice"), + false + ), + b.identifier("call"), + false +); + +visit(ast, { + // This method will be called for any node whose type is a subtype of + // Function (e.g., FunctionDeclaration, FunctionExpression, and + // ArrowFunctionExpression). Note that types.visit precomputes a + // lookup table from every known type to the appropriate visitor + // method to call for nodes of that type, so the dispatch takes + // constant time. + visitFunction(path) { + // Visitor methods receive a single argument, a NodePath object + // wrapping the node of interest. + const node = path.node; + + // It's your responsibility to call this.traverse with some + // NodePath object (usually the one passed into the visitor + // method) before the visitor method returns, or return false to + // indicate that the traversal need not continue any further down + // this subtree. An assertion will fail if you forget, which is + // awesome, because it means you will never again make the + // disastrous mistake of forgetting to traverse a subtree. Also + // cool: because you can call this method at any point in the + // visitor method, it's up to you whether your traversal is + // pre-order, post-order, or both! + this.traverse(path); + + // This traversal is only concerned with Function nodes that have + // rest parameters. + if (!node.rest) { + return; + } + + // For the purposes of this example, we won't worry about functions + // with Expression bodies. + n.BlockStatement.assert(node.body); + + // Use types.builders to build a variable declaration of the form + // + // var rest = Array.prototype.slice.call(arguments, n); + // + // where `rest` is the name of the rest parameter, and `n` is a + // numeric literal specifying the number of named parameters the + // function takes. + const restVarDecl = b.variableDeclaration("var", [ + b.variableDeclarator( + node.rest, + b.callExpression(sliceExpr, [ + b.identifier("arguments"), + b.literal(node.params.length) + ]) + ) + ]); + + // Similar to doing node.body.body.unshift(restVarDecl), except + // that the other NodePath objects wrapping body statements will + // have their indexes updated to accommodate the new statement. + path.get("body", "body").unshift(restVarDecl); + + // Nullify node.rest now that we have simulated the behavior of + // the rest parameter using ordinary JavaScript. + path.get("rest").replace(null); + + // There's nothing wrong with doing node.rest = null, but I wanted + // to point out that the above statement has the same effect. + assert.strictEqual(node.rest, null); + } +}); +``` + +Here's how you might use `types.visit` to implement a function that +determines if a given function node refers to `this`: + +```js +function usesThis(funcNode) { + n.Function.assert(funcNode); + var result = false; + + visit(funcNode, { + visitThisExpression(path) { + result = true; + + // The quickest way to terminate the traversal is to call + // this.abort(), which throws a special exception (instanceof + // this.AbortRequest) that will be caught in the top-level + // types.visit method, so you don't have to worry about + // catching the exception yourself. + this.abort(); + }, + + visitFunction(path) { + // ThisExpression nodes in nested scopes don't count as `this` + // references for the original function node, so we can safely + // avoid traversing this subtree. + return false; + }, + + visitCallExpression(path) { + const node = path.node; + + // If the function contains CallExpression nodes involving + // super, those expressions will implicitly depend on the + // value of `this`, even though they do not explicitly contain + // any ThisExpression nodes. + if (this.isSuperCallExpression(node)) { + result = true; + this.abort(); // Throws AbortRequest exception. + } + + this.traverse(path); + }, + + // Yes, you can define arbitrary helper methods. + isSuperCallExpression(callExpr) { + n.CallExpression.assert(callExpr); + return this.isSuperIdentifier(callExpr.callee) + || this.isSuperMemberExpression(callExpr.callee); + }, + + // And even helper helper methods! + isSuperIdentifier(node) { + return n.Identifier.check(node.callee) + && node.callee.name === "super"; + }, + + isSuperMemberExpression(node) { + return n.MemberExpression.check(node.callee) + && n.Identifier.check(node.callee.object) + && node.callee.object.name === "super"; + } + }); + + return result; +} +``` + +As you might guess, when an `AbortRequest` is thrown from a subtree, the +exception will propagate from the corresponding calls to `this.traverse` +in the ancestor visitor methods. If you decide you want to cancel the +request, simply catch the exception and call its `.cancel()` method. The +rest of the subtree beneath the `try`-`catch` block will be abandoned, but +the remaining siblings of the ancestor node will still be visited. + +NodePath +--- + +The `NodePath` object passed to visitor methods is a wrapper around an AST +node, and it serves to provide access to the chain of ancestor objects +(all the way back to the root of the AST) and scope information. + +In general, `path.node` refers to the wrapped node, `path.parent.node` +refers to the nearest `Node` ancestor, `path.parent.parent.node` to the +grandparent, and so on. + +Note that `path.node` may not be a direct property value of +`path.parent.node`; for instance, it might be the case that `path.node` is +an element of an array that is a direct child of the parent node: +```js +path.node === path.parent.node.elements[3] +``` +in which case you should know that `path.parentPath` provides +finer-grained access to the complete path of objects (not just the `Node` +ones) from the root of the AST: +```js +// In reality, path.parent is the grandparent of path: +path.parentPath.parentPath === path.parent + +// The path.parentPath object wraps the elements array (note that we use +// .value because the elements array is not a Node): +path.parentPath.value === path.parent.node.elements + +// The path.node object is the fourth element in that array: +path.parentPath.value[3] === path.node + +// Unlike path.node and path.value, which are synonyms because path.node +// is a Node object, path.parentPath.node is distinct from +// path.parentPath.value, because the elements array is not a +// Node. Instead, path.parentPath.node refers to the closest ancestor +// Node, which happens to be the same as path.parent.node: +path.parentPath.node === path.parent.node + +// The path is named for its index in the elements array: +path.name === 3 + +// Likewise, path.parentPath is named for the property by which +// path.parent.node refers to it: +path.parentPath.name === "elements" + +// Putting it all together, we can follow the chain of object references +// from path.parent.node all the way to path.node by accessing each +// property by name: +path.parent.node[path.parentPath.name][path.name] === path.node +``` + +These `NodePath` objects are created during the traversal without +modifying the AST nodes themselves, so it's not a problem if the same node +appears more than once in the AST (like `Array.prototype.slice.call` in +the example above), because it will be visited with a distict `NodePath` +each time it appears. + +Child `NodePath` objects are created lazily, by calling the `.get` method +of a parent `NodePath` object: +```js +// If a NodePath object for the elements array has never been created +// before, it will be created here and cached in the future: +path.get("elements").get(3).value === path.value.elements[3] + +// Alternatively, you can pass multiple property names to .get instead of +// chaining multiple .get calls: +path.get("elements", 0).value === path.value.elements[0] +``` + +`NodePath` objects support a number of useful methods: +```js +// Replace one node with another node: +var fifth = path.get("elements", 4); +fifth.replace(newNode); + +// Now do some stuff that might rearrange the list, and this replacement +// remains safe: +fifth.replace(newerNode); + +// Replace the third element in an array with two new nodes: +path.get("elements", 2).replace( + b.identifier("foo"), + b.thisExpression() +); + +// Remove a node and its parent if it would leave a redundant AST node: +//e.g. var t = 1, y =2; removing the `t` and `y` declarators results in `var undefined`. +path.prune(); //returns the closest parent `NodePath`. + +// Remove a node from a list of nodes: +path.get("elements", 3).replace(); + +// Add three new nodes to the beginning of a list of nodes: +path.get("elements").unshift(a, b, c); + +// Remove and return the first node in a list of nodes: +path.get("elements").shift(); + +// Push two new nodes onto the end of a list of nodes: +path.get("elements").push(d, e); + +// Remove and return the last node in a list of nodes: +path.get("elements").pop(); + +// Insert a new node before/after the seventh node in a list of nodes: +var seventh = path.get("elements", 6); +seventh.insertBefore(newNode); +seventh.insertAfter(newNode); + +// Insert a new element at index 5 in a list of nodes: +path.get("elements").insertAt(5, newNode); +``` + +Scope +--- + +The object exposed as `path.scope` during AST traversals provides +information about variable and function declarations in the scope that +contains `path.node`. See [scope.ts](lib/scope.ts) for its public +interface, which currently includes `.isGlobal`, `.getGlobalScope()`, +`.depth`, `.declares(name)`, `.lookup(name)`, and `.getBindings()`. + +Custom AST Node Types +--- + +The `ast-types` module was designed to be extended. To that end, it +provides a readable, declarative syntax for specifying new AST node types, +based primarily upon the `require("ast-types").Type.def` function: +```js +import { + Type, + builtInTypes, + builders as b, + finalize, +} from "ast-types"; + +const { def } = Type; +const { string } = builtInTypes; + +// Suppose you need a named File type to wrap your Programs. +def("File") + .bases("Node") + .build("name", "program") + .field("name", string) + .field("program", def("Program")); + +// Prevent further modifications to the File type (and any other +// types newly introduced by def(...)). +finalize(); + +// The b.file builder function is now available. It expects two +// arguments, as named by .build("name", "program") above. +const main = b.file("main.js", b.program([ + // Pointless program contents included for extra color. + b.functionDeclaration(b.identifier("succ"), [ + b.identifier("x") + ], b.blockStatement([ + b.returnStatement( + b.binaryExpression( + "+", b.identifier("x"), b.literal(1) + ) + ) + ])) +])); + +assert.strictEqual(main.name, "main.js"); +assert.strictEqual(main.program.body[0].params[0].name, "x"); +// etc. + +// If you pass the wrong type of arguments, or fail to pass enough +// arguments, an AssertionError will be thrown. + +b.file(b.blockStatement([])); +// ==> AssertionError: {"body":[],"type":"BlockStatement","loc":null} does not match type string + +b.file("lib/types.js", b.thisExpression()); +// ==> AssertionError: {"type":"ThisExpression","loc":null} does not match type Program +``` + +The `def` syntax is used to define all the default AST node types found in +[babel-core.ts](def/babel-core.ts), +[babel.ts](def/babel.ts), +[core.ts](def/core.ts), +[es-proposals.ts](def/es-proposals.ts), +[es6.ts](def/es6.ts), +[es7.ts](def/es7.ts), +[es2020.ts](def/es2020.ts), +[esprima.ts](def/esprima.ts), +[flow.ts](def/flow.ts), +[jsx.ts](def/jsx.ts), +[type-annotations.ts](def/type-annotations.ts), +and +[typescripts.ts](def/typescripts.ts), +so you have +no shortage of examples to learn from. diff --git a/code/application_liste/app/node_modules/ast-types/def/babel-core.d.ts b/code/application_liste/app/node_modules/ast-types/def/babel-core.d.ts new file mode 100644 index 0000000..1ef9137 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/def/babel-core.d.ts @@ -0,0 +1,2 @@ +import { Fork } from "../types"; +export default function (fork: Fork): void; diff --git a/code/application_liste/app/node_modules/ast-types/def/babel-core.js b/code/application_liste/app/node_modules/ast-types/def/babel-core.js new file mode 100644 index 0000000..d97c7c0 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/def/babel-core.js @@ -0,0 +1,258 @@ +"use strict";; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var types_1 = __importDefault(require("../lib/types")); +var shared_1 = __importDefault(require("../lib/shared")); +var es7_1 = __importDefault(require("./es7")); +function default_1(fork) { + fork.use(es7_1.default); + var types = fork.use(types_1.default); + var defaults = fork.use(shared_1.default).defaults; + var def = types.Type.def; + var or = types.Type.or; + def("Noop") + .bases("Statement") + .build(); + def("DoExpression") + .bases("Expression") + .build("body") + .field("body", [def("Statement")]); + def("Super") + .bases("Expression") + .build(); + def("BindExpression") + .bases("Expression") + .build("object", "callee") + .field("object", or(def("Expression"), null)) + .field("callee", def("Expression")); + def("Decorator") + .bases("Node") + .build("expression") + .field("expression", def("Expression")); + def("Property") + .field("decorators", or([def("Decorator")], null), defaults["null"]); + def("MethodDefinition") + .field("decorators", or([def("Decorator")], null), defaults["null"]); + def("MetaProperty") + .bases("Expression") + .build("meta", "property") + .field("meta", def("Identifier")) + .field("property", def("Identifier")); + def("ParenthesizedExpression") + .bases("Expression") + .build("expression") + .field("expression", def("Expression")); + def("ImportSpecifier") + .bases("ModuleSpecifier") + .build("imported", "local") + .field("imported", def("Identifier")); + def("ImportDefaultSpecifier") + .bases("ModuleSpecifier") + .build("local"); + def("ImportNamespaceSpecifier") + .bases("ModuleSpecifier") + .build("local"); + def("ExportDefaultDeclaration") + .bases("Declaration") + .build("declaration") + .field("declaration", or(def("Declaration"), def("Expression"))); + def("ExportNamedDeclaration") + .bases("Declaration") + .build("declaration", "specifiers", "source") + .field("declaration", or(def("Declaration"), null)) + .field("specifiers", [def("ExportSpecifier")], defaults.emptyArray) + .field("source", or(def("Literal"), null), defaults["null"]); + def("ExportSpecifier") + .bases("ModuleSpecifier") + .build("local", "exported") + .field("exported", def("Identifier")); + def("ExportNamespaceSpecifier") + .bases("Specifier") + .build("exported") + .field("exported", def("Identifier")); + def("ExportDefaultSpecifier") + .bases("Specifier") + .build("exported") + .field("exported", def("Identifier")); + def("ExportAllDeclaration") + .bases("Declaration") + .build("exported", "source") + .field("exported", or(def("Identifier"), null)) + .field("source", def("Literal")); + def("CommentBlock") + .bases("Comment") + .build("value", /*optional:*/ "leading", "trailing"); + def("CommentLine") + .bases("Comment") + .build("value", /*optional:*/ "leading", "trailing"); + def("Directive") + .bases("Node") + .build("value") + .field("value", def("DirectiveLiteral")); + def("DirectiveLiteral") + .bases("Node", "Expression") + .build("value") + .field("value", String, defaults["use strict"]); + def("InterpreterDirective") + .bases("Node") + .build("value") + .field("value", String); + def("BlockStatement") + .bases("Statement") + .build("body") + .field("body", [def("Statement")]) + .field("directives", [def("Directive")], defaults.emptyArray); + def("Program") + .bases("Node") + .build("body") + .field("body", [def("Statement")]) + .field("directives", [def("Directive")], defaults.emptyArray) + .field("interpreter", or(def("InterpreterDirective"), null), defaults["null"]); + // Split Literal + def("StringLiteral") + .bases("Literal") + .build("value") + .field("value", String); + def("NumericLiteral") + .bases("Literal") + .build("value") + .field("value", Number) + .field("raw", or(String, null), defaults["null"]) + .field("extra", { + rawValue: Number, + raw: String + }, function getDefault() { + return { + rawValue: this.value, + raw: this.value + "" + }; + }); + def("BigIntLiteral") + .bases("Literal") + .build("value") + // Only String really seems appropriate here, since BigInt values + // often exceed the limits of JS numbers. + .field("value", or(String, Number)) + .field("extra", { + rawValue: String, + raw: String + }, function getDefault() { + return { + rawValue: String(this.value), + raw: this.value + "n" + }; + }); + def("NullLiteral") + .bases("Literal") + .build() + .field("value", null, defaults["null"]); + def("BooleanLiteral") + .bases("Literal") + .build("value") + .field("value", Boolean); + def("RegExpLiteral") + .bases("Literal") + .build("pattern", "flags") + .field("pattern", String) + .field("flags", String) + .field("value", RegExp, function () { + return new RegExp(this.pattern, this.flags); + }); + var ObjectExpressionProperty = or(def("Property"), def("ObjectMethod"), def("ObjectProperty"), def("SpreadProperty"), def("SpreadElement")); + // Split Property -> ObjectProperty and ObjectMethod + def("ObjectExpression") + .bases("Expression") + .build("properties") + .field("properties", [ObjectExpressionProperty]); + // ObjectMethod hoist .value properties to own properties + def("ObjectMethod") + .bases("Node", "Function") + .build("kind", "key", "params", "body", "computed") + .field("kind", or("method", "get", "set")) + .field("key", or(def("Literal"), def("Identifier"), def("Expression"))) + .field("params", [def("Pattern")]) + .field("body", def("BlockStatement")) + .field("computed", Boolean, defaults["false"]) + .field("generator", Boolean, defaults["false"]) + .field("async", Boolean, defaults["false"]) + .field("accessibility", // TypeScript + or(def("Literal"), null), defaults["null"]) + .field("decorators", or([def("Decorator")], null), defaults["null"]); + def("ObjectProperty") + .bases("Node") + .build("key", "value") + .field("key", or(def("Literal"), def("Identifier"), def("Expression"))) + .field("value", or(def("Expression"), def("Pattern"))) + .field("accessibility", // TypeScript + or(def("Literal"), null), defaults["null"]) + .field("computed", Boolean, defaults["false"]); + var ClassBodyElement = or(def("MethodDefinition"), def("VariableDeclarator"), def("ClassPropertyDefinition"), def("ClassProperty"), def("ClassPrivateProperty"), def("ClassMethod"), def("ClassPrivateMethod")); + // MethodDefinition -> ClassMethod + def("ClassBody") + .bases("Declaration") + .build("body") + .field("body", [ClassBodyElement]); + def("ClassMethod") + .bases("Declaration", "Function") + .build("kind", "key", "params", "body", "computed", "static") + .field("key", or(def("Literal"), def("Identifier"), def("Expression"))); + def("ClassPrivateMethod") + .bases("Declaration", "Function") + .build("key", "params", "body", "kind", "computed", "static") + .field("key", def("PrivateName")); + ["ClassMethod", + "ClassPrivateMethod", + ].forEach(function (typeName) { + def(typeName) + .field("kind", or("get", "set", "method", "constructor"), function () { return "method"; }) + .field("body", def("BlockStatement")) + .field("computed", Boolean, defaults["false"]) + .field("static", or(Boolean, null), defaults["null"]) + .field("abstract", or(Boolean, null), defaults["null"]) + .field("access", or("public", "private", "protected", null), defaults["null"]) + .field("accessibility", or("public", "private", "protected", null), defaults["null"]) + .field("decorators", or([def("Decorator")], null), defaults["null"]) + .field("optional", or(Boolean, null), defaults["null"]); + }); + def("ClassPrivateProperty") + .bases("ClassProperty") + .build("key", "value") + .field("key", def("PrivateName")) + .field("value", or(def("Expression"), null), defaults["null"]); + def("PrivateName") + .bases("Expression", "Pattern") + .build("id") + .field("id", def("Identifier")); + var ObjectPatternProperty = or(def("Property"), def("PropertyPattern"), def("SpreadPropertyPattern"), def("SpreadProperty"), // Used by Esprima + def("ObjectProperty"), // Babel 6 + def("RestProperty") // Babel 6 + ); + // Split into RestProperty and SpreadProperty + def("ObjectPattern") + .bases("Pattern") + .build("properties") + .field("properties", [ObjectPatternProperty]) + .field("decorators", or([def("Decorator")], null), defaults["null"]); + def("SpreadProperty") + .bases("Node") + .build("argument") + .field("argument", def("Expression")); + def("RestProperty") + .bases("Node") + .build("argument") + .field("argument", def("Expression")); + def("ForAwaitStatement") + .bases("Statement") + .build("left", "right", "body") + .field("left", or(def("VariableDeclaration"), def("Expression"))) + .field("right", def("Expression")) + .field("body", def("Statement")); + // The callee node of a dynamic import(...) expression. + def("Import") + .bases("Expression") + .build(); +} +exports.default = default_1; +module.exports = exports["default"]; diff --git a/code/application_liste/app/node_modules/ast-types/def/babel.d.ts b/code/application_liste/app/node_modules/ast-types/def/babel.d.ts new file mode 100644 index 0000000..1ef9137 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/def/babel.d.ts @@ -0,0 +1,2 @@ +import { Fork } from "../types"; +export default function (fork: Fork): void; diff --git a/code/application_liste/app/node_modules/ast-types/def/babel.js b/code/application_liste/app/node_modules/ast-types/def/babel.js new file mode 100644 index 0000000..5a9816a --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/def/babel.js @@ -0,0 +1,13 @@ +"use strict";; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var babel_core_1 = __importDefault(require("./babel-core")); +var flow_1 = __importDefault(require("./flow")); +function default_1(fork) { + fork.use(babel_core_1.default); + fork.use(flow_1.default); +} +exports.default = default_1; +module.exports = exports["default"]; diff --git a/code/application_liste/app/node_modules/ast-types/def/core.d.ts b/code/application_liste/app/node_modules/ast-types/def/core.d.ts new file mode 100644 index 0000000..1ef9137 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/def/core.d.ts @@ -0,0 +1,2 @@ +import { Fork } from "../types"; +export default function (fork: Fork): void; diff --git a/code/application_liste/app/node_modules/ast-types/def/core.js b/code/application_liste/app/node_modules/ast-types/def/core.js new file mode 100644 index 0000000..a2aa9e5 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/def/core.js @@ -0,0 +1,300 @@ +"use strict";; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var types_1 = __importDefault(require("../lib/types")); +var shared_1 = __importDefault(require("../lib/shared")); +function default_1(fork) { + var types = fork.use(types_1.default); + var Type = types.Type; + var def = Type.def; + var or = Type.or; + var shared = fork.use(shared_1.default); + var defaults = shared.defaults; + var geq = shared.geq; + // Abstract supertype of all syntactic entities that are allowed to have a + // .loc field. + def("Printable") + .field("loc", or(def("SourceLocation"), null), defaults["null"], true); + def("Node") + .bases("Printable") + .field("type", String) + .field("comments", or([def("Comment")], null), defaults["null"], true); + def("SourceLocation") + .field("start", def("Position")) + .field("end", def("Position")) + .field("source", or(String, null), defaults["null"]); + def("Position") + .field("line", geq(1)) + .field("column", geq(0)); + def("File") + .bases("Node") + .build("program", "name") + .field("program", def("Program")) + .field("name", or(String, null), defaults["null"]); + def("Program") + .bases("Node") + .build("body") + .field("body", [def("Statement")]); + def("Function") + .bases("Node") + .field("id", or(def("Identifier"), null), defaults["null"]) + .field("params", [def("Pattern")]) + .field("body", def("BlockStatement")) + .field("generator", Boolean, defaults["false"]) + .field("async", Boolean, defaults["false"]); + def("Statement").bases("Node"); + // The empty .build() here means that an EmptyStatement can be constructed + // (i.e. it's not abstract) but that it needs no arguments. + def("EmptyStatement").bases("Statement").build(); + def("BlockStatement") + .bases("Statement") + .build("body") + .field("body", [def("Statement")]); + // TODO Figure out how to silently coerce Expressions to + // ExpressionStatements where a Statement was expected. + def("ExpressionStatement") + .bases("Statement") + .build("expression") + .field("expression", def("Expression")); + def("IfStatement") + .bases("Statement") + .build("test", "consequent", "alternate") + .field("test", def("Expression")) + .field("consequent", def("Statement")) + .field("alternate", or(def("Statement"), null), defaults["null"]); + def("LabeledStatement") + .bases("Statement") + .build("label", "body") + .field("label", def("Identifier")) + .field("body", def("Statement")); + def("BreakStatement") + .bases("Statement") + .build("label") + .field("label", or(def("Identifier"), null), defaults["null"]); + def("ContinueStatement") + .bases("Statement") + .build("label") + .field("label", or(def("Identifier"), null), defaults["null"]); + def("WithStatement") + .bases("Statement") + .build("object", "body") + .field("object", def("Expression")) + .field("body", def("Statement")); + def("SwitchStatement") + .bases("Statement") + .build("discriminant", "cases", "lexical") + .field("discriminant", def("Expression")) + .field("cases", [def("SwitchCase")]) + .field("lexical", Boolean, defaults["false"]); + def("ReturnStatement") + .bases("Statement") + .build("argument") + .field("argument", or(def("Expression"), null)); + def("ThrowStatement") + .bases("Statement") + .build("argument") + .field("argument", def("Expression")); + def("TryStatement") + .bases("Statement") + .build("block", "handler", "finalizer") + .field("block", def("BlockStatement")) + .field("handler", or(def("CatchClause"), null), function () { + return this.handlers && this.handlers[0] || null; + }) + .field("handlers", [def("CatchClause")], function () { + return this.handler ? [this.handler] : []; + }, true) // Indicates this field is hidden from eachField iteration. + .field("guardedHandlers", [def("CatchClause")], defaults.emptyArray) + .field("finalizer", or(def("BlockStatement"), null), defaults["null"]); + def("CatchClause") + .bases("Node") + .build("param", "guard", "body") + // https://github.com/tc39/proposal-optional-catch-binding + .field("param", or(def("Pattern"), null), defaults["null"]) + .field("guard", or(def("Expression"), null), defaults["null"]) + .field("body", def("BlockStatement")); + def("WhileStatement") + .bases("Statement") + .build("test", "body") + .field("test", def("Expression")) + .field("body", def("Statement")); + def("DoWhileStatement") + .bases("Statement") + .build("body", "test") + .field("body", def("Statement")) + .field("test", def("Expression")); + def("ForStatement") + .bases("Statement") + .build("init", "test", "update", "body") + .field("init", or(def("VariableDeclaration"), def("Expression"), null)) + .field("test", or(def("Expression"), null)) + .field("update", or(def("Expression"), null)) + .field("body", def("Statement")); + def("ForInStatement") + .bases("Statement") + .build("left", "right", "body") + .field("left", or(def("VariableDeclaration"), def("Expression"))) + .field("right", def("Expression")) + .field("body", def("Statement")); + def("DebuggerStatement").bases("Statement").build(); + def("Declaration").bases("Statement"); + def("FunctionDeclaration") + .bases("Function", "Declaration") + .build("id", "params", "body") + .field("id", def("Identifier")); + def("FunctionExpression") + .bases("Function", "Expression") + .build("id", "params", "body"); + def("VariableDeclaration") + .bases("Declaration") + .build("kind", "declarations") + .field("kind", or("var", "let", "const")) + .field("declarations", [def("VariableDeclarator")]); + def("VariableDeclarator") + .bases("Node") + .build("id", "init") + .field("id", def("Pattern")) + .field("init", or(def("Expression"), null), defaults["null"]); + def("Expression").bases("Node"); + def("ThisExpression").bases("Expression").build(); + def("ArrayExpression") + .bases("Expression") + .build("elements") + .field("elements", [or(def("Expression"), null)]); + def("ObjectExpression") + .bases("Expression") + .build("properties") + .field("properties", [def("Property")]); + // TODO Not in the Mozilla Parser API, but used by Esprima. + def("Property") + .bases("Node") // Want to be able to visit Property Nodes. + .build("kind", "key", "value") + .field("kind", or("init", "get", "set")) + .field("key", or(def("Literal"), def("Identifier"))) + .field("value", def("Expression")); + def("SequenceExpression") + .bases("Expression") + .build("expressions") + .field("expressions", [def("Expression")]); + var UnaryOperator = or("-", "+", "!", "~", "typeof", "void", "delete"); + def("UnaryExpression") + .bases("Expression") + .build("operator", "argument", "prefix") + .field("operator", UnaryOperator) + .field("argument", def("Expression")) + // Esprima doesn't bother with this field, presumably because it's + // always true for unary operators. + .field("prefix", Boolean, defaults["true"]); + var BinaryOperator = or("==", "!=", "===", "!==", "<", "<=", ">", ">=", "<<", ">>", ">>>", "+", "-", "*", "/", "%", "**", "&", // TODO Missing from the Parser API. + "|", "^", "in", "instanceof"); + def("BinaryExpression") + .bases("Expression") + .build("operator", "left", "right") + .field("operator", BinaryOperator) + .field("left", def("Expression")) + .field("right", def("Expression")); + var AssignmentOperator = or("=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=", "|=", "^=", "&="); + def("AssignmentExpression") + .bases("Expression") + .build("operator", "left", "right") + .field("operator", AssignmentOperator) + .field("left", or(def("Pattern"), def("MemberExpression"))) + .field("right", def("Expression")); + var UpdateOperator = or("++", "--"); + def("UpdateExpression") + .bases("Expression") + .build("operator", "argument", "prefix") + .field("operator", UpdateOperator) + .field("argument", def("Expression")) + .field("prefix", Boolean); + var LogicalOperator = or("||", "&&"); + def("LogicalExpression") + .bases("Expression") + .build("operator", "left", "right") + .field("operator", LogicalOperator) + .field("left", def("Expression")) + .field("right", def("Expression")); + def("ConditionalExpression") + .bases("Expression") + .build("test", "consequent", "alternate") + .field("test", def("Expression")) + .field("consequent", def("Expression")) + .field("alternate", def("Expression")); + def("NewExpression") + .bases("Expression") + .build("callee", "arguments") + .field("callee", def("Expression")) + // The Mozilla Parser API gives this type as [or(def("Expression"), + // null)], but null values don't really make sense at the call site. + // TODO Report this nonsense. + .field("arguments", [def("Expression")]); + def("CallExpression") + .bases("Expression") + .build("callee", "arguments") + .field("callee", def("Expression")) + // See comment for NewExpression above. + .field("arguments", [def("Expression")]); + def("MemberExpression") + .bases("Expression") + .build("object", "property", "computed") + .field("object", def("Expression")) + .field("property", or(def("Identifier"), def("Expression"))) + .field("computed", Boolean, function () { + var type = this.property.type; + if (type === 'Literal' || + type === 'MemberExpression' || + type === 'BinaryExpression') { + return true; + } + return false; + }); + def("Pattern").bases("Node"); + def("SwitchCase") + .bases("Node") + .build("test", "consequent") + .field("test", or(def("Expression"), null)) + .field("consequent", [def("Statement")]); + def("Identifier") + .bases("Expression", "Pattern") + .build("name") + .field("name", String) + .field("optional", Boolean, defaults["false"]); + def("Literal") + .bases("Expression") + .build("value") + .field("value", or(String, Boolean, null, Number, RegExp)) + .field("regex", or({ + pattern: String, + flags: String + }, null), function () { + if (this.value instanceof RegExp) { + var flags = ""; + if (this.value.ignoreCase) + flags += "i"; + if (this.value.multiline) + flags += "m"; + if (this.value.global) + flags += "g"; + return { + pattern: this.value.source, + flags: flags + }; + } + return null; + }); + // Abstract (non-buildable) comment supertype. Not a Node. + def("Comment") + .bases("Printable") + .field("value", String) + // A .leading comment comes before the node, whereas a .trailing + // comment comes after it. These two fields should not both be true, + // but they might both be false when the comment falls inside a node + // and the node has no children for the comment to lead or trail, + // e.g. { /*dangling*/ }. + .field("leading", Boolean, defaults["true"]) + .field("trailing", Boolean, defaults["false"]); +} +exports.default = default_1; +module.exports = exports["default"]; diff --git a/code/application_liste/app/node_modules/ast-types/def/es-proposals.d.ts b/code/application_liste/app/node_modules/ast-types/def/es-proposals.d.ts new file mode 100644 index 0000000..1ef9137 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/def/es-proposals.d.ts @@ -0,0 +1,2 @@ +import { Fork } from "../types"; +export default function (fork: Fork): void; diff --git a/code/application_liste/app/node_modules/ast-types/def/es-proposals.js b/code/application_liste/app/node_modules/ast-types/def/es-proposals.js new file mode 100644 index 0000000..a9431d6 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/def/es-proposals.js @@ -0,0 +1,35 @@ +"use strict";; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var types_1 = __importDefault(require("../lib/types")); +var shared_1 = __importDefault(require("../lib/shared")); +var core_1 = __importDefault(require("./core")); +function default_1(fork) { + fork.use(core_1.default); + var types = fork.use(types_1.default); + var Type = types.Type; + var def = types.Type.def; + var or = Type.or; + var shared = fork.use(shared_1.default); + var defaults = shared.defaults; + // https://github.com/tc39/proposal-optional-chaining + // `a?.b` as per https://github.com/estree/estree/issues/146 + def("OptionalMemberExpression") + .bases("MemberExpression") + .build("object", "property", "computed", "optional") + .field("optional", Boolean, defaults["true"]); + // a?.b() + def("OptionalCallExpression") + .bases("CallExpression") + .build("callee", "arguments", "optional") + .field("optional", Boolean, defaults["true"]); + // https://github.com/tc39/proposal-nullish-coalescing + // `a ?? b` as per https://github.com/babel/babylon/pull/761/files + var LogicalOperator = or("||", "&&", "??"); + def("LogicalExpression") + .field("operator", LogicalOperator); +} +exports.default = default_1; +module.exports = exports["default"]; diff --git a/code/application_liste/app/node_modules/ast-types/def/es2020.d.ts b/code/application_liste/app/node_modules/ast-types/def/es2020.d.ts new file mode 100644 index 0000000..1ef9137 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/def/es2020.d.ts @@ -0,0 +1,2 @@ +import { Fork } from "../types"; +export default function (fork: Fork): void; diff --git a/code/application_liste/app/node_modules/ast-types/def/es2020.js b/code/application_liste/app/node_modules/ast-types/def/es2020.js new file mode 100644 index 0000000..86fce65 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/def/es2020.js @@ -0,0 +1,18 @@ +"use strict";; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var es7_1 = __importDefault(require("./es7")); +var types_1 = __importDefault(require("../lib/types")); +function default_1(fork) { + fork.use(es7_1.default); + var types = fork.use(types_1.default); + var def = types.Type.def; + def("ImportExpression") + .bases("Expression") + .build("source") + .field("source", def("Expression")); +} +exports.default = default_1; +module.exports = exports["default"]; diff --git a/code/application_liste/app/node_modules/ast-types/def/es6.d.ts b/code/application_liste/app/node_modules/ast-types/def/es6.d.ts new file mode 100644 index 0000000..1ef9137 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/def/es6.d.ts @@ -0,0 +1,2 @@ +import { Fork } from "../types"; +export default function (fork: Fork): void; diff --git a/code/application_liste/app/node_modules/ast-types/def/es6.js b/code/application_liste/app/node_modules/ast-types/def/es6.js new file mode 100644 index 0000000..56291af --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/def/es6.js @@ -0,0 +1,212 @@ +"use strict";; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var core_1 = __importDefault(require("./core")); +var types_1 = __importDefault(require("../lib/types")); +var shared_1 = __importDefault(require("../lib/shared")); +function default_1(fork) { + fork.use(core_1.default); + var types = fork.use(types_1.default); + var def = types.Type.def; + var or = types.Type.or; + var defaults = fork.use(shared_1.default).defaults; + def("Function") + .field("generator", Boolean, defaults["false"]) + .field("expression", Boolean, defaults["false"]) + .field("defaults", [or(def("Expression"), null)], defaults.emptyArray) + // TODO This could be represented as a RestElement in .params. + .field("rest", or(def("Identifier"), null), defaults["null"]); + // The ESTree way of representing a ...rest parameter. + def("RestElement") + .bases("Pattern") + .build("argument") + .field("argument", def("Pattern")) + .field("typeAnnotation", // for Babylon. Flow parser puts it on the identifier + or(def("TypeAnnotation"), def("TSTypeAnnotation"), null), defaults["null"]); + def("SpreadElementPattern") + .bases("Pattern") + .build("argument") + .field("argument", def("Pattern")); + def("FunctionDeclaration") + .build("id", "params", "body", "generator", "expression"); + def("FunctionExpression") + .build("id", "params", "body", "generator", "expression"); + // The Parser API calls this ArrowExpression, but Esprima and all other + // actual parsers use ArrowFunctionExpression. + def("ArrowFunctionExpression") + .bases("Function", "Expression") + .build("params", "body", "expression") + // The forced null value here is compatible with the overridden + // definition of the "id" field in the Function interface. + .field("id", null, defaults["null"]) + // Arrow function bodies are allowed to be expressions. + .field("body", or(def("BlockStatement"), def("Expression"))) + // The current spec forbids arrow generators, so I have taken the + // liberty of enforcing that. TODO Report this. + .field("generator", false, defaults["false"]); + def("ForOfStatement") + .bases("Statement") + .build("left", "right", "body") + .field("left", or(def("VariableDeclaration"), def("Pattern"))) + .field("right", def("Expression")) + .field("body", def("Statement")); + def("YieldExpression") + .bases("Expression") + .build("argument", "delegate") + .field("argument", or(def("Expression"), null)) + .field("delegate", Boolean, defaults["false"]); + def("GeneratorExpression") + .bases("Expression") + .build("body", "blocks", "filter") + .field("body", def("Expression")) + .field("blocks", [def("ComprehensionBlock")]) + .field("filter", or(def("Expression"), null)); + def("ComprehensionExpression") + .bases("Expression") + .build("body", "blocks", "filter") + .field("body", def("Expression")) + .field("blocks", [def("ComprehensionBlock")]) + .field("filter", or(def("Expression"), null)); + def("ComprehensionBlock") + .bases("Node") + .build("left", "right", "each") + .field("left", def("Pattern")) + .field("right", def("Expression")) + .field("each", Boolean); + def("Property") + .field("key", or(def("Literal"), def("Identifier"), def("Expression"))) + .field("value", or(def("Expression"), def("Pattern"))) + .field("method", Boolean, defaults["false"]) + .field("shorthand", Boolean, defaults["false"]) + .field("computed", Boolean, defaults["false"]); + def("ObjectProperty") + .field("shorthand", Boolean, defaults["false"]); + def("PropertyPattern") + .bases("Pattern") + .build("key", "pattern") + .field("key", or(def("Literal"), def("Identifier"), def("Expression"))) + .field("pattern", def("Pattern")) + .field("computed", Boolean, defaults["false"]); + def("ObjectPattern") + .bases("Pattern") + .build("properties") + .field("properties", [or(def("PropertyPattern"), def("Property"))]); + def("ArrayPattern") + .bases("Pattern") + .build("elements") + .field("elements", [or(def("Pattern"), null)]); + def("MethodDefinition") + .bases("Declaration") + .build("kind", "key", "value", "static") + .field("kind", or("constructor", "method", "get", "set")) + .field("key", def("Expression")) + .field("value", def("Function")) + .field("computed", Boolean, defaults["false"]) + .field("static", Boolean, defaults["false"]); + def("SpreadElement") + .bases("Node") + .build("argument") + .field("argument", def("Expression")); + def("ArrayExpression") + .field("elements", [or(def("Expression"), def("SpreadElement"), def("RestElement"), null)]); + def("NewExpression") + .field("arguments", [or(def("Expression"), def("SpreadElement"))]); + def("CallExpression") + .field("arguments", [or(def("Expression"), def("SpreadElement"))]); + // Note: this node type is *not* an AssignmentExpression with a Pattern on + // the left-hand side! The existing AssignmentExpression type already + // supports destructuring assignments. AssignmentPattern nodes may appear + // wherever a Pattern is allowed, and the right-hand side represents a + // default value to be destructured against the left-hand side, if no + // value is otherwise provided. For example: default parameter values. + def("AssignmentPattern") + .bases("Pattern") + .build("left", "right") + .field("left", def("Pattern")) + .field("right", def("Expression")); + var ClassBodyElement = or(def("MethodDefinition"), def("VariableDeclarator"), def("ClassPropertyDefinition"), def("ClassProperty")); + def("ClassProperty") + .bases("Declaration") + .build("key") + .field("key", or(def("Literal"), def("Identifier"), def("Expression"))) + .field("computed", Boolean, defaults["false"]); + def("ClassPropertyDefinition") // static property + .bases("Declaration") + .build("definition") + // Yes, Virginia, circular definitions are permitted. + .field("definition", ClassBodyElement); + def("ClassBody") + .bases("Declaration") + .build("body") + .field("body", [ClassBodyElement]); + def("ClassDeclaration") + .bases("Declaration") + .build("id", "body", "superClass") + .field("id", or(def("Identifier"), null)) + .field("body", def("ClassBody")) + .field("superClass", or(def("Expression"), null), defaults["null"]); + def("ClassExpression") + .bases("Expression") + .build("id", "body", "superClass") + .field("id", or(def("Identifier"), null), defaults["null"]) + .field("body", def("ClassBody")) + .field("superClass", or(def("Expression"), null), defaults["null"]); + // Specifier and ModuleSpecifier are abstract non-standard types + // introduced for definitional convenience. + def("Specifier").bases("Node"); + // This supertype is shared/abused by both def/babel.js and + // def/esprima.js. In the future, it will be possible to load only one set + // of definitions appropriate for a given parser, but until then we must + // rely on default functions to reconcile the conflicting AST formats. + def("ModuleSpecifier") + .bases("Specifier") + // This local field is used by Babel/Acorn. It should not technically + // be optional in the Babel/Acorn AST format, but it must be optional + // in the Esprima AST format. + .field("local", or(def("Identifier"), null), defaults["null"]) + // The id and name fields are used by Esprima. The id field should not + // technically be optional in the Esprima AST format, but it must be + // optional in the Babel/Acorn AST format. + .field("id", or(def("Identifier"), null), defaults["null"]) + .field("name", or(def("Identifier"), null), defaults["null"]); + // Like ModuleSpecifier, except type:"ImportSpecifier" and buildable. + // import {} from ...; + def("ImportSpecifier") + .bases("ModuleSpecifier") + .build("id", "name"); + // import <* as id> from ...; + def("ImportNamespaceSpecifier") + .bases("ModuleSpecifier") + .build("id"); + // import from ...; + def("ImportDefaultSpecifier") + .bases("ModuleSpecifier") + .build("id"); + def("ImportDeclaration") + .bases("Declaration") + .build("specifiers", "source", "importKind") + .field("specifiers", [or(def("ImportSpecifier"), def("ImportNamespaceSpecifier"), def("ImportDefaultSpecifier"))], defaults.emptyArray) + .field("source", def("Literal")) + .field("importKind", or("value", "type"), function () { + return "value"; + }); + def("TaggedTemplateExpression") + .bases("Expression") + .build("tag", "quasi") + .field("tag", def("Expression")) + .field("quasi", def("TemplateLiteral")); + def("TemplateLiteral") + .bases("Expression") + .build("quasis", "expressions") + .field("quasis", [def("TemplateElement")]) + .field("expressions", [def("Expression")]); + def("TemplateElement") + .bases("Node") + .build("value", "tail") + .field("value", { "cooked": String, "raw": String }) + .field("tail", Boolean); +} +exports.default = default_1; +module.exports = exports["default"]; diff --git a/code/application_liste/app/node_modules/ast-types/def/es7.d.ts b/code/application_liste/app/node_modules/ast-types/def/es7.d.ts new file mode 100644 index 0000000..1ef9137 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/def/es7.d.ts @@ -0,0 +1,2 @@ +import { Fork } from "../types"; +export default function (fork: Fork): void; diff --git a/code/application_liste/app/node_modules/ast-types/def/es7.js b/code/application_liste/app/node_modules/ast-types/def/es7.js new file mode 100644 index 0000000..9da0139 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/def/es7.js @@ -0,0 +1,36 @@ +"use strict";; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var es6_1 = __importDefault(require("./es6")); +var types_1 = __importDefault(require("../lib/types")); +var shared_1 = __importDefault(require("../lib/shared")); +function default_1(fork) { + fork.use(es6_1.default); + var types = fork.use(types_1.default); + var def = types.Type.def; + var or = types.Type.or; + var defaults = fork.use(shared_1.default).defaults; + def("Function") + .field("async", Boolean, defaults["false"]); + def("SpreadProperty") + .bases("Node") + .build("argument") + .field("argument", def("Expression")); + def("ObjectExpression") + .field("properties", [or(def("Property"), def("SpreadProperty"), def("SpreadElement"))]); + def("SpreadPropertyPattern") + .bases("Pattern") + .build("argument") + .field("argument", def("Pattern")); + def("ObjectPattern") + .field("properties", [or(def("Property"), def("PropertyPattern"), def("SpreadPropertyPattern"))]); + def("AwaitExpression") + .bases("Expression") + .build("argument", "all") + .field("argument", or(def("Expression"), null)) + .field("all", Boolean, defaults["false"]); +} +exports.default = default_1; +module.exports = exports["default"]; diff --git a/code/application_liste/app/node_modules/ast-types/def/esNext.d.ts b/code/application_liste/app/node_modules/ast-types/def/esNext.d.ts new file mode 100644 index 0000000..1ef9137 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/def/esNext.d.ts @@ -0,0 +1,2 @@ +import { Fork } from "../types"; +export default function (fork: Fork): void; diff --git a/code/application_liste/app/node_modules/ast-types/def/esNext.js b/code/application_liste/app/node_modules/ast-types/def/esNext.js new file mode 100644 index 0000000..954af9c --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/def/esNext.js @@ -0,0 +1,57 @@ +"use strict";; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var es6_1 = __importDefault(require("./es6")); +var types_1 = __importDefault(require("../lib/types")); +var shared_1 = __importDefault(require("../lib/shared")); +function default_1(fork) { + fork.use(es6_1.default); + var types = fork.use(types_1.default); + var def = types.Type.def; + var or = types.Type.or; + var defaults = fork.use(shared_1.default).defaults; + def("SpreadProperty") + .bases("Node") + .build("argument") + .field("argument", def("Expression")); + def("ObjectExpression") + .field("properties", [or(def("Property"), def("SpreadProperty"), def("SpreadElement"))]); + def("SpreadPropertyPattern") + .bases("Pattern") + .build("argument") + .field("argument", def("Pattern")); + def("ObjectPattern") + .field("properties", [or(def("Property"), def("PropertyPattern"), def("SpreadPropertyPattern"))]); + def("Function") + .field("async", Boolean, defaults["false"]); + def("AwaitExpression") + .bases("Expression") + .build("argument", "all") + .field("argument", or(def("Expression"), null)) + .field("all", Boolean, defaults["false"]); + // Dynamic import(stringExpression) + def("ImportExpression") + .bases("Expression") + .build("source") + .field("source", def("Expression")); + // https://github.com/tc39/proposal-optional-chaining + // `a?.b` as per https://github.com/estree/estree/issues/146 + def("OptionalMemberExpression") + .bases("MemberExpression") + .build("object", "property", "computed", "optional") + .field("optional", Boolean, defaults["true"]); + // a?.b() + def("OptionalCallExpression") + .bases("CallExpression") + .build("callee", "arguments", "optional") + .field("optional", Boolean, defaults["true"]); + // https://github.com/tc39/proposal-nullish-coalescing + // `a ?? b` as per https://github.com/babel/babylon/pull/761/files + var LogicalOperator = or("||", "&&", "??"); + def("LogicalExpression") + .field("operator", LogicalOperator); +} +exports.default = default_1; +module.exports = exports["default"]; diff --git a/code/application_liste/app/node_modules/ast-types/def/esprima.d.ts b/code/application_liste/app/node_modules/ast-types/def/esprima.d.ts new file mode 100644 index 0000000..1ef9137 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/def/esprima.d.ts @@ -0,0 +1,2 @@ +import { Fork } from "../types"; +export default function (fork: Fork): void; diff --git a/code/application_liste/app/node_modules/ast-types/def/esprima.js b/code/application_liste/app/node_modules/ast-types/def/esprima.js new file mode 100644 index 0000000..1684132 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/def/esprima.js @@ -0,0 +1,51 @@ +"use strict";; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var es7_1 = __importDefault(require("./es7")); +var types_1 = __importDefault(require("../lib/types")); +var shared_1 = __importDefault(require("../lib/shared")); +function default_1(fork) { + fork.use(es7_1.default); + var types = fork.use(types_1.default); + var defaults = fork.use(shared_1.default).defaults; + var def = types.Type.def; + var or = types.Type.or; + def("VariableDeclaration") + .field("declarations", [or(def("VariableDeclarator"), def("Identifier") // Esprima deviation. + )]); + def("Property") + .field("value", or(def("Expression"), def("Pattern") // Esprima deviation. + )); + def("ArrayPattern") + .field("elements", [or(def("Pattern"), def("SpreadElement"), null)]); + def("ObjectPattern") + .field("properties", [or(def("Property"), def("PropertyPattern"), def("SpreadPropertyPattern"), def("SpreadProperty") // Used by Esprima. + )]); + // Like ModuleSpecifier, except type:"ExportSpecifier" and buildable. + // export {} [from ...]; + def("ExportSpecifier") + .bases("ModuleSpecifier") + .build("id", "name"); + // export <*> from ...; + def("ExportBatchSpecifier") + .bases("Specifier") + .build(); + def("ExportDeclaration") + .bases("Declaration") + .build("default", "declaration", "specifiers", "source") + .field("default", Boolean) + .field("declaration", or(def("Declaration"), def("Expression"), // Implies default. + null)) + .field("specifiers", [or(def("ExportSpecifier"), def("ExportBatchSpecifier"))], defaults.emptyArray) + .field("source", or(def("Literal"), null), defaults["null"]); + def("Block") + .bases("Comment") + .build("value", /*optional:*/ "leading", "trailing"); + def("Line") + .bases("Comment") + .build("value", /*optional:*/ "leading", "trailing"); +} +exports.default = default_1; +module.exports = exports["default"]; diff --git a/code/application_liste/app/node_modules/ast-types/def/flow.d.ts b/code/application_liste/app/node_modules/ast-types/def/flow.d.ts new file mode 100644 index 0000000..1ef9137 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/def/flow.d.ts @@ -0,0 +1,2 @@ +import { Fork } from "../types"; +export default function (fork: Fork): void; diff --git a/code/application_liste/app/node_modules/ast-types/def/flow.js b/code/application_liste/app/node_modules/ast-types/def/flow.js new file mode 100644 index 0000000..b8f9358 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/def/flow.js @@ -0,0 +1,294 @@ +"use strict";; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var es7_1 = __importDefault(require("./es7")); +var type_annotations_1 = __importDefault(require("./type-annotations")); +var types_1 = __importDefault(require("../lib/types")); +var shared_1 = __importDefault(require("../lib/shared")); +function default_1(fork) { + fork.use(es7_1.default); + fork.use(type_annotations_1.default); + var types = fork.use(types_1.default); + var def = types.Type.def; + var or = types.Type.or; + var defaults = fork.use(shared_1.default).defaults; + // Base types + def("Flow").bases("Node"); + def("FlowType").bases("Flow"); + // Type annotations + def("AnyTypeAnnotation") + .bases("FlowType") + .build(); + def("EmptyTypeAnnotation") + .bases("FlowType") + .build(); + def("MixedTypeAnnotation") + .bases("FlowType") + .build(); + def("VoidTypeAnnotation") + .bases("FlowType") + .build(); + def("NumberTypeAnnotation") + .bases("FlowType") + .build(); + def("NumberLiteralTypeAnnotation") + .bases("FlowType") + .build("value", "raw") + .field("value", Number) + .field("raw", String); + // Babylon 6 differs in AST from Flow + // same as NumberLiteralTypeAnnotation + def("NumericLiteralTypeAnnotation") + .bases("FlowType") + .build("value", "raw") + .field("value", Number) + .field("raw", String); + def("StringTypeAnnotation") + .bases("FlowType") + .build(); + def("StringLiteralTypeAnnotation") + .bases("FlowType") + .build("value", "raw") + .field("value", String) + .field("raw", String); + def("BooleanTypeAnnotation") + .bases("FlowType") + .build(); + def("BooleanLiteralTypeAnnotation") + .bases("FlowType") + .build("value", "raw") + .field("value", Boolean) + .field("raw", String); + def("TypeAnnotation") + .bases("Node") + .build("typeAnnotation") + .field("typeAnnotation", def("FlowType")); + def("NullableTypeAnnotation") + .bases("FlowType") + .build("typeAnnotation") + .field("typeAnnotation", def("FlowType")); + def("NullLiteralTypeAnnotation") + .bases("FlowType") + .build(); + def("NullTypeAnnotation") + .bases("FlowType") + .build(); + def("ThisTypeAnnotation") + .bases("FlowType") + .build(); + def("ExistsTypeAnnotation") + .bases("FlowType") + .build(); + def("ExistentialTypeParam") + .bases("FlowType") + .build(); + def("FunctionTypeAnnotation") + .bases("FlowType") + .build("params", "returnType", "rest", "typeParameters") + .field("params", [def("FunctionTypeParam")]) + .field("returnType", def("FlowType")) + .field("rest", or(def("FunctionTypeParam"), null)) + .field("typeParameters", or(def("TypeParameterDeclaration"), null)); + def("FunctionTypeParam") + .bases("Node") + .build("name", "typeAnnotation", "optional") + .field("name", def("Identifier")) + .field("typeAnnotation", def("FlowType")) + .field("optional", Boolean); + def("ArrayTypeAnnotation") + .bases("FlowType") + .build("elementType") + .field("elementType", def("FlowType")); + def("ObjectTypeAnnotation") + .bases("FlowType") + .build("properties", "indexers", "callProperties") + .field("properties", [ + or(def("ObjectTypeProperty"), def("ObjectTypeSpreadProperty")) + ]) + .field("indexers", [def("ObjectTypeIndexer")], defaults.emptyArray) + .field("callProperties", [def("ObjectTypeCallProperty")], defaults.emptyArray) + .field("inexact", or(Boolean, void 0), defaults["undefined"]) + .field("exact", Boolean, defaults["false"]) + .field("internalSlots", [def("ObjectTypeInternalSlot")], defaults.emptyArray); + def("Variance") + .bases("Node") + .build("kind") + .field("kind", or("plus", "minus")); + var LegacyVariance = or(def("Variance"), "plus", "minus", null); + def("ObjectTypeProperty") + .bases("Node") + .build("key", "value", "optional") + .field("key", or(def("Literal"), def("Identifier"))) + .field("value", def("FlowType")) + .field("optional", Boolean) + .field("variance", LegacyVariance, defaults["null"]); + def("ObjectTypeIndexer") + .bases("Node") + .build("id", "key", "value") + .field("id", def("Identifier")) + .field("key", def("FlowType")) + .field("value", def("FlowType")) + .field("variance", LegacyVariance, defaults["null"]); + def("ObjectTypeCallProperty") + .bases("Node") + .build("value") + .field("value", def("FunctionTypeAnnotation")) + .field("static", Boolean, defaults["false"]); + def("QualifiedTypeIdentifier") + .bases("Node") + .build("qualification", "id") + .field("qualification", or(def("Identifier"), def("QualifiedTypeIdentifier"))) + .field("id", def("Identifier")); + def("GenericTypeAnnotation") + .bases("FlowType") + .build("id", "typeParameters") + .field("id", or(def("Identifier"), def("QualifiedTypeIdentifier"))) + .field("typeParameters", or(def("TypeParameterInstantiation"), null)); + def("MemberTypeAnnotation") + .bases("FlowType") + .build("object", "property") + .field("object", def("Identifier")) + .field("property", or(def("MemberTypeAnnotation"), def("GenericTypeAnnotation"))); + def("UnionTypeAnnotation") + .bases("FlowType") + .build("types") + .field("types", [def("FlowType")]); + def("IntersectionTypeAnnotation") + .bases("FlowType") + .build("types") + .field("types", [def("FlowType")]); + def("TypeofTypeAnnotation") + .bases("FlowType") + .build("argument") + .field("argument", def("FlowType")); + def("ObjectTypeSpreadProperty") + .bases("Node") + .build("argument") + .field("argument", def("FlowType")); + def("ObjectTypeInternalSlot") + .bases("Node") + .build("id", "value", "optional", "static", "method") + .field("id", def("Identifier")) + .field("value", def("FlowType")) + .field("optional", Boolean) + .field("static", Boolean) + .field("method", Boolean); + def("TypeParameterDeclaration") + .bases("Node") + .build("params") + .field("params", [def("TypeParameter")]); + def("TypeParameterInstantiation") + .bases("Node") + .build("params") + .field("params", [def("FlowType")]); + def("TypeParameter") + .bases("FlowType") + .build("name", "variance", "bound") + .field("name", String) + .field("variance", LegacyVariance, defaults["null"]) + .field("bound", or(def("TypeAnnotation"), null), defaults["null"]); + def("ClassProperty") + .field("variance", LegacyVariance, defaults["null"]); + def("ClassImplements") + .bases("Node") + .build("id") + .field("id", def("Identifier")) + .field("superClass", or(def("Expression"), null), defaults["null"]) + .field("typeParameters", or(def("TypeParameterInstantiation"), null), defaults["null"]); + def("InterfaceTypeAnnotation") + .bases("FlowType") + .build("body", "extends") + .field("body", def("ObjectTypeAnnotation")) + .field("extends", or([def("InterfaceExtends")], null), defaults["null"]); + def("InterfaceDeclaration") + .bases("Declaration") + .build("id", "body", "extends") + .field("id", def("Identifier")) + .field("typeParameters", or(def("TypeParameterDeclaration"), null), defaults["null"]) + .field("body", def("ObjectTypeAnnotation")) + .field("extends", [def("InterfaceExtends")]); + def("DeclareInterface") + .bases("InterfaceDeclaration") + .build("id", "body", "extends"); + def("InterfaceExtends") + .bases("Node") + .build("id") + .field("id", def("Identifier")) + .field("typeParameters", or(def("TypeParameterInstantiation"), null), defaults["null"]); + def("TypeAlias") + .bases("Declaration") + .build("id", "typeParameters", "right") + .field("id", def("Identifier")) + .field("typeParameters", or(def("TypeParameterDeclaration"), null)) + .field("right", def("FlowType")); + def("OpaqueType") + .bases("Declaration") + .build("id", "typeParameters", "impltype", "supertype") + .field("id", def("Identifier")) + .field("typeParameters", or(def("TypeParameterDeclaration"), null)) + .field("impltype", def("FlowType")) + .field("supertype", def("FlowType")); + def("DeclareTypeAlias") + .bases("TypeAlias") + .build("id", "typeParameters", "right"); + def("DeclareOpaqueType") + .bases("TypeAlias") + .build("id", "typeParameters", "supertype"); + def("TypeCastExpression") + .bases("Expression") + .build("expression", "typeAnnotation") + .field("expression", def("Expression")) + .field("typeAnnotation", def("TypeAnnotation")); + def("TupleTypeAnnotation") + .bases("FlowType") + .build("types") + .field("types", [def("FlowType")]); + def("DeclareVariable") + .bases("Statement") + .build("id") + .field("id", def("Identifier")); + def("DeclareFunction") + .bases("Statement") + .build("id") + .field("id", def("Identifier")); + def("DeclareClass") + .bases("InterfaceDeclaration") + .build("id"); + def("DeclareModule") + .bases("Statement") + .build("id", "body") + .field("id", or(def("Identifier"), def("Literal"))) + .field("body", def("BlockStatement")); + def("DeclareModuleExports") + .bases("Statement") + .build("typeAnnotation") + .field("typeAnnotation", def("TypeAnnotation")); + def("DeclareExportDeclaration") + .bases("Declaration") + .build("default", "declaration", "specifiers", "source") + .field("default", Boolean) + .field("declaration", or(def("DeclareVariable"), def("DeclareFunction"), def("DeclareClass"), def("FlowType"), // Implies default. + null)) + .field("specifiers", [or(def("ExportSpecifier"), def("ExportBatchSpecifier"))], defaults.emptyArray) + .field("source", or(def("Literal"), null), defaults["null"]); + def("DeclareExportAllDeclaration") + .bases("Declaration") + .build("source") + .field("source", or(def("Literal"), null), defaults["null"]); + def("FlowPredicate").bases("Flow"); + def("InferredPredicate") + .bases("FlowPredicate") + .build(); + def("DeclaredPredicate") + .bases("FlowPredicate") + .build("value") + .field("value", def("Expression")); + def("CallExpression") + .field("typeArguments", or(null, def("TypeParameterInstantiation")), defaults["null"]); + def("NewExpression") + .field("typeArguments", or(null, def("TypeParameterInstantiation")), defaults["null"]); +} +exports.default = default_1; +module.exports = exports["default"]; diff --git a/code/application_liste/app/node_modules/ast-types/def/jsx.d.ts b/code/application_liste/app/node_modules/ast-types/def/jsx.d.ts new file mode 100644 index 0000000..1ef9137 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/def/jsx.d.ts @@ -0,0 +1,2 @@ +import { Fork } from "../types"; +export default function (fork: Fork): void; diff --git a/code/application_liste/app/node_modules/ast-types/def/jsx.js b/code/application_liste/app/node_modules/ast-types/def/jsx.js new file mode 100644 index 0000000..f6fb42d --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/def/jsx.js @@ -0,0 +1,105 @@ +"use strict";; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var es7_1 = __importDefault(require("./es7")); +var types_1 = __importDefault(require("../lib/types")); +var shared_1 = __importDefault(require("../lib/shared")); +function default_1(fork) { + fork.use(es7_1.default); + var types = fork.use(types_1.default); + var def = types.Type.def; + var or = types.Type.or; + var defaults = fork.use(shared_1.default).defaults; + def("JSXAttribute") + .bases("Node") + .build("name", "value") + .field("name", or(def("JSXIdentifier"), def("JSXNamespacedName"))) + .field("value", or(def("Literal"), // attr="value" + def("JSXExpressionContainer"), // attr={value} + null // attr= or just attr + ), defaults["null"]); + def("JSXIdentifier") + .bases("Identifier") + .build("name") + .field("name", String); + def("JSXNamespacedName") + .bases("Node") + .build("namespace", "name") + .field("namespace", def("JSXIdentifier")) + .field("name", def("JSXIdentifier")); + def("JSXMemberExpression") + .bases("MemberExpression") + .build("object", "property") + .field("object", or(def("JSXIdentifier"), def("JSXMemberExpression"))) + .field("property", def("JSXIdentifier")) + .field("computed", Boolean, defaults.false); + var JSXElementName = or(def("JSXIdentifier"), def("JSXNamespacedName"), def("JSXMemberExpression")); + def("JSXSpreadAttribute") + .bases("Node") + .build("argument") + .field("argument", def("Expression")); + var JSXAttributes = [or(def("JSXAttribute"), def("JSXSpreadAttribute"))]; + def("JSXExpressionContainer") + .bases("Expression") + .build("expression") + .field("expression", def("Expression")); + def("JSXElement") + .bases("Expression") + .build("openingElement", "closingElement", "children") + .field("openingElement", def("JSXOpeningElement")) + .field("closingElement", or(def("JSXClosingElement"), null), defaults["null"]) + .field("children", [or(def("JSXElement"), def("JSXExpressionContainer"), def("JSXFragment"), def("JSXText"), def("Literal") // TODO Esprima should return JSXText instead. + )], defaults.emptyArray) + .field("name", JSXElementName, function () { + // Little-known fact: the `this` object inside a default function + // is none other than the partially-built object itself, and any + // fields initialized directly from builder function arguments + // (like openingElement, closingElement, and children) are + // guaranteed to be available. + return this.openingElement.name; + }, true) // hidden from traversal + .field("selfClosing", Boolean, function () { + return this.openingElement.selfClosing; + }, true) // hidden from traversal + .field("attributes", JSXAttributes, function () { + return this.openingElement.attributes; + }, true); // hidden from traversal + def("JSXOpeningElement") + .bases("Node") // TODO Does this make sense? Can't really be an JSXElement. + .build("name", "attributes", "selfClosing") + .field("name", JSXElementName) + .field("attributes", JSXAttributes, defaults.emptyArray) + .field("selfClosing", Boolean, defaults["false"]); + def("JSXClosingElement") + .bases("Node") // TODO Same concern. + .build("name") + .field("name", JSXElementName); + def("JSXFragment") + .bases("Expression") + .build("openingElement", "closingElement", "children") + .field("openingElement", def("JSXOpeningFragment")) + .field("closingElement", def("JSXClosingFragment")) + .field("children", [or(def("JSXElement"), def("JSXExpressionContainer"), def("JSXFragment"), def("JSXText"), def("Literal") // TODO Esprima should return JSXText instead. + )], defaults.emptyArray); + def("JSXOpeningFragment") + .bases("Node") // TODO Same concern. + .build(); + def("JSXClosingFragment") + .bases("Node") // TODO Same concern. + .build(); + def("JSXText") + .bases("Literal") + .build("value") + .field("value", String); + def("JSXEmptyExpression").bases("Expression").build(); + // This PR has caused many people issues, but supporting it seems like a + // good idea anyway: https://github.com/babel/babel/pull/4988 + def("JSXSpreadChild") + .bases("Expression") + .build("expression") + .field("expression", def("Expression")); +} +exports.default = default_1; +module.exports = exports["default"]; diff --git a/code/application_liste/app/node_modules/ast-types/def/type-annotations.d.ts b/code/application_liste/app/node_modules/ast-types/def/type-annotations.d.ts new file mode 100644 index 0000000..7c57c57 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/def/type-annotations.d.ts @@ -0,0 +1,7 @@ +/** + * Type annotation defs shared between Flow and TypeScript. + * These defs could not be defined in ./flow.ts or ./typescript.ts directly + * because they use the same name. + */ +import { Fork } from "../types"; +export default function (fork: Fork): void; diff --git a/code/application_liste/app/node_modules/ast-types/def/type-annotations.js b/code/application_liste/app/node_modules/ast-types/def/type-annotations.js new file mode 100644 index 0000000..95ca42e --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/def/type-annotations.js @@ -0,0 +1,42 @@ +"use strict";; +/** + * Type annotation defs shared between Flow and TypeScript. + * These defs could not be defined in ./flow.ts or ./typescript.ts directly + * because they use the same name. + */ +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var types_1 = __importDefault(require("../lib/types")); +var shared_1 = __importDefault(require("../lib/shared")); +function default_1(fork) { + var types = fork.use(types_1.default); + var def = types.Type.def; + var or = types.Type.or; + var defaults = fork.use(shared_1.default).defaults; + var TypeAnnotation = or(def("TypeAnnotation"), def("TSTypeAnnotation"), null); + var TypeParamDecl = or(def("TypeParameterDeclaration"), def("TSTypeParameterDeclaration"), null); + def("Identifier") + .field("typeAnnotation", TypeAnnotation, defaults["null"]); + def("ObjectPattern") + .field("typeAnnotation", TypeAnnotation, defaults["null"]); + def("Function") + .field("returnType", TypeAnnotation, defaults["null"]) + .field("typeParameters", TypeParamDecl, defaults["null"]); + def("ClassProperty") + .build("key", "value", "typeAnnotation", "static") + .field("value", or(def("Expression"), null)) + .field("static", Boolean, defaults["false"]) + .field("typeAnnotation", TypeAnnotation, defaults["null"]); + ["ClassDeclaration", + "ClassExpression", + ].forEach(function (typeName) { + def(typeName) + .field("typeParameters", TypeParamDecl, defaults["null"]) + .field("superTypeParameters", or(def("TypeParameterInstantiation"), def("TSTypeParameterInstantiation"), null), defaults["null"]) + .field("implements", or([def("ClassImplements")], [def("TSExpressionWithTypeArguments")]), defaults.emptyArray); + }); +} +exports.default = default_1; +module.exports = exports["default"]; diff --git a/code/application_liste/app/node_modules/ast-types/def/typescript.d.ts b/code/application_liste/app/node_modules/ast-types/def/typescript.d.ts new file mode 100644 index 0000000..1ef9137 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/def/typescript.d.ts @@ -0,0 +1,2 @@ +import { Fork } from "../types"; +export default function (fork: Fork): void; diff --git a/code/application_liste/app/node_modules/ast-types/def/typescript.js b/code/application_liste/app/node_modules/ast-types/def/typescript.js new file mode 100644 index 0000000..bef599d --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/def/typescript.js @@ -0,0 +1,339 @@ +"use strict";; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var babel_core_1 = __importDefault(require("./babel-core")); +var type_annotations_1 = __importDefault(require("./type-annotations")); +var types_1 = __importDefault(require("../lib/types")); +var shared_1 = __importDefault(require("../lib/shared")); +function default_1(fork) { + // Since TypeScript is parsed by Babylon, include the core Babylon types + // but omit the Flow-related types. + fork.use(babel_core_1.default); + fork.use(type_annotations_1.default); + var types = fork.use(types_1.default); + var n = types.namedTypes; + var def = types.Type.def; + var or = types.Type.or; + var defaults = fork.use(shared_1.default).defaults; + var StringLiteral = types.Type.from(function (value, deep) { + if (n.StringLiteral && + n.StringLiteral.check(value, deep)) { + return true; + } + if (n.Literal && + n.Literal.check(value, deep) && + typeof value.value === "string") { + return true; + } + return false; + }, "StringLiteral"); + def("TSType") + .bases("Node"); + var TSEntityName = or(def("Identifier"), def("TSQualifiedName")); + def("TSTypeReference") + .bases("TSType", "TSHasOptionalTypeParameterInstantiation") + .build("typeName", "typeParameters") + .field("typeName", TSEntityName); + // An abstract (non-buildable) base type that provide a commonly-needed + // optional .typeParameters field. + def("TSHasOptionalTypeParameterInstantiation") + .field("typeParameters", or(def("TSTypeParameterInstantiation"), null), defaults["null"]); + // An abstract (non-buildable) base type that provide a commonly-needed + // optional .typeParameters field. + def("TSHasOptionalTypeParameters") + .field("typeParameters", or(def("TSTypeParameterDeclaration"), null, void 0), defaults["null"]); + // An abstract (non-buildable) base type that provide a commonly-needed + // optional .typeAnnotation field. + def("TSHasOptionalTypeAnnotation") + .field("typeAnnotation", or(def("TSTypeAnnotation"), null), defaults["null"]); + def("TSQualifiedName") + .bases("Node") + .build("left", "right") + .field("left", TSEntityName) + .field("right", TSEntityName); + def("TSAsExpression") + .bases("Expression", "Pattern") + .build("expression", "typeAnnotation") + .field("expression", def("Expression")) + .field("typeAnnotation", def("TSType")) + .field("extra", or({ parenthesized: Boolean }, null), defaults["null"]); + def("TSNonNullExpression") + .bases("Expression", "Pattern") + .build("expression") + .field("expression", def("Expression")); + [ + "TSAnyKeyword", + "TSBigIntKeyword", + "TSBooleanKeyword", + "TSNeverKeyword", + "TSNullKeyword", + "TSNumberKeyword", + "TSObjectKeyword", + "TSStringKeyword", + "TSSymbolKeyword", + "TSUndefinedKeyword", + "TSUnknownKeyword", + "TSVoidKeyword", + "TSThisType", + ].forEach(function (keywordType) { + def(keywordType) + .bases("TSType") + .build(); + }); + def("TSArrayType") + .bases("TSType") + .build("elementType") + .field("elementType", def("TSType")); + def("TSLiteralType") + .bases("TSType") + .build("literal") + .field("literal", or(def("NumericLiteral"), def("StringLiteral"), def("BooleanLiteral"), def("TemplateLiteral"), def("UnaryExpression"))); + ["TSUnionType", + "TSIntersectionType", + ].forEach(function (typeName) { + def(typeName) + .bases("TSType") + .build("types") + .field("types", [def("TSType")]); + }); + def("TSConditionalType") + .bases("TSType") + .build("checkType", "extendsType", "trueType", "falseType") + .field("checkType", def("TSType")) + .field("extendsType", def("TSType")) + .field("trueType", def("TSType")) + .field("falseType", def("TSType")); + def("TSInferType") + .bases("TSType") + .build("typeParameter") + .field("typeParameter", def("TSTypeParameter")); + def("TSParenthesizedType") + .bases("TSType") + .build("typeAnnotation") + .field("typeAnnotation", def("TSType")); + var ParametersType = [or(def("Identifier"), def("RestElement"), def("ArrayPattern"), def("ObjectPattern"))]; + ["TSFunctionType", + "TSConstructorType", + ].forEach(function (typeName) { + def(typeName) + .bases("TSType", "TSHasOptionalTypeParameters", "TSHasOptionalTypeAnnotation") + .build("parameters") + .field("parameters", ParametersType); + }); + def("TSDeclareFunction") + .bases("Declaration", "TSHasOptionalTypeParameters") + .build("id", "params", "returnType") + .field("declare", Boolean, defaults["false"]) + .field("async", Boolean, defaults["false"]) + .field("generator", Boolean, defaults["false"]) + .field("id", or(def("Identifier"), null), defaults["null"]) + .field("params", [def("Pattern")]) + // tSFunctionTypeAnnotationCommon + .field("returnType", or(def("TSTypeAnnotation"), def("Noop"), // Still used? + null), defaults["null"]); + def("TSDeclareMethod") + .bases("Declaration", "TSHasOptionalTypeParameters") + .build("key", "params", "returnType") + .field("async", Boolean, defaults["false"]) + .field("generator", Boolean, defaults["false"]) + .field("params", [def("Pattern")]) + // classMethodOrPropertyCommon + .field("abstract", Boolean, defaults["false"]) + .field("accessibility", or("public", "private", "protected", void 0), defaults["undefined"]) + .field("static", Boolean, defaults["false"]) + .field("computed", Boolean, defaults["false"]) + .field("optional", Boolean, defaults["false"]) + .field("key", or(def("Identifier"), def("StringLiteral"), def("NumericLiteral"), + // Only allowed if .computed is true. + def("Expression"))) + // classMethodOrDeclareMethodCommon + .field("kind", or("get", "set", "method", "constructor"), function getDefault() { return "method"; }) + .field("access", // Not "accessibility"? + or("public", "private", "protected", void 0), defaults["undefined"]) + .field("decorators", or([def("Decorator")], null), defaults["null"]) + // tSFunctionTypeAnnotationCommon + .field("returnType", or(def("TSTypeAnnotation"), def("Noop"), // Still used? + null), defaults["null"]); + def("TSMappedType") + .bases("TSType") + .build("typeParameter", "typeAnnotation") + .field("readonly", or(Boolean, "+", "-"), defaults["false"]) + .field("typeParameter", def("TSTypeParameter")) + .field("optional", or(Boolean, "+", "-"), defaults["false"]) + .field("typeAnnotation", or(def("TSType"), null), defaults["null"]); + def("TSTupleType") + .bases("TSType") + .build("elementTypes") + .field("elementTypes", [def("TSType")]); + def("TSRestType") + .bases("TSType") + .build("typeAnnotation") + .field("typeAnnotation", def("TSType")); + def("TSOptionalType") + .bases("TSType") + .build("typeAnnotation") + .field("typeAnnotation", def("TSType")); + def("TSIndexedAccessType") + .bases("TSType") + .build("objectType", "indexType") + .field("objectType", def("TSType")) + .field("indexType", def("TSType")); + def("TSTypeOperator") + .bases("TSType") + .build("operator") + .field("operator", String) + .field("typeAnnotation", def("TSType")); + def("TSTypeAnnotation") + .bases("Node") + .build("typeAnnotation") + .field("typeAnnotation", or(def("TSType"), def("TSTypeAnnotation"))); + def("TSIndexSignature") + .bases("Declaration", "TSHasOptionalTypeAnnotation") + .build("parameters", "typeAnnotation") + .field("parameters", [def("Identifier")]) // Length === 1 + .field("readonly", Boolean, defaults["false"]); + def("TSPropertySignature") + .bases("Declaration", "TSHasOptionalTypeAnnotation") + .build("key", "typeAnnotation", "optional") + .field("key", def("Expression")) + .field("computed", Boolean, defaults["false"]) + .field("readonly", Boolean, defaults["false"]) + .field("optional", Boolean, defaults["false"]) + .field("initializer", or(def("Expression"), null), defaults["null"]); + def("TSMethodSignature") + .bases("Declaration", "TSHasOptionalTypeParameters", "TSHasOptionalTypeAnnotation") + .build("key", "parameters", "typeAnnotation") + .field("key", def("Expression")) + .field("computed", Boolean, defaults["false"]) + .field("optional", Boolean, defaults["false"]) + .field("parameters", ParametersType); + def("TSTypePredicate") + .bases("TSTypeAnnotation") + .build("parameterName", "typeAnnotation") + .field("parameterName", or(def("Identifier"), def("TSThisType"))) + .field("typeAnnotation", def("TSTypeAnnotation")); + ["TSCallSignatureDeclaration", + "TSConstructSignatureDeclaration", + ].forEach(function (typeName) { + def(typeName) + .bases("Declaration", "TSHasOptionalTypeParameters", "TSHasOptionalTypeAnnotation") + .build("parameters", "typeAnnotation") + .field("parameters", ParametersType); + }); + def("TSEnumMember") + .bases("Node") + .build("id", "initializer") + .field("id", or(def("Identifier"), StringLiteral)) + .field("initializer", or(def("Expression"), null), defaults["null"]); + def("TSTypeQuery") + .bases("TSType") + .build("exprName") + .field("exprName", or(TSEntityName, def("TSImportType"))); + // Inferred from Babylon's tsParseTypeMember method. + var TSTypeMember = or(def("TSCallSignatureDeclaration"), def("TSConstructSignatureDeclaration"), def("TSIndexSignature"), def("TSMethodSignature"), def("TSPropertySignature")); + def("TSTypeLiteral") + .bases("TSType") + .build("members") + .field("members", [TSTypeMember]); + def("TSTypeParameter") + .bases("Identifier") + .build("name", "constraint", "default") + .field("name", String) + .field("constraint", or(def("TSType"), void 0), defaults["undefined"]) + .field("default", or(def("TSType"), void 0), defaults["undefined"]); + def("TSTypeAssertion") + .bases("Expression", "Pattern") + .build("typeAnnotation", "expression") + .field("typeAnnotation", def("TSType")) + .field("expression", def("Expression")) + .field("extra", or({ parenthesized: Boolean }, null), defaults["null"]); + def("TSTypeParameterDeclaration") + .bases("Declaration") + .build("params") + .field("params", [def("TSTypeParameter")]); + def("TSTypeParameterInstantiation") + .bases("Node") + .build("params") + .field("params", [def("TSType")]); + def("TSEnumDeclaration") + .bases("Declaration") + .build("id", "members") + .field("id", def("Identifier")) + .field("const", Boolean, defaults["false"]) + .field("declare", Boolean, defaults["false"]) + .field("members", [def("TSEnumMember")]) + .field("initializer", or(def("Expression"), null), defaults["null"]); + def("TSTypeAliasDeclaration") + .bases("Declaration", "TSHasOptionalTypeParameters") + .build("id", "typeAnnotation") + .field("id", def("Identifier")) + .field("declare", Boolean, defaults["false"]) + .field("typeAnnotation", def("TSType")); + def("TSModuleBlock") + .bases("Node") + .build("body") + .field("body", [def("Statement")]); + def("TSModuleDeclaration") + .bases("Declaration") + .build("id", "body") + .field("id", or(StringLiteral, TSEntityName)) + .field("declare", Boolean, defaults["false"]) + .field("global", Boolean, defaults["false"]) + .field("body", or(def("TSModuleBlock"), def("TSModuleDeclaration"), null), defaults["null"]); + def("TSImportType") + .bases("TSType", "TSHasOptionalTypeParameterInstantiation") + .build("argument", "qualifier", "typeParameters") + .field("argument", StringLiteral) + .field("qualifier", or(TSEntityName, void 0), defaults["undefined"]); + def("TSImportEqualsDeclaration") + .bases("Declaration") + .build("id", "moduleReference") + .field("id", def("Identifier")) + .field("isExport", Boolean, defaults["false"]) + .field("moduleReference", or(TSEntityName, def("TSExternalModuleReference"))); + def("TSExternalModuleReference") + .bases("Declaration") + .build("expression") + .field("expression", StringLiteral); + def("TSExportAssignment") + .bases("Statement") + .build("expression") + .field("expression", def("Expression")); + def("TSNamespaceExportDeclaration") + .bases("Declaration") + .build("id") + .field("id", def("Identifier")); + def("TSInterfaceBody") + .bases("Node") + .build("body") + .field("body", [TSTypeMember]); + def("TSExpressionWithTypeArguments") + .bases("TSType", "TSHasOptionalTypeParameterInstantiation") + .build("expression", "typeParameters") + .field("expression", TSEntityName); + def("TSInterfaceDeclaration") + .bases("Declaration", "TSHasOptionalTypeParameters") + .build("id", "body") + .field("id", TSEntityName) + .field("declare", Boolean, defaults["false"]) + .field("extends", or([def("TSExpressionWithTypeArguments")], null), defaults["null"]) + .field("body", def("TSInterfaceBody")); + def("TSParameterProperty") + .bases("Pattern") + .build("parameter") + .field("accessibility", or("public", "private", "protected", void 0), defaults["undefined"]) + .field("readonly", Boolean, defaults["false"]) + .field("parameter", or(def("Identifier"), def("AssignmentPattern"))); + def("ClassProperty") + .field("access", // Not "accessibility"? + or("public", "private", "protected", void 0), defaults["undefined"]); + // Defined already in es6 and babel-core. + def("ClassBody") + .field("body", [or(def("MethodDefinition"), def("VariableDeclarator"), def("ClassPropertyDefinition"), def("ClassProperty"), def("ClassPrivateProperty"), def("ClassMethod"), def("ClassPrivateMethod"), + // Just need to add these types: + def("TSDeclareMethod"), TSTypeMember)]); +} +exports.default = default_1; +module.exports = exports["default"]; diff --git a/code/application_liste/app/node_modules/ast-types/fork.d.ts b/code/application_liste/app/node_modules/ast-types/fork.d.ts new file mode 100644 index 0000000..3badc9c --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/fork.d.ts @@ -0,0 +1,42 @@ +import { Def, Plugin } from "./types"; +export default function (defs: Def[]): { + Type: { + or(...types: any[]): import("./lib/types").Type; + from(value: any, name?: string | undefined): import("./lib/types").Type; + def(typeName: string): import("./lib/types").Def; + hasDef(typeName: string): boolean; + }; + builtInTypes: { + string: import("./lib/types").Type; + function: import("./lib/types").Type; + array: import("./lib/types").Type; + object: import("./lib/types").Type<{ + [key: string]: any; + }>; + RegExp: import("./lib/types").Type; + Date: import("./lib/types").Type; + number: import("./lib/types").Type; + boolean: import("./lib/types").Type; + null: import("./lib/types").Type; + undefined: import("./lib/types").Type; + }; + namedTypes: import("./gen/namedTypes").NamedTypes; + builders: import("./gen/builders").builders; + defineMethod: (name: any, func?: Function | undefined) => Function; + getFieldNames: (object: any) => string[]; + getFieldValue: (object: any, fieldName: any) => any; + eachField: (object: any, callback: (name: any, value: any) => any, context?: any) => void; + someField: (object: any, callback: (name: any, value: any) => any, context?: any) => boolean; + getSupertypeNames: (typeName: string) => string[]; + getBuilderName: (typeName: any) => any; + astNodesAreEquivalent: { + (a: any, b: any, problemPath?: any): boolean; + assert(a: any, b: any): void; + }; + finalize: () => void; + Path: import("./lib/path").PathConstructor; + NodePath: import("./lib/node-path").NodePathConstructor; + PathVisitor: import("./lib/path-visitor").PathVisitorConstructor; + use: (plugin: Plugin) => T; + visit: (node: import("./lib/types").ASTNode, methods?: import("./main").Visitor | undefined) => any; +}; diff --git a/code/application_liste/app/node_modules/ast-types/fork.js b/code/application_liste/app/node_modules/ast-types/fork.js new file mode 100644 index 0000000..31c1b26 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/fork.js @@ -0,0 +1,54 @@ +"use strict";; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var types_1 = __importDefault(require("./lib/types")); +var path_visitor_1 = __importDefault(require("./lib/path-visitor")); +var equiv_1 = __importDefault(require("./lib/equiv")); +var path_1 = __importDefault(require("./lib/path")); +var node_path_1 = __importDefault(require("./lib/node-path")); +function default_1(defs) { + var fork = createFork(); + var types = fork.use(types_1.default); + defs.forEach(fork.use); + types.finalize(); + var PathVisitor = fork.use(path_visitor_1.default); + return { + Type: types.Type, + builtInTypes: types.builtInTypes, + namedTypes: types.namedTypes, + builders: types.builders, + defineMethod: types.defineMethod, + getFieldNames: types.getFieldNames, + getFieldValue: types.getFieldValue, + eachField: types.eachField, + someField: types.someField, + getSupertypeNames: types.getSupertypeNames, + getBuilderName: types.getBuilderName, + astNodesAreEquivalent: fork.use(equiv_1.default), + finalize: types.finalize, + Path: fork.use(path_1.default), + NodePath: fork.use(node_path_1.default), + PathVisitor: PathVisitor, + use: fork.use, + visit: PathVisitor.visit, + }; +} +exports.default = default_1; +function createFork() { + var used = []; + var usedResult = []; + function use(plugin) { + var idx = used.indexOf(plugin); + if (idx === -1) { + idx = used.length; + used.push(plugin); + usedResult[idx] = plugin(fork); + } + return usedResult[idx]; + } + var fork = { use: use }; + return fork; +} +module.exports = exports["default"]; diff --git a/code/application_liste/app/node_modules/ast-types/gen/builders.d.ts b/code/application_liste/app/node_modules/ast-types/gen/builders.d.ts new file mode 100644 index 0000000..e953064 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/gen/builders.d.ts @@ -0,0 +1,2572 @@ +import * as K from "./kinds"; +import { namedTypes } from "./namedTypes"; +export interface FileBuilder { + (program: K.ProgramKind, name?: string | null): namedTypes.File; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + name?: string | null; + program: K.ProgramKind; + }): namedTypes.File; +} +export interface ProgramBuilder { + (body: K.StatementKind[]): namedTypes.Program; + from(params: { + body: K.StatementKind[]; + comments?: K.CommentKind[] | null; + directives?: K.DirectiveKind[]; + interpreter?: K.InterpreterDirectiveKind | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.Program; +} +export interface IdentifierBuilder { + (name: string): namedTypes.Identifier; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + name: string; + optional?: boolean; + typeAnnotation?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null; + }): namedTypes.Identifier; +} +export interface BlockStatementBuilder { + (body: K.StatementKind[]): namedTypes.BlockStatement; + from(params: { + body: K.StatementKind[]; + comments?: K.CommentKind[] | null; + directives?: K.DirectiveKind[]; + loc?: K.SourceLocationKind | null; + }): namedTypes.BlockStatement; +} +export interface EmptyStatementBuilder { + (): namedTypes.EmptyStatement; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.EmptyStatement; +} +export interface ExpressionStatementBuilder { + (expression: K.ExpressionKind): namedTypes.ExpressionStatement; + from(params: { + comments?: K.CommentKind[] | null; + expression: K.ExpressionKind; + loc?: K.SourceLocationKind | null; + }): namedTypes.ExpressionStatement; +} +export interface IfStatementBuilder { + (test: K.ExpressionKind, consequent: K.StatementKind, alternate?: K.StatementKind | null): namedTypes.IfStatement; + from(params: { + alternate?: K.StatementKind | null; + comments?: K.CommentKind[] | null; + consequent: K.StatementKind; + loc?: K.SourceLocationKind | null; + test: K.ExpressionKind; + }): namedTypes.IfStatement; +} +export interface LabeledStatementBuilder { + (label: K.IdentifierKind, body: K.StatementKind): namedTypes.LabeledStatement; + from(params: { + body: K.StatementKind; + comments?: K.CommentKind[] | null; + label: K.IdentifierKind; + loc?: K.SourceLocationKind | null; + }): namedTypes.LabeledStatement; +} +export interface BreakStatementBuilder { + (label?: K.IdentifierKind | null): namedTypes.BreakStatement; + from(params: { + comments?: K.CommentKind[] | null; + label?: K.IdentifierKind | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.BreakStatement; +} +export interface ContinueStatementBuilder { + (label?: K.IdentifierKind | null): namedTypes.ContinueStatement; + from(params: { + comments?: K.CommentKind[] | null; + label?: K.IdentifierKind | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.ContinueStatement; +} +export interface WithStatementBuilder { + (object: K.ExpressionKind, body: K.StatementKind): namedTypes.WithStatement; + from(params: { + body: K.StatementKind; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + object: K.ExpressionKind; + }): namedTypes.WithStatement; +} +export interface SwitchStatementBuilder { + (discriminant: K.ExpressionKind, cases: K.SwitchCaseKind[], lexical?: boolean): namedTypes.SwitchStatement; + from(params: { + cases: K.SwitchCaseKind[]; + comments?: K.CommentKind[] | null; + discriminant: K.ExpressionKind; + lexical?: boolean; + loc?: K.SourceLocationKind | null; + }): namedTypes.SwitchStatement; +} +export interface SwitchCaseBuilder { + (test: K.ExpressionKind | null, consequent: K.StatementKind[]): namedTypes.SwitchCase; + from(params: { + comments?: K.CommentKind[] | null; + consequent: K.StatementKind[]; + loc?: K.SourceLocationKind | null; + test: K.ExpressionKind | null; + }): namedTypes.SwitchCase; +} +export interface ReturnStatementBuilder { + (argument: K.ExpressionKind | null): namedTypes.ReturnStatement; + from(params: { + argument: K.ExpressionKind | null; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.ReturnStatement; +} +export interface ThrowStatementBuilder { + (argument: K.ExpressionKind): namedTypes.ThrowStatement; + from(params: { + argument: K.ExpressionKind; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.ThrowStatement; +} +export interface TryStatementBuilder { + (block: K.BlockStatementKind, handler?: K.CatchClauseKind | null, finalizer?: K.BlockStatementKind | null): namedTypes.TryStatement; + from(params: { + block: K.BlockStatementKind; + comments?: K.CommentKind[] | null; + finalizer?: K.BlockStatementKind | null; + guardedHandlers?: K.CatchClauseKind[]; + handler?: K.CatchClauseKind | null; + handlers?: K.CatchClauseKind[]; + loc?: K.SourceLocationKind | null; + }): namedTypes.TryStatement; +} +export interface CatchClauseBuilder { + (param: K.PatternKind | null | undefined, guard: K.ExpressionKind | null | undefined, body: K.BlockStatementKind): namedTypes.CatchClause; + from(params: { + body: K.BlockStatementKind; + comments?: K.CommentKind[] | null; + guard?: K.ExpressionKind | null; + loc?: K.SourceLocationKind | null; + param?: K.PatternKind | null; + }): namedTypes.CatchClause; +} +export interface WhileStatementBuilder { + (test: K.ExpressionKind, body: K.StatementKind): namedTypes.WhileStatement; + from(params: { + body: K.StatementKind; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + test: K.ExpressionKind; + }): namedTypes.WhileStatement; +} +export interface DoWhileStatementBuilder { + (body: K.StatementKind, test: K.ExpressionKind): namedTypes.DoWhileStatement; + from(params: { + body: K.StatementKind; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + test: K.ExpressionKind; + }): namedTypes.DoWhileStatement; +} +export interface ForStatementBuilder { + (init: K.VariableDeclarationKind | K.ExpressionKind | null, test: K.ExpressionKind | null, update: K.ExpressionKind | null, body: K.StatementKind): namedTypes.ForStatement; + from(params: { + body: K.StatementKind; + comments?: K.CommentKind[] | null; + init: K.VariableDeclarationKind | K.ExpressionKind | null; + loc?: K.SourceLocationKind | null; + test: K.ExpressionKind | null; + update: K.ExpressionKind | null; + }): namedTypes.ForStatement; +} +export interface VariableDeclarationBuilder { + (kind: "var" | "let" | "const", declarations: (K.VariableDeclaratorKind | K.IdentifierKind)[]): namedTypes.VariableDeclaration; + from(params: { + comments?: K.CommentKind[] | null; + declarations: (K.VariableDeclaratorKind | K.IdentifierKind)[]; + kind: "var" | "let" | "const"; + loc?: K.SourceLocationKind | null; + }): namedTypes.VariableDeclaration; +} +export interface ForInStatementBuilder { + (left: K.VariableDeclarationKind | K.ExpressionKind, right: K.ExpressionKind, body: K.StatementKind): namedTypes.ForInStatement; + from(params: { + body: K.StatementKind; + comments?: K.CommentKind[] | null; + left: K.VariableDeclarationKind | K.ExpressionKind; + loc?: K.SourceLocationKind | null; + right: K.ExpressionKind; + }): namedTypes.ForInStatement; +} +export interface DebuggerStatementBuilder { + (): namedTypes.DebuggerStatement; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.DebuggerStatement; +} +export interface FunctionDeclarationBuilder { + (id: K.IdentifierKind, params: K.PatternKind[], body: K.BlockStatementKind, generator?: boolean, expression?: boolean): namedTypes.FunctionDeclaration; + from(params: { + async?: boolean; + body: K.BlockStatementKind; + comments?: K.CommentKind[] | null; + defaults?: (K.ExpressionKind | null)[]; + expression?: boolean; + generator?: boolean; + id: K.IdentifierKind; + loc?: K.SourceLocationKind | null; + params: K.PatternKind[]; + rest?: K.IdentifierKind | null; + returnType?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null; + typeParameters?: K.TypeParameterDeclarationKind | K.TSTypeParameterDeclarationKind | null; + }): namedTypes.FunctionDeclaration; +} +export interface FunctionExpressionBuilder { + (id: K.IdentifierKind | null | undefined, params: K.PatternKind[], body: K.BlockStatementKind, generator?: boolean, expression?: boolean): namedTypes.FunctionExpression; + from(params: { + async?: boolean; + body: K.BlockStatementKind; + comments?: K.CommentKind[] | null; + defaults?: (K.ExpressionKind | null)[]; + expression?: boolean; + generator?: boolean; + id?: K.IdentifierKind | null; + loc?: K.SourceLocationKind | null; + params: K.PatternKind[]; + rest?: K.IdentifierKind | null; + returnType?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null; + typeParameters?: K.TypeParameterDeclarationKind | K.TSTypeParameterDeclarationKind | null; + }): namedTypes.FunctionExpression; +} +export interface VariableDeclaratorBuilder { + (id: K.PatternKind, init?: K.ExpressionKind | null): namedTypes.VariableDeclarator; + from(params: { + comments?: K.CommentKind[] | null; + id: K.PatternKind; + init?: K.ExpressionKind | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.VariableDeclarator; +} +export interface ThisExpressionBuilder { + (): namedTypes.ThisExpression; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.ThisExpression; +} +export interface ArrayExpressionBuilder { + (elements: (K.ExpressionKind | K.SpreadElementKind | K.RestElementKind | null)[]): namedTypes.ArrayExpression; + from(params: { + comments?: K.CommentKind[] | null; + elements: (K.ExpressionKind | K.SpreadElementKind | K.RestElementKind | null)[]; + loc?: K.SourceLocationKind | null; + }): namedTypes.ArrayExpression; +} +export interface ObjectExpressionBuilder { + (properties: (K.PropertyKind | K.ObjectMethodKind | K.ObjectPropertyKind | K.SpreadPropertyKind | K.SpreadElementKind)[]): namedTypes.ObjectExpression; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + properties: (K.PropertyKind | K.ObjectMethodKind | K.ObjectPropertyKind | K.SpreadPropertyKind | K.SpreadElementKind)[]; + }): namedTypes.ObjectExpression; +} +export interface PropertyBuilder { + (kind: "init" | "get" | "set", key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind, value: K.ExpressionKind | K.PatternKind): namedTypes.Property; + from(params: { + comments?: K.CommentKind[] | null; + computed?: boolean; + decorators?: K.DecoratorKind[] | null; + key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind; + kind: "init" | "get" | "set"; + loc?: K.SourceLocationKind | null; + method?: boolean; + shorthand?: boolean; + value: K.ExpressionKind | K.PatternKind; + }): namedTypes.Property; +} +export interface LiteralBuilder { + (value: string | boolean | null | number | RegExp): namedTypes.Literal; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + regex?: { + pattern: string; + flags: string; + } | null; + value: string | boolean | null | number | RegExp; + }): namedTypes.Literal; +} +export interface SequenceExpressionBuilder { + (expressions: K.ExpressionKind[]): namedTypes.SequenceExpression; + from(params: { + comments?: K.CommentKind[] | null; + expressions: K.ExpressionKind[]; + loc?: K.SourceLocationKind | null; + }): namedTypes.SequenceExpression; +} +export interface UnaryExpressionBuilder { + (operator: "-" | "+" | "!" | "~" | "typeof" | "void" | "delete", argument: K.ExpressionKind, prefix?: boolean): namedTypes.UnaryExpression; + from(params: { + argument: K.ExpressionKind; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + operator: "-" | "+" | "!" | "~" | "typeof" | "void" | "delete"; + prefix?: boolean; + }): namedTypes.UnaryExpression; +} +export interface BinaryExpressionBuilder { + (operator: "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "in" | "instanceof", left: K.ExpressionKind, right: K.ExpressionKind): namedTypes.BinaryExpression; + from(params: { + comments?: K.CommentKind[] | null; + left: K.ExpressionKind; + loc?: K.SourceLocationKind | null; + operator: "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "in" | "instanceof"; + right: K.ExpressionKind; + }): namedTypes.BinaryExpression; +} +export interface AssignmentExpressionBuilder { + (operator: "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=", left: K.PatternKind | K.MemberExpressionKind, right: K.ExpressionKind): namedTypes.AssignmentExpression; + from(params: { + comments?: K.CommentKind[] | null; + left: K.PatternKind | K.MemberExpressionKind; + loc?: K.SourceLocationKind | null; + operator: "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&="; + right: K.ExpressionKind; + }): namedTypes.AssignmentExpression; +} +export interface MemberExpressionBuilder { + (object: K.ExpressionKind, property: K.IdentifierKind | K.ExpressionKind, computed?: boolean): namedTypes.MemberExpression; + from(params: { + comments?: K.CommentKind[] | null; + computed?: boolean; + loc?: K.SourceLocationKind | null; + object: K.ExpressionKind; + property: K.IdentifierKind | K.ExpressionKind; + }): namedTypes.MemberExpression; +} +export interface UpdateExpressionBuilder { + (operator: "++" | "--", argument: K.ExpressionKind, prefix: boolean): namedTypes.UpdateExpression; + from(params: { + argument: K.ExpressionKind; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + operator: "++" | "--"; + prefix: boolean; + }): namedTypes.UpdateExpression; +} +export interface LogicalExpressionBuilder { + (operator: "||" | "&&" | "??", left: K.ExpressionKind, right: K.ExpressionKind): namedTypes.LogicalExpression; + from(params: { + comments?: K.CommentKind[] | null; + left: K.ExpressionKind; + loc?: K.SourceLocationKind | null; + operator: "||" | "&&" | "??"; + right: K.ExpressionKind; + }): namedTypes.LogicalExpression; +} +export interface ConditionalExpressionBuilder { + (test: K.ExpressionKind, consequent: K.ExpressionKind, alternate: K.ExpressionKind): namedTypes.ConditionalExpression; + from(params: { + alternate: K.ExpressionKind; + comments?: K.CommentKind[] | null; + consequent: K.ExpressionKind; + loc?: K.SourceLocationKind | null; + test: K.ExpressionKind; + }): namedTypes.ConditionalExpression; +} +export interface NewExpressionBuilder { + (callee: K.ExpressionKind, argumentsParam: (K.ExpressionKind | K.SpreadElementKind)[]): namedTypes.NewExpression; + from(params: { + arguments: (K.ExpressionKind | K.SpreadElementKind)[]; + callee: K.ExpressionKind; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + typeArguments?: null | K.TypeParameterInstantiationKind; + }): namedTypes.NewExpression; +} +export interface CallExpressionBuilder { + (callee: K.ExpressionKind, argumentsParam: (K.ExpressionKind | K.SpreadElementKind)[]): namedTypes.CallExpression; + from(params: { + arguments: (K.ExpressionKind | K.SpreadElementKind)[]; + callee: K.ExpressionKind; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + typeArguments?: null | K.TypeParameterInstantiationKind; + }): namedTypes.CallExpression; +} +export interface RestElementBuilder { + (argument: K.PatternKind): namedTypes.RestElement; + from(params: { + argument: K.PatternKind; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + typeAnnotation?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null; + }): namedTypes.RestElement; +} +export interface TypeAnnotationBuilder { + (typeAnnotation: K.FlowTypeKind): namedTypes.TypeAnnotation; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + typeAnnotation: K.FlowTypeKind; + }): namedTypes.TypeAnnotation; +} +export interface TSTypeAnnotationBuilder { + (typeAnnotation: K.TSTypeKind | K.TSTypeAnnotationKind): namedTypes.TSTypeAnnotation; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + typeAnnotation: K.TSTypeKind | K.TSTypeAnnotationKind; + }): namedTypes.TSTypeAnnotation; +} +export interface SpreadElementPatternBuilder { + (argument: K.PatternKind): namedTypes.SpreadElementPattern; + from(params: { + argument: K.PatternKind; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.SpreadElementPattern; +} +export interface ArrowFunctionExpressionBuilder { + (params: K.PatternKind[], body: K.BlockStatementKind | K.ExpressionKind, expression?: boolean): namedTypes.ArrowFunctionExpression; + from(params: { + async?: boolean; + body: K.BlockStatementKind | K.ExpressionKind; + comments?: K.CommentKind[] | null; + defaults?: (K.ExpressionKind | null)[]; + expression?: boolean; + generator?: false; + id?: null; + loc?: K.SourceLocationKind | null; + params: K.PatternKind[]; + rest?: K.IdentifierKind | null; + returnType?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null; + typeParameters?: K.TypeParameterDeclarationKind | K.TSTypeParameterDeclarationKind | null; + }): namedTypes.ArrowFunctionExpression; +} +export interface ForOfStatementBuilder { + (left: K.VariableDeclarationKind | K.PatternKind, right: K.ExpressionKind, body: K.StatementKind): namedTypes.ForOfStatement; + from(params: { + body: K.StatementKind; + comments?: K.CommentKind[] | null; + left: K.VariableDeclarationKind | K.PatternKind; + loc?: K.SourceLocationKind | null; + right: K.ExpressionKind; + }): namedTypes.ForOfStatement; +} +export interface YieldExpressionBuilder { + (argument: K.ExpressionKind | null, delegate?: boolean): namedTypes.YieldExpression; + from(params: { + argument: K.ExpressionKind | null; + comments?: K.CommentKind[] | null; + delegate?: boolean; + loc?: K.SourceLocationKind | null; + }): namedTypes.YieldExpression; +} +export interface GeneratorExpressionBuilder { + (body: K.ExpressionKind, blocks: K.ComprehensionBlockKind[], filter: K.ExpressionKind | null): namedTypes.GeneratorExpression; + from(params: { + blocks: K.ComprehensionBlockKind[]; + body: K.ExpressionKind; + comments?: K.CommentKind[] | null; + filter: K.ExpressionKind | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.GeneratorExpression; +} +export interface ComprehensionBlockBuilder { + (left: K.PatternKind, right: K.ExpressionKind, each: boolean): namedTypes.ComprehensionBlock; + from(params: { + comments?: K.CommentKind[] | null; + each: boolean; + left: K.PatternKind; + loc?: K.SourceLocationKind | null; + right: K.ExpressionKind; + }): namedTypes.ComprehensionBlock; +} +export interface ComprehensionExpressionBuilder { + (body: K.ExpressionKind, blocks: K.ComprehensionBlockKind[], filter: K.ExpressionKind | null): namedTypes.ComprehensionExpression; + from(params: { + blocks: K.ComprehensionBlockKind[]; + body: K.ExpressionKind; + comments?: K.CommentKind[] | null; + filter: K.ExpressionKind | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.ComprehensionExpression; +} +export interface ObjectPropertyBuilder { + (key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind, value: K.ExpressionKind | K.PatternKind): namedTypes.ObjectProperty; + from(params: { + accessibility?: K.LiteralKind | null; + comments?: K.CommentKind[] | null; + computed?: boolean; + key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind; + loc?: K.SourceLocationKind | null; + shorthand?: boolean; + value: K.ExpressionKind | K.PatternKind; + }): namedTypes.ObjectProperty; +} +export interface PropertyPatternBuilder { + (key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind, pattern: K.PatternKind): namedTypes.PropertyPattern; + from(params: { + comments?: K.CommentKind[] | null; + computed?: boolean; + key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind; + loc?: K.SourceLocationKind | null; + pattern: K.PatternKind; + }): namedTypes.PropertyPattern; +} +export interface ObjectPatternBuilder { + (properties: (K.PropertyKind | K.PropertyPatternKind | K.SpreadPropertyPatternKind | K.SpreadPropertyKind | K.ObjectPropertyKind | K.RestPropertyKind)[]): namedTypes.ObjectPattern; + from(params: { + comments?: K.CommentKind[] | null; + decorators?: K.DecoratorKind[] | null; + loc?: K.SourceLocationKind | null; + properties: (K.PropertyKind | K.PropertyPatternKind | K.SpreadPropertyPatternKind | K.SpreadPropertyKind | K.ObjectPropertyKind | K.RestPropertyKind)[]; + typeAnnotation?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null; + }): namedTypes.ObjectPattern; +} +export interface ArrayPatternBuilder { + (elements: (K.PatternKind | K.SpreadElementKind | null)[]): namedTypes.ArrayPattern; + from(params: { + comments?: K.CommentKind[] | null; + elements: (K.PatternKind | K.SpreadElementKind | null)[]; + loc?: K.SourceLocationKind | null; + }): namedTypes.ArrayPattern; +} +export interface MethodDefinitionBuilder { + (kind: "constructor" | "method" | "get" | "set", key: K.ExpressionKind, value: K.FunctionKind, staticParam?: boolean): namedTypes.MethodDefinition; + from(params: { + comments?: K.CommentKind[] | null; + computed?: boolean; + decorators?: K.DecoratorKind[] | null; + key: K.ExpressionKind; + kind: "constructor" | "method" | "get" | "set"; + loc?: K.SourceLocationKind | null; + static?: boolean; + value: K.FunctionKind; + }): namedTypes.MethodDefinition; +} +export interface SpreadElementBuilder { + (argument: K.ExpressionKind): namedTypes.SpreadElement; + from(params: { + argument: K.ExpressionKind; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.SpreadElement; +} +export interface AssignmentPatternBuilder { + (left: K.PatternKind, right: K.ExpressionKind): namedTypes.AssignmentPattern; + from(params: { + comments?: K.CommentKind[] | null; + left: K.PatternKind; + loc?: K.SourceLocationKind | null; + right: K.ExpressionKind; + }): namedTypes.AssignmentPattern; +} +export interface ClassPropertyDefinitionBuilder { + (definition: K.MethodDefinitionKind | K.VariableDeclaratorKind | K.ClassPropertyDefinitionKind | K.ClassPropertyKind): namedTypes.ClassPropertyDefinition; + from(params: { + comments?: K.CommentKind[] | null; + definition: K.MethodDefinitionKind | K.VariableDeclaratorKind | K.ClassPropertyDefinitionKind | K.ClassPropertyKind; + loc?: K.SourceLocationKind | null; + }): namedTypes.ClassPropertyDefinition; +} +export interface ClassPropertyBuilder { + (key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind, value: K.ExpressionKind | null, typeAnnotation?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null, staticParam?: boolean): namedTypes.ClassProperty; + from(params: { + access?: "public" | "private" | "protected" | undefined; + comments?: K.CommentKind[] | null; + computed?: boolean; + key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind; + loc?: K.SourceLocationKind | null; + static?: boolean; + typeAnnotation?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null; + value: K.ExpressionKind | null; + variance?: K.VarianceKind | "plus" | "minus" | null; + }): namedTypes.ClassProperty; +} +export interface ClassBodyBuilder { + (body: (K.MethodDefinitionKind | K.VariableDeclaratorKind | K.ClassPropertyDefinitionKind | K.ClassPropertyKind | K.ClassPrivatePropertyKind | K.ClassMethodKind | K.ClassPrivateMethodKind | K.TSDeclareMethodKind | K.TSCallSignatureDeclarationKind | K.TSConstructSignatureDeclarationKind | K.TSIndexSignatureKind | K.TSMethodSignatureKind | K.TSPropertySignatureKind)[]): namedTypes.ClassBody; + from(params: { + body: (K.MethodDefinitionKind | K.VariableDeclaratorKind | K.ClassPropertyDefinitionKind | K.ClassPropertyKind | K.ClassPrivatePropertyKind | K.ClassMethodKind | K.ClassPrivateMethodKind | K.TSDeclareMethodKind | K.TSCallSignatureDeclarationKind | K.TSConstructSignatureDeclarationKind | K.TSIndexSignatureKind | K.TSMethodSignatureKind | K.TSPropertySignatureKind)[]; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.ClassBody; +} +export interface ClassDeclarationBuilder { + (id: K.IdentifierKind | null, body: K.ClassBodyKind, superClass?: K.ExpressionKind | null): namedTypes.ClassDeclaration; + from(params: { + body: K.ClassBodyKind; + comments?: K.CommentKind[] | null; + id: K.IdentifierKind | null; + implements?: K.ClassImplementsKind[] | K.TSExpressionWithTypeArgumentsKind[]; + loc?: K.SourceLocationKind | null; + superClass?: K.ExpressionKind | null; + superTypeParameters?: K.TypeParameterInstantiationKind | K.TSTypeParameterInstantiationKind | null; + typeParameters?: K.TypeParameterDeclarationKind | K.TSTypeParameterDeclarationKind | null; + }): namedTypes.ClassDeclaration; +} +export interface ClassExpressionBuilder { + (id: K.IdentifierKind | null | undefined, body: K.ClassBodyKind, superClass?: K.ExpressionKind | null): namedTypes.ClassExpression; + from(params: { + body: K.ClassBodyKind; + comments?: K.CommentKind[] | null; + id?: K.IdentifierKind | null; + implements?: K.ClassImplementsKind[] | K.TSExpressionWithTypeArgumentsKind[]; + loc?: K.SourceLocationKind | null; + superClass?: K.ExpressionKind | null; + superTypeParameters?: K.TypeParameterInstantiationKind | K.TSTypeParameterInstantiationKind | null; + typeParameters?: K.TypeParameterDeclarationKind | K.TSTypeParameterDeclarationKind | null; + }): namedTypes.ClassExpression; +} +export interface ImportSpecifierBuilder { + (imported: K.IdentifierKind, local?: K.IdentifierKind | null): namedTypes.ImportSpecifier; + from(params: { + comments?: K.CommentKind[] | null; + id?: K.IdentifierKind | null; + imported: K.IdentifierKind; + loc?: K.SourceLocationKind | null; + local?: K.IdentifierKind | null; + name?: K.IdentifierKind | null; + }): namedTypes.ImportSpecifier; +} +export interface ImportNamespaceSpecifierBuilder { + (local?: K.IdentifierKind | null): namedTypes.ImportNamespaceSpecifier; + from(params: { + comments?: K.CommentKind[] | null; + id?: K.IdentifierKind | null; + loc?: K.SourceLocationKind | null; + local?: K.IdentifierKind | null; + name?: K.IdentifierKind | null; + }): namedTypes.ImportNamespaceSpecifier; +} +export interface ImportDefaultSpecifierBuilder { + (local?: K.IdentifierKind | null): namedTypes.ImportDefaultSpecifier; + from(params: { + comments?: K.CommentKind[] | null; + id?: K.IdentifierKind | null; + loc?: K.SourceLocationKind | null; + local?: K.IdentifierKind | null; + name?: K.IdentifierKind | null; + }): namedTypes.ImportDefaultSpecifier; +} +export interface ImportDeclarationBuilder { + (specifiers: (K.ImportSpecifierKind | K.ImportNamespaceSpecifierKind | K.ImportDefaultSpecifierKind)[] | undefined, source: K.LiteralKind, importKind?: "value" | "type"): namedTypes.ImportDeclaration; + from(params: { + comments?: K.CommentKind[] | null; + importKind?: "value" | "type"; + loc?: K.SourceLocationKind | null; + source: K.LiteralKind; + specifiers?: (K.ImportSpecifierKind | K.ImportNamespaceSpecifierKind | K.ImportDefaultSpecifierKind)[]; + }): namedTypes.ImportDeclaration; +} +export interface TaggedTemplateExpressionBuilder { + (tag: K.ExpressionKind, quasi: K.TemplateLiteralKind): namedTypes.TaggedTemplateExpression; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + quasi: K.TemplateLiteralKind; + tag: K.ExpressionKind; + }): namedTypes.TaggedTemplateExpression; +} +export interface TemplateLiteralBuilder { + (quasis: K.TemplateElementKind[], expressions: K.ExpressionKind[]): namedTypes.TemplateLiteral; + from(params: { + comments?: K.CommentKind[] | null; + expressions: K.ExpressionKind[]; + loc?: K.SourceLocationKind | null; + quasis: K.TemplateElementKind[]; + }): namedTypes.TemplateLiteral; +} +export interface TemplateElementBuilder { + (value: { + cooked: string; + raw: string; + }, tail: boolean): namedTypes.TemplateElement; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + tail: boolean; + value: { + cooked: string; + raw: string; + }; + }): namedTypes.TemplateElement; +} +export interface SpreadPropertyBuilder { + (argument: K.ExpressionKind): namedTypes.SpreadProperty; + from(params: { + argument: K.ExpressionKind; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.SpreadProperty; +} +export interface SpreadPropertyPatternBuilder { + (argument: K.PatternKind): namedTypes.SpreadPropertyPattern; + from(params: { + argument: K.PatternKind; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.SpreadPropertyPattern; +} +export interface AwaitExpressionBuilder { + (argument: K.ExpressionKind | null, all?: boolean): namedTypes.AwaitExpression; + from(params: { + all?: boolean; + argument: K.ExpressionKind | null; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.AwaitExpression; +} +export interface ImportExpressionBuilder { + (source: K.ExpressionKind): namedTypes.ImportExpression; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + source: K.ExpressionKind; + }): namedTypes.ImportExpression; +} +export interface JSXAttributeBuilder { + (name: K.JSXIdentifierKind | K.JSXNamespacedNameKind, value?: K.LiteralKind | K.JSXExpressionContainerKind | null): namedTypes.JSXAttribute; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + name: K.JSXIdentifierKind | K.JSXNamespacedNameKind; + value?: K.LiteralKind | K.JSXExpressionContainerKind | null; + }): namedTypes.JSXAttribute; +} +export interface JSXIdentifierBuilder { + (name: string): namedTypes.JSXIdentifier; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + name: string; + optional?: boolean; + typeAnnotation?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null; + }): namedTypes.JSXIdentifier; +} +export interface JSXNamespacedNameBuilder { + (namespace: K.JSXIdentifierKind, name: K.JSXIdentifierKind): namedTypes.JSXNamespacedName; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + name: K.JSXIdentifierKind; + namespace: K.JSXIdentifierKind; + }): namedTypes.JSXNamespacedName; +} +export interface JSXExpressionContainerBuilder { + (expression: K.ExpressionKind): namedTypes.JSXExpressionContainer; + from(params: { + comments?: K.CommentKind[] | null; + expression: K.ExpressionKind; + loc?: K.SourceLocationKind | null; + }): namedTypes.JSXExpressionContainer; +} +export interface JSXMemberExpressionBuilder { + (object: K.JSXIdentifierKind | K.JSXMemberExpressionKind, property: K.JSXIdentifierKind): namedTypes.JSXMemberExpression; + from(params: { + comments?: K.CommentKind[] | null; + computed?: boolean; + loc?: K.SourceLocationKind | null; + object: K.JSXIdentifierKind | K.JSXMemberExpressionKind; + property: K.JSXIdentifierKind; + }): namedTypes.JSXMemberExpression; +} +export interface JSXSpreadAttributeBuilder { + (argument: K.ExpressionKind): namedTypes.JSXSpreadAttribute; + from(params: { + argument: K.ExpressionKind; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.JSXSpreadAttribute; +} +export interface JSXElementBuilder { + (openingElement: K.JSXOpeningElementKind, closingElement?: K.JSXClosingElementKind | null, children?: (K.JSXElementKind | K.JSXExpressionContainerKind | K.JSXFragmentKind | K.JSXTextKind | K.LiteralKind)[]): namedTypes.JSXElement; + from(params: { + attributes?: (K.JSXAttributeKind | K.JSXSpreadAttributeKind)[]; + children?: (K.JSXElementKind | K.JSXExpressionContainerKind | K.JSXFragmentKind | K.JSXTextKind | K.LiteralKind)[]; + closingElement?: K.JSXClosingElementKind | null; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + name?: K.JSXIdentifierKind | K.JSXNamespacedNameKind | K.JSXMemberExpressionKind; + openingElement: K.JSXOpeningElementKind; + selfClosing?: boolean; + }): namedTypes.JSXElement; +} +export interface JSXOpeningElementBuilder { + (name: K.JSXIdentifierKind | K.JSXNamespacedNameKind | K.JSXMemberExpressionKind, attributes?: (K.JSXAttributeKind | K.JSXSpreadAttributeKind)[], selfClosing?: boolean): namedTypes.JSXOpeningElement; + from(params: { + attributes?: (K.JSXAttributeKind | K.JSXSpreadAttributeKind)[]; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + name: K.JSXIdentifierKind | K.JSXNamespacedNameKind | K.JSXMemberExpressionKind; + selfClosing?: boolean; + }): namedTypes.JSXOpeningElement; +} +export interface JSXClosingElementBuilder { + (name: K.JSXIdentifierKind | K.JSXNamespacedNameKind | K.JSXMemberExpressionKind): namedTypes.JSXClosingElement; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + name: K.JSXIdentifierKind | K.JSXNamespacedNameKind | K.JSXMemberExpressionKind; + }): namedTypes.JSXClosingElement; +} +export interface JSXFragmentBuilder { + (openingElement: K.JSXOpeningFragmentKind, closingElement: K.JSXClosingFragmentKind, children?: (K.JSXElementKind | K.JSXExpressionContainerKind | K.JSXFragmentKind | K.JSXTextKind | K.LiteralKind)[]): namedTypes.JSXFragment; + from(params: { + children?: (K.JSXElementKind | K.JSXExpressionContainerKind | K.JSXFragmentKind | K.JSXTextKind | K.LiteralKind)[]; + closingElement: K.JSXClosingFragmentKind; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + openingElement: K.JSXOpeningFragmentKind; + }): namedTypes.JSXFragment; +} +export interface JSXTextBuilder { + (value: string): namedTypes.JSXText; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + regex?: { + pattern: string; + flags: string; + } | null; + value: string; + }): namedTypes.JSXText; +} +export interface JSXOpeningFragmentBuilder { + (): namedTypes.JSXOpeningFragment; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.JSXOpeningFragment; +} +export interface JSXClosingFragmentBuilder { + (): namedTypes.JSXClosingFragment; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.JSXClosingFragment; +} +export interface JSXEmptyExpressionBuilder { + (): namedTypes.JSXEmptyExpression; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.JSXEmptyExpression; +} +export interface JSXSpreadChildBuilder { + (expression: K.ExpressionKind): namedTypes.JSXSpreadChild; + from(params: { + comments?: K.CommentKind[] | null; + expression: K.ExpressionKind; + loc?: K.SourceLocationKind | null; + }): namedTypes.JSXSpreadChild; +} +export interface TypeParameterDeclarationBuilder { + (params: K.TypeParameterKind[]): namedTypes.TypeParameterDeclaration; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + params: K.TypeParameterKind[]; + }): namedTypes.TypeParameterDeclaration; +} +export interface TSTypeParameterDeclarationBuilder { + (params: K.TSTypeParameterKind[]): namedTypes.TSTypeParameterDeclaration; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + params: K.TSTypeParameterKind[]; + }): namedTypes.TSTypeParameterDeclaration; +} +export interface TypeParameterInstantiationBuilder { + (params: K.FlowTypeKind[]): namedTypes.TypeParameterInstantiation; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + params: K.FlowTypeKind[]; + }): namedTypes.TypeParameterInstantiation; +} +export interface TSTypeParameterInstantiationBuilder { + (params: K.TSTypeKind[]): namedTypes.TSTypeParameterInstantiation; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + params: K.TSTypeKind[]; + }): namedTypes.TSTypeParameterInstantiation; +} +export interface ClassImplementsBuilder { + (id: K.IdentifierKind): namedTypes.ClassImplements; + from(params: { + comments?: K.CommentKind[] | null; + id: K.IdentifierKind; + loc?: K.SourceLocationKind | null; + superClass?: K.ExpressionKind | null; + typeParameters?: K.TypeParameterInstantiationKind | null; + }): namedTypes.ClassImplements; +} +export interface TSExpressionWithTypeArgumentsBuilder { + (expression: K.IdentifierKind | K.TSQualifiedNameKind, typeParameters?: K.TSTypeParameterInstantiationKind | null): namedTypes.TSExpressionWithTypeArguments; + from(params: { + comments?: K.CommentKind[] | null; + expression: K.IdentifierKind | K.TSQualifiedNameKind; + loc?: K.SourceLocationKind | null; + typeParameters?: K.TSTypeParameterInstantiationKind | null; + }): namedTypes.TSExpressionWithTypeArguments; +} +export interface AnyTypeAnnotationBuilder { + (): namedTypes.AnyTypeAnnotation; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.AnyTypeAnnotation; +} +export interface EmptyTypeAnnotationBuilder { + (): namedTypes.EmptyTypeAnnotation; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.EmptyTypeAnnotation; +} +export interface MixedTypeAnnotationBuilder { + (): namedTypes.MixedTypeAnnotation; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.MixedTypeAnnotation; +} +export interface VoidTypeAnnotationBuilder { + (): namedTypes.VoidTypeAnnotation; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.VoidTypeAnnotation; +} +export interface NumberTypeAnnotationBuilder { + (): namedTypes.NumberTypeAnnotation; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.NumberTypeAnnotation; +} +export interface NumberLiteralTypeAnnotationBuilder { + (value: number, raw: string): namedTypes.NumberLiteralTypeAnnotation; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + raw: string; + value: number; + }): namedTypes.NumberLiteralTypeAnnotation; +} +export interface NumericLiteralTypeAnnotationBuilder { + (value: number, raw: string): namedTypes.NumericLiteralTypeAnnotation; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + raw: string; + value: number; + }): namedTypes.NumericLiteralTypeAnnotation; +} +export interface StringTypeAnnotationBuilder { + (): namedTypes.StringTypeAnnotation; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.StringTypeAnnotation; +} +export interface StringLiteralTypeAnnotationBuilder { + (value: string, raw: string): namedTypes.StringLiteralTypeAnnotation; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + raw: string; + value: string; + }): namedTypes.StringLiteralTypeAnnotation; +} +export interface BooleanTypeAnnotationBuilder { + (): namedTypes.BooleanTypeAnnotation; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.BooleanTypeAnnotation; +} +export interface BooleanLiteralTypeAnnotationBuilder { + (value: boolean, raw: string): namedTypes.BooleanLiteralTypeAnnotation; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + raw: string; + value: boolean; + }): namedTypes.BooleanLiteralTypeAnnotation; +} +export interface NullableTypeAnnotationBuilder { + (typeAnnotation: K.FlowTypeKind): namedTypes.NullableTypeAnnotation; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + typeAnnotation: K.FlowTypeKind; + }): namedTypes.NullableTypeAnnotation; +} +export interface NullLiteralTypeAnnotationBuilder { + (): namedTypes.NullLiteralTypeAnnotation; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.NullLiteralTypeAnnotation; +} +export interface NullTypeAnnotationBuilder { + (): namedTypes.NullTypeAnnotation; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.NullTypeAnnotation; +} +export interface ThisTypeAnnotationBuilder { + (): namedTypes.ThisTypeAnnotation; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.ThisTypeAnnotation; +} +export interface ExistsTypeAnnotationBuilder { + (): namedTypes.ExistsTypeAnnotation; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.ExistsTypeAnnotation; +} +export interface ExistentialTypeParamBuilder { + (): namedTypes.ExistentialTypeParam; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.ExistentialTypeParam; +} +export interface FunctionTypeAnnotationBuilder { + (params: K.FunctionTypeParamKind[], returnType: K.FlowTypeKind, rest: K.FunctionTypeParamKind | null, typeParameters: K.TypeParameterDeclarationKind | null): namedTypes.FunctionTypeAnnotation; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + params: K.FunctionTypeParamKind[]; + rest: K.FunctionTypeParamKind | null; + returnType: K.FlowTypeKind; + typeParameters: K.TypeParameterDeclarationKind | null; + }): namedTypes.FunctionTypeAnnotation; +} +export interface FunctionTypeParamBuilder { + (name: K.IdentifierKind, typeAnnotation: K.FlowTypeKind, optional: boolean): namedTypes.FunctionTypeParam; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + name: K.IdentifierKind; + optional: boolean; + typeAnnotation: K.FlowTypeKind; + }): namedTypes.FunctionTypeParam; +} +export interface ArrayTypeAnnotationBuilder { + (elementType: K.FlowTypeKind): namedTypes.ArrayTypeAnnotation; + from(params: { + comments?: K.CommentKind[] | null; + elementType: K.FlowTypeKind; + loc?: K.SourceLocationKind | null; + }): namedTypes.ArrayTypeAnnotation; +} +export interface ObjectTypeAnnotationBuilder { + (properties: (K.ObjectTypePropertyKind | K.ObjectTypeSpreadPropertyKind)[], indexers?: K.ObjectTypeIndexerKind[], callProperties?: K.ObjectTypeCallPropertyKind[]): namedTypes.ObjectTypeAnnotation; + from(params: { + callProperties?: K.ObjectTypeCallPropertyKind[]; + comments?: K.CommentKind[] | null; + exact?: boolean; + indexers?: K.ObjectTypeIndexerKind[]; + inexact?: boolean | undefined; + internalSlots?: K.ObjectTypeInternalSlotKind[]; + loc?: K.SourceLocationKind | null; + properties: (K.ObjectTypePropertyKind | K.ObjectTypeSpreadPropertyKind)[]; + }): namedTypes.ObjectTypeAnnotation; +} +export interface ObjectTypePropertyBuilder { + (key: K.LiteralKind | K.IdentifierKind, value: K.FlowTypeKind, optional: boolean): namedTypes.ObjectTypeProperty; + from(params: { + comments?: K.CommentKind[] | null; + key: K.LiteralKind | K.IdentifierKind; + loc?: K.SourceLocationKind | null; + optional: boolean; + value: K.FlowTypeKind; + variance?: K.VarianceKind | "plus" | "minus" | null; + }): namedTypes.ObjectTypeProperty; +} +export interface ObjectTypeSpreadPropertyBuilder { + (argument: K.FlowTypeKind): namedTypes.ObjectTypeSpreadProperty; + from(params: { + argument: K.FlowTypeKind; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.ObjectTypeSpreadProperty; +} +export interface ObjectTypeIndexerBuilder { + (id: K.IdentifierKind, key: K.FlowTypeKind, value: K.FlowTypeKind): namedTypes.ObjectTypeIndexer; + from(params: { + comments?: K.CommentKind[] | null; + id: K.IdentifierKind; + key: K.FlowTypeKind; + loc?: K.SourceLocationKind | null; + value: K.FlowTypeKind; + variance?: K.VarianceKind | "plus" | "minus" | null; + }): namedTypes.ObjectTypeIndexer; +} +export interface ObjectTypeCallPropertyBuilder { + (value: K.FunctionTypeAnnotationKind): namedTypes.ObjectTypeCallProperty; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + static?: boolean; + value: K.FunctionTypeAnnotationKind; + }): namedTypes.ObjectTypeCallProperty; +} +export interface ObjectTypeInternalSlotBuilder { + (id: K.IdentifierKind, value: K.FlowTypeKind, optional: boolean, staticParam: boolean, method: boolean): namedTypes.ObjectTypeInternalSlot; + from(params: { + comments?: K.CommentKind[] | null; + id: K.IdentifierKind; + loc?: K.SourceLocationKind | null; + method: boolean; + optional: boolean; + static: boolean; + value: K.FlowTypeKind; + }): namedTypes.ObjectTypeInternalSlot; +} +export interface VarianceBuilder { + (kind: "plus" | "minus"): namedTypes.Variance; + from(params: { + comments?: K.CommentKind[] | null; + kind: "plus" | "minus"; + loc?: K.SourceLocationKind | null; + }): namedTypes.Variance; +} +export interface QualifiedTypeIdentifierBuilder { + (qualification: K.IdentifierKind | K.QualifiedTypeIdentifierKind, id: K.IdentifierKind): namedTypes.QualifiedTypeIdentifier; + from(params: { + comments?: K.CommentKind[] | null; + id: K.IdentifierKind; + loc?: K.SourceLocationKind | null; + qualification: K.IdentifierKind | K.QualifiedTypeIdentifierKind; + }): namedTypes.QualifiedTypeIdentifier; +} +export interface GenericTypeAnnotationBuilder { + (id: K.IdentifierKind | K.QualifiedTypeIdentifierKind, typeParameters: K.TypeParameterInstantiationKind | null): namedTypes.GenericTypeAnnotation; + from(params: { + comments?: K.CommentKind[] | null; + id: K.IdentifierKind | K.QualifiedTypeIdentifierKind; + loc?: K.SourceLocationKind | null; + typeParameters: K.TypeParameterInstantiationKind | null; + }): namedTypes.GenericTypeAnnotation; +} +export interface MemberTypeAnnotationBuilder { + (object: K.IdentifierKind, property: K.MemberTypeAnnotationKind | K.GenericTypeAnnotationKind): namedTypes.MemberTypeAnnotation; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + object: K.IdentifierKind; + property: K.MemberTypeAnnotationKind | K.GenericTypeAnnotationKind; + }): namedTypes.MemberTypeAnnotation; +} +export interface UnionTypeAnnotationBuilder { + (types: K.FlowTypeKind[]): namedTypes.UnionTypeAnnotation; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + types: K.FlowTypeKind[]; + }): namedTypes.UnionTypeAnnotation; +} +export interface IntersectionTypeAnnotationBuilder { + (types: K.FlowTypeKind[]): namedTypes.IntersectionTypeAnnotation; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + types: K.FlowTypeKind[]; + }): namedTypes.IntersectionTypeAnnotation; +} +export interface TypeofTypeAnnotationBuilder { + (argument: K.FlowTypeKind): namedTypes.TypeofTypeAnnotation; + from(params: { + argument: K.FlowTypeKind; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.TypeofTypeAnnotation; +} +export interface TypeParameterBuilder { + (name: string, variance?: K.VarianceKind | "plus" | "minus" | null, bound?: K.TypeAnnotationKind | null): namedTypes.TypeParameter; + from(params: { + bound?: K.TypeAnnotationKind | null; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + name: string; + variance?: K.VarianceKind | "plus" | "minus" | null; + }): namedTypes.TypeParameter; +} +export interface InterfaceTypeAnnotationBuilder { + (body: K.ObjectTypeAnnotationKind, extendsParam?: K.InterfaceExtendsKind[] | null): namedTypes.InterfaceTypeAnnotation; + from(params: { + body: K.ObjectTypeAnnotationKind; + comments?: K.CommentKind[] | null; + extends?: K.InterfaceExtendsKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.InterfaceTypeAnnotation; +} +export interface InterfaceExtendsBuilder { + (id: K.IdentifierKind): namedTypes.InterfaceExtends; + from(params: { + comments?: K.CommentKind[] | null; + id: K.IdentifierKind; + loc?: K.SourceLocationKind | null; + typeParameters?: K.TypeParameterInstantiationKind | null; + }): namedTypes.InterfaceExtends; +} +export interface InterfaceDeclarationBuilder { + (id: K.IdentifierKind, body: K.ObjectTypeAnnotationKind, extendsParam: K.InterfaceExtendsKind[]): namedTypes.InterfaceDeclaration; + from(params: { + body: K.ObjectTypeAnnotationKind; + comments?: K.CommentKind[] | null; + extends: K.InterfaceExtendsKind[]; + id: K.IdentifierKind; + loc?: K.SourceLocationKind | null; + typeParameters?: K.TypeParameterDeclarationKind | null; + }): namedTypes.InterfaceDeclaration; +} +export interface DeclareInterfaceBuilder { + (id: K.IdentifierKind, body: K.ObjectTypeAnnotationKind, extendsParam: K.InterfaceExtendsKind[]): namedTypes.DeclareInterface; + from(params: { + body: K.ObjectTypeAnnotationKind; + comments?: K.CommentKind[] | null; + extends: K.InterfaceExtendsKind[]; + id: K.IdentifierKind; + loc?: K.SourceLocationKind | null; + typeParameters?: K.TypeParameterDeclarationKind | null; + }): namedTypes.DeclareInterface; +} +export interface TypeAliasBuilder { + (id: K.IdentifierKind, typeParameters: K.TypeParameterDeclarationKind | null, right: K.FlowTypeKind): namedTypes.TypeAlias; + from(params: { + comments?: K.CommentKind[] | null; + id: K.IdentifierKind; + loc?: K.SourceLocationKind | null; + right: K.FlowTypeKind; + typeParameters: K.TypeParameterDeclarationKind | null; + }): namedTypes.TypeAlias; +} +export interface OpaqueTypeBuilder { + (id: K.IdentifierKind, typeParameters: K.TypeParameterDeclarationKind | null, impltype: K.FlowTypeKind, supertype: K.FlowTypeKind): namedTypes.OpaqueType; + from(params: { + comments?: K.CommentKind[] | null; + id: K.IdentifierKind; + impltype: K.FlowTypeKind; + loc?: K.SourceLocationKind | null; + supertype: K.FlowTypeKind; + typeParameters: K.TypeParameterDeclarationKind | null; + }): namedTypes.OpaqueType; +} +export interface DeclareTypeAliasBuilder { + (id: K.IdentifierKind, typeParameters: K.TypeParameterDeclarationKind | null, right: K.FlowTypeKind): namedTypes.DeclareTypeAlias; + from(params: { + comments?: K.CommentKind[] | null; + id: K.IdentifierKind; + loc?: K.SourceLocationKind | null; + right: K.FlowTypeKind; + typeParameters: K.TypeParameterDeclarationKind | null; + }): namedTypes.DeclareTypeAlias; +} +export interface DeclareOpaqueTypeBuilder { + (id: K.IdentifierKind, typeParameters: K.TypeParameterDeclarationKind | null): namedTypes.DeclareOpaqueType; + from(params: { + comments?: K.CommentKind[] | null; + id: K.IdentifierKind; + loc?: K.SourceLocationKind | null; + right: K.FlowTypeKind; + typeParameters: K.TypeParameterDeclarationKind | null; + }): namedTypes.DeclareOpaqueType; +} +export interface TypeCastExpressionBuilder { + (expression: K.ExpressionKind, typeAnnotation: K.TypeAnnotationKind): namedTypes.TypeCastExpression; + from(params: { + comments?: K.CommentKind[] | null; + expression: K.ExpressionKind; + loc?: K.SourceLocationKind | null; + typeAnnotation: K.TypeAnnotationKind; + }): namedTypes.TypeCastExpression; +} +export interface TupleTypeAnnotationBuilder { + (types: K.FlowTypeKind[]): namedTypes.TupleTypeAnnotation; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + types: K.FlowTypeKind[]; + }): namedTypes.TupleTypeAnnotation; +} +export interface DeclareVariableBuilder { + (id: K.IdentifierKind): namedTypes.DeclareVariable; + from(params: { + comments?: K.CommentKind[] | null; + id: K.IdentifierKind; + loc?: K.SourceLocationKind | null; + }): namedTypes.DeclareVariable; +} +export interface DeclareFunctionBuilder { + (id: K.IdentifierKind): namedTypes.DeclareFunction; + from(params: { + comments?: K.CommentKind[] | null; + id: K.IdentifierKind; + loc?: K.SourceLocationKind | null; + }): namedTypes.DeclareFunction; +} +export interface DeclareClassBuilder { + (id: K.IdentifierKind): namedTypes.DeclareClass; + from(params: { + body: K.ObjectTypeAnnotationKind; + comments?: K.CommentKind[] | null; + extends: K.InterfaceExtendsKind[]; + id: K.IdentifierKind; + loc?: K.SourceLocationKind | null; + typeParameters?: K.TypeParameterDeclarationKind | null; + }): namedTypes.DeclareClass; +} +export interface DeclareModuleBuilder { + (id: K.IdentifierKind | K.LiteralKind, body: K.BlockStatementKind): namedTypes.DeclareModule; + from(params: { + body: K.BlockStatementKind; + comments?: K.CommentKind[] | null; + id: K.IdentifierKind | K.LiteralKind; + loc?: K.SourceLocationKind | null; + }): namedTypes.DeclareModule; +} +export interface DeclareModuleExportsBuilder { + (typeAnnotation: K.TypeAnnotationKind): namedTypes.DeclareModuleExports; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + typeAnnotation: K.TypeAnnotationKind; + }): namedTypes.DeclareModuleExports; +} +export interface DeclareExportDeclarationBuilder { + (defaultParam: boolean, declaration: K.DeclareVariableKind | K.DeclareFunctionKind | K.DeclareClassKind | K.FlowTypeKind | null, specifiers?: (K.ExportSpecifierKind | K.ExportBatchSpecifierKind)[], source?: K.LiteralKind | null): namedTypes.DeclareExportDeclaration; + from(params: { + comments?: K.CommentKind[] | null; + declaration: K.DeclareVariableKind | K.DeclareFunctionKind | K.DeclareClassKind | K.FlowTypeKind | null; + default: boolean; + loc?: K.SourceLocationKind | null; + source?: K.LiteralKind | null; + specifiers?: (K.ExportSpecifierKind | K.ExportBatchSpecifierKind)[]; + }): namedTypes.DeclareExportDeclaration; +} +export interface ExportSpecifierBuilder { + (local: K.IdentifierKind | null | undefined, exported: K.IdentifierKind): namedTypes.ExportSpecifier; + from(params: { + comments?: K.CommentKind[] | null; + exported: K.IdentifierKind; + id?: K.IdentifierKind | null; + loc?: K.SourceLocationKind | null; + local?: K.IdentifierKind | null; + name?: K.IdentifierKind | null; + }): namedTypes.ExportSpecifier; +} +export interface ExportBatchSpecifierBuilder { + (): namedTypes.ExportBatchSpecifier; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.ExportBatchSpecifier; +} +export interface DeclareExportAllDeclarationBuilder { + (source?: K.LiteralKind | null): namedTypes.DeclareExportAllDeclaration; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + source?: K.LiteralKind | null; + }): namedTypes.DeclareExportAllDeclaration; +} +export interface InferredPredicateBuilder { + (): namedTypes.InferredPredicate; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.InferredPredicate; +} +export interface DeclaredPredicateBuilder { + (value: K.ExpressionKind): namedTypes.DeclaredPredicate; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + value: K.ExpressionKind; + }): namedTypes.DeclaredPredicate; +} +export interface ExportDeclarationBuilder { + (defaultParam: boolean, declaration: K.DeclarationKind | K.ExpressionKind | null, specifiers?: (K.ExportSpecifierKind | K.ExportBatchSpecifierKind)[], source?: K.LiteralKind | null): namedTypes.ExportDeclaration; + from(params: { + comments?: K.CommentKind[] | null; + declaration: K.DeclarationKind | K.ExpressionKind | null; + default: boolean; + loc?: K.SourceLocationKind | null; + source?: K.LiteralKind | null; + specifiers?: (K.ExportSpecifierKind | K.ExportBatchSpecifierKind)[]; + }): namedTypes.ExportDeclaration; +} +export interface BlockBuilder { + (value: string, leading?: boolean, trailing?: boolean): namedTypes.Block; + from(params: { + leading?: boolean; + loc?: K.SourceLocationKind | null; + trailing?: boolean; + value: string; + }): namedTypes.Block; +} +export interface LineBuilder { + (value: string, leading?: boolean, trailing?: boolean): namedTypes.Line; + from(params: { + leading?: boolean; + loc?: K.SourceLocationKind | null; + trailing?: boolean; + value: string; + }): namedTypes.Line; +} +export interface NoopBuilder { + (): namedTypes.Noop; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.Noop; +} +export interface DoExpressionBuilder { + (body: K.StatementKind[]): namedTypes.DoExpression; + from(params: { + body: K.StatementKind[]; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.DoExpression; +} +export interface SuperBuilder { + (): namedTypes.Super; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.Super; +} +export interface BindExpressionBuilder { + (object: K.ExpressionKind | null, callee: K.ExpressionKind): namedTypes.BindExpression; + from(params: { + callee: K.ExpressionKind; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + object: K.ExpressionKind | null; + }): namedTypes.BindExpression; +} +export interface DecoratorBuilder { + (expression: K.ExpressionKind): namedTypes.Decorator; + from(params: { + comments?: K.CommentKind[] | null; + expression: K.ExpressionKind; + loc?: K.SourceLocationKind | null; + }): namedTypes.Decorator; +} +export interface MetaPropertyBuilder { + (meta: K.IdentifierKind, property: K.IdentifierKind): namedTypes.MetaProperty; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + meta: K.IdentifierKind; + property: K.IdentifierKind; + }): namedTypes.MetaProperty; +} +export interface ParenthesizedExpressionBuilder { + (expression: K.ExpressionKind): namedTypes.ParenthesizedExpression; + from(params: { + comments?: K.CommentKind[] | null; + expression: K.ExpressionKind; + loc?: K.SourceLocationKind | null; + }): namedTypes.ParenthesizedExpression; +} +export interface ExportDefaultDeclarationBuilder { + (declaration: K.DeclarationKind | K.ExpressionKind): namedTypes.ExportDefaultDeclaration; + from(params: { + comments?: K.CommentKind[] | null; + declaration: K.DeclarationKind | K.ExpressionKind; + loc?: K.SourceLocationKind | null; + }): namedTypes.ExportDefaultDeclaration; +} +export interface ExportNamedDeclarationBuilder { + (declaration: K.DeclarationKind | null, specifiers?: K.ExportSpecifierKind[], source?: K.LiteralKind | null): namedTypes.ExportNamedDeclaration; + from(params: { + comments?: K.CommentKind[] | null; + declaration: K.DeclarationKind | null; + loc?: K.SourceLocationKind | null; + source?: K.LiteralKind | null; + specifiers?: K.ExportSpecifierKind[]; + }): namedTypes.ExportNamedDeclaration; +} +export interface ExportNamespaceSpecifierBuilder { + (exported: K.IdentifierKind): namedTypes.ExportNamespaceSpecifier; + from(params: { + comments?: K.CommentKind[] | null; + exported: K.IdentifierKind; + loc?: K.SourceLocationKind | null; + }): namedTypes.ExportNamespaceSpecifier; +} +export interface ExportDefaultSpecifierBuilder { + (exported: K.IdentifierKind): namedTypes.ExportDefaultSpecifier; + from(params: { + comments?: K.CommentKind[] | null; + exported: K.IdentifierKind; + loc?: K.SourceLocationKind | null; + }): namedTypes.ExportDefaultSpecifier; +} +export interface ExportAllDeclarationBuilder { + (exported: K.IdentifierKind | null, source: K.LiteralKind): namedTypes.ExportAllDeclaration; + from(params: { + comments?: K.CommentKind[] | null; + exported: K.IdentifierKind | null; + loc?: K.SourceLocationKind | null; + source: K.LiteralKind; + }): namedTypes.ExportAllDeclaration; +} +export interface CommentBlockBuilder { + (value: string, leading?: boolean, trailing?: boolean): namedTypes.CommentBlock; + from(params: { + leading?: boolean; + loc?: K.SourceLocationKind | null; + trailing?: boolean; + value: string; + }): namedTypes.CommentBlock; +} +export interface CommentLineBuilder { + (value: string, leading?: boolean, trailing?: boolean): namedTypes.CommentLine; + from(params: { + leading?: boolean; + loc?: K.SourceLocationKind | null; + trailing?: boolean; + value: string; + }): namedTypes.CommentLine; +} +export interface DirectiveBuilder { + (value: K.DirectiveLiteralKind): namedTypes.Directive; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + value: K.DirectiveLiteralKind; + }): namedTypes.Directive; +} +export interface DirectiveLiteralBuilder { + (value?: string): namedTypes.DirectiveLiteral; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + value?: string; + }): namedTypes.DirectiveLiteral; +} +export interface InterpreterDirectiveBuilder { + (value: string): namedTypes.InterpreterDirective; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + value: string; + }): namedTypes.InterpreterDirective; +} +export interface StringLiteralBuilder { + (value: string): namedTypes.StringLiteral; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + regex?: { + pattern: string; + flags: string; + } | null; + value: string; + }): namedTypes.StringLiteral; +} +export interface NumericLiteralBuilder { + (value: number): namedTypes.NumericLiteral; + from(params: { + comments?: K.CommentKind[] | null; + extra?: { + rawValue: number; + raw: string; + }; + loc?: K.SourceLocationKind | null; + raw?: string | null; + regex?: { + pattern: string; + flags: string; + } | null; + value: number; + }): namedTypes.NumericLiteral; +} +export interface BigIntLiteralBuilder { + (value: string | number): namedTypes.BigIntLiteral; + from(params: { + comments?: K.CommentKind[] | null; + extra?: { + rawValue: string; + raw: string; + }; + loc?: K.SourceLocationKind | null; + regex?: { + pattern: string; + flags: string; + } | null; + value: string | number; + }): namedTypes.BigIntLiteral; +} +export interface NullLiteralBuilder { + (): namedTypes.NullLiteral; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + regex?: { + pattern: string; + flags: string; + } | null; + value?: null; + }): namedTypes.NullLiteral; +} +export interface BooleanLiteralBuilder { + (value: boolean): namedTypes.BooleanLiteral; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + regex?: { + pattern: string; + flags: string; + } | null; + value: boolean; + }): namedTypes.BooleanLiteral; +} +export interface RegExpLiteralBuilder { + (pattern: string, flags: string): namedTypes.RegExpLiteral; + from(params: { + comments?: K.CommentKind[] | null; + flags: string; + loc?: K.SourceLocationKind | null; + pattern: string; + regex?: { + pattern: string; + flags: string; + } | null; + value?: RegExp; + }): namedTypes.RegExpLiteral; +} +export interface ObjectMethodBuilder { + (kind: "method" | "get" | "set", key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind, params: K.PatternKind[], body: K.BlockStatementKind, computed?: boolean): namedTypes.ObjectMethod; + from(params: { + accessibility?: K.LiteralKind | null; + async?: boolean; + body: K.BlockStatementKind; + comments?: K.CommentKind[] | null; + computed?: boolean; + decorators?: K.DecoratorKind[] | null; + defaults?: (K.ExpressionKind | null)[]; + expression?: boolean; + generator?: boolean; + id?: K.IdentifierKind | null; + key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind; + kind: "method" | "get" | "set"; + loc?: K.SourceLocationKind | null; + params: K.PatternKind[]; + rest?: K.IdentifierKind | null; + returnType?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null; + typeParameters?: K.TypeParameterDeclarationKind | K.TSTypeParameterDeclarationKind | null; + }): namedTypes.ObjectMethod; +} +export interface ClassPrivatePropertyBuilder { + (key: K.PrivateNameKind, value?: K.ExpressionKind | null): namedTypes.ClassPrivateProperty; + from(params: { + access?: "public" | "private" | "protected" | undefined; + comments?: K.CommentKind[] | null; + computed?: boolean; + key: K.PrivateNameKind; + loc?: K.SourceLocationKind | null; + static?: boolean; + typeAnnotation?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null; + value?: K.ExpressionKind | null; + variance?: K.VarianceKind | "plus" | "minus" | null; + }): namedTypes.ClassPrivateProperty; +} +export interface ClassMethodBuilder { + (kind: "get" | "set" | "method" | "constructor" | undefined, key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind, params: K.PatternKind[], body: K.BlockStatementKind, computed?: boolean, staticParam?: boolean | null): namedTypes.ClassMethod; + from(params: { + abstract?: boolean | null; + access?: "public" | "private" | "protected" | null; + accessibility?: "public" | "private" | "protected" | null; + async?: boolean; + body: K.BlockStatementKind; + comments?: K.CommentKind[] | null; + computed?: boolean; + decorators?: K.DecoratorKind[] | null; + defaults?: (K.ExpressionKind | null)[]; + expression?: boolean; + generator?: boolean; + id?: K.IdentifierKind | null; + key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind; + kind?: "get" | "set" | "method" | "constructor"; + loc?: K.SourceLocationKind | null; + optional?: boolean | null; + params: K.PatternKind[]; + rest?: K.IdentifierKind | null; + returnType?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null; + static?: boolean | null; + typeParameters?: K.TypeParameterDeclarationKind | K.TSTypeParameterDeclarationKind | null; + }): namedTypes.ClassMethod; +} +export interface ClassPrivateMethodBuilder { + (key: K.PrivateNameKind, params: K.PatternKind[], body: K.BlockStatementKind, kind?: "get" | "set" | "method" | "constructor", computed?: boolean, staticParam?: boolean | null): namedTypes.ClassPrivateMethod; + from(params: { + abstract?: boolean | null; + access?: "public" | "private" | "protected" | null; + accessibility?: "public" | "private" | "protected" | null; + async?: boolean; + body: K.BlockStatementKind; + comments?: K.CommentKind[] | null; + computed?: boolean; + decorators?: K.DecoratorKind[] | null; + defaults?: (K.ExpressionKind | null)[]; + expression?: boolean; + generator?: boolean; + id?: K.IdentifierKind | null; + key: K.PrivateNameKind; + kind?: "get" | "set" | "method" | "constructor"; + loc?: K.SourceLocationKind | null; + optional?: boolean | null; + params: K.PatternKind[]; + rest?: K.IdentifierKind | null; + returnType?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null; + static?: boolean | null; + typeParameters?: K.TypeParameterDeclarationKind | K.TSTypeParameterDeclarationKind | null; + }): namedTypes.ClassPrivateMethod; +} +export interface PrivateNameBuilder { + (id: K.IdentifierKind): namedTypes.PrivateName; + from(params: { + comments?: K.CommentKind[] | null; + id: K.IdentifierKind; + loc?: K.SourceLocationKind | null; + }): namedTypes.PrivateName; +} +export interface RestPropertyBuilder { + (argument: K.ExpressionKind): namedTypes.RestProperty; + from(params: { + argument: K.ExpressionKind; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.RestProperty; +} +export interface ForAwaitStatementBuilder { + (left: K.VariableDeclarationKind | K.ExpressionKind, right: K.ExpressionKind, body: K.StatementKind): namedTypes.ForAwaitStatement; + from(params: { + body: K.StatementKind; + comments?: K.CommentKind[] | null; + left: K.VariableDeclarationKind | K.ExpressionKind; + loc?: K.SourceLocationKind | null; + right: K.ExpressionKind; + }): namedTypes.ForAwaitStatement; +} +export interface ImportBuilder { + (): namedTypes.Import; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.Import; +} +export interface TSQualifiedNameBuilder { + (left: K.IdentifierKind | K.TSQualifiedNameKind, right: K.IdentifierKind | K.TSQualifiedNameKind): namedTypes.TSQualifiedName; + from(params: { + comments?: K.CommentKind[] | null; + left: K.IdentifierKind | K.TSQualifiedNameKind; + loc?: K.SourceLocationKind | null; + right: K.IdentifierKind | K.TSQualifiedNameKind; + }): namedTypes.TSQualifiedName; +} +export interface TSTypeReferenceBuilder { + (typeName: K.IdentifierKind | K.TSQualifiedNameKind, typeParameters?: K.TSTypeParameterInstantiationKind | null): namedTypes.TSTypeReference; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + typeName: K.IdentifierKind | K.TSQualifiedNameKind; + typeParameters?: K.TSTypeParameterInstantiationKind | null; + }): namedTypes.TSTypeReference; +} +export interface TSAsExpressionBuilder { + (expression: K.ExpressionKind, typeAnnotation: K.TSTypeKind): namedTypes.TSAsExpression; + from(params: { + comments?: K.CommentKind[] | null; + expression: K.ExpressionKind; + extra?: { + parenthesized: boolean; + } | null; + loc?: K.SourceLocationKind | null; + typeAnnotation: K.TSTypeKind; + }): namedTypes.TSAsExpression; +} +export interface TSNonNullExpressionBuilder { + (expression: K.ExpressionKind): namedTypes.TSNonNullExpression; + from(params: { + comments?: K.CommentKind[] | null; + expression: K.ExpressionKind; + loc?: K.SourceLocationKind | null; + }): namedTypes.TSNonNullExpression; +} +export interface TSAnyKeywordBuilder { + (): namedTypes.TSAnyKeyword; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.TSAnyKeyword; +} +export interface TSBigIntKeywordBuilder { + (): namedTypes.TSBigIntKeyword; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.TSBigIntKeyword; +} +export interface TSBooleanKeywordBuilder { + (): namedTypes.TSBooleanKeyword; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.TSBooleanKeyword; +} +export interface TSNeverKeywordBuilder { + (): namedTypes.TSNeverKeyword; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.TSNeverKeyword; +} +export interface TSNullKeywordBuilder { + (): namedTypes.TSNullKeyword; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.TSNullKeyword; +} +export interface TSNumberKeywordBuilder { + (): namedTypes.TSNumberKeyword; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.TSNumberKeyword; +} +export interface TSObjectKeywordBuilder { + (): namedTypes.TSObjectKeyword; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.TSObjectKeyword; +} +export interface TSStringKeywordBuilder { + (): namedTypes.TSStringKeyword; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.TSStringKeyword; +} +export interface TSSymbolKeywordBuilder { + (): namedTypes.TSSymbolKeyword; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.TSSymbolKeyword; +} +export interface TSUndefinedKeywordBuilder { + (): namedTypes.TSUndefinedKeyword; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.TSUndefinedKeyword; +} +export interface TSUnknownKeywordBuilder { + (): namedTypes.TSUnknownKeyword; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.TSUnknownKeyword; +} +export interface TSVoidKeywordBuilder { + (): namedTypes.TSVoidKeyword; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.TSVoidKeyword; +} +export interface TSThisTypeBuilder { + (): namedTypes.TSThisType; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.TSThisType; +} +export interface TSArrayTypeBuilder { + (elementType: K.TSTypeKind): namedTypes.TSArrayType; + from(params: { + comments?: K.CommentKind[] | null; + elementType: K.TSTypeKind; + loc?: K.SourceLocationKind | null; + }): namedTypes.TSArrayType; +} +export interface TSLiteralTypeBuilder { + (literal: K.NumericLiteralKind | K.StringLiteralKind | K.BooleanLiteralKind | K.TemplateLiteralKind | K.UnaryExpressionKind): namedTypes.TSLiteralType; + from(params: { + comments?: K.CommentKind[] | null; + literal: K.NumericLiteralKind | K.StringLiteralKind | K.BooleanLiteralKind | K.TemplateLiteralKind | K.UnaryExpressionKind; + loc?: K.SourceLocationKind | null; + }): namedTypes.TSLiteralType; +} +export interface TSUnionTypeBuilder { + (types: K.TSTypeKind[]): namedTypes.TSUnionType; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + types: K.TSTypeKind[]; + }): namedTypes.TSUnionType; +} +export interface TSIntersectionTypeBuilder { + (types: K.TSTypeKind[]): namedTypes.TSIntersectionType; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + types: K.TSTypeKind[]; + }): namedTypes.TSIntersectionType; +} +export interface TSConditionalTypeBuilder { + (checkType: K.TSTypeKind, extendsType: K.TSTypeKind, trueType: K.TSTypeKind, falseType: K.TSTypeKind): namedTypes.TSConditionalType; + from(params: { + checkType: K.TSTypeKind; + comments?: K.CommentKind[] | null; + extendsType: K.TSTypeKind; + falseType: K.TSTypeKind; + loc?: K.SourceLocationKind | null; + trueType: K.TSTypeKind; + }): namedTypes.TSConditionalType; +} +export interface TSInferTypeBuilder { + (typeParameter: K.TSTypeParameterKind): namedTypes.TSInferType; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + typeParameter: K.TSTypeParameterKind; + }): namedTypes.TSInferType; +} +export interface TSTypeParameterBuilder { + (name: string, constraint?: K.TSTypeKind | undefined, defaultParam?: K.TSTypeKind | undefined): namedTypes.TSTypeParameter; + from(params: { + comments?: K.CommentKind[] | null; + constraint?: K.TSTypeKind | undefined; + default?: K.TSTypeKind | undefined; + loc?: K.SourceLocationKind | null; + name: string; + optional?: boolean; + typeAnnotation?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null; + }): namedTypes.TSTypeParameter; +} +export interface TSParenthesizedTypeBuilder { + (typeAnnotation: K.TSTypeKind): namedTypes.TSParenthesizedType; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + typeAnnotation: K.TSTypeKind; + }): namedTypes.TSParenthesizedType; +} +export interface TSFunctionTypeBuilder { + (parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[]): namedTypes.TSFunctionType; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[]; + typeAnnotation?: K.TSTypeAnnotationKind | null; + typeParameters?: K.TSTypeParameterDeclarationKind | null | undefined; + }): namedTypes.TSFunctionType; +} +export interface TSConstructorTypeBuilder { + (parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[]): namedTypes.TSConstructorType; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[]; + typeAnnotation?: K.TSTypeAnnotationKind | null; + typeParameters?: K.TSTypeParameterDeclarationKind | null | undefined; + }): namedTypes.TSConstructorType; +} +export interface TSDeclareFunctionBuilder { + (id: K.IdentifierKind | null | undefined, params: K.PatternKind[], returnType?: K.TSTypeAnnotationKind | K.NoopKind | null): namedTypes.TSDeclareFunction; + from(params: { + async?: boolean; + comments?: K.CommentKind[] | null; + declare?: boolean; + generator?: boolean; + id?: K.IdentifierKind | null; + loc?: K.SourceLocationKind | null; + params: K.PatternKind[]; + returnType?: K.TSTypeAnnotationKind | K.NoopKind | null; + typeParameters?: K.TSTypeParameterDeclarationKind | null | undefined; + }): namedTypes.TSDeclareFunction; +} +export interface TSDeclareMethodBuilder { + (key: K.IdentifierKind | K.StringLiteralKind | K.NumericLiteralKind | K.ExpressionKind, params: K.PatternKind[], returnType?: K.TSTypeAnnotationKind | K.NoopKind | null): namedTypes.TSDeclareMethod; + from(params: { + abstract?: boolean; + access?: "public" | "private" | "protected" | undefined; + accessibility?: "public" | "private" | "protected" | undefined; + async?: boolean; + comments?: K.CommentKind[] | null; + computed?: boolean; + decorators?: K.DecoratorKind[] | null; + generator?: boolean; + key: K.IdentifierKind | K.StringLiteralKind | K.NumericLiteralKind | K.ExpressionKind; + kind?: "get" | "set" | "method" | "constructor"; + loc?: K.SourceLocationKind | null; + optional?: boolean; + params: K.PatternKind[]; + returnType?: K.TSTypeAnnotationKind | K.NoopKind | null; + static?: boolean; + typeParameters?: K.TSTypeParameterDeclarationKind | null | undefined; + }): namedTypes.TSDeclareMethod; +} +export interface TSMappedTypeBuilder { + (typeParameter: K.TSTypeParameterKind, typeAnnotation?: K.TSTypeKind | null): namedTypes.TSMappedType; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + optional?: boolean | "+" | "-"; + readonly?: boolean | "+" | "-"; + typeAnnotation?: K.TSTypeKind | null; + typeParameter: K.TSTypeParameterKind; + }): namedTypes.TSMappedType; +} +export interface TSTupleTypeBuilder { + (elementTypes: K.TSTypeKind[]): namedTypes.TSTupleType; + from(params: { + comments?: K.CommentKind[] | null; + elementTypes: K.TSTypeKind[]; + loc?: K.SourceLocationKind | null; + }): namedTypes.TSTupleType; +} +export interface TSRestTypeBuilder { + (typeAnnotation: K.TSTypeKind): namedTypes.TSRestType; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + typeAnnotation: K.TSTypeKind; + }): namedTypes.TSRestType; +} +export interface TSOptionalTypeBuilder { + (typeAnnotation: K.TSTypeKind): namedTypes.TSOptionalType; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + typeAnnotation: K.TSTypeKind; + }): namedTypes.TSOptionalType; +} +export interface TSIndexedAccessTypeBuilder { + (objectType: K.TSTypeKind, indexType: K.TSTypeKind): namedTypes.TSIndexedAccessType; + from(params: { + comments?: K.CommentKind[] | null; + indexType: K.TSTypeKind; + loc?: K.SourceLocationKind | null; + objectType: K.TSTypeKind; + }): namedTypes.TSIndexedAccessType; +} +export interface TSTypeOperatorBuilder { + (operator: string): namedTypes.TSTypeOperator; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + operator: string; + typeAnnotation: K.TSTypeKind; + }): namedTypes.TSTypeOperator; +} +export interface TSIndexSignatureBuilder { + (parameters: K.IdentifierKind[], typeAnnotation?: K.TSTypeAnnotationKind | null): namedTypes.TSIndexSignature; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + parameters: K.IdentifierKind[]; + readonly?: boolean; + typeAnnotation?: K.TSTypeAnnotationKind | null; + }): namedTypes.TSIndexSignature; +} +export interface TSPropertySignatureBuilder { + (key: K.ExpressionKind, typeAnnotation?: K.TSTypeAnnotationKind | null, optional?: boolean): namedTypes.TSPropertySignature; + from(params: { + comments?: K.CommentKind[] | null; + computed?: boolean; + initializer?: K.ExpressionKind | null; + key: K.ExpressionKind; + loc?: K.SourceLocationKind | null; + optional?: boolean; + readonly?: boolean; + typeAnnotation?: K.TSTypeAnnotationKind | null; + }): namedTypes.TSPropertySignature; +} +export interface TSMethodSignatureBuilder { + (key: K.ExpressionKind, parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[], typeAnnotation?: K.TSTypeAnnotationKind | null): namedTypes.TSMethodSignature; + from(params: { + comments?: K.CommentKind[] | null; + computed?: boolean; + key: K.ExpressionKind; + loc?: K.SourceLocationKind | null; + optional?: boolean; + parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[]; + typeAnnotation?: K.TSTypeAnnotationKind | null; + typeParameters?: K.TSTypeParameterDeclarationKind | null | undefined; + }): namedTypes.TSMethodSignature; +} +export interface TSTypePredicateBuilder { + (parameterName: K.IdentifierKind | K.TSThisTypeKind, typeAnnotation: K.TSTypeAnnotationKind): namedTypes.TSTypePredicate; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + parameterName: K.IdentifierKind | K.TSThisTypeKind; + typeAnnotation: K.TSTypeAnnotationKind; + }): namedTypes.TSTypePredicate; +} +export interface TSCallSignatureDeclarationBuilder { + (parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[], typeAnnotation?: K.TSTypeAnnotationKind | null): namedTypes.TSCallSignatureDeclaration; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[]; + typeAnnotation?: K.TSTypeAnnotationKind | null; + typeParameters?: K.TSTypeParameterDeclarationKind | null | undefined; + }): namedTypes.TSCallSignatureDeclaration; +} +export interface TSConstructSignatureDeclarationBuilder { + (parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[], typeAnnotation?: K.TSTypeAnnotationKind | null): namedTypes.TSConstructSignatureDeclaration; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[]; + typeAnnotation?: K.TSTypeAnnotationKind | null; + typeParameters?: K.TSTypeParameterDeclarationKind | null | undefined; + }): namedTypes.TSConstructSignatureDeclaration; +} +export interface TSEnumMemberBuilder { + (id: K.IdentifierKind | K.StringLiteralKind, initializer?: K.ExpressionKind | null): namedTypes.TSEnumMember; + from(params: { + comments?: K.CommentKind[] | null; + id: K.IdentifierKind | K.StringLiteralKind; + initializer?: K.ExpressionKind | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.TSEnumMember; +} +export interface TSTypeQueryBuilder { + (exprName: K.IdentifierKind | K.TSQualifiedNameKind | K.TSImportTypeKind): namedTypes.TSTypeQuery; + from(params: { + comments?: K.CommentKind[] | null; + exprName: K.IdentifierKind | K.TSQualifiedNameKind | K.TSImportTypeKind; + loc?: K.SourceLocationKind | null; + }): namedTypes.TSTypeQuery; +} +export interface TSImportTypeBuilder { + (argument: K.StringLiteralKind, qualifier?: K.IdentifierKind | K.TSQualifiedNameKind | undefined, typeParameters?: K.TSTypeParameterInstantiationKind | null): namedTypes.TSImportType; + from(params: { + argument: K.StringLiteralKind; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + qualifier?: K.IdentifierKind | K.TSQualifiedNameKind | undefined; + typeParameters?: K.TSTypeParameterInstantiationKind | null; + }): namedTypes.TSImportType; +} +export interface TSTypeLiteralBuilder { + (members: (K.TSCallSignatureDeclarationKind | K.TSConstructSignatureDeclarationKind | K.TSIndexSignatureKind | K.TSMethodSignatureKind | K.TSPropertySignatureKind)[]): namedTypes.TSTypeLiteral; + from(params: { + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + members: (K.TSCallSignatureDeclarationKind | K.TSConstructSignatureDeclarationKind | K.TSIndexSignatureKind | K.TSMethodSignatureKind | K.TSPropertySignatureKind)[]; + }): namedTypes.TSTypeLiteral; +} +export interface TSTypeAssertionBuilder { + (typeAnnotation: K.TSTypeKind, expression: K.ExpressionKind): namedTypes.TSTypeAssertion; + from(params: { + comments?: K.CommentKind[] | null; + expression: K.ExpressionKind; + extra?: { + parenthesized: boolean; + } | null; + loc?: K.SourceLocationKind | null; + typeAnnotation: K.TSTypeKind; + }): namedTypes.TSTypeAssertion; +} +export interface TSEnumDeclarationBuilder { + (id: K.IdentifierKind, members: K.TSEnumMemberKind[]): namedTypes.TSEnumDeclaration; + from(params: { + comments?: K.CommentKind[] | null; + const?: boolean; + declare?: boolean; + id: K.IdentifierKind; + initializer?: K.ExpressionKind | null; + loc?: K.SourceLocationKind | null; + members: K.TSEnumMemberKind[]; + }): namedTypes.TSEnumDeclaration; +} +export interface TSTypeAliasDeclarationBuilder { + (id: K.IdentifierKind, typeAnnotation: K.TSTypeKind): namedTypes.TSTypeAliasDeclaration; + from(params: { + comments?: K.CommentKind[] | null; + declare?: boolean; + id: K.IdentifierKind; + loc?: K.SourceLocationKind | null; + typeAnnotation: K.TSTypeKind; + typeParameters?: K.TSTypeParameterDeclarationKind | null | undefined; + }): namedTypes.TSTypeAliasDeclaration; +} +export interface TSModuleBlockBuilder { + (body: K.StatementKind[]): namedTypes.TSModuleBlock; + from(params: { + body: K.StatementKind[]; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.TSModuleBlock; +} +export interface TSModuleDeclarationBuilder { + (id: K.StringLiteralKind | K.IdentifierKind | K.TSQualifiedNameKind, body?: K.TSModuleBlockKind | K.TSModuleDeclarationKind | null): namedTypes.TSModuleDeclaration; + from(params: { + body?: K.TSModuleBlockKind | K.TSModuleDeclarationKind | null; + comments?: K.CommentKind[] | null; + declare?: boolean; + global?: boolean; + id: K.StringLiteralKind | K.IdentifierKind | K.TSQualifiedNameKind; + loc?: K.SourceLocationKind | null; + }): namedTypes.TSModuleDeclaration; +} +export interface TSImportEqualsDeclarationBuilder { + (id: K.IdentifierKind, moduleReference: K.IdentifierKind | K.TSQualifiedNameKind | K.TSExternalModuleReferenceKind): namedTypes.TSImportEqualsDeclaration; + from(params: { + comments?: K.CommentKind[] | null; + id: K.IdentifierKind; + isExport?: boolean; + loc?: K.SourceLocationKind | null; + moduleReference: K.IdentifierKind | K.TSQualifiedNameKind | K.TSExternalModuleReferenceKind; + }): namedTypes.TSImportEqualsDeclaration; +} +export interface TSExternalModuleReferenceBuilder { + (expression: K.StringLiteralKind): namedTypes.TSExternalModuleReference; + from(params: { + comments?: K.CommentKind[] | null; + expression: K.StringLiteralKind; + loc?: K.SourceLocationKind | null; + }): namedTypes.TSExternalModuleReference; +} +export interface TSExportAssignmentBuilder { + (expression: K.ExpressionKind): namedTypes.TSExportAssignment; + from(params: { + comments?: K.CommentKind[] | null; + expression: K.ExpressionKind; + loc?: K.SourceLocationKind | null; + }): namedTypes.TSExportAssignment; +} +export interface TSNamespaceExportDeclarationBuilder { + (id: K.IdentifierKind): namedTypes.TSNamespaceExportDeclaration; + from(params: { + comments?: K.CommentKind[] | null; + id: K.IdentifierKind; + loc?: K.SourceLocationKind | null; + }): namedTypes.TSNamespaceExportDeclaration; +} +export interface TSInterfaceBodyBuilder { + (body: (K.TSCallSignatureDeclarationKind | K.TSConstructSignatureDeclarationKind | K.TSIndexSignatureKind | K.TSMethodSignatureKind | K.TSPropertySignatureKind)[]): namedTypes.TSInterfaceBody; + from(params: { + body: (K.TSCallSignatureDeclarationKind | K.TSConstructSignatureDeclarationKind | K.TSIndexSignatureKind | K.TSMethodSignatureKind | K.TSPropertySignatureKind)[]; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + }): namedTypes.TSInterfaceBody; +} +export interface TSInterfaceDeclarationBuilder { + (id: K.IdentifierKind | K.TSQualifiedNameKind, body: K.TSInterfaceBodyKind): namedTypes.TSInterfaceDeclaration; + from(params: { + body: K.TSInterfaceBodyKind; + comments?: K.CommentKind[] | null; + declare?: boolean; + extends?: K.TSExpressionWithTypeArgumentsKind[] | null; + id: K.IdentifierKind | K.TSQualifiedNameKind; + loc?: K.SourceLocationKind | null; + typeParameters?: K.TSTypeParameterDeclarationKind | null | undefined; + }): namedTypes.TSInterfaceDeclaration; +} +export interface TSParameterPropertyBuilder { + (parameter: K.IdentifierKind | K.AssignmentPatternKind): namedTypes.TSParameterProperty; + from(params: { + accessibility?: "public" | "private" | "protected" | undefined; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + parameter: K.IdentifierKind | K.AssignmentPatternKind; + readonly?: boolean; + }): namedTypes.TSParameterProperty; +} +export interface OptionalMemberExpressionBuilder { + (object: K.ExpressionKind, property: K.IdentifierKind | K.ExpressionKind, computed?: boolean, optional?: boolean): namedTypes.OptionalMemberExpression; + from(params: { + comments?: K.CommentKind[] | null; + computed?: boolean; + loc?: K.SourceLocationKind | null; + object: K.ExpressionKind; + optional?: boolean; + property: K.IdentifierKind | K.ExpressionKind; + }): namedTypes.OptionalMemberExpression; +} +export interface OptionalCallExpressionBuilder { + (callee: K.ExpressionKind, argumentsParam: (K.ExpressionKind | K.SpreadElementKind)[], optional?: boolean): namedTypes.OptionalCallExpression; + from(params: { + arguments: (K.ExpressionKind | K.SpreadElementKind)[]; + callee: K.ExpressionKind; + comments?: K.CommentKind[] | null; + loc?: K.SourceLocationKind | null; + optional?: boolean; + typeArguments?: null | K.TypeParameterInstantiationKind; + }): namedTypes.OptionalCallExpression; +} +export interface builders { + file: FileBuilder; + program: ProgramBuilder; + identifier: IdentifierBuilder; + blockStatement: BlockStatementBuilder; + emptyStatement: EmptyStatementBuilder; + expressionStatement: ExpressionStatementBuilder; + ifStatement: IfStatementBuilder; + labeledStatement: LabeledStatementBuilder; + breakStatement: BreakStatementBuilder; + continueStatement: ContinueStatementBuilder; + withStatement: WithStatementBuilder; + switchStatement: SwitchStatementBuilder; + switchCase: SwitchCaseBuilder; + returnStatement: ReturnStatementBuilder; + throwStatement: ThrowStatementBuilder; + tryStatement: TryStatementBuilder; + catchClause: CatchClauseBuilder; + whileStatement: WhileStatementBuilder; + doWhileStatement: DoWhileStatementBuilder; + forStatement: ForStatementBuilder; + variableDeclaration: VariableDeclarationBuilder; + forInStatement: ForInStatementBuilder; + debuggerStatement: DebuggerStatementBuilder; + functionDeclaration: FunctionDeclarationBuilder; + functionExpression: FunctionExpressionBuilder; + variableDeclarator: VariableDeclaratorBuilder; + thisExpression: ThisExpressionBuilder; + arrayExpression: ArrayExpressionBuilder; + objectExpression: ObjectExpressionBuilder; + property: PropertyBuilder; + literal: LiteralBuilder; + sequenceExpression: SequenceExpressionBuilder; + unaryExpression: UnaryExpressionBuilder; + binaryExpression: BinaryExpressionBuilder; + assignmentExpression: AssignmentExpressionBuilder; + memberExpression: MemberExpressionBuilder; + updateExpression: UpdateExpressionBuilder; + logicalExpression: LogicalExpressionBuilder; + conditionalExpression: ConditionalExpressionBuilder; + newExpression: NewExpressionBuilder; + callExpression: CallExpressionBuilder; + restElement: RestElementBuilder; + typeAnnotation: TypeAnnotationBuilder; + tsTypeAnnotation: TSTypeAnnotationBuilder; + spreadElementPattern: SpreadElementPatternBuilder; + arrowFunctionExpression: ArrowFunctionExpressionBuilder; + forOfStatement: ForOfStatementBuilder; + yieldExpression: YieldExpressionBuilder; + generatorExpression: GeneratorExpressionBuilder; + comprehensionBlock: ComprehensionBlockBuilder; + comprehensionExpression: ComprehensionExpressionBuilder; + objectProperty: ObjectPropertyBuilder; + propertyPattern: PropertyPatternBuilder; + objectPattern: ObjectPatternBuilder; + arrayPattern: ArrayPatternBuilder; + methodDefinition: MethodDefinitionBuilder; + spreadElement: SpreadElementBuilder; + assignmentPattern: AssignmentPatternBuilder; + classPropertyDefinition: ClassPropertyDefinitionBuilder; + classProperty: ClassPropertyBuilder; + classBody: ClassBodyBuilder; + classDeclaration: ClassDeclarationBuilder; + classExpression: ClassExpressionBuilder; + importSpecifier: ImportSpecifierBuilder; + importNamespaceSpecifier: ImportNamespaceSpecifierBuilder; + importDefaultSpecifier: ImportDefaultSpecifierBuilder; + importDeclaration: ImportDeclarationBuilder; + taggedTemplateExpression: TaggedTemplateExpressionBuilder; + templateLiteral: TemplateLiteralBuilder; + templateElement: TemplateElementBuilder; + spreadProperty: SpreadPropertyBuilder; + spreadPropertyPattern: SpreadPropertyPatternBuilder; + awaitExpression: AwaitExpressionBuilder; + importExpression: ImportExpressionBuilder; + jsxAttribute: JSXAttributeBuilder; + jsxIdentifier: JSXIdentifierBuilder; + jsxNamespacedName: JSXNamespacedNameBuilder; + jsxExpressionContainer: JSXExpressionContainerBuilder; + jsxMemberExpression: JSXMemberExpressionBuilder; + jsxSpreadAttribute: JSXSpreadAttributeBuilder; + jsxElement: JSXElementBuilder; + jsxOpeningElement: JSXOpeningElementBuilder; + jsxClosingElement: JSXClosingElementBuilder; + jsxFragment: JSXFragmentBuilder; + jsxText: JSXTextBuilder; + jsxOpeningFragment: JSXOpeningFragmentBuilder; + jsxClosingFragment: JSXClosingFragmentBuilder; + jsxEmptyExpression: JSXEmptyExpressionBuilder; + jsxSpreadChild: JSXSpreadChildBuilder; + typeParameterDeclaration: TypeParameterDeclarationBuilder; + tsTypeParameterDeclaration: TSTypeParameterDeclarationBuilder; + typeParameterInstantiation: TypeParameterInstantiationBuilder; + tsTypeParameterInstantiation: TSTypeParameterInstantiationBuilder; + classImplements: ClassImplementsBuilder; + tsExpressionWithTypeArguments: TSExpressionWithTypeArgumentsBuilder; + anyTypeAnnotation: AnyTypeAnnotationBuilder; + emptyTypeAnnotation: EmptyTypeAnnotationBuilder; + mixedTypeAnnotation: MixedTypeAnnotationBuilder; + voidTypeAnnotation: VoidTypeAnnotationBuilder; + numberTypeAnnotation: NumberTypeAnnotationBuilder; + numberLiteralTypeAnnotation: NumberLiteralTypeAnnotationBuilder; + numericLiteralTypeAnnotation: NumericLiteralTypeAnnotationBuilder; + stringTypeAnnotation: StringTypeAnnotationBuilder; + stringLiteralTypeAnnotation: StringLiteralTypeAnnotationBuilder; + booleanTypeAnnotation: BooleanTypeAnnotationBuilder; + booleanLiteralTypeAnnotation: BooleanLiteralTypeAnnotationBuilder; + nullableTypeAnnotation: NullableTypeAnnotationBuilder; + nullLiteralTypeAnnotation: NullLiteralTypeAnnotationBuilder; + nullTypeAnnotation: NullTypeAnnotationBuilder; + thisTypeAnnotation: ThisTypeAnnotationBuilder; + existsTypeAnnotation: ExistsTypeAnnotationBuilder; + existentialTypeParam: ExistentialTypeParamBuilder; + functionTypeAnnotation: FunctionTypeAnnotationBuilder; + functionTypeParam: FunctionTypeParamBuilder; + arrayTypeAnnotation: ArrayTypeAnnotationBuilder; + objectTypeAnnotation: ObjectTypeAnnotationBuilder; + objectTypeProperty: ObjectTypePropertyBuilder; + objectTypeSpreadProperty: ObjectTypeSpreadPropertyBuilder; + objectTypeIndexer: ObjectTypeIndexerBuilder; + objectTypeCallProperty: ObjectTypeCallPropertyBuilder; + objectTypeInternalSlot: ObjectTypeInternalSlotBuilder; + variance: VarianceBuilder; + qualifiedTypeIdentifier: QualifiedTypeIdentifierBuilder; + genericTypeAnnotation: GenericTypeAnnotationBuilder; + memberTypeAnnotation: MemberTypeAnnotationBuilder; + unionTypeAnnotation: UnionTypeAnnotationBuilder; + intersectionTypeAnnotation: IntersectionTypeAnnotationBuilder; + typeofTypeAnnotation: TypeofTypeAnnotationBuilder; + typeParameter: TypeParameterBuilder; + interfaceTypeAnnotation: InterfaceTypeAnnotationBuilder; + interfaceExtends: InterfaceExtendsBuilder; + interfaceDeclaration: InterfaceDeclarationBuilder; + declareInterface: DeclareInterfaceBuilder; + typeAlias: TypeAliasBuilder; + opaqueType: OpaqueTypeBuilder; + declareTypeAlias: DeclareTypeAliasBuilder; + declareOpaqueType: DeclareOpaqueTypeBuilder; + typeCastExpression: TypeCastExpressionBuilder; + tupleTypeAnnotation: TupleTypeAnnotationBuilder; + declareVariable: DeclareVariableBuilder; + declareFunction: DeclareFunctionBuilder; + declareClass: DeclareClassBuilder; + declareModule: DeclareModuleBuilder; + declareModuleExports: DeclareModuleExportsBuilder; + declareExportDeclaration: DeclareExportDeclarationBuilder; + exportSpecifier: ExportSpecifierBuilder; + exportBatchSpecifier: ExportBatchSpecifierBuilder; + declareExportAllDeclaration: DeclareExportAllDeclarationBuilder; + inferredPredicate: InferredPredicateBuilder; + declaredPredicate: DeclaredPredicateBuilder; + exportDeclaration: ExportDeclarationBuilder; + block: BlockBuilder; + line: LineBuilder; + noop: NoopBuilder; + doExpression: DoExpressionBuilder; + super: SuperBuilder; + bindExpression: BindExpressionBuilder; + decorator: DecoratorBuilder; + metaProperty: MetaPropertyBuilder; + parenthesizedExpression: ParenthesizedExpressionBuilder; + exportDefaultDeclaration: ExportDefaultDeclarationBuilder; + exportNamedDeclaration: ExportNamedDeclarationBuilder; + exportNamespaceSpecifier: ExportNamespaceSpecifierBuilder; + exportDefaultSpecifier: ExportDefaultSpecifierBuilder; + exportAllDeclaration: ExportAllDeclarationBuilder; + commentBlock: CommentBlockBuilder; + commentLine: CommentLineBuilder; + directive: DirectiveBuilder; + directiveLiteral: DirectiveLiteralBuilder; + interpreterDirective: InterpreterDirectiveBuilder; + stringLiteral: StringLiteralBuilder; + numericLiteral: NumericLiteralBuilder; + bigIntLiteral: BigIntLiteralBuilder; + nullLiteral: NullLiteralBuilder; + booleanLiteral: BooleanLiteralBuilder; + regExpLiteral: RegExpLiteralBuilder; + objectMethod: ObjectMethodBuilder; + classPrivateProperty: ClassPrivatePropertyBuilder; + classMethod: ClassMethodBuilder; + classPrivateMethod: ClassPrivateMethodBuilder; + privateName: PrivateNameBuilder; + restProperty: RestPropertyBuilder; + forAwaitStatement: ForAwaitStatementBuilder; + import: ImportBuilder; + tsQualifiedName: TSQualifiedNameBuilder; + tsTypeReference: TSTypeReferenceBuilder; + tsAsExpression: TSAsExpressionBuilder; + tsNonNullExpression: TSNonNullExpressionBuilder; + tsAnyKeyword: TSAnyKeywordBuilder; + tsBigIntKeyword: TSBigIntKeywordBuilder; + tsBooleanKeyword: TSBooleanKeywordBuilder; + tsNeverKeyword: TSNeverKeywordBuilder; + tsNullKeyword: TSNullKeywordBuilder; + tsNumberKeyword: TSNumberKeywordBuilder; + tsObjectKeyword: TSObjectKeywordBuilder; + tsStringKeyword: TSStringKeywordBuilder; + tsSymbolKeyword: TSSymbolKeywordBuilder; + tsUndefinedKeyword: TSUndefinedKeywordBuilder; + tsUnknownKeyword: TSUnknownKeywordBuilder; + tsVoidKeyword: TSVoidKeywordBuilder; + tsThisType: TSThisTypeBuilder; + tsArrayType: TSArrayTypeBuilder; + tsLiteralType: TSLiteralTypeBuilder; + tsUnionType: TSUnionTypeBuilder; + tsIntersectionType: TSIntersectionTypeBuilder; + tsConditionalType: TSConditionalTypeBuilder; + tsInferType: TSInferTypeBuilder; + tsTypeParameter: TSTypeParameterBuilder; + tsParenthesizedType: TSParenthesizedTypeBuilder; + tsFunctionType: TSFunctionTypeBuilder; + tsConstructorType: TSConstructorTypeBuilder; + tsDeclareFunction: TSDeclareFunctionBuilder; + tsDeclareMethod: TSDeclareMethodBuilder; + tsMappedType: TSMappedTypeBuilder; + tsTupleType: TSTupleTypeBuilder; + tsRestType: TSRestTypeBuilder; + tsOptionalType: TSOptionalTypeBuilder; + tsIndexedAccessType: TSIndexedAccessTypeBuilder; + tsTypeOperator: TSTypeOperatorBuilder; + tsIndexSignature: TSIndexSignatureBuilder; + tsPropertySignature: TSPropertySignatureBuilder; + tsMethodSignature: TSMethodSignatureBuilder; + tsTypePredicate: TSTypePredicateBuilder; + tsCallSignatureDeclaration: TSCallSignatureDeclarationBuilder; + tsConstructSignatureDeclaration: TSConstructSignatureDeclarationBuilder; + tsEnumMember: TSEnumMemberBuilder; + tsTypeQuery: TSTypeQueryBuilder; + tsImportType: TSImportTypeBuilder; + tsTypeLiteral: TSTypeLiteralBuilder; + tsTypeAssertion: TSTypeAssertionBuilder; + tsEnumDeclaration: TSEnumDeclarationBuilder; + tsTypeAliasDeclaration: TSTypeAliasDeclarationBuilder; + tsModuleBlock: TSModuleBlockBuilder; + tsModuleDeclaration: TSModuleDeclarationBuilder; + tsImportEqualsDeclaration: TSImportEqualsDeclarationBuilder; + tsExternalModuleReference: TSExternalModuleReferenceBuilder; + tsExportAssignment: TSExportAssignmentBuilder; + tsNamespaceExportDeclaration: TSNamespaceExportDeclarationBuilder; + tsInterfaceBody: TSInterfaceBodyBuilder; + tsInterfaceDeclaration: TSInterfaceDeclarationBuilder; + tsParameterProperty: TSParameterPropertyBuilder; + optionalMemberExpression: OptionalMemberExpressionBuilder; + optionalCallExpression: OptionalCallExpressionBuilder; + [builderName: string]: any; +} diff --git a/code/application_liste/app/node_modules/ast-types/gen/builders.js b/code/application_liste/app/node_modules/ast-types/gen/builders.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/gen/builders.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/code/application_liste/app/node_modules/ast-types/gen/kinds.d.ts b/code/application_liste/app/node_modules/ast-types/gen/kinds.d.ts new file mode 100644 index 0000000..3534dde --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/gen/kinds.d.ts @@ -0,0 +1,263 @@ +import { namedTypes } from "./namedTypes"; +export declare type PrintableKind = namedTypes.File | namedTypes.Program | namedTypes.Identifier | namedTypes.BlockStatement | namedTypes.EmptyStatement | namedTypes.ExpressionStatement | namedTypes.IfStatement | namedTypes.LabeledStatement | namedTypes.BreakStatement | namedTypes.ContinueStatement | namedTypes.WithStatement | namedTypes.SwitchStatement | namedTypes.SwitchCase | namedTypes.ReturnStatement | namedTypes.ThrowStatement | namedTypes.TryStatement | namedTypes.CatchClause | namedTypes.WhileStatement | namedTypes.DoWhileStatement | namedTypes.ForStatement | namedTypes.VariableDeclaration | namedTypes.ForInStatement | namedTypes.DebuggerStatement | namedTypes.FunctionDeclaration | namedTypes.FunctionExpression | namedTypes.VariableDeclarator | namedTypes.ThisExpression | namedTypes.ArrayExpression | namedTypes.ObjectExpression | namedTypes.Property | namedTypes.Literal | namedTypes.SequenceExpression | namedTypes.UnaryExpression | namedTypes.BinaryExpression | namedTypes.AssignmentExpression | namedTypes.MemberExpression | namedTypes.UpdateExpression | namedTypes.LogicalExpression | namedTypes.ConditionalExpression | namedTypes.NewExpression | namedTypes.CallExpression | namedTypes.RestElement | namedTypes.TypeAnnotation | namedTypes.TSTypeAnnotation | namedTypes.SpreadElementPattern | namedTypes.ArrowFunctionExpression | namedTypes.ForOfStatement | namedTypes.YieldExpression | namedTypes.GeneratorExpression | namedTypes.ComprehensionBlock | namedTypes.ComprehensionExpression | namedTypes.ObjectProperty | namedTypes.PropertyPattern | namedTypes.ObjectPattern | namedTypes.ArrayPattern | namedTypes.MethodDefinition | namedTypes.SpreadElement | namedTypes.AssignmentPattern | namedTypes.ClassPropertyDefinition | namedTypes.ClassProperty | namedTypes.ClassBody | namedTypes.ClassDeclaration | namedTypes.ClassExpression | namedTypes.ImportSpecifier | namedTypes.ImportNamespaceSpecifier | namedTypes.ImportDefaultSpecifier | namedTypes.ImportDeclaration | namedTypes.TaggedTemplateExpression | namedTypes.TemplateLiteral | namedTypes.TemplateElement | namedTypes.SpreadProperty | namedTypes.SpreadPropertyPattern | namedTypes.AwaitExpression | namedTypes.ImportExpression | namedTypes.JSXAttribute | namedTypes.JSXIdentifier | namedTypes.JSXNamespacedName | namedTypes.JSXExpressionContainer | namedTypes.JSXMemberExpression | namedTypes.JSXSpreadAttribute | namedTypes.JSXElement | namedTypes.JSXOpeningElement | namedTypes.JSXClosingElement | namedTypes.JSXFragment | namedTypes.JSXText | namedTypes.JSXOpeningFragment | namedTypes.JSXClosingFragment | namedTypes.JSXEmptyExpression | namedTypes.JSXSpreadChild | namedTypes.TypeParameterDeclaration | namedTypes.TSTypeParameterDeclaration | namedTypes.TypeParameterInstantiation | namedTypes.TSTypeParameterInstantiation | namedTypes.ClassImplements | namedTypes.TSExpressionWithTypeArguments | namedTypes.AnyTypeAnnotation | namedTypes.EmptyTypeAnnotation | namedTypes.MixedTypeAnnotation | namedTypes.VoidTypeAnnotation | namedTypes.NumberTypeAnnotation | namedTypes.NumberLiteralTypeAnnotation | namedTypes.NumericLiteralTypeAnnotation | namedTypes.StringTypeAnnotation | namedTypes.StringLiteralTypeAnnotation | namedTypes.BooleanTypeAnnotation | namedTypes.BooleanLiteralTypeAnnotation | namedTypes.NullableTypeAnnotation | namedTypes.NullLiteralTypeAnnotation | namedTypes.NullTypeAnnotation | namedTypes.ThisTypeAnnotation | namedTypes.ExistsTypeAnnotation | namedTypes.ExistentialTypeParam | namedTypes.FunctionTypeAnnotation | namedTypes.FunctionTypeParam | namedTypes.ArrayTypeAnnotation | namedTypes.ObjectTypeAnnotation | namedTypes.ObjectTypeProperty | namedTypes.ObjectTypeSpreadProperty | namedTypes.ObjectTypeIndexer | namedTypes.ObjectTypeCallProperty | namedTypes.ObjectTypeInternalSlot | namedTypes.Variance | namedTypes.QualifiedTypeIdentifier | namedTypes.GenericTypeAnnotation | namedTypes.MemberTypeAnnotation | namedTypes.UnionTypeAnnotation | namedTypes.IntersectionTypeAnnotation | namedTypes.TypeofTypeAnnotation | namedTypes.TypeParameter | namedTypes.InterfaceTypeAnnotation | namedTypes.InterfaceExtends | namedTypes.InterfaceDeclaration | namedTypes.DeclareInterface | namedTypes.TypeAlias | namedTypes.OpaqueType | namedTypes.DeclareTypeAlias | namedTypes.DeclareOpaqueType | namedTypes.TypeCastExpression | namedTypes.TupleTypeAnnotation | namedTypes.DeclareVariable | namedTypes.DeclareFunction | namedTypes.DeclareClass | namedTypes.DeclareModule | namedTypes.DeclareModuleExports | namedTypes.DeclareExportDeclaration | namedTypes.ExportSpecifier | namedTypes.ExportBatchSpecifier | namedTypes.DeclareExportAllDeclaration | namedTypes.InferredPredicate | namedTypes.DeclaredPredicate | namedTypes.ExportDeclaration | namedTypes.Block | namedTypes.Line | namedTypes.Noop | namedTypes.DoExpression | namedTypes.Super | namedTypes.BindExpression | namedTypes.Decorator | namedTypes.MetaProperty | namedTypes.ParenthesizedExpression | namedTypes.ExportDefaultDeclaration | namedTypes.ExportNamedDeclaration | namedTypes.ExportNamespaceSpecifier | namedTypes.ExportDefaultSpecifier | namedTypes.ExportAllDeclaration | namedTypes.CommentBlock | namedTypes.CommentLine | namedTypes.Directive | namedTypes.DirectiveLiteral | namedTypes.InterpreterDirective | namedTypes.StringLiteral | namedTypes.NumericLiteral | namedTypes.BigIntLiteral | namedTypes.NullLiteral | namedTypes.BooleanLiteral | namedTypes.RegExpLiteral | namedTypes.ObjectMethod | namedTypes.ClassPrivateProperty | namedTypes.ClassMethod | namedTypes.ClassPrivateMethod | namedTypes.PrivateName | namedTypes.RestProperty | namedTypes.ForAwaitStatement | namedTypes.Import | namedTypes.TSQualifiedName | namedTypes.TSTypeReference | namedTypes.TSAsExpression | namedTypes.TSNonNullExpression | namedTypes.TSAnyKeyword | namedTypes.TSBigIntKeyword | namedTypes.TSBooleanKeyword | namedTypes.TSNeverKeyword | namedTypes.TSNullKeyword | namedTypes.TSNumberKeyword | namedTypes.TSObjectKeyword | namedTypes.TSStringKeyword | namedTypes.TSSymbolKeyword | namedTypes.TSUndefinedKeyword | namedTypes.TSUnknownKeyword | namedTypes.TSVoidKeyword | namedTypes.TSThisType | namedTypes.TSArrayType | namedTypes.TSLiteralType | namedTypes.TSUnionType | namedTypes.TSIntersectionType | namedTypes.TSConditionalType | namedTypes.TSInferType | namedTypes.TSTypeParameter | namedTypes.TSParenthesizedType | namedTypes.TSFunctionType | namedTypes.TSConstructorType | namedTypes.TSDeclareFunction | namedTypes.TSDeclareMethod | namedTypes.TSMappedType | namedTypes.TSTupleType | namedTypes.TSRestType | namedTypes.TSOptionalType | namedTypes.TSIndexedAccessType | namedTypes.TSTypeOperator | namedTypes.TSIndexSignature | namedTypes.TSPropertySignature | namedTypes.TSMethodSignature | namedTypes.TSTypePredicate | namedTypes.TSCallSignatureDeclaration | namedTypes.TSConstructSignatureDeclaration | namedTypes.TSEnumMember | namedTypes.TSTypeQuery | namedTypes.TSImportType | namedTypes.TSTypeLiteral | namedTypes.TSTypeAssertion | namedTypes.TSEnumDeclaration | namedTypes.TSTypeAliasDeclaration | namedTypes.TSModuleBlock | namedTypes.TSModuleDeclaration | namedTypes.TSImportEqualsDeclaration | namedTypes.TSExternalModuleReference | namedTypes.TSExportAssignment | namedTypes.TSNamespaceExportDeclaration | namedTypes.TSInterfaceBody | namedTypes.TSInterfaceDeclaration | namedTypes.TSParameterProperty | namedTypes.OptionalMemberExpression | namedTypes.OptionalCallExpression; +export declare type SourceLocationKind = namedTypes.SourceLocation; +export declare type NodeKind = namedTypes.File | namedTypes.Program | namedTypes.Identifier | namedTypes.BlockStatement | namedTypes.EmptyStatement | namedTypes.ExpressionStatement | namedTypes.IfStatement | namedTypes.LabeledStatement | namedTypes.BreakStatement | namedTypes.ContinueStatement | namedTypes.WithStatement | namedTypes.SwitchStatement | namedTypes.SwitchCase | namedTypes.ReturnStatement | namedTypes.ThrowStatement | namedTypes.TryStatement | namedTypes.CatchClause | namedTypes.WhileStatement | namedTypes.DoWhileStatement | namedTypes.ForStatement | namedTypes.VariableDeclaration | namedTypes.ForInStatement | namedTypes.DebuggerStatement | namedTypes.FunctionDeclaration | namedTypes.FunctionExpression | namedTypes.VariableDeclarator | namedTypes.ThisExpression | namedTypes.ArrayExpression | namedTypes.ObjectExpression | namedTypes.Property | namedTypes.Literal | namedTypes.SequenceExpression | namedTypes.UnaryExpression | namedTypes.BinaryExpression | namedTypes.AssignmentExpression | namedTypes.MemberExpression | namedTypes.UpdateExpression | namedTypes.LogicalExpression | namedTypes.ConditionalExpression | namedTypes.NewExpression | namedTypes.CallExpression | namedTypes.RestElement | namedTypes.TypeAnnotation | namedTypes.TSTypeAnnotation | namedTypes.SpreadElementPattern | namedTypes.ArrowFunctionExpression | namedTypes.ForOfStatement | namedTypes.YieldExpression | namedTypes.GeneratorExpression | namedTypes.ComprehensionBlock | namedTypes.ComprehensionExpression | namedTypes.ObjectProperty | namedTypes.PropertyPattern | namedTypes.ObjectPattern | namedTypes.ArrayPattern | namedTypes.MethodDefinition | namedTypes.SpreadElement | namedTypes.AssignmentPattern | namedTypes.ClassPropertyDefinition | namedTypes.ClassProperty | namedTypes.ClassBody | namedTypes.ClassDeclaration | namedTypes.ClassExpression | namedTypes.ImportSpecifier | namedTypes.ImportNamespaceSpecifier | namedTypes.ImportDefaultSpecifier | namedTypes.ImportDeclaration | namedTypes.TaggedTemplateExpression | namedTypes.TemplateLiteral | namedTypes.TemplateElement | namedTypes.SpreadProperty | namedTypes.SpreadPropertyPattern | namedTypes.AwaitExpression | namedTypes.ImportExpression | namedTypes.JSXAttribute | namedTypes.JSXIdentifier | namedTypes.JSXNamespacedName | namedTypes.JSXExpressionContainer | namedTypes.JSXMemberExpression | namedTypes.JSXSpreadAttribute | namedTypes.JSXElement | namedTypes.JSXOpeningElement | namedTypes.JSXClosingElement | namedTypes.JSXFragment | namedTypes.JSXText | namedTypes.JSXOpeningFragment | namedTypes.JSXClosingFragment | namedTypes.JSXEmptyExpression | namedTypes.JSXSpreadChild | namedTypes.TypeParameterDeclaration | namedTypes.TSTypeParameterDeclaration | namedTypes.TypeParameterInstantiation | namedTypes.TSTypeParameterInstantiation | namedTypes.ClassImplements | namedTypes.TSExpressionWithTypeArguments | namedTypes.AnyTypeAnnotation | namedTypes.EmptyTypeAnnotation | namedTypes.MixedTypeAnnotation | namedTypes.VoidTypeAnnotation | namedTypes.NumberTypeAnnotation | namedTypes.NumberLiteralTypeAnnotation | namedTypes.NumericLiteralTypeAnnotation | namedTypes.StringTypeAnnotation | namedTypes.StringLiteralTypeAnnotation | namedTypes.BooleanTypeAnnotation | namedTypes.BooleanLiteralTypeAnnotation | namedTypes.NullableTypeAnnotation | namedTypes.NullLiteralTypeAnnotation | namedTypes.NullTypeAnnotation | namedTypes.ThisTypeAnnotation | namedTypes.ExistsTypeAnnotation | namedTypes.ExistentialTypeParam | namedTypes.FunctionTypeAnnotation | namedTypes.FunctionTypeParam | namedTypes.ArrayTypeAnnotation | namedTypes.ObjectTypeAnnotation | namedTypes.ObjectTypeProperty | namedTypes.ObjectTypeSpreadProperty | namedTypes.ObjectTypeIndexer | namedTypes.ObjectTypeCallProperty | namedTypes.ObjectTypeInternalSlot | namedTypes.Variance | namedTypes.QualifiedTypeIdentifier | namedTypes.GenericTypeAnnotation | namedTypes.MemberTypeAnnotation | namedTypes.UnionTypeAnnotation | namedTypes.IntersectionTypeAnnotation | namedTypes.TypeofTypeAnnotation | namedTypes.TypeParameter | namedTypes.InterfaceTypeAnnotation | namedTypes.InterfaceExtends | namedTypes.InterfaceDeclaration | namedTypes.DeclareInterface | namedTypes.TypeAlias | namedTypes.OpaqueType | namedTypes.DeclareTypeAlias | namedTypes.DeclareOpaqueType | namedTypes.TypeCastExpression | namedTypes.TupleTypeAnnotation | namedTypes.DeclareVariable | namedTypes.DeclareFunction | namedTypes.DeclareClass | namedTypes.DeclareModule | namedTypes.DeclareModuleExports | namedTypes.DeclareExportDeclaration | namedTypes.ExportSpecifier | namedTypes.ExportBatchSpecifier | namedTypes.DeclareExportAllDeclaration | namedTypes.InferredPredicate | namedTypes.DeclaredPredicate | namedTypes.ExportDeclaration | namedTypes.Noop | namedTypes.DoExpression | namedTypes.Super | namedTypes.BindExpression | namedTypes.Decorator | namedTypes.MetaProperty | namedTypes.ParenthesizedExpression | namedTypes.ExportDefaultDeclaration | namedTypes.ExportNamedDeclaration | namedTypes.ExportNamespaceSpecifier | namedTypes.ExportDefaultSpecifier | namedTypes.ExportAllDeclaration | namedTypes.Directive | namedTypes.DirectiveLiteral | namedTypes.InterpreterDirective | namedTypes.StringLiteral | namedTypes.NumericLiteral | namedTypes.BigIntLiteral | namedTypes.NullLiteral | namedTypes.BooleanLiteral | namedTypes.RegExpLiteral | namedTypes.ObjectMethod | namedTypes.ClassPrivateProperty | namedTypes.ClassMethod | namedTypes.ClassPrivateMethod | namedTypes.PrivateName | namedTypes.RestProperty | namedTypes.ForAwaitStatement | namedTypes.Import | namedTypes.TSQualifiedName | namedTypes.TSTypeReference | namedTypes.TSAsExpression | namedTypes.TSNonNullExpression | namedTypes.TSAnyKeyword | namedTypes.TSBigIntKeyword | namedTypes.TSBooleanKeyword | namedTypes.TSNeverKeyword | namedTypes.TSNullKeyword | namedTypes.TSNumberKeyword | namedTypes.TSObjectKeyword | namedTypes.TSStringKeyword | namedTypes.TSSymbolKeyword | namedTypes.TSUndefinedKeyword | namedTypes.TSUnknownKeyword | namedTypes.TSVoidKeyword | namedTypes.TSThisType | namedTypes.TSArrayType | namedTypes.TSLiteralType | namedTypes.TSUnionType | namedTypes.TSIntersectionType | namedTypes.TSConditionalType | namedTypes.TSInferType | namedTypes.TSTypeParameter | namedTypes.TSParenthesizedType | namedTypes.TSFunctionType | namedTypes.TSConstructorType | namedTypes.TSDeclareFunction | namedTypes.TSDeclareMethod | namedTypes.TSMappedType | namedTypes.TSTupleType | namedTypes.TSRestType | namedTypes.TSOptionalType | namedTypes.TSIndexedAccessType | namedTypes.TSTypeOperator | namedTypes.TSIndexSignature | namedTypes.TSPropertySignature | namedTypes.TSMethodSignature | namedTypes.TSTypePredicate | namedTypes.TSCallSignatureDeclaration | namedTypes.TSConstructSignatureDeclaration | namedTypes.TSEnumMember | namedTypes.TSTypeQuery | namedTypes.TSImportType | namedTypes.TSTypeLiteral | namedTypes.TSTypeAssertion | namedTypes.TSEnumDeclaration | namedTypes.TSTypeAliasDeclaration | namedTypes.TSModuleBlock | namedTypes.TSModuleDeclaration | namedTypes.TSImportEqualsDeclaration | namedTypes.TSExternalModuleReference | namedTypes.TSExportAssignment | namedTypes.TSNamespaceExportDeclaration | namedTypes.TSInterfaceBody | namedTypes.TSInterfaceDeclaration | namedTypes.TSParameterProperty | namedTypes.OptionalMemberExpression | namedTypes.OptionalCallExpression; +export declare type CommentKind = namedTypes.Block | namedTypes.Line | namedTypes.CommentBlock | namedTypes.CommentLine; +export declare type PositionKind = namedTypes.Position; +export declare type FileKind = namedTypes.File; +export declare type ProgramKind = namedTypes.Program; +export declare type StatementKind = namedTypes.BlockStatement | namedTypes.EmptyStatement | namedTypes.ExpressionStatement | namedTypes.IfStatement | namedTypes.LabeledStatement | namedTypes.BreakStatement | namedTypes.ContinueStatement | namedTypes.WithStatement | namedTypes.SwitchStatement | namedTypes.ReturnStatement | namedTypes.ThrowStatement | namedTypes.TryStatement | namedTypes.WhileStatement | namedTypes.DoWhileStatement | namedTypes.ForStatement | namedTypes.VariableDeclaration | namedTypes.ForInStatement | namedTypes.DebuggerStatement | namedTypes.FunctionDeclaration | namedTypes.ForOfStatement | namedTypes.MethodDefinition | namedTypes.ClassPropertyDefinition | namedTypes.ClassProperty | namedTypes.ClassBody | namedTypes.ClassDeclaration | namedTypes.ImportDeclaration | namedTypes.TSTypeParameterDeclaration | namedTypes.InterfaceDeclaration | namedTypes.DeclareInterface | namedTypes.TypeAlias | namedTypes.OpaqueType | namedTypes.DeclareTypeAlias | namedTypes.DeclareOpaqueType | namedTypes.DeclareVariable | namedTypes.DeclareFunction | namedTypes.DeclareClass | namedTypes.DeclareModule | namedTypes.DeclareModuleExports | namedTypes.DeclareExportDeclaration | namedTypes.DeclareExportAllDeclaration | namedTypes.ExportDeclaration | namedTypes.Noop | namedTypes.ExportDefaultDeclaration | namedTypes.ExportNamedDeclaration | namedTypes.ExportAllDeclaration | namedTypes.ClassPrivateProperty | namedTypes.ClassMethod | namedTypes.ClassPrivateMethod | namedTypes.ForAwaitStatement | namedTypes.TSDeclareFunction | namedTypes.TSDeclareMethod | namedTypes.TSIndexSignature | namedTypes.TSPropertySignature | namedTypes.TSMethodSignature | namedTypes.TSCallSignatureDeclaration | namedTypes.TSConstructSignatureDeclaration | namedTypes.TSEnumDeclaration | namedTypes.TSTypeAliasDeclaration | namedTypes.TSModuleDeclaration | namedTypes.TSImportEqualsDeclaration | namedTypes.TSExternalModuleReference | namedTypes.TSExportAssignment | namedTypes.TSNamespaceExportDeclaration | namedTypes.TSInterfaceDeclaration; +export declare type FunctionKind = namedTypes.FunctionDeclaration | namedTypes.FunctionExpression | namedTypes.ArrowFunctionExpression | namedTypes.ObjectMethod | namedTypes.ClassMethod | namedTypes.ClassPrivateMethod; +export declare type ExpressionKind = namedTypes.Identifier | namedTypes.FunctionExpression | namedTypes.ThisExpression | namedTypes.ArrayExpression | namedTypes.ObjectExpression | namedTypes.Literal | namedTypes.SequenceExpression | namedTypes.UnaryExpression | namedTypes.BinaryExpression | namedTypes.AssignmentExpression | namedTypes.MemberExpression | namedTypes.UpdateExpression | namedTypes.LogicalExpression | namedTypes.ConditionalExpression | namedTypes.NewExpression | namedTypes.CallExpression | namedTypes.ArrowFunctionExpression | namedTypes.YieldExpression | namedTypes.GeneratorExpression | namedTypes.ComprehensionExpression | namedTypes.ClassExpression | namedTypes.TaggedTemplateExpression | namedTypes.TemplateLiteral | namedTypes.AwaitExpression | namedTypes.ImportExpression | namedTypes.JSXIdentifier | namedTypes.JSXExpressionContainer | namedTypes.JSXMemberExpression | namedTypes.JSXElement | namedTypes.JSXFragment | namedTypes.JSXText | namedTypes.JSXEmptyExpression | namedTypes.JSXSpreadChild | namedTypes.TypeCastExpression | namedTypes.DoExpression | namedTypes.Super | namedTypes.BindExpression | namedTypes.MetaProperty | namedTypes.ParenthesizedExpression | namedTypes.DirectiveLiteral | namedTypes.StringLiteral | namedTypes.NumericLiteral | namedTypes.BigIntLiteral | namedTypes.NullLiteral | namedTypes.BooleanLiteral | namedTypes.RegExpLiteral | namedTypes.PrivateName | namedTypes.Import | namedTypes.TSAsExpression | namedTypes.TSNonNullExpression | namedTypes.TSTypeParameter | namedTypes.TSTypeAssertion | namedTypes.OptionalMemberExpression | namedTypes.OptionalCallExpression; +export declare type PatternKind = namedTypes.Identifier | namedTypes.RestElement | namedTypes.SpreadElementPattern | namedTypes.PropertyPattern | namedTypes.ObjectPattern | namedTypes.ArrayPattern | namedTypes.AssignmentPattern | namedTypes.SpreadPropertyPattern | namedTypes.JSXIdentifier | namedTypes.PrivateName | namedTypes.TSAsExpression | namedTypes.TSNonNullExpression | namedTypes.TSTypeParameter | namedTypes.TSTypeAssertion | namedTypes.TSParameterProperty; +export declare type IdentifierKind = namedTypes.Identifier | namedTypes.JSXIdentifier | namedTypes.TSTypeParameter; +export declare type BlockStatementKind = namedTypes.BlockStatement; +export declare type EmptyStatementKind = namedTypes.EmptyStatement; +export declare type ExpressionStatementKind = namedTypes.ExpressionStatement; +export declare type IfStatementKind = namedTypes.IfStatement; +export declare type LabeledStatementKind = namedTypes.LabeledStatement; +export declare type BreakStatementKind = namedTypes.BreakStatement; +export declare type ContinueStatementKind = namedTypes.ContinueStatement; +export declare type WithStatementKind = namedTypes.WithStatement; +export declare type SwitchStatementKind = namedTypes.SwitchStatement; +export declare type SwitchCaseKind = namedTypes.SwitchCase; +export declare type ReturnStatementKind = namedTypes.ReturnStatement; +export declare type ThrowStatementKind = namedTypes.ThrowStatement; +export declare type TryStatementKind = namedTypes.TryStatement; +export declare type CatchClauseKind = namedTypes.CatchClause; +export declare type WhileStatementKind = namedTypes.WhileStatement; +export declare type DoWhileStatementKind = namedTypes.DoWhileStatement; +export declare type ForStatementKind = namedTypes.ForStatement; +export declare type DeclarationKind = namedTypes.VariableDeclaration | namedTypes.FunctionDeclaration | namedTypes.MethodDefinition | namedTypes.ClassPropertyDefinition | namedTypes.ClassProperty | namedTypes.ClassBody | namedTypes.ClassDeclaration | namedTypes.ImportDeclaration | namedTypes.TSTypeParameterDeclaration | namedTypes.InterfaceDeclaration | namedTypes.DeclareInterface | namedTypes.TypeAlias | namedTypes.OpaqueType | namedTypes.DeclareTypeAlias | namedTypes.DeclareOpaqueType | namedTypes.DeclareClass | namedTypes.DeclareExportDeclaration | namedTypes.DeclareExportAllDeclaration | namedTypes.ExportDeclaration | namedTypes.ExportDefaultDeclaration | namedTypes.ExportNamedDeclaration | namedTypes.ExportAllDeclaration | namedTypes.ClassPrivateProperty | namedTypes.ClassMethod | namedTypes.ClassPrivateMethod | namedTypes.TSDeclareFunction | namedTypes.TSDeclareMethod | namedTypes.TSIndexSignature | namedTypes.TSPropertySignature | namedTypes.TSMethodSignature | namedTypes.TSCallSignatureDeclaration | namedTypes.TSConstructSignatureDeclaration | namedTypes.TSEnumDeclaration | namedTypes.TSTypeAliasDeclaration | namedTypes.TSModuleDeclaration | namedTypes.TSImportEqualsDeclaration | namedTypes.TSExternalModuleReference | namedTypes.TSNamespaceExportDeclaration | namedTypes.TSInterfaceDeclaration; +export declare type VariableDeclarationKind = namedTypes.VariableDeclaration; +export declare type ForInStatementKind = namedTypes.ForInStatement; +export declare type DebuggerStatementKind = namedTypes.DebuggerStatement; +export declare type FunctionDeclarationKind = namedTypes.FunctionDeclaration; +export declare type FunctionExpressionKind = namedTypes.FunctionExpression; +export declare type VariableDeclaratorKind = namedTypes.VariableDeclarator; +export declare type ThisExpressionKind = namedTypes.ThisExpression; +export declare type ArrayExpressionKind = namedTypes.ArrayExpression; +export declare type ObjectExpressionKind = namedTypes.ObjectExpression; +export declare type PropertyKind = namedTypes.Property; +export declare type LiteralKind = namedTypes.Literal | namedTypes.JSXText | namedTypes.StringLiteral | namedTypes.NumericLiteral | namedTypes.BigIntLiteral | namedTypes.NullLiteral | namedTypes.BooleanLiteral | namedTypes.RegExpLiteral; +export declare type SequenceExpressionKind = namedTypes.SequenceExpression; +export declare type UnaryExpressionKind = namedTypes.UnaryExpression; +export declare type BinaryExpressionKind = namedTypes.BinaryExpression; +export declare type AssignmentExpressionKind = namedTypes.AssignmentExpression; +export declare type MemberExpressionKind = namedTypes.MemberExpression | namedTypes.JSXMemberExpression | namedTypes.OptionalMemberExpression; +export declare type UpdateExpressionKind = namedTypes.UpdateExpression; +export declare type LogicalExpressionKind = namedTypes.LogicalExpression; +export declare type ConditionalExpressionKind = namedTypes.ConditionalExpression; +export declare type NewExpressionKind = namedTypes.NewExpression; +export declare type CallExpressionKind = namedTypes.CallExpression | namedTypes.OptionalCallExpression; +export declare type RestElementKind = namedTypes.RestElement; +export declare type TypeAnnotationKind = namedTypes.TypeAnnotation; +export declare type TSTypeAnnotationKind = namedTypes.TSTypeAnnotation | namedTypes.TSTypePredicate; +export declare type SpreadElementPatternKind = namedTypes.SpreadElementPattern; +export declare type ArrowFunctionExpressionKind = namedTypes.ArrowFunctionExpression; +export declare type ForOfStatementKind = namedTypes.ForOfStatement; +export declare type YieldExpressionKind = namedTypes.YieldExpression; +export declare type GeneratorExpressionKind = namedTypes.GeneratorExpression; +export declare type ComprehensionBlockKind = namedTypes.ComprehensionBlock; +export declare type ComprehensionExpressionKind = namedTypes.ComprehensionExpression; +export declare type ObjectPropertyKind = namedTypes.ObjectProperty; +export declare type PropertyPatternKind = namedTypes.PropertyPattern; +export declare type ObjectPatternKind = namedTypes.ObjectPattern; +export declare type ArrayPatternKind = namedTypes.ArrayPattern; +export declare type MethodDefinitionKind = namedTypes.MethodDefinition; +export declare type SpreadElementKind = namedTypes.SpreadElement; +export declare type AssignmentPatternKind = namedTypes.AssignmentPattern; +export declare type ClassPropertyDefinitionKind = namedTypes.ClassPropertyDefinition; +export declare type ClassPropertyKind = namedTypes.ClassProperty | namedTypes.ClassPrivateProperty; +export declare type ClassBodyKind = namedTypes.ClassBody; +export declare type ClassDeclarationKind = namedTypes.ClassDeclaration; +export declare type ClassExpressionKind = namedTypes.ClassExpression; +export declare type SpecifierKind = namedTypes.ImportSpecifier | namedTypes.ImportNamespaceSpecifier | namedTypes.ImportDefaultSpecifier | namedTypes.ExportSpecifier | namedTypes.ExportBatchSpecifier | namedTypes.ExportNamespaceSpecifier | namedTypes.ExportDefaultSpecifier; +export declare type ModuleSpecifierKind = namedTypes.ImportSpecifier | namedTypes.ImportNamespaceSpecifier | namedTypes.ImportDefaultSpecifier | namedTypes.ExportSpecifier; +export declare type ImportSpecifierKind = namedTypes.ImportSpecifier; +export declare type ImportNamespaceSpecifierKind = namedTypes.ImportNamespaceSpecifier; +export declare type ImportDefaultSpecifierKind = namedTypes.ImportDefaultSpecifier; +export declare type ImportDeclarationKind = namedTypes.ImportDeclaration; +export declare type TaggedTemplateExpressionKind = namedTypes.TaggedTemplateExpression; +export declare type TemplateLiteralKind = namedTypes.TemplateLiteral; +export declare type TemplateElementKind = namedTypes.TemplateElement; +export declare type SpreadPropertyKind = namedTypes.SpreadProperty; +export declare type SpreadPropertyPatternKind = namedTypes.SpreadPropertyPattern; +export declare type AwaitExpressionKind = namedTypes.AwaitExpression; +export declare type ImportExpressionKind = namedTypes.ImportExpression; +export declare type JSXAttributeKind = namedTypes.JSXAttribute; +export declare type JSXIdentifierKind = namedTypes.JSXIdentifier; +export declare type JSXNamespacedNameKind = namedTypes.JSXNamespacedName; +export declare type JSXExpressionContainerKind = namedTypes.JSXExpressionContainer; +export declare type JSXMemberExpressionKind = namedTypes.JSXMemberExpression; +export declare type JSXSpreadAttributeKind = namedTypes.JSXSpreadAttribute; +export declare type JSXElementKind = namedTypes.JSXElement; +export declare type JSXOpeningElementKind = namedTypes.JSXOpeningElement; +export declare type JSXClosingElementKind = namedTypes.JSXClosingElement; +export declare type JSXFragmentKind = namedTypes.JSXFragment; +export declare type JSXTextKind = namedTypes.JSXText; +export declare type JSXOpeningFragmentKind = namedTypes.JSXOpeningFragment; +export declare type JSXClosingFragmentKind = namedTypes.JSXClosingFragment; +export declare type JSXEmptyExpressionKind = namedTypes.JSXEmptyExpression; +export declare type JSXSpreadChildKind = namedTypes.JSXSpreadChild; +export declare type TypeParameterDeclarationKind = namedTypes.TypeParameterDeclaration; +export declare type TSTypeParameterDeclarationKind = namedTypes.TSTypeParameterDeclaration; +export declare type TypeParameterInstantiationKind = namedTypes.TypeParameterInstantiation; +export declare type TSTypeParameterInstantiationKind = namedTypes.TSTypeParameterInstantiation; +export declare type ClassImplementsKind = namedTypes.ClassImplements; +export declare type TSTypeKind = namedTypes.TSExpressionWithTypeArguments | namedTypes.TSTypeReference | namedTypes.TSAnyKeyword | namedTypes.TSBigIntKeyword | namedTypes.TSBooleanKeyword | namedTypes.TSNeverKeyword | namedTypes.TSNullKeyword | namedTypes.TSNumberKeyword | namedTypes.TSObjectKeyword | namedTypes.TSStringKeyword | namedTypes.TSSymbolKeyword | namedTypes.TSUndefinedKeyword | namedTypes.TSUnknownKeyword | namedTypes.TSVoidKeyword | namedTypes.TSThisType | namedTypes.TSArrayType | namedTypes.TSLiteralType | namedTypes.TSUnionType | namedTypes.TSIntersectionType | namedTypes.TSConditionalType | namedTypes.TSInferType | namedTypes.TSParenthesizedType | namedTypes.TSFunctionType | namedTypes.TSConstructorType | namedTypes.TSMappedType | namedTypes.TSTupleType | namedTypes.TSRestType | namedTypes.TSOptionalType | namedTypes.TSIndexedAccessType | namedTypes.TSTypeOperator | namedTypes.TSTypeQuery | namedTypes.TSImportType | namedTypes.TSTypeLiteral; +export declare type TSHasOptionalTypeParameterInstantiationKind = namedTypes.TSExpressionWithTypeArguments | namedTypes.TSTypeReference | namedTypes.TSImportType; +export declare type TSExpressionWithTypeArgumentsKind = namedTypes.TSExpressionWithTypeArguments; +export declare type FlowKind = namedTypes.AnyTypeAnnotation | namedTypes.EmptyTypeAnnotation | namedTypes.MixedTypeAnnotation | namedTypes.VoidTypeAnnotation | namedTypes.NumberTypeAnnotation | namedTypes.NumberLiteralTypeAnnotation | namedTypes.NumericLiteralTypeAnnotation | namedTypes.StringTypeAnnotation | namedTypes.StringLiteralTypeAnnotation | namedTypes.BooleanTypeAnnotation | namedTypes.BooleanLiteralTypeAnnotation | namedTypes.NullableTypeAnnotation | namedTypes.NullLiteralTypeAnnotation | namedTypes.NullTypeAnnotation | namedTypes.ThisTypeAnnotation | namedTypes.ExistsTypeAnnotation | namedTypes.ExistentialTypeParam | namedTypes.FunctionTypeAnnotation | namedTypes.ArrayTypeAnnotation | namedTypes.ObjectTypeAnnotation | namedTypes.GenericTypeAnnotation | namedTypes.MemberTypeAnnotation | namedTypes.UnionTypeAnnotation | namedTypes.IntersectionTypeAnnotation | namedTypes.TypeofTypeAnnotation | namedTypes.TypeParameter | namedTypes.InterfaceTypeAnnotation | namedTypes.TupleTypeAnnotation | namedTypes.InferredPredicate | namedTypes.DeclaredPredicate; +export declare type FlowTypeKind = namedTypes.AnyTypeAnnotation | namedTypes.EmptyTypeAnnotation | namedTypes.MixedTypeAnnotation | namedTypes.VoidTypeAnnotation | namedTypes.NumberTypeAnnotation | namedTypes.NumberLiteralTypeAnnotation | namedTypes.NumericLiteralTypeAnnotation | namedTypes.StringTypeAnnotation | namedTypes.StringLiteralTypeAnnotation | namedTypes.BooleanTypeAnnotation | namedTypes.BooleanLiteralTypeAnnotation | namedTypes.NullableTypeAnnotation | namedTypes.NullLiteralTypeAnnotation | namedTypes.NullTypeAnnotation | namedTypes.ThisTypeAnnotation | namedTypes.ExistsTypeAnnotation | namedTypes.ExistentialTypeParam | namedTypes.FunctionTypeAnnotation | namedTypes.ArrayTypeAnnotation | namedTypes.ObjectTypeAnnotation | namedTypes.GenericTypeAnnotation | namedTypes.MemberTypeAnnotation | namedTypes.UnionTypeAnnotation | namedTypes.IntersectionTypeAnnotation | namedTypes.TypeofTypeAnnotation | namedTypes.TypeParameter | namedTypes.InterfaceTypeAnnotation | namedTypes.TupleTypeAnnotation; +export declare type AnyTypeAnnotationKind = namedTypes.AnyTypeAnnotation; +export declare type EmptyTypeAnnotationKind = namedTypes.EmptyTypeAnnotation; +export declare type MixedTypeAnnotationKind = namedTypes.MixedTypeAnnotation; +export declare type VoidTypeAnnotationKind = namedTypes.VoidTypeAnnotation; +export declare type NumberTypeAnnotationKind = namedTypes.NumberTypeAnnotation; +export declare type NumberLiteralTypeAnnotationKind = namedTypes.NumberLiteralTypeAnnotation; +export declare type NumericLiteralTypeAnnotationKind = namedTypes.NumericLiteralTypeAnnotation; +export declare type StringTypeAnnotationKind = namedTypes.StringTypeAnnotation; +export declare type StringLiteralTypeAnnotationKind = namedTypes.StringLiteralTypeAnnotation; +export declare type BooleanTypeAnnotationKind = namedTypes.BooleanTypeAnnotation; +export declare type BooleanLiteralTypeAnnotationKind = namedTypes.BooleanLiteralTypeAnnotation; +export declare type NullableTypeAnnotationKind = namedTypes.NullableTypeAnnotation; +export declare type NullLiteralTypeAnnotationKind = namedTypes.NullLiteralTypeAnnotation; +export declare type NullTypeAnnotationKind = namedTypes.NullTypeAnnotation; +export declare type ThisTypeAnnotationKind = namedTypes.ThisTypeAnnotation; +export declare type ExistsTypeAnnotationKind = namedTypes.ExistsTypeAnnotation; +export declare type ExistentialTypeParamKind = namedTypes.ExistentialTypeParam; +export declare type FunctionTypeAnnotationKind = namedTypes.FunctionTypeAnnotation; +export declare type FunctionTypeParamKind = namedTypes.FunctionTypeParam; +export declare type ArrayTypeAnnotationKind = namedTypes.ArrayTypeAnnotation; +export declare type ObjectTypeAnnotationKind = namedTypes.ObjectTypeAnnotation; +export declare type ObjectTypePropertyKind = namedTypes.ObjectTypeProperty; +export declare type ObjectTypeSpreadPropertyKind = namedTypes.ObjectTypeSpreadProperty; +export declare type ObjectTypeIndexerKind = namedTypes.ObjectTypeIndexer; +export declare type ObjectTypeCallPropertyKind = namedTypes.ObjectTypeCallProperty; +export declare type ObjectTypeInternalSlotKind = namedTypes.ObjectTypeInternalSlot; +export declare type VarianceKind = namedTypes.Variance; +export declare type QualifiedTypeIdentifierKind = namedTypes.QualifiedTypeIdentifier; +export declare type GenericTypeAnnotationKind = namedTypes.GenericTypeAnnotation; +export declare type MemberTypeAnnotationKind = namedTypes.MemberTypeAnnotation; +export declare type UnionTypeAnnotationKind = namedTypes.UnionTypeAnnotation; +export declare type IntersectionTypeAnnotationKind = namedTypes.IntersectionTypeAnnotation; +export declare type TypeofTypeAnnotationKind = namedTypes.TypeofTypeAnnotation; +export declare type TypeParameterKind = namedTypes.TypeParameter; +export declare type InterfaceTypeAnnotationKind = namedTypes.InterfaceTypeAnnotation; +export declare type InterfaceExtendsKind = namedTypes.InterfaceExtends; +export declare type InterfaceDeclarationKind = namedTypes.InterfaceDeclaration | namedTypes.DeclareInterface | namedTypes.DeclareClass; +export declare type DeclareInterfaceKind = namedTypes.DeclareInterface; +export declare type TypeAliasKind = namedTypes.TypeAlias | namedTypes.DeclareTypeAlias | namedTypes.DeclareOpaqueType; +export declare type OpaqueTypeKind = namedTypes.OpaqueType; +export declare type DeclareTypeAliasKind = namedTypes.DeclareTypeAlias; +export declare type DeclareOpaqueTypeKind = namedTypes.DeclareOpaqueType; +export declare type TypeCastExpressionKind = namedTypes.TypeCastExpression; +export declare type TupleTypeAnnotationKind = namedTypes.TupleTypeAnnotation; +export declare type DeclareVariableKind = namedTypes.DeclareVariable; +export declare type DeclareFunctionKind = namedTypes.DeclareFunction; +export declare type DeclareClassKind = namedTypes.DeclareClass; +export declare type DeclareModuleKind = namedTypes.DeclareModule; +export declare type DeclareModuleExportsKind = namedTypes.DeclareModuleExports; +export declare type DeclareExportDeclarationKind = namedTypes.DeclareExportDeclaration; +export declare type ExportSpecifierKind = namedTypes.ExportSpecifier; +export declare type ExportBatchSpecifierKind = namedTypes.ExportBatchSpecifier; +export declare type DeclareExportAllDeclarationKind = namedTypes.DeclareExportAllDeclaration; +export declare type FlowPredicateKind = namedTypes.InferredPredicate | namedTypes.DeclaredPredicate; +export declare type InferredPredicateKind = namedTypes.InferredPredicate; +export declare type DeclaredPredicateKind = namedTypes.DeclaredPredicate; +export declare type ExportDeclarationKind = namedTypes.ExportDeclaration; +export declare type BlockKind = namedTypes.Block; +export declare type LineKind = namedTypes.Line; +export declare type NoopKind = namedTypes.Noop; +export declare type DoExpressionKind = namedTypes.DoExpression; +export declare type SuperKind = namedTypes.Super; +export declare type BindExpressionKind = namedTypes.BindExpression; +export declare type DecoratorKind = namedTypes.Decorator; +export declare type MetaPropertyKind = namedTypes.MetaProperty; +export declare type ParenthesizedExpressionKind = namedTypes.ParenthesizedExpression; +export declare type ExportDefaultDeclarationKind = namedTypes.ExportDefaultDeclaration; +export declare type ExportNamedDeclarationKind = namedTypes.ExportNamedDeclaration; +export declare type ExportNamespaceSpecifierKind = namedTypes.ExportNamespaceSpecifier; +export declare type ExportDefaultSpecifierKind = namedTypes.ExportDefaultSpecifier; +export declare type ExportAllDeclarationKind = namedTypes.ExportAllDeclaration; +export declare type CommentBlockKind = namedTypes.CommentBlock; +export declare type CommentLineKind = namedTypes.CommentLine; +export declare type DirectiveKind = namedTypes.Directive; +export declare type DirectiveLiteralKind = namedTypes.DirectiveLiteral; +export declare type InterpreterDirectiveKind = namedTypes.InterpreterDirective; +export declare type StringLiteralKind = namedTypes.StringLiteral; +export declare type NumericLiteralKind = namedTypes.NumericLiteral; +export declare type BigIntLiteralKind = namedTypes.BigIntLiteral; +export declare type NullLiteralKind = namedTypes.NullLiteral; +export declare type BooleanLiteralKind = namedTypes.BooleanLiteral; +export declare type RegExpLiteralKind = namedTypes.RegExpLiteral; +export declare type ObjectMethodKind = namedTypes.ObjectMethod; +export declare type ClassPrivatePropertyKind = namedTypes.ClassPrivateProperty; +export declare type ClassMethodKind = namedTypes.ClassMethod; +export declare type ClassPrivateMethodKind = namedTypes.ClassPrivateMethod; +export declare type PrivateNameKind = namedTypes.PrivateName; +export declare type RestPropertyKind = namedTypes.RestProperty; +export declare type ForAwaitStatementKind = namedTypes.ForAwaitStatement; +export declare type ImportKind = namedTypes.Import; +export declare type TSQualifiedNameKind = namedTypes.TSQualifiedName; +export declare type TSTypeReferenceKind = namedTypes.TSTypeReference; +export declare type TSHasOptionalTypeParametersKind = namedTypes.TSFunctionType | namedTypes.TSConstructorType | namedTypes.TSDeclareFunction | namedTypes.TSDeclareMethod | namedTypes.TSMethodSignature | namedTypes.TSCallSignatureDeclaration | namedTypes.TSConstructSignatureDeclaration | namedTypes.TSTypeAliasDeclaration | namedTypes.TSInterfaceDeclaration; +export declare type TSHasOptionalTypeAnnotationKind = namedTypes.TSFunctionType | namedTypes.TSConstructorType | namedTypes.TSIndexSignature | namedTypes.TSPropertySignature | namedTypes.TSMethodSignature | namedTypes.TSCallSignatureDeclaration | namedTypes.TSConstructSignatureDeclaration; +export declare type TSAsExpressionKind = namedTypes.TSAsExpression; +export declare type TSNonNullExpressionKind = namedTypes.TSNonNullExpression; +export declare type TSAnyKeywordKind = namedTypes.TSAnyKeyword; +export declare type TSBigIntKeywordKind = namedTypes.TSBigIntKeyword; +export declare type TSBooleanKeywordKind = namedTypes.TSBooleanKeyword; +export declare type TSNeverKeywordKind = namedTypes.TSNeverKeyword; +export declare type TSNullKeywordKind = namedTypes.TSNullKeyword; +export declare type TSNumberKeywordKind = namedTypes.TSNumberKeyword; +export declare type TSObjectKeywordKind = namedTypes.TSObjectKeyword; +export declare type TSStringKeywordKind = namedTypes.TSStringKeyword; +export declare type TSSymbolKeywordKind = namedTypes.TSSymbolKeyword; +export declare type TSUndefinedKeywordKind = namedTypes.TSUndefinedKeyword; +export declare type TSUnknownKeywordKind = namedTypes.TSUnknownKeyword; +export declare type TSVoidKeywordKind = namedTypes.TSVoidKeyword; +export declare type TSThisTypeKind = namedTypes.TSThisType; +export declare type TSArrayTypeKind = namedTypes.TSArrayType; +export declare type TSLiteralTypeKind = namedTypes.TSLiteralType; +export declare type TSUnionTypeKind = namedTypes.TSUnionType; +export declare type TSIntersectionTypeKind = namedTypes.TSIntersectionType; +export declare type TSConditionalTypeKind = namedTypes.TSConditionalType; +export declare type TSInferTypeKind = namedTypes.TSInferType; +export declare type TSTypeParameterKind = namedTypes.TSTypeParameter; +export declare type TSParenthesizedTypeKind = namedTypes.TSParenthesizedType; +export declare type TSFunctionTypeKind = namedTypes.TSFunctionType; +export declare type TSConstructorTypeKind = namedTypes.TSConstructorType; +export declare type TSDeclareFunctionKind = namedTypes.TSDeclareFunction; +export declare type TSDeclareMethodKind = namedTypes.TSDeclareMethod; +export declare type TSMappedTypeKind = namedTypes.TSMappedType; +export declare type TSTupleTypeKind = namedTypes.TSTupleType; +export declare type TSRestTypeKind = namedTypes.TSRestType; +export declare type TSOptionalTypeKind = namedTypes.TSOptionalType; +export declare type TSIndexedAccessTypeKind = namedTypes.TSIndexedAccessType; +export declare type TSTypeOperatorKind = namedTypes.TSTypeOperator; +export declare type TSIndexSignatureKind = namedTypes.TSIndexSignature; +export declare type TSPropertySignatureKind = namedTypes.TSPropertySignature; +export declare type TSMethodSignatureKind = namedTypes.TSMethodSignature; +export declare type TSTypePredicateKind = namedTypes.TSTypePredicate; +export declare type TSCallSignatureDeclarationKind = namedTypes.TSCallSignatureDeclaration; +export declare type TSConstructSignatureDeclarationKind = namedTypes.TSConstructSignatureDeclaration; +export declare type TSEnumMemberKind = namedTypes.TSEnumMember; +export declare type TSTypeQueryKind = namedTypes.TSTypeQuery; +export declare type TSImportTypeKind = namedTypes.TSImportType; +export declare type TSTypeLiteralKind = namedTypes.TSTypeLiteral; +export declare type TSTypeAssertionKind = namedTypes.TSTypeAssertion; +export declare type TSEnumDeclarationKind = namedTypes.TSEnumDeclaration; +export declare type TSTypeAliasDeclarationKind = namedTypes.TSTypeAliasDeclaration; +export declare type TSModuleBlockKind = namedTypes.TSModuleBlock; +export declare type TSModuleDeclarationKind = namedTypes.TSModuleDeclaration; +export declare type TSImportEqualsDeclarationKind = namedTypes.TSImportEqualsDeclaration; +export declare type TSExternalModuleReferenceKind = namedTypes.TSExternalModuleReference; +export declare type TSExportAssignmentKind = namedTypes.TSExportAssignment; +export declare type TSNamespaceExportDeclarationKind = namedTypes.TSNamespaceExportDeclaration; +export declare type TSInterfaceBodyKind = namedTypes.TSInterfaceBody; +export declare type TSInterfaceDeclarationKind = namedTypes.TSInterfaceDeclaration; +export declare type TSParameterPropertyKind = namedTypes.TSParameterProperty; +export declare type OptionalMemberExpressionKind = namedTypes.OptionalMemberExpression; +export declare type OptionalCallExpressionKind = namedTypes.OptionalCallExpression; diff --git a/code/application_liste/app/node_modules/ast-types/gen/kinds.js b/code/application_liste/app/node_modules/ast-types/gen/kinds.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/gen/kinds.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/code/application_liste/app/node_modules/ast-types/gen/namedTypes.d.ts b/code/application_liste/app/node_modules/ast-types/gen/namedTypes.d.ts new file mode 100644 index 0000000..47bb619 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/gen/namedTypes.d.ts @@ -0,0 +1,1800 @@ +import { Omit } from "../types"; +import { Type } from "../lib/types"; +import * as K from "./kinds"; +export declare namespace namedTypes { + interface Printable { + loc?: K.SourceLocationKind | null; + } + interface SourceLocation { + start: K.PositionKind; + end: K.PositionKind; + source?: string | null; + } + interface Node extends Printable { + type: string; + comments?: K.CommentKind[] | null; + } + interface Comment extends Printable { + value: string; + leading?: boolean; + trailing?: boolean; + } + interface Position { + line: number; + column: number; + } + interface File extends Omit { + type: "File"; + program: K.ProgramKind; + name?: string | null; + } + interface Program extends Omit { + type: "Program"; + body: K.StatementKind[]; + directives?: K.DirectiveKind[]; + interpreter?: K.InterpreterDirectiveKind | null; + } + interface Statement extends Node { + } + interface Function extends Node { + id?: K.IdentifierKind | null; + params: K.PatternKind[]; + body: K.BlockStatementKind; + generator?: boolean; + async?: boolean; + expression?: boolean; + defaults?: (K.ExpressionKind | null)[]; + rest?: K.IdentifierKind | null; + returnType?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null; + typeParameters?: K.TypeParameterDeclarationKind | K.TSTypeParameterDeclarationKind | null; + } + interface Expression extends Node { + } + interface Pattern extends Node { + } + interface Identifier extends Omit, Omit { + type: "Identifier"; + name: string; + optional?: boolean; + typeAnnotation?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null; + } + interface BlockStatement extends Omit { + type: "BlockStatement"; + body: K.StatementKind[]; + directives?: K.DirectiveKind[]; + } + interface EmptyStatement extends Omit { + type: "EmptyStatement"; + } + interface ExpressionStatement extends Omit { + type: "ExpressionStatement"; + expression: K.ExpressionKind; + } + interface IfStatement extends Omit { + type: "IfStatement"; + test: K.ExpressionKind; + consequent: K.StatementKind; + alternate?: K.StatementKind | null; + } + interface LabeledStatement extends Omit { + type: "LabeledStatement"; + label: K.IdentifierKind; + body: K.StatementKind; + } + interface BreakStatement extends Omit { + type: "BreakStatement"; + label?: K.IdentifierKind | null; + } + interface ContinueStatement extends Omit { + type: "ContinueStatement"; + label?: K.IdentifierKind | null; + } + interface WithStatement extends Omit { + type: "WithStatement"; + object: K.ExpressionKind; + body: K.StatementKind; + } + interface SwitchStatement extends Omit { + type: "SwitchStatement"; + discriminant: K.ExpressionKind; + cases: K.SwitchCaseKind[]; + lexical?: boolean; + } + interface SwitchCase extends Omit { + type: "SwitchCase"; + test: K.ExpressionKind | null; + consequent: K.StatementKind[]; + } + interface ReturnStatement extends Omit { + type: "ReturnStatement"; + argument: K.ExpressionKind | null; + } + interface ThrowStatement extends Omit { + type: "ThrowStatement"; + argument: K.ExpressionKind; + } + interface TryStatement extends Omit { + type: "TryStatement"; + block: K.BlockStatementKind; + handler?: K.CatchClauseKind | null; + handlers?: K.CatchClauseKind[]; + guardedHandlers?: K.CatchClauseKind[]; + finalizer?: K.BlockStatementKind | null; + } + interface CatchClause extends Omit { + type: "CatchClause"; + param?: K.PatternKind | null; + guard?: K.ExpressionKind | null; + body: K.BlockStatementKind; + } + interface WhileStatement extends Omit { + type: "WhileStatement"; + test: K.ExpressionKind; + body: K.StatementKind; + } + interface DoWhileStatement extends Omit { + type: "DoWhileStatement"; + body: K.StatementKind; + test: K.ExpressionKind; + } + interface ForStatement extends Omit { + type: "ForStatement"; + init: K.VariableDeclarationKind | K.ExpressionKind | null; + test: K.ExpressionKind | null; + update: K.ExpressionKind | null; + body: K.StatementKind; + } + interface Declaration extends Statement { + } + interface VariableDeclaration extends Omit { + type: "VariableDeclaration"; + kind: "var" | "let" | "const"; + declarations: (K.VariableDeclaratorKind | K.IdentifierKind)[]; + } + interface ForInStatement extends Omit { + type: "ForInStatement"; + left: K.VariableDeclarationKind | K.ExpressionKind; + right: K.ExpressionKind; + body: K.StatementKind; + } + interface DebuggerStatement extends Omit { + type: "DebuggerStatement"; + } + interface FunctionDeclaration extends Omit, Omit { + type: "FunctionDeclaration"; + id: K.IdentifierKind; + } + interface FunctionExpression extends Omit, Omit { + type: "FunctionExpression"; + } + interface VariableDeclarator extends Omit { + type: "VariableDeclarator"; + id: K.PatternKind; + init?: K.ExpressionKind | null; + } + interface ThisExpression extends Omit { + type: "ThisExpression"; + } + interface ArrayExpression extends Omit { + type: "ArrayExpression"; + elements: (K.ExpressionKind | K.SpreadElementKind | K.RestElementKind | null)[]; + } + interface ObjectExpression extends Omit { + type: "ObjectExpression"; + properties: (K.PropertyKind | K.ObjectMethodKind | K.ObjectPropertyKind | K.SpreadPropertyKind | K.SpreadElementKind)[]; + } + interface Property extends Omit { + type: "Property"; + kind: "init" | "get" | "set"; + key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind; + value: K.ExpressionKind | K.PatternKind; + method?: boolean; + shorthand?: boolean; + computed?: boolean; + decorators?: K.DecoratorKind[] | null; + } + interface Literal extends Omit { + type: "Literal"; + value: string | boolean | null | number | RegExp; + regex?: { + pattern: string; + flags: string; + } | null; + } + interface SequenceExpression extends Omit { + type: "SequenceExpression"; + expressions: K.ExpressionKind[]; + } + interface UnaryExpression extends Omit { + type: "UnaryExpression"; + operator: "-" | "+" | "!" | "~" | "typeof" | "void" | "delete"; + argument: K.ExpressionKind; + prefix?: boolean; + } + interface BinaryExpression extends Omit { + type: "BinaryExpression"; + operator: "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "in" | "instanceof"; + left: K.ExpressionKind; + right: K.ExpressionKind; + } + interface AssignmentExpression extends Omit { + type: "AssignmentExpression"; + operator: "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&="; + left: K.PatternKind | K.MemberExpressionKind; + right: K.ExpressionKind; + } + interface MemberExpression extends Omit { + type: "MemberExpression"; + object: K.ExpressionKind; + property: K.IdentifierKind | K.ExpressionKind; + computed?: boolean; + } + interface UpdateExpression extends Omit { + type: "UpdateExpression"; + operator: "++" | "--"; + argument: K.ExpressionKind; + prefix: boolean; + } + interface LogicalExpression extends Omit { + type: "LogicalExpression"; + operator: "||" | "&&" | "??"; + left: K.ExpressionKind; + right: K.ExpressionKind; + } + interface ConditionalExpression extends Omit { + type: "ConditionalExpression"; + test: K.ExpressionKind; + consequent: K.ExpressionKind; + alternate: K.ExpressionKind; + } + interface NewExpression extends Omit { + type: "NewExpression"; + callee: K.ExpressionKind; + arguments: (K.ExpressionKind | K.SpreadElementKind)[]; + typeArguments?: null | K.TypeParameterInstantiationKind; + } + interface CallExpression extends Omit { + type: "CallExpression"; + callee: K.ExpressionKind; + arguments: (K.ExpressionKind | K.SpreadElementKind)[]; + typeArguments?: null | K.TypeParameterInstantiationKind; + } + interface RestElement extends Omit { + type: "RestElement"; + argument: K.PatternKind; + typeAnnotation?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null; + } + interface TypeAnnotation extends Omit { + type: "TypeAnnotation"; + typeAnnotation: K.FlowTypeKind; + } + interface TSTypeAnnotation extends Omit { + type: "TSTypeAnnotation"; + typeAnnotation: K.TSTypeKind | K.TSTypeAnnotationKind; + } + interface SpreadElementPattern extends Omit { + type: "SpreadElementPattern"; + argument: K.PatternKind; + } + interface ArrowFunctionExpression extends Omit, Omit { + type: "ArrowFunctionExpression"; + id?: null; + body: K.BlockStatementKind | K.ExpressionKind; + generator?: false; + } + interface ForOfStatement extends Omit { + type: "ForOfStatement"; + left: K.VariableDeclarationKind | K.PatternKind; + right: K.ExpressionKind; + body: K.StatementKind; + } + interface YieldExpression extends Omit { + type: "YieldExpression"; + argument: K.ExpressionKind | null; + delegate?: boolean; + } + interface GeneratorExpression extends Omit { + type: "GeneratorExpression"; + body: K.ExpressionKind; + blocks: K.ComprehensionBlockKind[]; + filter: K.ExpressionKind | null; + } + interface ComprehensionBlock extends Omit { + type: "ComprehensionBlock"; + left: K.PatternKind; + right: K.ExpressionKind; + each: boolean; + } + interface ComprehensionExpression extends Omit { + type: "ComprehensionExpression"; + body: K.ExpressionKind; + blocks: K.ComprehensionBlockKind[]; + filter: K.ExpressionKind | null; + } + interface ObjectProperty extends Omit { + shorthand?: boolean; + type: "ObjectProperty"; + key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind; + value: K.ExpressionKind | K.PatternKind; + accessibility?: K.LiteralKind | null; + computed?: boolean; + } + interface PropertyPattern extends Omit { + type: "PropertyPattern"; + key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind; + pattern: K.PatternKind; + computed?: boolean; + } + interface ObjectPattern extends Omit { + type: "ObjectPattern"; + properties: (K.PropertyKind | K.PropertyPatternKind | K.SpreadPropertyPatternKind | K.SpreadPropertyKind | K.ObjectPropertyKind | K.RestPropertyKind)[]; + typeAnnotation?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null; + decorators?: K.DecoratorKind[] | null; + } + interface ArrayPattern extends Omit { + type: "ArrayPattern"; + elements: (K.PatternKind | K.SpreadElementKind | null)[]; + } + interface MethodDefinition extends Omit { + type: "MethodDefinition"; + kind: "constructor" | "method" | "get" | "set"; + key: K.ExpressionKind; + value: K.FunctionKind; + computed?: boolean; + static?: boolean; + decorators?: K.DecoratorKind[] | null; + } + interface SpreadElement extends Omit { + type: "SpreadElement"; + argument: K.ExpressionKind; + } + interface AssignmentPattern extends Omit { + type: "AssignmentPattern"; + left: K.PatternKind; + right: K.ExpressionKind; + } + interface ClassPropertyDefinition extends Omit { + type: "ClassPropertyDefinition"; + definition: K.MethodDefinitionKind | K.VariableDeclaratorKind | K.ClassPropertyDefinitionKind | K.ClassPropertyKind; + } + interface ClassProperty extends Omit { + type: "ClassProperty"; + key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind; + computed?: boolean; + value: K.ExpressionKind | null; + static?: boolean; + typeAnnotation?: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null; + variance?: K.VarianceKind | "plus" | "minus" | null; + access?: "public" | "private" | "protected" | undefined; + } + interface ClassBody extends Omit { + type: "ClassBody"; + body: (K.MethodDefinitionKind | K.VariableDeclaratorKind | K.ClassPropertyDefinitionKind | K.ClassPropertyKind | K.ClassPrivatePropertyKind | K.ClassMethodKind | K.ClassPrivateMethodKind | K.TSDeclareMethodKind | K.TSCallSignatureDeclarationKind | K.TSConstructSignatureDeclarationKind | K.TSIndexSignatureKind | K.TSMethodSignatureKind | K.TSPropertySignatureKind)[]; + } + interface ClassDeclaration extends Omit { + type: "ClassDeclaration"; + id: K.IdentifierKind | null; + body: K.ClassBodyKind; + superClass?: K.ExpressionKind | null; + typeParameters?: K.TypeParameterDeclarationKind | K.TSTypeParameterDeclarationKind | null; + superTypeParameters?: K.TypeParameterInstantiationKind | K.TSTypeParameterInstantiationKind | null; + implements?: K.ClassImplementsKind[] | K.TSExpressionWithTypeArgumentsKind[]; + } + interface ClassExpression extends Omit { + type: "ClassExpression"; + id?: K.IdentifierKind | null; + body: K.ClassBodyKind; + superClass?: K.ExpressionKind | null; + typeParameters?: K.TypeParameterDeclarationKind | K.TSTypeParameterDeclarationKind | null; + superTypeParameters?: K.TypeParameterInstantiationKind | K.TSTypeParameterInstantiationKind | null; + implements?: K.ClassImplementsKind[] | K.TSExpressionWithTypeArgumentsKind[]; + } + interface Specifier extends Node { + } + interface ModuleSpecifier extends Specifier { + local?: K.IdentifierKind | null; + id?: K.IdentifierKind | null; + name?: K.IdentifierKind | null; + } + interface ImportSpecifier extends Omit { + type: "ImportSpecifier"; + imported: K.IdentifierKind; + } + interface ImportNamespaceSpecifier extends Omit { + type: "ImportNamespaceSpecifier"; + } + interface ImportDefaultSpecifier extends Omit { + type: "ImportDefaultSpecifier"; + } + interface ImportDeclaration extends Omit { + type: "ImportDeclaration"; + specifiers?: (K.ImportSpecifierKind | K.ImportNamespaceSpecifierKind | K.ImportDefaultSpecifierKind)[]; + source: K.LiteralKind; + importKind?: "value" | "type"; + } + interface TaggedTemplateExpression extends Omit { + type: "TaggedTemplateExpression"; + tag: K.ExpressionKind; + quasi: K.TemplateLiteralKind; + } + interface TemplateLiteral extends Omit { + type: "TemplateLiteral"; + quasis: K.TemplateElementKind[]; + expressions: K.ExpressionKind[]; + } + interface TemplateElement extends Omit { + type: "TemplateElement"; + value: { + cooked: string; + raw: string; + }; + tail: boolean; + } + interface SpreadProperty extends Omit { + type: "SpreadProperty"; + argument: K.ExpressionKind; + } + interface SpreadPropertyPattern extends Omit { + type: "SpreadPropertyPattern"; + argument: K.PatternKind; + } + interface AwaitExpression extends Omit { + type: "AwaitExpression"; + argument: K.ExpressionKind | null; + all?: boolean; + } + interface ImportExpression extends Omit { + type: "ImportExpression"; + source: K.ExpressionKind; + } + interface JSXAttribute extends Omit { + type: "JSXAttribute"; + name: K.JSXIdentifierKind | K.JSXNamespacedNameKind; + value?: K.LiteralKind | K.JSXExpressionContainerKind | null; + } + interface JSXIdentifier extends Omit { + type: "JSXIdentifier"; + name: string; + } + interface JSXNamespacedName extends Omit { + type: "JSXNamespacedName"; + namespace: K.JSXIdentifierKind; + name: K.JSXIdentifierKind; + } + interface JSXExpressionContainer extends Omit { + type: "JSXExpressionContainer"; + expression: K.ExpressionKind; + } + interface JSXMemberExpression extends Omit { + type: "JSXMemberExpression"; + object: K.JSXIdentifierKind | K.JSXMemberExpressionKind; + property: K.JSXIdentifierKind; + computed?: boolean; + } + interface JSXSpreadAttribute extends Omit { + type: "JSXSpreadAttribute"; + argument: K.ExpressionKind; + } + interface JSXElement extends Omit { + type: "JSXElement"; + openingElement: K.JSXOpeningElementKind; + closingElement?: K.JSXClosingElementKind | null; + children?: (K.JSXElementKind | K.JSXExpressionContainerKind | K.JSXFragmentKind | K.JSXTextKind | K.LiteralKind)[]; + name?: K.JSXIdentifierKind | K.JSXNamespacedNameKind | K.JSXMemberExpressionKind; + selfClosing?: boolean; + attributes?: (K.JSXAttributeKind | K.JSXSpreadAttributeKind)[]; + } + interface JSXOpeningElement extends Omit { + type: "JSXOpeningElement"; + name: K.JSXIdentifierKind | K.JSXNamespacedNameKind | K.JSXMemberExpressionKind; + attributes?: (K.JSXAttributeKind | K.JSXSpreadAttributeKind)[]; + selfClosing?: boolean; + } + interface JSXClosingElement extends Omit { + type: "JSXClosingElement"; + name: K.JSXIdentifierKind | K.JSXNamespacedNameKind | K.JSXMemberExpressionKind; + } + interface JSXFragment extends Omit { + type: "JSXFragment"; + openingElement: K.JSXOpeningFragmentKind; + closingElement: K.JSXClosingFragmentKind; + children?: (K.JSXElementKind | K.JSXExpressionContainerKind | K.JSXFragmentKind | K.JSXTextKind | K.LiteralKind)[]; + } + interface JSXText extends Omit { + type: "JSXText"; + value: string; + } + interface JSXOpeningFragment extends Omit { + type: "JSXOpeningFragment"; + } + interface JSXClosingFragment extends Omit { + type: "JSXClosingFragment"; + } + interface JSXEmptyExpression extends Omit { + type: "JSXEmptyExpression"; + } + interface JSXSpreadChild extends Omit { + type: "JSXSpreadChild"; + expression: K.ExpressionKind; + } + interface TypeParameterDeclaration extends Omit { + type: "TypeParameterDeclaration"; + params: K.TypeParameterKind[]; + } + interface TSTypeParameterDeclaration extends Omit { + type: "TSTypeParameterDeclaration"; + params: K.TSTypeParameterKind[]; + } + interface TypeParameterInstantiation extends Omit { + type: "TypeParameterInstantiation"; + params: K.FlowTypeKind[]; + } + interface TSTypeParameterInstantiation extends Omit { + type: "TSTypeParameterInstantiation"; + params: K.TSTypeKind[]; + } + interface ClassImplements extends Omit { + type: "ClassImplements"; + id: K.IdentifierKind; + superClass?: K.ExpressionKind | null; + typeParameters?: K.TypeParameterInstantiationKind | null; + } + interface TSType extends Node { + } + interface TSHasOptionalTypeParameterInstantiation { + typeParameters?: K.TSTypeParameterInstantiationKind | null; + } + interface TSExpressionWithTypeArguments extends Omit, TSHasOptionalTypeParameterInstantiation { + type: "TSExpressionWithTypeArguments"; + expression: K.IdentifierKind | K.TSQualifiedNameKind; + } + interface Flow extends Node { + } + interface FlowType extends Flow { + } + interface AnyTypeAnnotation extends Omit { + type: "AnyTypeAnnotation"; + } + interface EmptyTypeAnnotation extends Omit { + type: "EmptyTypeAnnotation"; + } + interface MixedTypeAnnotation extends Omit { + type: "MixedTypeAnnotation"; + } + interface VoidTypeAnnotation extends Omit { + type: "VoidTypeAnnotation"; + } + interface NumberTypeAnnotation extends Omit { + type: "NumberTypeAnnotation"; + } + interface NumberLiteralTypeAnnotation extends Omit { + type: "NumberLiteralTypeAnnotation"; + value: number; + raw: string; + } + interface NumericLiteralTypeAnnotation extends Omit { + type: "NumericLiteralTypeAnnotation"; + value: number; + raw: string; + } + interface StringTypeAnnotation extends Omit { + type: "StringTypeAnnotation"; + } + interface StringLiteralTypeAnnotation extends Omit { + type: "StringLiteralTypeAnnotation"; + value: string; + raw: string; + } + interface BooleanTypeAnnotation extends Omit { + type: "BooleanTypeAnnotation"; + } + interface BooleanLiteralTypeAnnotation extends Omit { + type: "BooleanLiteralTypeAnnotation"; + value: boolean; + raw: string; + } + interface NullableTypeAnnotation extends Omit { + type: "NullableTypeAnnotation"; + typeAnnotation: K.FlowTypeKind; + } + interface NullLiteralTypeAnnotation extends Omit { + type: "NullLiteralTypeAnnotation"; + } + interface NullTypeAnnotation extends Omit { + type: "NullTypeAnnotation"; + } + interface ThisTypeAnnotation extends Omit { + type: "ThisTypeAnnotation"; + } + interface ExistsTypeAnnotation extends Omit { + type: "ExistsTypeAnnotation"; + } + interface ExistentialTypeParam extends Omit { + type: "ExistentialTypeParam"; + } + interface FunctionTypeAnnotation extends Omit { + type: "FunctionTypeAnnotation"; + params: K.FunctionTypeParamKind[]; + returnType: K.FlowTypeKind; + rest: K.FunctionTypeParamKind | null; + typeParameters: K.TypeParameterDeclarationKind | null; + } + interface FunctionTypeParam extends Omit { + type: "FunctionTypeParam"; + name: K.IdentifierKind; + typeAnnotation: K.FlowTypeKind; + optional: boolean; + } + interface ArrayTypeAnnotation extends Omit { + type: "ArrayTypeAnnotation"; + elementType: K.FlowTypeKind; + } + interface ObjectTypeAnnotation extends Omit { + type: "ObjectTypeAnnotation"; + properties: (K.ObjectTypePropertyKind | K.ObjectTypeSpreadPropertyKind)[]; + indexers?: K.ObjectTypeIndexerKind[]; + callProperties?: K.ObjectTypeCallPropertyKind[]; + inexact?: boolean | undefined; + exact?: boolean; + internalSlots?: K.ObjectTypeInternalSlotKind[]; + } + interface ObjectTypeProperty extends Omit { + type: "ObjectTypeProperty"; + key: K.LiteralKind | K.IdentifierKind; + value: K.FlowTypeKind; + optional: boolean; + variance?: K.VarianceKind | "plus" | "minus" | null; + } + interface ObjectTypeSpreadProperty extends Omit { + type: "ObjectTypeSpreadProperty"; + argument: K.FlowTypeKind; + } + interface ObjectTypeIndexer extends Omit { + type: "ObjectTypeIndexer"; + id: K.IdentifierKind; + key: K.FlowTypeKind; + value: K.FlowTypeKind; + variance?: K.VarianceKind | "plus" | "minus" | null; + } + interface ObjectTypeCallProperty extends Omit { + type: "ObjectTypeCallProperty"; + value: K.FunctionTypeAnnotationKind; + static?: boolean; + } + interface ObjectTypeInternalSlot extends Omit { + type: "ObjectTypeInternalSlot"; + id: K.IdentifierKind; + value: K.FlowTypeKind; + optional: boolean; + static: boolean; + method: boolean; + } + interface Variance extends Omit { + type: "Variance"; + kind: "plus" | "minus"; + } + interface QualifiedTypeIdentifier extends Omit { + type: "QualifiedTypeIdentifier"; + qualification: K.IdentifierKind | K.QualifiedTypeIdentifierKind; + id: K.IdentifierKind; + } + interface GenericTypeAnnotation extends Omit { + type: "GenericTypeAnnotation"; + id: K.IdentifierKind | K.QualifiedTypeIdentifierKind; + typeParameters: K.TypeParameterInstantiationKind | null; + } + interface MemberTypeAnnotation extends Omit { + type: "MemberTypeAnnotation"; + object: K.IdentifierKind; + property: K.MemberTypeAnnotationKind | K.GenericTypeAnnotationKind; + } + interface UnionTypeAnnotation extends Omit { + type: "UnionTypeAnnotation"; + types: K.FlowTypeKind[]; + } + interface IntersectionTypeAnnotation extends Omit { + type: "IntersectionTypeAnnotation"; + types: K.FlowTypeKind[]; + } + interface TypeofTypeAnnotation extends Omit { + type: "TypeofTypeAnnotation"; + argument: K.FlowTypeKind; + } + interface TypeParameter extends Omit { + type: "TypeParameter"; + name: string; + variance?: K.VarianceKind | "plus" | "minus" | null; + bound?: K.TypeAnnotationKind | null; + } + interface InterfaceTypeAnnotation extends Omit { + type: "InterfaceTypeAnnotation"; + body: K.ObjectTypeAnnotationKind; + extends?: K.InterfaceExtendsKind[] | null; + } + interface InterfaceExtends extends Omit { + type: "InterfaceExtends"; + id: K.IdentifierKind; + typeParameters?: K.TypeParameterInstantiationKind | null; + } + interface InterfaceDeclaration extends Omit { + type: "InterfaceDeclaration"; + id: K.IdentifierKind; + typeParameters?: K.TypeParameterDeclarationKind | null; + body: K.ObjectTypeAnnotationKind; + extends: K.InterfaceExtendsKind[]; + } + interface DeclareInterface extends Omit { + type: "DeclareInterface"; + } + interface TypeAlias extends Omit { + type: "TypeAlias"; + id: K.IdentifierKind; + typeParameters: K.TypeParameterDeclarationKind | null; + right: K.FlowTypeKind; + } + interface OpaqueType extends Omit { + type: "OpaqueType"; + id: K.IdentifierKind; + typeParameters: K.TypeParameterDeclarationKind | null; + impltype: K.FlowTypeKind; + supertype: K.FlowTypeKind; + } + interface DeclareTypeAlias extends Omit { + type: "DeclareTypeAlias"; + } + interface DeclareOpaqueType extends Omit { + type: "DeclareOpaqueType"; + } + interface TypeCastExpression extends Omit { + type: "TypeCastExpression"; + expression: K.ExpressionKind; + typeAnnotation: K.TypeAnnotationKind; + } + interface TupleTypeAnnotation extends Omit { + type: "TupleTypeAnnotation"; + types: K.FlowTypeKind[]; + } + interface DeclareVariable extends Omit { + type: "DeclareVariable"; + id: K.IdentifierKind; + } + interface DeclareFunction extends Omit { + type: "DeclareFunction"; + id: K.IdentifierKind; + } + interface DeclareClass extends Omit { + type: "DeclareClass"; + } + interface DeclareModule extends Omit { + type: "DeclareModule"; + id: K.IdentifierKind | K.LiteralKind; + body: K.BlockStatementKind; + } + interface DeclareModuleExports extends Omit { + type: "DeclareModuleExports"; + typeAnnotation: K.TypeAnnotationKind; + } + interface DeclareExportDeclaration extends Omit { + type: "DeclareExportDeclaration"; + default: boolean; + declaration: K.DeclareVariableKind | K.DeclareFunctionKind | K.DeclareClassKind | K.FlowTypeKind | null; + specifiers?: (K.ExportSpecifierKind | K.ExportBatchSpecifierKind)[]; + source?: K.LiteralKind | null; + } + interface ExportSpecifier extends Omit { + type: "ExportSpecifier"; + exported: K.IdentifierKind; + } + interface ExportBatchSpecifier extends Omit { + type: "ExportBatchSpecifier"; + } + interface DeclareExportAllDeclaration extends Omit { + type: "DeclareExportAllDeclaration"; + source?: K.LiteralKind | null; + } + interface FlowPredicate extends Flow { + } + interface InferredPredicate extends Omit { + type: "InferredPredicate"; + } + interface DeclaredPredicate extends Omit { + type: "DeclaredPredicate"; + value: K.ExpressionKind; + } + interface ExportDeclaration extends Omit { + type: "ExportDeclaration"; + default: boolean; + declaration: K.DeclarationKind | K.ExpressionKind | null; + specifiers?: (K.ExportSpecifierKind | K.ExportBatchSpecifierKind)[]; + source?: K.LiteralKind | null; + } + interface Block extends Comment { + type: "Block"; + } + interface Line extends Comment { + type: "Line"; + } + interface Noop extends Omit { + type: "Noop"; + } + interface DoExpression extends Omit { + type: "DoExpression"; + body: K.StatementKind[]; + } + interface Super extends Omit { + type: "Super"; + } + interface BindExpression extends Omit { + type: "BindExpression"; + object: K.ExpressionKind | null; + callee: K.ExpressionKind; + } + interface Decorator extends Omit { + type: "Decorator"; + expression: K.ExpressionKind; + } + interface MetaProperty extends Omit { + type: "MetaProperty"; + meta: K.IdentifierKind; + property: K.IdentifierKind; + } + interface ParenthesizedExpression extends Omit { + type: "ParenthesizedExpression"; + expression: K.ExpressionKind; + } + interface ExportDefaultDeclaration extends Omit { + type: "ExportDefaultDeclaration"; + declaration: K.DeclarationKind | K.ExpressionKind; + } + interface ExportNamedDeclaration extends Omit { + type: "ExportNamedDeclaration"; + declaration: K.DeclarationKind | null; + specifiers?: K.ExportSpecifierKind[]; + source?: K.LiteralKind | null; + } + interface ExportNamespaceSpecifier extends Omit { + type: "ExportNamespaceSpecifier"; + exported: K.IdentifierKind; + } + interface ExportDefaultSpecifier extends Omit { + type: "ExportDefaultSpecifier"; + exported: K.IdentifierKind; + } + interface ExportAllDeclaration extends Omit { + type: "ExportAllDeclaration"; + exported: K.IdentifierKind | null; + source: K.LiteralKind; + } + interface CommentBlock extends Comment { + type: "CommentBlock"; + } + interface CommentLine extends Comment { + type: "CommentLine"; + } + interface Directive extends Omit { + type: "Directive"; + value: K.DirectiveLiteralKind; + } + interface DirectiveLiteral extends Omit, Omit { + type: "DirectiveLiteral"; + value?: string; + } + interface InterpreterDirective extends Omit { + type: "InterpreterDirective"; + value: string; + } + interface StringLiteral extends Omit { + type: "StringLiteral"; + value: string; + } + interface NumericLiteral extends Omit { + type: "NumericLiteral"; + value: number; + raw?: string | null; + extra?: { + rawValue: number; + raw: string; + }; + } + interface BigIntLiteral extends Omit { + type: "BigIntLiteral"; + value: string | number; + extra?: { + rawValue: string; + raw: string; + }; + } + interface NullLiteral extends Omit { + type: "NullLiteral"; + value?: null; + } + interface BooleanLiteral extends Omit { + type: "BooleanLiteral"; + value: boolean; + } + interface RegExpLiteral extends Omit { + type: "RegExpLiteral"; + pattern: string; + flags: string; + value?: RegExp; + } + interface ObjectMethod extends Omit, Omit { + type: "ObjectMethod"; + kind: "method" | "get" | "set"; + key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind; + params: K.PatternKind[]; + body: K.BlockStatementKind; + computed?: boolean; + generator?: boolean; + async?: boolean; + accessibility?: K.LiteralKind | null; + decorators?: K.DecoratorKind[] | null; + } + interface ClassPrivateProperty extends Omit { + type: "ClassPrivateProperty"; + key: K.PrivateNameKind; + value?: K.ExpressionKind | null; + } + interface ClassMethod extends Omit, Omit { + type: "ClassMethod"; + key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind; + kind?: "get" | "set" | "method" | "constructor"; + body: K.BlockStatementKind; + computed?: boolean; + static?: boolean | null; + abstract?: boolean | null; + access?: "public" | "private" | "protected" | null; + accessibility?: "public" | "private" | "protected" | null; + decorators?: K.DecoratorKind[] | null; + optional?: boolean | null; + } + interface ClassPrivateMethod extends Omit, Omit { + type: "ClassPrivateMethod"; + key: K.PrivateNameKind; + kind?: "get" | "set" | "method" | "constructor"; + body: K.BlockStatementKind; + computed?: boolean; + static?: boolean | null; + abstract?: boolean | null; + access?: "public" | "private" | "protected" | null; + accessibility?: "public" | "private" | "protected" | null; + decorators?: K.DecoratorKind[] | null; + optional?: boolean | null; + } + interface PrivateName extends Omit, Omit { + type: "PrivateName"; + id: K.IdentifierKind; + } + interface RestProperty extends Omit { + type: "RestProperty"; + argument: K.ExpressionKind; + } + interface ForAwaitStatement extends Omit { + type: "ForAwaitStatement"; + left: K.VariableDeclarationKind | K.ExpressionKind; + right: K.ExpressionKind; + body: K.StatementKind; + } + interface Import extends Omit { + type: "Import"; + } + interface TSQualifiedName extends Omit { + type: "TSQualifiedName"; + left: K.IdentifierKind | K.TSQualifiedNameKind; + right: K.IdentifierKind | K.TSQualifiedNameKind; + } + interface TSTypeReference extends Omit, TSHasOptionalTypeParameterInstantiation { + type: "TSTypeReference"; + typeName: K.IdentifierKind | K.TSQualifiedNameKind; + } + interface TSHasOptionalTypeParameters { + typeParameters?: K.TSTypeParameterDeclarationKind | null | undefined; + } + interface TSHasOptionalTypeAnnotation { + typeAnnotation?: K.TSTypeAnnotationKind | null; + } + interface TSAsExpression extends Omit, Omit { + type: "TSAsExpression"; + expression: K.ExpressionKind; + typeAnnotation: K.TSTypeKind; + extra?: { + parenthesized: boolean; + } | null; + } + interface TSNonNullExpression extends Omit, Omit { + type: "TSNonNullExpression"; + expression: K.ExpressionKind; + } + interface TSAnyKeyword extends Omit { + type: "TSAnyKeyword"; + } + interface TSBigIntKeyword extends Omit { + type: "TSBigIntKeyword"; + } + interface TSBooleanKeyword extends Omit { + type: "TSBooleanKeyword"; + } + interface TSNeverKeyword extends Omit { + type: "TSNeverKeyword"; + } + interface TSNullKeyword extends Omit { + type: "TSNullKeyword"; + } + interface TSNumberKeyword extends Omit { + type: "TSNumberKeyword"; + } + interface TSObjectKeyword extends Omit { + type: "TSObjectKeyword"; + } + interface TSStringKeyword extends Omit { + type: "TSStringKeyword"; + } + interface TSSymbolKeyword extends Omit { + type: "TSSymbolKeyword"; + } + interface TSUndefinedKeyword extends Omit { + type: "TSUndefinedKeyword"; + } + interface TSUnknownKeyword extends Omit { + type: "TSUnknownKeyword"; + } + interface TSVoidKeyword extends Omit { + type: "TSVoidKeyword"; + } + interface TSThisType extends Omit { + type: "TSThisType"; + } + interface TSArrayType extends Omit { + type: "TSArrayType"; + elementType: K.TSTypeKind; + } + interface TSLiteralType extends Omit { + type: "TSLiteralType"; + literal: K.NumericLiteralKind | K.StringLiteralKind | K.BooleanLiteralKind | K.TemplateLiteralKind | K.UnaryExpressionKind; + } + interface TSUnionType extends Omit { + type: "TSUnionType"; + types: K.TSTypeKind[]; + } + interface TSIntersectionType extends Omit { + type: "TSIntersectionType"; + types: K.TSTypeKind[]; + } + interface TSConditionalType extends Omit { + type: "TSConditionalType"; + checkType: K.TSTypeKind; + extendsType: K.TSTypeKind; + trueType: K.TSTypeKind; + falseType: K.TSTypeKind; + } + interface TSInferType extends Omit { + type: "TSInferType"; + typeParameter: K.TSTypeParameterKind; + } + interface TSTypeParameter extends Omit { + type: "TSTypeParameter"; + name: string; + constraint?: K.TSTypeKind | undefined; + default?: K.TSTypeKind | undefined; + } + interface TSParenthesizedType extends Omit { + type: "TSParenthesizedType"; + typeAnnotation: K.TSTypeKind; + } + interface TSFunctionType extends Omit, TSHasOptionalTypeParameters, TSHasOptionalTypeAnnotation { + type: "TSFunctionType"; + parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[]; + } + interface TSConstructorType extends Omit, TSHasOptionalTypeParameters, TSHasOptionalTypeAnnotation { + type: "TSConstructorType"; + parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[]; + } + interface TSDeclareFunction extends Omit, TSHasOptionalTypeParameters { + type: "TSDeclareFunction"; + declare?: boolean; + async?: boolean; + generator?: boolean; + id?: K.IdentifierKind | null; + params: K.PatternKind[]; + returnType?: K.TSTypeAnnotationKind | K.NoopKind | null; + } + interface TSDeclareMethod extends Omit, TSHasOptionalTypeParameters { + type: "TSDeclareMethod"; + async?: boolean; + generator?: boolean; + params: K.PatternKind[]; + abstract?: boolean; + accessibility?: "public" | "private" | "protected" | undefined; + static?: boolean; + computed?: boolean; + optional?: boolean; + key: K.IdentifierKind | K.StringLiteralKind | K.NumericLiteralKind | K.ExpressionKind; + kind?: "get" | "set" | "method" | "constructor"; + access?: "public" | "private" | "protected" | undefined; + decorators?: K.DecoratorKind[] | null; + returnType?: K.TSTypeAnnotationKind | K.NoopKind | null; + } + interface TSMappedType extends Omit { + type: "TSMappedType"; + readonly?: boolean | "+" | "-"; + typeParameter: K.TSTypeParameterKind; + optional?: boolean | "+" | "-"; + typeAnnotation?: K.TSTypeKind | null; + } + interface TSTupleType extends Omit { + type: "TSTupleType"; + elementTypes: K.TSTypeKind[]; + } + interface TSRestType extends Omit { + type: "TSRestType"; + typeAnnotation: K.TSTypeKind; + } + interface TSOptionalType extends Omit { + type: "TSOptionalType"; + typeAnnotation: K.TSTypeKind; + } + interface TSIndexedAccessType extends Omit { + type: "TSIndexedAccessType"; + objectType: K.TSTypeKind; + indexType: K.TSTypeKind; + } + interface TSTypeOperator extends Omit { + type: "TSTypeOperator"; + operator: string; + typeAnnotation: K.TSTypeKind; + } + interface TSIndexSignature extends Omit, TSHasOptionalTypeAnnotation { + type: "TSIndexSignature"; + parameters: K.IdentifierKind[]; + readonly?: boolean; + } + interface TSPropertySignature extends Omit, TSHasOptionalTypeAnnotation { + type: "TSPropertySignature"; + key: K.ExpressionKind; + computed?: boolean; + readonly?: boolean; + optional?: boolean; + initializer?: K.ExpressionKind | null; + } + interface TSMethodSignature extends Omit, TSHasOptionalTypeParameters, TSHasOptionalTypeAnnotation { + type: "TSMethodSignature"; + key: K.ExpressionKind; + computed?: boolean; + optional?: boolean; + parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[]; + } + interface TSTypePredicate extends Omit { + type: "TSTypePredicate"; + parameterName: K.IdentifierKind | K.TSThisTypeKind; + typeAnnotation: K.TSTypeAnnotationKind; + } + interface TSCallSignatureDeclaration extends Omit, TSHasOptionalTypeParameters, TSHasOptionalTypeAnnotation { + type: "TSCallSignatureDeclaration"; + parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[]; + } + interface TSConstructSignatureDeclaration extends Omit, TSHasOptionalTypeParameters, TSHasOptionalTypeAnnotation { + type: "TSConstructSignatureDeclaration"; + parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[]; + } + interface TSEnumMember extends Omit { + type: "TSEnumMember"; + id: K.IdentifierKind | K.StringLiteralKind; + initializer?: K.ExpressionKind | null; + } + interface TSTypeQuery extends Omit { + type: "TSTypeQuery"; + exprName: K.IdentifierKind | K.TSQualifiedNameKind | K.TSImportTypeKind; + } + interface TSImportType extends Omit, TSHasOptionalTypeParameterInstantiation { + type: "TSImportType"; + argument: K.StringLiteralKind; + qualifier?: K.IdentifierKind | K.TSQualifiedNameKind | undefined; + } + interface TSTypeLiteral extends Omit { + type: "TSTypeLiteral"; + members: (K.TSCallSignatureDeclarationKind | K.TSConstructSignatureDeclarationKind | K.TSIndexSignatureKind | K.TSMethodSignatureKind | K.TSPropertySignatureKind)[]; + } + interface TSTypeAssertion extends Omit, Omit { + type: "TSTypeAssertion"; + typeAnnotation: K.TSTypeKind; + expression: K.ExpressionKind; + extra?: { + parenthesized: boolean; + } | null; + } + interface TSEnumDeclaration extends Omit { + type: "TSEnumDeclaration"; + id: K.IdentifierKind; + const?: boolean; + declare?: boolean; + members: K.TSEnumMemberKind[]; + initializer?: K.ExpressionKind | null; + } + interface TSTypeAliasDeclaration extends Omit, TSHasOptionalTypeParameters { + type: "TSTypeAliasDeclaration"; + id: K.IdentifierKind; + declare?: boolean; + typeAnnotation: K.TSTypeKind; + } + interface TSModuleBlock extends Omit { + type: "TSModuleBlock"; + body: K.StatementKind[]; + } + interface TSModuleDeclaration extends Omit { + type: "TSModuleDeclaration"; + id: K.StringLiteralKind | K.IdentifierKind | K.TSQualifiedNameKind; + declare?: boolean; + global?: boolean; + body?: K.TSModuleBlockKind | K.TSModuleDeclarationKind | null; + } + interface TSImportEqualsDeclaration extends Omit { + type: "TSImportEqualsDeclaration"; + id: K.IdentifierKind; + isExport?: boolean; + moduleReference: K.IdentifierKind | K.TSQualifiedNameKind | K.TSExternalModuleReferenceKind; + } + interface TSExternalModuleReference extends Omit { + type: "TSExternalModuleReference"; + expression: K.StringLiteralKind; + } + interface TSExportAssignment extends Omit { + type: "TSExportAssignment"; + expression: K.ExpressionKind; + } + interface TSNamespaceExportDeclaration extends Omit { + type: "TSNamespaceExportDeclaration"; + id: K.IdentifierKind; + } + interface TSInterfaceBody extends Omit { + type: "TSInterfaceBody"; + body: (K.TSCallSignatureDeclarationKind | K.TSConstructSignatureDeclarationKind | K.TSIndexSignatureKind | K.TSMethodSignatureKind | K.TSPropertySignatureKind)[]; + } + interface TSInterfaceDeclaration extends Omit, TSHasOptionalTypeParameters { + type: "TSInterfaceDeclaration"; + id: K.IdentifierKind | K.TSQualifiedNameKind; + declare?: boolean; + extends?: K.TSExpressionWithTypeArgumentsKind[] | null; + body: K.TSInterfaceBodyKind; + } + interface TSParameterProperty extends Omit { + type: "TSParameterProperty"; + accessibility?: "public" | "private" | "protected" | undefined; + readonly?: boolean; + parameter: K.IdentifierKind | K.AssignmentPatternKind; + } + interface OptionalMemberExpression extends Omit { + type: "OptionalMemberExpression"; + optional?: boolean; + } + interface OptionalCallExpression extends Omit { + type: "OptionalCallExpression"; + optional?: boolean; + } + type ASTNode = File | Program | Identifier | BlockStatement | EmptyStatement | ExpressionStatement | IfStatement | LabeledStatement | BreakStatement | ContinueStatement | WithStatement | SwitchStatement | SwitchCase | ReturnStatement | ThrowStatement | TryStatement | CatchClause | WhileStatement | DoWhileStatement | ForStatement | VariableDeclaration | ForInStatement | DebuggerStatement | FunctionDeclaration | FunctionExpression | VariableDeclarator | ThisExpression | ArrayExpression | ObjectExpression | Property | Literal | SequenceExpression | UnaryExpression | BinaryExpression | AssignmentExpression | MemberExpression | UpdateExpression | LogicalExpression | ConditionalExpression | NewExpression | CallExpression | RestElement | TypeAnnotation | TSTypeAnnotation | SpreadElementPattern | ArrowFunctionExpression | ForOfStatement | YieldExpression | GeneratorExpression | ComprehensionBlock | ComprehensionExpression | ObjectProperty | PropertyPattern | ObjectPattern | ArrayPattern | MethodDefinition | SpreadElement | AssignmentPattern | ClassPropertyDefinition | ClassProperty | ClassBody | ClassDeclaration | ClassExpression | ImportSpecifier | ImportNamespaceSpecifier | ImportDefaultSpecifier | ImportDeclaration | TaggedTemplateExpression | TemplateLiteral | TemplateElement | SpreadProperty | SpreadPropertyPattern | AwaitExpression | ImportExpression | JSXAttribute | JSXIdentifier | JSXNamespacedName | JSXExpressionContainer | JSXMemberExpression | JSXSpreadAttribute | JSXElement | JSXOpeningElement | JSXClosingElement | JSXFragment | JSXText | JSXOpeningFragment | JSXClosingFragment | JSXEmptyExpression | JSXSpreadChild | TypeParameterDeclaration | TSTypeParameterDeclaration | TypeParameterInstantiation | TSTypeParameterInstantiation | ClassImplements | TSExpressionWithTypeArguments | AnyTypeAnnotation | EmptyTypeAnnotation | MixedTypeAnnotation | VoidTypeAnnotation | NumberTypeAnnotation | NumberLiteralTypeAnnotation | NumericLiteralTypeAnnotation | StringTypeAnnotation | StringLiteralTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullableTypeAnnotation | NullLiteralTypeAnnotation | NullTypeAnnotation | ThisTypeAnnotation | ExistsTypeAnnotation | ExistentialTypeParam | FunctionTypeAnnotation | FunctionTypeParam | ArrayTypeAnnotation | ObjectTypeAnnotation | ObjectTypeProperty | ObjectTypeSpreadProperty | ObjectTypeIndexer | ObjectTypeCallProperty | ObjectTypeInternalSlot | Variance | QualifiedTypeIdentifier | GenericTypeAnnotation | MemberTypeAnnotation | UnionTypeAnnotation | IntersectionTypeAnnotation | TypeofTypeAnnotation | TypeParameter | InterfaceTypeAnnotation | InterfaceExtends | InterfaceDeclaration | DeclareInterface | TypeAlias | OpaqueType | DeclareTypeAlias | DeclareOpaqueType | TypeCastExpression | TupleTypeAnnotation | DeclareVariable | DeclareFunction | DeclareClass | DeclareModule | DeclareModuleExports | DeclareExportDeclaration | ExportSpecifier | ExportBatchSpecifier | DeclareExportAllDeclaration | InferredPredicate | DeclaredPredicate | ExportDeclaration | Block | Line | Noop | DoExpression | Super | BindExpression | Decorator | MetaProperty | ParenthesizedExpression | ExportDefaultDeclaration | ExportNamedDeclaration | ExportNamespaceSpecifier | ExportDefaultSpecifier | ExportAllDeclaration | CommentBlock | CommentLine | Directive | DirectiveLiteral | InterpreterDirective | StringLiteral | NumericLiteral | BigIntLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | ObjectMethod | ClassPrivateProperty | ClassMethod | ClassPrivateMethod | PrivateName | RestProperty | ForAwaitStatement | Import | TSQualifiedName | TSTypeReference | TSAsExpression | TSNonNullExpression | TSAnyKeyword | TSBigIntKeyword | TSBooleanKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSThisType | TSArrayType | TSLiteralType | TSUnionType | TSIntersectionType | TSConditionalType | TSInferType | TSTypeParameter | TSParenthesizedType | TSFunctionType | TSConstructorType | TSDeclareFunction | TSDeclareMethod | TSMappedType | TSTupleType | TSRestType | TSOptionalType | TSIndexedAccessType | TSTypeOperator | TSIndexSignature | TSPropertySignature | TSMethodSignature | TSTypePredicate | TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSEnumMember | TSTypeQuery | TSImportType | TSTypeLiteral | TSTypeAssertion | TSEnumDeclaration | TSTypeAliasDeclaration | TSModuleBlock | TSModuleDeclaration | TSImportEqualsDeclaration | TSExternalModuleReference | TSExportAssignment | TSNamespaceExportDeclaration | TSInterfaceBody | TSInterfaceDeclaration | TSParameterProperty | OptionalMemberExpression | OptionalCallExpression; + let Printable: Type; + let SourceLocation: Type; + let Node: Type; + let Comment: Type; + let Position: Type; + let File: Type; + let Program: Type; + let Statement: Type; + let Function: Type; + let Expression: Type; + let Pattern: Type; + let Identifier: Type; + let BlockStatement: Type; + let EmptyStatement: Type; + let ExpressionStatement: Type; + let IfStatement: Type; + let LabeledStatement: Type; + let BreakStatement: Type; + let ContinueStatement: Type; + let WithStatement: Type; + let SwitchStatement: Type; + let SwitchCase: Type; + let ReturnStatement: Type; + let ThrowStatement: Type; + let TryStatement: Type; + let CatchClause: Type; + let WhileStatement: Type; + let DoWhileStatement: Type; + let ForStatement: Type; + let Declaration: Type; + let VariableDeclaration: Type; + let ForInStatement: Type; + let DebuggerStatement: Type; + let FunctionDeclaration: Type; + let FunctionExpression: Type; + let VariableDeclarator: Type; + let ThisExpression: Type; + let ArrayExpression: Type; + let ObjectExpression: Type; + let Property: Type; + let Literal: Type; + let SequenceExpression: Type; + let UnaryExpression: Type; + let BinaryExpression: Type; + let AssignmentExpression: Type; + let MemberExpression: Type; + let UpdateExpression: Type; + let LogicalExpression: Type; + let ConditionalExpression: Type; + let NewExpression: Type; + let CallExpression: Type; + let RestElement: Type; + let TypeAnnotation: Type; + let TSTypeAnnotation: Type; + let SpreadElementPattern: Type; + let ArrowFunctionExpression: Type; + let ForOfStatement: Type; + let YieldExpression: Type; + let GeneratorExpression: Type; + let ComprehensionBlock: Type; + let ComprehensionExpression: Type; + let ObjectProperty: Type; + let PropertyPattern: Type; + let ObjectPattern: Type; + let ArrayPattern: Type; + let MethodDefinition: Type; + let SpreadElement: Type; + let AssignmentPattern: Type; + let ClassPropertyDefinition: Type; + let ClassProperty: Type; + let ClassBody: Type; + let ClassDeclaration: Type; + let ClassExpression: Type; + let Specifier: Type; + let ModuleSpecifier: Type; + let ImportSpecifier: Type; + let ImportNamespaceSpecifier: Type; + let ImportDefaultSpecifier: Type; + let ImportDeclaration: Type; + let TaggedTemplateExpression: Type; + let TemplateLiteral: Type; + let TemplateElement: Type; + let SpreadProperty: Type; + let SpreadPropertyPattern: Type; + let AwaitExpression: Type; + let ImportExpression: Type; + let JSXAttribute: Type; + let JSXIdentifier: Type; + let JSXNamespacedName: Type; + let JSXExpressionContainer: Type; + let JSXMemberExpression: Type; + let JSXSpreadAttribute: Type; + let JSXElement: Type; + let JSXOpeningElement: Type; + let JSXClosingElement: Type; + let JSXFragment: Type; + let JSXText: Type; + let JSXOpeningFragment: Type; + let JSXClosingFragment: Type; + let JSXEmptyExpression: Type; + let JSXSpreadChild: Type; + let TypeParameterDeclaration: Type; + let TSTypeParameterDeclaration: Type; + let TypeParameterInstantiation: Type; + let TSTypeParameterInstantiation: Type; + let ClassImplements: Type; + let TSType: Type; + let TSHasOptionalTypeParameterInstantiation: Type; + let TSExpressionWithTypeArguments: Type; + let Flow: Type; + let FlowType: Type; + let AnyTypeAnnotation: Type; + let EmptyTypeAnnotation: Type; + let MixedTypeAnnotation: Type; + let VoidTypeAnnotation: Type; + let NumberTypeAnnotation: Type; + let NumberLiteralTypeAnnotation: Type; + let NumericLiteralTypeAnnotation: Type; + let StringTypeAnnotation: Type; + let StringLiteralTypeAnnotation: Type; + let BooleanTypeAnnotation: Type; + let BooleanLiteralTypeAnnotation: Type; + let NullableTypeAnnotation: Type; + let NullLiteralTypeAnnotation: Type; + let NullTypeAnnotation: Type; + let ThisTypeAnnotation: Type; + let ExistsTypeAnnotation: Type; + let ExistentialTypeParam: Type; + let FunctionTypeAnnotation: Type; + let FunctionTypeParam: Type; + let ArrayTypeAnnotation: Type; + let ObjectTypeAnnotation: Type; + let ObjectTypeProperty: Type; + let ObjectTypeSpreadProperty: Type; + let ObjectTypeIndexer: Type; + let ObjectTypeCallProperty: Type; + let ObjectTypeInternalSlot: Type; + let Variance: Type; + let QualifiedTypeIdentifier: Type; + let GenericTypeAnnotation: Type; + let MemberTypeAnnotation: Type; + let UnionTypeAnnotation: Type; + let IntersectionTypeAnnotation: Type; + let TypeofTypeAnnotation: Type; + let TypeParameter: Type; + let InterfaceTypeAnnotation: Type; + let InterfaceExtends: Type; + let InterfaceDeclaration: Type; + let DeclareInterface: Type; + let TypeAlias: Type; + let OpaqueType: Type; + let DeclareTypeAlias: Type; + let DeclareOpaqueType: Type; + let TypeCastExpression: Type; + let TupleTypeAnnotation: Type; + let DeclareVariable: Type; + let DeclareFunction: Type; + let DeclareClass: Type; + let DeclareModule: Type; + let DeclareModuleExports: Type; + let DeclareExportDeclaration: Type; + let ExportSpecifier: Type; + let ExportBatchSpecifier: Type; + let DeclareExportAllDeclaration: Type; + let FlowPredicate: Type; + let InferredPredicate: Type; + let DeclaredPredicate: Type; + let ExportDeclaration: Type; + let Block: Type; + let Line: Type; + let Noop: Type; + let DoExpression: Type; + let Super: Type; + let BindExpression: Type; + let Decorator: Type; + let MetaProperty: Type; + let ParenthesizedExpression: Type; + let ExportDefaultDeclaration: Type; + let ExportNamedDeclaration: Type; + let ExportNamespaceSpecifier: Type; + let ExportDefaultSpecifier: Type; + let ExportAllDeclaration: Type; + let CommentBlock: Type; + let CommentLine: Type; + let Directive: Type; + let DirectiveLiteral: Type; + let InterpreterDirective: Type; + let StringLiteral: Type; + let NumericLiteral: Type; + let BigIntLiteral: Type; + let NullLiteral: Type; + let BooleanLiteral: Type; + let RegExpLiteral: Type; + let ObjectMethod: Type; + let ClassPrivateProperty: Type; + let ClassMethod: Type; + let ClassPrivateMethod: Type; + let PrivateName: Type; + let RestProperty: Type; + let ForAwaitStatement: Type; + let Import: Type; + let TSQualifiedName: Type; + let TSTypeReference: Type; + let TSHasOptionalTypeParameters: Type; + let TSHasOptionalTypeAnnotation: Type; + let TSAsExpression: Type; + let TSNonNullExpression: Type; + let TSAnyKeyword: Type; + let TSBigIntKeyword: Type; + let TSBooleanKeyword: Type; + let TSNeverKeyword: Type; + let TSNullKeyword: Type; + let TSNumberKeyword: Type; + let TSObjectKeyword: Type; + let TSStringKeyword: Type; + let TSSymbolKeyword: Type; + let TSUndefinedKeyword: Type; + let TSUnknownKeyword: Type; + let TSVoidKeyword: Type; + let TSThisType: Type; + let TSArrayType: Type; + let TSLiteralType: Type; + let TSUnionType: Type; + let TSIntersectionType: Type; + let TSConditionalType: Type; + let TSInferType: Type; + let TSTypeParameter: Type; + let TSParenthesizedType: Type; + let TSFunctionType: Type; + let TSConstructorType: Type; + let TSDeclareFunction: Type; + let TSDeclareMethod: Type; + let TSMappedType: Type; + let TSTupleType: Type; + let TSRestType: Type; + let TSOptionalType: Type; + let TSIndexedAccessType: Type; + let TSTypeOperator: Type; + let TSIndexSignature: Type; + let TSPropertySignature: Type; + let TSMethodSignature: Type; + let TSTypePredicate: Type; + let TSCallSignatureDeclaration: Type; + let TSConstructSignatureDeclaration: Type; + let TSEnumMember: Type; + let TSTypeQuery: Type; + let TSImportType: Type; + let TSTypeLiteral: Type; + let TSTypeAssertion: Type; + let TSEnumDeclaration: Type; + let TSTypeAliasDeclaration: Type; + let TSModuleBlock: Type; + let TSModuleDeclaration: Type; + let TSImportEqualsDeclaration: Type; + let TSExternalModuleReference: Type; + let TSExportAssignment: Type; + let TSNamespaceExportDeclaration: Type; + let TSInterfaceBody: Type; + let TSInterfaceDeclaration: Type; + let TSParameterProperty: Type; + let OptionalMemberExpression: Type; + let OptionalCallExpression: Type; +} +export interface NamedTypes { + Printable: Type; + SourceLocation: Type; + Node: Type; + Comment: Type; + Position: Type; + File: Type; + Program: Type; + Statement: Type; + Function: Type; + Expression: Type; + Pattern: Type; + Identifier: Type; + BlockStatement: Type; + EmptyStatement: Type; + ExpressionStatement: Type; + IfStatement: Type; + LabeledStatement: Type; + BreakStatement: Type; + ContinueStatement: Type; + WithStatement: Type; + SwitchStatement: Type; + SwitchCase: Type; + ReturnStatement: Type; + ThrowStatement: Type; + TryStatement: Type; + CatchClause: Type; + WhileStatement: Type; + DoWhileStatement: Type; + ForStatement: Type; + Declaration: Type; + VariableDeclaration: Type; + ForInStatement: Type; + DebuggerStatement: Type; + FunctionDeclaration: Type; + FunctionExpression: Type; + VariableDeclarator: Type; + ThisExpression: Type; + ArrayExpression: Type; + ObjectExpression: Type; + Property: Type; + Literal: Type; + SequenceExpression: Type; + UnaryExpression: Type; + BinaryExpression: Type; + AssignmentExpression: Type; + MemberExpression: Type; + UpdateExpression: Type; + LogicalExpression: Type; + ConditionalExpression: Type; + NewExpression: Type; + CallExpression: Type; + RestElement: Type; + TypeAnnotation: Type; + TSTypeAnnotation: Type; + SpreadElementPattern: Type; + ArrowFunctionExpression: Type; + ForOfStatement: Type; + YieldExpression: Type; + GeneratorExpression: Type; + ComprehensionBlock: Type; + ComprehensionExpression: Type; + ObjectProperty: Type; + PropertyPattern: Type; + ObjectPattern: Type; + ArrayPattern: Type; + MethodDefinition: Type; + SpreadElement: Type; + AssignmentPattern: Type; + ClassPropertyDefinition: Type; + ClassProperty: Type; + ClassBody: Type; + ClassDeclaration: Type; + ClassExpression: Type; + Specifier: Type; + ModuleSpecifier: Type; + ImportSpecifier: Type; + ImportNamespaceSpecifier: Type; + ImportDefaultSpecifier: Type; + ImportDeclaration: Type; + TaggedTemplateExpression: Type; + TemplateLiteral: Type; + TemplateElement: Type; + SpreadProperty: Type; + SpreadPropertyPattern: Type; + AwaitExpression: Type; + ImportExpression: Type; + JSXAttribute: Type; + JSXIdentifier: Type; + JSXNamespacedName: Type; + JSXExpressionContainer: Type; + JSXMemberExpression: Type; + JSXSpreadAttribute: Type; + JSXElement: Type; + JSXOpeningElement: Type; + JSXClosingElement: Type; + JSXFragment: Type; + JSXText: Type; + JSXOpeningFragment: Type; + JSXClosingFragment: Type; + JSXEmptyExpression: Type; + JSXSpreadChild: Type; + TypeParameterDeclaration: Type; + TSTypeParameterDeclaration: Type; + TypeParameterInstantiation: Type; + TSTypeParameterInstantiation: Type; + ClassImplements: Type; + TSType: Type; + TSHasOptionalTypeParameterInstantiation: Type; + TSExpressionWithTypeArguments: Type; + Flow: Type; + FlowType: Type; + AnyTypeAnnotation: Type; + EmptyTypeAnnotation: Type; + MixedTypeAnnotation: Type; + VoidTypeAnnotation: Type; + NumberTypeAnnotation: Type; + NumberLiteralTypeAnnotation: Type; + NumericLiteralTypeAnnotation: Type; + StringTypeAnnotation: Type; + StringLiteralTypeAnnotation: Type; + BooleanTypeAnnotation: Type; + BooleanLiteralTypeAnnotation: Type; + NullableTypeAnnotation: Type; + NullLiteralTypeAnnotation: Type; + NullTypeAnnotation: Type; + ThisTypeAnnotation: Type; + ExistsTypeAnnotation: Type; + ExistentialTypeParam: Type; + FunctionTypeAnnotation: Type; + FunctionTypeParam: Type; + ArrayTypeAnnotation: Type; + ObjectTypeAnnotation: Type; + ObjectTypeProperty: Type; + ObjectTypeSpreadProperty: Type; + ObjectTypeIndexer: Type; + ObjectTypeCallProperty: Type; + ObjectTypeInternalSlot: Type; + Variance: Type; + QualifiedTypeIdentifier: Type; + GenericTypeAnnotation: Type; + MemberTypeAnnotation: Type; + UnionTypeAnnotation: Type; + IntersectionTypeAnnotation: Type; + TypeofTypeAnnotation: Type; + TypeParameter: Type; + InterfaceTypeAnnotation: Type; + InterfaceExtends: Type; + InterfaceDeclaration: Type; + DeclareInterface: Type; + TypeAlias: Type; + OpaqueType: Type; + DeclareTypeAlias: Type; + DeclareOpaqueType: Type; + TypeCastExpression: Type; + TupleTypeAnnotation: Type; + DeclareVariable: Type; + DeclareFunction: Type; + DeclareClass: Type; + DeclareModule: Type; + DeclareModuleExports: Type; + DeclareExportDeclaration: Type; + ExportSpecifier: Type; + ExportBatchSpecifier: Type; + DeclareExportAllDeclaration: Type; + FlowPredicate: Type; + InferredPredicate: Type; + DeclaredPredicate: Type; + ExportDeclaration: Type; + Block: Type; + Line: Type; + Noop: Type; + DoExpression: Type; + Super: Type; + BindExpression: Type; + Decorator: Type; + MetaProperty: Type; + ParenthesizedExpression: Type; + ExportDefaultDeclaration: Type; + ExportNamedDeclaration: Type; + ExportNamespaceSpecifier: Type; + ExportDefaultSpecifier: Type; + ExportAllDeclaration: Type; + CommentBlock: Type; + CommentLine: Type; + Directive: Type; + DirectiveLiteral: Type; + InterpreterDirective: Type; + StringLiteral: Type; + NumericLiteral: Type; + BigIntLiteral: Type; + NullLiteral: Type; + BooleanLiteral: Type; + RegExpLiteral: Type; + ObjectMethod: Type; + ClassPrivateProperty: Type; + ClassMethod: Type; + ClassPrivateMethod: Type; + PrivateName: Type; + RestProperty: Type; + ForAwaitStatement: Type; + Import: Type; + TSQualifiedName: Type; + TSTypeReference: Type; + TSHasOptionalTypeParameters: Type; + TSHasOptionalTypeAnnotation: Type; + TSAsExpression: Type; + TSNonNullExpression: Type; + TSAnyKeyword: Type; + TSBigIntKeyword: Type; + TSBooleanKeyword: Type; + TSNeverKeyword: Type; + TSNullKeyword: Type; + TSNumberKeyword: Type; + TSObjectKeyword: Type; + TSStringKeyword: Type; + TSSymbolKeyword: Type; + TSUndefinedKeyword: Type; + TSUnknownKeyword: Type; + TSVoidKeyword: Type; + TSThisType: Type; + TSArrayType: Type; + TSLiteralType: Type; + TSUnionType: Type; + TSIntersectionType: Type; + TSConditionalType: Type; + TSInferType: Type; + TSTypeParameter: Type; + TSParenthesizedType: Type; + TSFunctionType: Type; + TSConstructorType: Type; + TSDeclareFunction: Type; + TSDeclareMethod: Type; + TSMappedType: Type; + TSTupleType: Type; + TSRestType: Type; + TSOptionalType: Type; + TSIndexedAccessType: Type; + TSTypeOperator: Type; + TSIndexSignature: Type; + TSPropertySignature: Type; + TSMethodSignature: Type; + TSTypePredicate: Type; + TSCallSignatureDeclaration: Type; + TSConstructSignatureDeclaration: Type; + TSEnumMember: Type; + TSTypeQuery: Type; + TSImportType: Type; + TSTypeLiteral: Type; + TSTypeAssertion: Type; + TSEnumDeclaration: Type; + TSTypeAliasDeclaration: Type; + TSModuleBlock: Type; + TSModuleDeclaration: Type; + TSImportEqualsDeclaration: Type; + TSExternalModuleReference: Type; + TSExportAssignment: Type; + TSNamespaceExportDeclaration: Type; + TSInterfaceBody: Type; + TSInterfaceDeclaration: Type; + TSParameterProperty: Type; + OptionalMemberExpression: Type; + OptionalCallExpression: Type; +} diff --git a/code/application_liste/app/node_modules/ast-types/gen/namedTypes.js b/code/application_liste/app/node_modules/ast-types/gen/namedTypes.js new file mode 100644 index 0000000..c5ace25 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/gen/namedTypes.js @@ -0,0 +1,5 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var namedTypes; +(function (namedTypes) { +})(namedTypes = exports.namedTypes || (exports.namedTypes = {})); diff --git a/code/application_liste/app/node_modules/ast-types/gen/nodes.d.ts b/code/application_liste/app/node_modules/ast-types/gen/nodes.d.ts new file mode 100644 index 0000000..4f7724a --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/gen/nodes.d.ts @@ -0,0 +1,1265 @@ +import { Omit } from "../types"; +import * as K from "./kinds"; +export interface Printable { + loc: K.SourceLocationKind | null; +} +export interface SourceLocation { + start: K.PositionKind; + end: K.PositionKind; + source: string | null; +} +export interface Node extends Printable { + type: string; + comments: K.CommentKind[] | null; +} +export interface Comment extends Printable { + value: string; + leading: boolean; + trailing: boolean; +} +export interface Position { + line: number; + column: number; +} +export interface File extends Omit { + type: "File"; + program: K.ProgramKind; + name: string | null; +} +export interface Program extends Omit { + type: "Program"; + body: K.StatementKind[]; + directives: K.DirectiveKind[]; + interpreter: K.InterpreterDirectiveKind | null; +} +export interface Statement extends Node { +} +export interface Function extends Node { + id: K.IdentifierKind | null; + params: K.PatternKind[]; + body: K.BlockStatementKind; + generator: boolean; + async: boolean; + expression: boolean; + defaults: (K.ExpressionKind | null)[]; + rest: K.IdentifierKind | null; + returnType: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null; + typeParameters: K.TypeParameterDeclarationKind | K.TSTypeParameterDeclarationKind | null; +} +export interface Expression extends Node { +} +export interface Pattern extends Node { +} +export interface Identifier extends Omit, Omit { + type: "Identifier"; + name: string; + optional: boolean; + typeAnnotation: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null; +} +export interface BlockStatement extends Omit { + type: "BlockStatement"; + body: K.StatementKind[]; + directives: K.DirectiveKind[]; +} +export interface EmptyStatement extends Omit { + type: "EmptyStatement"; +} +export interface ExpressionStatement extends Omit { + type: "ExpressionStatement"; + expression: K.ExpressionKind; +} +export interface IfStatement extends Omit { + type: "IfStatement"; + test: K.ExpressionKind; + consequent: K.StatementKind; + alternate: K.StatementKind | null; +} +export interface LabeledStatement extends Omit { + type: "LabeledStatement"; + label: K.IdentifierKind; + body: K.StatementKind; +} +export interface BreakStatement extends Omit { + type: "BreakStatement"; + label: K.IdentifierKind | null; +} +export interface ContinueStatement extends Omit { + type: "ContinueStatement"; + label: K.IdentifierKind | null; +} +export interface WithStatement extends Omit { + type: "WithStatement"; + object: K.ExpressionKind; + body: K.StatementKind; +} +export interface SwitchStatement extends Omit { + type: "SwitchStatement"; + discriminant: K.ExpressionKind; + cases: K.SwitchCaseKind[]; + lexical: boolean; +} +export interface SwitchCase extends Omit { + type: "SwitchCase"; + test: K.ExpressionKind | null; + consequent: K.StatementKind[]; +} +export interface ReturnStatement extends Omit { + type: "ReturnStatement"; + argument: K.ExpressionKind | null; +} +export interface ThrowStatement extends Omit { + type: "ThrowStatement"; + argument: K.ExpressionKind; +} +export interface TryStatement extends Omit { + type: "TryStatement"; + block: K.BlockStatementKind; + handler: K.CatchClauseKind | null; + handlers: K.CatchClauseKind[]; + guardedHandlers: K.CatchClauseKind[]; + finalizer: K.BlockStatementKind | null; +} +export interface CatchClause extends Omit { + type: "CatchClause"; + param: K.PatternKind | null; + guard: K.ExpressionKind | null; + body: K.BlockStatementKind; +} +export interface WhileStatement extends Omit { + type: "WhileStatement"; + test: K.ExpressionKind; + body: K.StatementKind; +} +export interface DoWhileStatement extends Omit { + type: "DoWhileStatement"; + body: K.StatementKind; + test: K.ExpressionKind; +} +export interface ForStatement extends Omit { + type: "ForStatement"; + init: K.VariableDeclarationKind | K.ExpressionKind | null; + test: K.ExpressionKind | null; + update: K.ExpressionKind | null; + body: K.StatementKind; +} +export interface Declaration extends Statement { +} +export interface VariableDeclaration extends Omit { + type: "VariableDeclaration"; + kind: "var" | "let" | "const"; + declarations: (K.VariableDeclaratorKind | K.IdentifierKind)[]; +} +export interface ForInStatement extends Omit { + type: "ForInStatement"; + left: K.VariableDeclarationKind | K.ExpressionKind; + right: K.ExpressionKind; + body: K.StatementKind; +} +export interface DebuggerStatement extends Omit { + type: "DebuggerStatement"; +} +export interface FunctionDeclaration extends Omit, Omit { + type: "FunctionDeclaration"; + id: K.IdentifierKind; +} +export interface FunctionExpression extends Omit, Omit { + type: "FunctionExpression"; +} +export interface VariableDeclarator extends Omit { + type: "VariableDeclarator"; + id: K.PatternKind; + init: K.ExpressionKind | null; +} +export interface ThisExpression extends Omit { + type: "ThisExpression"; +} +export interface ArrayExpression extends Omit { + type: "ArrayExpression"; + elements: (K.ExpressionKind | K.SpreadElementKind | K.RestElementKind | null)[]; +} +export interface ObjectExpression extends Omit { + type: "ObjectExpression"; + properties: (K.PropertyKind | K.ObjectMethodKind | K.ObjectPropertyKind | K.SpreadPropertyKind | K.SpreadElementKind)[]; +} +export interface Property extends Omit { + type: "Property"; + kind: "init" | "get" | "set"; + key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind; + value: K.ExpressionKind | K.PatternKind; + method: boolean; + shorthand: boolean; + computed: boolean; + decorators: K.DecoratorKind[] | null; +} +export interface Literal extends Omit { + type: "Literal"; + value: string | boolean | null | number | RegExp; + regex: { + pattern: string; + flags: string; + } | null; +} +export interface SequenceExpression extends Omit { + type: "SequenceExpression"; + expressions: K.ExpressionKind[]; +} +export interface UnaryExpression extends Omit { + type: "UnaryExpression"; + operator: "-" | "+" | "!" | "~" | "typeof" | "void" | "delete"; + argument: K.ExpressionKind; + prefix: boolean; +} +export interface BinaryExpression extends Omit { + type: "BinaryExpression"; + operator: "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "in" | "instanceof"; + left: K.ExpressionKind; + right: K.ExpressionKind; +} +export interface AssignmentExpression extends Omit { + type: "AssignmentExpression"; + operator: "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&="; + left: K.PatternKind | K.MemberExpressionKind; + right: K.ExpressionKind; +} +export interface MemberExpression extends Omit { + type: "MemberExpression"; + object: K.ExpressionKind; + property: K.IdentifierKind | K.ExpressionKind; + computed: boolean; +} +export interface UpdateExpression extends Omit { + type: "UpdateExpression"; + operator: "++" | "--"; + argument: K.ExpressionKind; + prefix: boolean; +} +export interface LogicalExpression extends Omit { + type: "LogicalExpression"; + operator: "||" | "&&" | "??"; + left: K.ExpressionKind; + right: K.ExpressionKind; +} +export interface ConditionalExpression extends Omit { + type: "ConditionalExpression"; + test: K.ExpressionKind; + consequent: K.ExpressionKind; + alternate: K.ExpressionKind; +} +export interface NewExpression extends Omit { + type: "NewExpression"; + callee: K.ExpressionKind; + arguments: (K.ExpressionKind | K.SpreadElementKind)[]; +} +export interface CallExpression extends Omit { + type: "CallExpression"; + callee: K.ExpressionKind; + arguments: (K.ExpressionKind | K.SpreadElementKind)[]; +} +export interface RestElement extends Omit { + type: "RestElement"; + argument: K.PatternKind; + typeAnnotation: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null; +} +export interface TypeAnnotation extends Omit { + type: "TypeAnnotation"; + typeAnnotation: K.FlowTypeKind; +} +export interface TSTypeAnnotation extends Omit { + type: "TSTypeAnnotation"; + typeAnnotation: K.TSTypeKind | K.TSTypeAnnotationKind; +} +export interface SpreadElementPattern extends Omit { + type: "SpreadElementPattern"; + argument: K.PatternKind; +} +export interface ArrowFunctionExpression extends Omit, Omit { + type: "ArrowFunctionExpression"; + id: null; + body: K.BlockStatementKind | K.ExpressionKind; + generator: false; +} +export interface ForOfStatement extends Omit { + type: "ForOfStatement"; + left: K.VariableDeclarationKind | K.PatternKind; + right: K.ExpressionKind; + body: K.StatementKind; +} +export interface YieldExpression extends Omit { + type: "YieldExpression"; + argument: K.ExpressionKind | null; + delegate: boolean; +} +export interface GeneratorExpression extends Omit { + type: "GeneratorExpression"; + body: K.ExpressionKind; + blocks: K.ComprehensionBlockKind[]; + filter: K.ExpressionKind | null; +} +export interface ComprehensionBlock extends Omit { + type: "ComprehensionBlock"; + left: K.PatternKind; + right: K.ExpressionKind; + each: boolean; +} +export interface ComprehensionExpression extends Omit { + type: "ComprehensionExpression"; + body: K.ExpressionKind; + blocks: K.ComprehensionBlockKind[]; + filter: K.ExpressionKind | null; +} +export interface ObjectProperty extends Omit { + shorthand: boolean; + type: "ObjectProperty"; + key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind; + value: K.ExpressionKind | K.PatternKind; + accessibility: K.LiteralKind | null; + computed: boolean; +} +export interface PropertyPattern extends Omit { + type: "PropertyPattern"; + key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind; + pattern: K.PatternKind; + computed: boolean; +} +export interface ObjectPattern extends Omit { + type: "ObjectPattern"; + properties: (K.PropertyKind | K.PropertyPatternKind | K.SpreadPropertyPatternKind | K.SpreadPropertyKind | K.ObjectPropertyKind | K.RestPropertyKind)[]; + typeAnnotation: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null; + decorators: K.DecoratorKind[] | null; +} +export interface ArrayPattern extends Omit { + type: "ArrayPattern"; + elements: (K.PatternKind | K.SpreadElementKind | null)[]; +} +export interface MethodDefinition extends Omit { + type: "MethodDefinition"; + kind: "constructor" | "method" | "get" | "set"; + key: K.ExpressionKind; + value: K.FunctionKind; + computed: boolean; + static: boolean; + decorators: K.DecoratorKind[] | null; +} +export interface SpreadElement extends Omit { + type: "SpreadElement"; + argument: K.ExpressionKind; +} +export interface AssignmentPattern extends Omit { + type: "AssignmentPattern"; + left: K.PatternKind; + right: K.ExpressionKind; +} +export interface ClassPropertyDefinition extends Omit { + type: "ClassPropertyDefinition"; + definition: K.MethodDefinitionKind | K.VariableDeclaratorKind | K.ClassPropertyDefinitionKind | K.ClassPropertyKind; +} +export interface ClassProperty extends Omit { + type: "ClassProperty"; + key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind; + computed: boolean; + value: K.ExpressionKind | null; + static: boolean; + typeAnnotation: K.TypeAnnotationKind | K.TSTypeAnnotationKind | null; + variance: K.VarianceKind | "plus" | "minus" | null; + access: "public" | "private" | "protected" | undefined; +} +export interface ClassBody extends Omit { + type: "ClassBody"; + body: (K.MethodDefinitionKind | K.VariableDeclaratorKind | K.ClassPropertyDefinitionKind | K.ClassPropertyKind | K.ClassPrivatePropertyKind | K.ClassMethodKind | K.ClassPrivateMethodKind | K.TSDeclareMethodKind | K.TSCallSignatureDeclarationKind | K.TSConstructSignatureDeclarationKind | K.TSIndexSignatureKind | K.TSMethodSignatureKind | K.TSPropertySignatureKind)[]; +} +export interface ClassDeclaration extends Omit { + type: "ClassDeclaration"; + id: K.IdentifierKind | null; + body: K.ClassBodyKind; + superClass: K.ExpressionKind | null; + typeParameters: K.TypeParameterDeclarationKind | K.TSTypeParameterDeclarationKind | null; + superTypeParameters: K.TypeParameterInstantiationKind | K.TSTypeParameterInstantiationKind | null; + implements: K.ClassImplementsKind[] | K.TSExpressionWithTypeArgumentsKind[]; +} +export interface ClassExpression extends Omit { + type: "ClassExpression"; + id: K.IdentifierKind | null; + body: K.ClassBodyKind; + superClass: K.ExpressionKind | null; + typeParameters: K.TypeParameterDeclarationKind | K.TSTypeParameterDeclarationKind | null; + superTypeParameters: K.TypeParameterInstantiationKind | K.TSTypeParameterInstantiationKind | null; + implements: K.ClassImplementsKind[] | K.TSExpressionWithTypeArgumentsKind[]; +} +export interface Specifier extends Node { +} +export interface ModuleSpecifier extends Specifier { + local: K.IdentifierKind | null; + id: K.IdentifierKind | null; + name: K.IdentifierKind | null; +} +export interface ImportSpecifier extends Omit { + type: "ImportSpecifier"; + imported: K.IdentifierKind; +} +export interface ImportNamespaceSpecifier extends Omit { + type: "ImportNamespaceSpecifier"; +} +export interface ImportDefaultSpecifier extends Omit { + type: "ImportDefaultSpecifier"; +} +export interface ImportDeclaration extends Omit { + type: "ImportDeclaration"; + specifiers: (K.ImportSpecifierKind | K.ImportNamespaceSpecifierKind | K.ImportDefaultSpecifierKind)[]; + source: K.LiteralKind; + importKind: "value" | "type"; +} +export interface TaggedTemplateExpression extends Omit { + type: "TaggedTemplateExpression"; + tag: K.ExpressionKind; + quasi: K.TemplateLiteralKind; +} +export interface TemplateLiteral extends Omit { + type: "TemplateLiteral"; + quasis: K.TemplateElementKind[]; + expressions: K.ExpressionKind[]; +} +export interface TemplateElement extends Omit { + type: "TemplateElement"; + value: { + cooked: string; + raw: string; + }; + tail: boolean; +} +export interface SpreadProperty extends Omit { + type: "SpreadProperty"; + argument: K.ExpressionKind; +} +export interface SpreadPropertyPattern extends Omit { + type: "SpreadPropertyPattern"; + argument: K.PatternKind; +} +export interface AwaitExpression extends Omit { + type: "AwaitExpression"; + argument: K.ExpressionKind | null; + all: boolean; +} +export interface JSXAttribute extends Omit { + type: "JSXAttribute"; + name: K.JSXIdentifierKind | K.JSXNamespacedNameKind; + value: K.LiteralKind | K.JSXExpressionContainerKind | null; +} +export interface JSXIdentifier extends Omit { + type: "JSXIdentifier"; + name: string; +} +export interface JSXNamespacedName extends Omit { + type: "JSXNamespacedName"; + namespace: K.JSXIdentifierKind; + name: K.JSXIdentifierKind; +} +export interface JSXExpressionContainer extends Omit { + type: "JSXExpressionContainer"; + expression: K.ExpressionKind; +} +export interface JSXMemberExpression extends Omit { + type: "JSXMemberExpression"; + object: K.JSXIdentifierKind | K.JSXMemberExpressionKind; + property: K.JSXIdentifierKind; + computed: boolean; +} +export interface JSXSpreadAttribute extends Omit { + type: "JSXSpreadAttribute"; + argument: K.ExpressionKind; +} +export interface JSXElement extends Omit { + type: "JSXElement"; + openingElement: K.JSXOpeningElementKind; + closingElement: K.JSXClosingElementKind | null; + children: (K.JSXElementKind | K.JSXExpressionContainerKind | K.JSXFragmentKind | K.JSXTextKind | K.LiteralKind)[]; + name: K.JSXIdentifierKind | K.JSXNamespacedNameKind | K.JSXMemberExpressionKind; + selfClosing: boolean; + attributes: (K.JSXAttributeKind | K.JSXSpreadAttributeKind)[]; +} +export interface JSXOpeningElement extends Omit { + type: "JSXOpeningElement"; + name: K.JSXIdentifierKind | K.JSXNamespacedNameKind | K.JSXMemberExpressionKind; + attributes: (K.JSXAttributeKind | K.JSXSpreadAttributeKind)[]; + selfClosing: boolean; +} +export interface JSXClosingElement extends Omit { + type: "JSXClosingElement"; + name: K.JSXIdentifierKind | K.JSXNamespacedNameKind | K.JSXMemberExpressionKind; +} +export interface JSXFragment extends Omit { + type: "JSXFragment"; + openingElement: K.JSXOpeningFragmentKind; + closingElement: K.JSXClosingFragmentKind; + children: (K.JSXElementKind | K.JSXExpressionContainerKind | K.JSXFragmentKind | K.JSXTextKind | K.LiteralKind)[]; +} +export interface JSXText extends Omit { + type: "JSXText"; + value: string; +} +export interface JSXOpeningFragment extends Omit { + type: "JSXOpeningFragment"; +} +export interface JSXClosingFragment extends Omit { + type: "JSXClosingFragment"; +} +export interface JSXEmptyExpression extends Omit { + type: "JSXEmptyExpression"; +} +export interface JSXSpreadChild extends Omit { + type: "JSXSpreadChild"; + expression: K.ExpressionKind; +} +export interface TypeParameterDeclaration extends Omit { + type: "TypeParameterDeclaration"; + params: K.TypeParameterKind[]; +} +export interface TSTypeParameterDeclaration extends Omit { + type: "TSTypeParameterDeclaration"; + params: K.TSTypeParameterKind[]; +} +export interface TypeParameterInstantiation extends Omit { + type: "TypeParameterInstantiation"; + params: K.FlowTypeKind[]; +} +export interface TSTypeParameterInstantiation extends Omit { + type: "TSTypeParameterInstantiation"; + params: K.TSTypeKind[]; +} +export interface ClassImplements extends Omit { + type: "ClassImplements"; + id: K.IdentifierKind; + superClass: K.ExpressionKind | null; + typeParameters: K.TypeParameterInstantiationKind | null; +} +export interface TSType extends Node { +} +export interface TSHasOptionalTypeParameterInstantiation { + typeParameters: K.TSTypeParameterInstantiationKind | null; +} +export interface TSExpressionWithTypeArguments extends Omit, TSHasOptionalTypeParameterInstantiation { + type: "TSExpressionWithTypeArguments"; + expression: K.IdentifierKind | K.TSQualifiedNameKind; +} +export interface Flow extends Node { +} +export interface FlowType extends Flow { +} +export interface AnyTypeAnnotation extends Omit { + type: "AnyTypeAnnotation"; +} +export interface EmptyTypeAnnotation extends Omit { + type: "EmptyTypeAnnotation"; +} +export interface MixedTypeAnnotation extends Omit { + type: "MixedTypeAnnotation"; +} +export interface VoidTypeAnnotation extends Omit { + type: "VoidTypeAnnotation"; +} +export interface NumberTypeAnnotation extends Omit { + type: "NumberTypeAnnotation"; +} +export interface NumberLiteralTypeAnnotation extends Omit { + type: "NumberLiteralTypeAnnotation"; + value: number; + raw: string; +} +export interface NumericLiteralTypeAnnotation extends Omit { + type: "NumericLiteralTypeAnnotation"; + value: number; + raw: string; +} +export interface StringTypeAnnotation extends Omit { + type: "StringTypeAnnotation"; +} +export interface StringLiteralTypeAnnotation extends Omit { + type: "StringLiteralTypeAnnotation"; + value: string; + raw: string; +} +export interface BooleanTypeAnnotation extends Omit { + type: "BooleanTypeAnnotation"; +} +export interface BooleanLiteralTypeAnnotation extends Omit { + type: "BooleanLiteralTypeAnnotation"; + value: boolean; + raw: string; +} +export interface NullableTypeAnnotation extends Omit { + type: "NullableTypeAnnotation"; + typeAnnotation: K.FlowTypeKind; +} +export interface NullLiteralTypeAnnotation extends Omit { + type: "NullLiteralTypeAnnotation"; +} +export interface NullTypeAnnotation extends Omit { + type: "NullTypeAnnotation"; +} +export interface ThisTypeAnnotation extends Omit { + type: "ThisTypeAnnotation"; +} +export interface ExistsTypeAnnotation extends Omit { + type: "ExistsTypeAnnotation"; +} +export interface ExistentialTypeParam extends Omit { + type: "ExistentialTypeParam"; +} +export interface FunctionTypeAnnotation extends Omit { + type: "FunctionTypeAnnotation"; + params: K.FunctionTypeParamKind[]; + returnType: K.FlowTypeKind; + rest: K.FunctionTypeParamKind | null; + typeParameters: K.TypeParameterDeclarationKind | null; +} +export interface FunctionTypeParam extends Omit { + type: "FunctionTypeParam"; + name: K.IdentifierKind; + typeAnnotation: K.FlowTypeKind; + optional: boolean; +} +export interface ArrayTypeAnnotation extends Omit { + type: "ArrayTypeAnnotation"; + elementType: K.FlowTypeKind; +} +export interface ObjectTypeAnnotation extends Omit { + type: "ObjectTypeAnnotation"; + properties: (K.ObjectTypePropertyKind | K.ObjectTypeSpreadPropertyKind)[]; + indexers: K.ObjectTypeIndexerKind[]; + callProperties: K.ObjectTypeCallPropertyKind[]; + inexact: boolean | undefined; + exact: boolean; + internalSlots: K.ObjectTypeInternalSlotKind[]; +} +export interface ObjectTypeProperty extends Omit { + type: "ObjectTypeProperty"; + key: K.LiteralKind | K.IdentifierKind; + value: K.FlowTypeKind; + optional: boolean; + variance: K.VarianceKind | "plus" | "minus" | null; +} +export interface ObjectTypeSpreadProperty extends Omit { + type: "ObjectTypeSpreadProperty"; + argument: K.FlowTypeKind; +} +export interface ObjectTypeIndexer extends Omit { + type: "ObjectTypeIndexer"; + id: K.IdentifierKind; + key: K.FlowTypeKind; + value: K.FlowTypeKind; + variance: K.VarianceKind | "plus" | "minus" | null; +} +export interface ObjectTypeCallProperty extends Omit { + type: "ObjectTypeCallProperty"; + value: K.FunctionTypeAnnotationKind; + static: boolean; +} +export interface ObjectTypeInternalSlot extends Omit { + type: "ObjectTypeInternalSlot"; + id: K.IdentifierKind; + value: K.FlowTypeKind; + optional: boolean; + static: boolean; + method: boolean; +} +export interface Variance extends Omit { + type: "Variance"; + kind: "plus" | "minus"; +} +export interface QualifiedTypeIdentifier extends Omit { + type: "QualifiedTypeIdentifier"; + qualification: K.IdentifierKind | K.QualifiedTypeIdentifierKind; + id: K.IdentifierKind; +} +export interface GenericTypeAnnotation extends Omit { + type: "GenericTypeAnnotation"; + id: K.IdentifierKind | K.QualifiedTypeIdentifierKind; + typeParameters: K.TypeParameterInstantiationKind | null; +} +export interface MemberTypeAnnotation extends Omit { + type: "MemberTypeAnnotation"; + object: K.IdentifierKind; + property: K.MemberTypeAnnotationKind | K.GenericTypeAnnotationKind; +} +export interface UnionTypeAnnotation extends Omit { + type: "UnionTypeAnnotation"; + types: K.FlowTypeKind[]; +} +export interface IntersectionTypeAnnotation extends Omit { + type: "IntersectionTypeAnnotation"; + types: K.FlowTypeKind[]; +} +export interface TypeofTypeAnnotation extends Omit { + type: "TypeofTypeAnnotation"; + argument: K.FlowTypeKind; +} +export interface TypeParameter extends Omit { + type: "TypeParameter"; + name: string; + variance: K.VarianceKind | "plus" | "minus" | null; + bound: K.TypeAnnotationKind | null; +} +export interface InterfaceTypeAnnotation extends Omit { + type: "InterfaceTypeAnnotation"; + body: K.ObjectTypeAnnotationKind; + extends: K.InterfaceExtendsKind[] | null; +} +export interface InterfaceExtends extends Omit { + type: "InterfaceExtends"; + id: K.IdentifierKind; + typeParameters: K.TypeParameterInstantiationKind | null; +} +export interface InterfaceDeclaration extends Omit { + type: "InterfaceDeclaration"; + id: K.IdentifierKind; + typeParameters: K.TypeParameterDeclarationKind | null; + body: K.ObjectTypeAnnotationKind; + extends: K.InterfaceExtendsKind[]; +} +export interface DeclareInterface extends Omit { + type: "DeclareInterface"; +} +export interface TypeAlias extends Omit { + type: "TypeAlias"; + id: K.IdentifierKind; + typeParameters: K.TypeParameterDeclarationKind | null; + right: K.FlowTypeKind; +} +export interface OpaqueType extends Omit { + type: "OpaqueType"; + id: K.IdentifierKind; + typeParameters: K.TypeParameterDeclarationKind | null; + impltype: K.FlowTypeKind; + supertype: K.FlowTypeKind; +} +export interface DeclareTypeAlias extends Omit { + type: "DeclareTypeAlias"; +} +export interface DeclareOpaqueType extends Omit { + type: "DeclareOpaqueType"; +} +export interface TypeCastExpression extends Omit { + type: "TypeCastExpression"; + expression: K.ExpressionKind; + typeAnnotation: K.TypeAnnotationKind; +} +export interface TupleTypeAnnotation extends Omit { + type: "TupleTypeAnnotation"; + types: K.FlowTypeKind[]; +} +export interface DeclareVariable extends Omit { + type: "DeclareVariable"; + id: K.IdentifierKind; +} +export interface DeclareFunction extends Omit { + type: "DeclareFunction"; + id: K.IdentifierKind; +} +export interface DeclareClass extends Omit { + type: "DeclareClass"; +} +export interface DeclareModule extends Omit { + type: "DeclareModule"; + id: K.IdentifierKind | K.LiteralKind; + body: K.BlockStatementKind; +} +export interface DeclareModuleExports extends Omit { + type: "DeclareModuleExports"; + typeAnnotation: K.TypeAnnotationKind; +} +export interface DeclareExportDeclaration extends Omit { + type: "DeclareExportDeclaration"; + default: boolean; + declaration: K.DeclareVariableKind | K.DeclareFunctionKind | K.DeclareClassKind | K.FlowTypeKind | null; + specifiers: (K.ExportSpecifierKind | K.ExportBatchSpecifierKind)[]; + source: K.LiteralKind | null; +} +export interface ExportSpecifier extends Omit { + type: "ExportSpecifier"; + exported: K.IdentifierKind; +} +export interface ExportBatchSpecifier extends Omit { + type: "ExportBatchSpecifier"; +} +export interface DeclareExportAllDeclaration extends Omit { + type: "DeclareExportAllDeclaration"; + source: K.LiteralKind | null; +} +export interface FlowPredicate extends Flow { +} +export interface InferredPredicate extends Omit { + type: "InferredPredicate"; +} +export interface DeclaredPredicate extends Omit { + type: "DeclaredPredicate"; + value: K.ExpressionKind; +} +export interface ExportDeclaration extends Omit { + type: "ExportDeclaration"; + default: boolean; + declaration: K.DeclarationKind | K.ExpressionKind | null; + specifiers: (K.ExportSpecifierKind | K.ExportBatchSpecifierKind)[]; + source: K.LiteralKind | null; +} +export interface Block extends Comment { + type: "Block"; +} +export interface Line extends Comment { + type: "Line"; +} +export interface Noop extends Omit { + type: "Noop"; +} +export interface DoExpression extends Omit { + type: "DoExpression"; + body: K.StatementKind[]; +} +export interface Super extends Omit { + type: "Super"; +} +export interface BindExpression extends Omit { + type: "BindExpression"; + object: K.ExpressionKind | null; + callee: K.ExpressionKind; +} +export interface Decorator extends Omit { + type: "Decorator"; + expression: K.ExpressionKind; +} +export interface MetaProperty extends Omit { + type: "MetaProperty"; + meta: K.IdentifierKind; + property: K.IdentifierKind; +} +export interface ParenthesizedExpression extends Omit { + type: "ParenthesizedExpression"; + expression: K.ExpressionKind; +} +export interface ExportDefaultDeclaration extends Omit { + type: "ExportDefaultDeclaration"; + declaration: K.DeclarationKind | K.ExpressionKind; +} +export interface ExportNamedDeclaration extends Omit { + type: "ExportNamedDeclaration"; + declaration: K.DeclarationKind | null; + specifiers: K.ExportSpecifierKind[]; + source: K.LiteralKind | null; +} +export interface ExportNamespaceSpecifier extends Omit { + type: "ExportNamespaceSpecifier"; + exported: K.IdentifierKind; +} +export interface ExportDefaultSpecifier extends Omit { + type: "ExportDefaultSpecifier"; + exported: K.IdentifierKind; +} +export interface ExportAllDeclaration extends Omit { + type: "ExportAllDeclaration"; + exported: K.IdentifierKind | null; + source: K.LiteralKind; +} +export interface CommentBlock extends Comment { + type: "CommentBlock"; +} +export interface CommentLine extends Comment { + type: "CommentLine"; +} +export interface Directive extends Omit { + type: "Directive"; + value: K.DirectiveLiteralKind; +} +export interface DirectiveLiteral extends Omit, Omit { + type: "DirectiveLiteral"; + value: string; +} +export interface InterpreterDirective extends Omit { + type: "InterpreterDirective"; + value: string; +} +export interface StringLiteral extends Omit { + type: "StringLiteral"; + value: string; +} +export interface NumericLiteral extends Omit { + type: "NumericLiteral"; + value: number; + raw: string | null; + extra: { + rawValue: number; + raw: string; + }; +} +export interface BigIntLiteral extends Omit { + type: "BigIntLiteral"; + value: string | number; + extra: { + rawValue: string; + raw: string; + }; +} +export interface NullLiteral extends Omit { + type: "NullLiteral"; + value: null; +} +export interface BooleanLiteral extends Omit { + type: "BooleanLiteral"; + value: boolean; +} +export interface RegExpLiteral extends Omit { + type: "RegExpLiteral"; + pattern: string; + flags: string; + value: RegExp; +} +export interface ObjectMethod extends Omit, Omit { + type: "ObjectMethod"; + kind: "method" | "get" | "set"; + key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind; + params: K.PatternKind[]; + body: K.BlockStatementKind; + computed: boolean; + generator: boolean; + async: boolean; + accessibility: K.LiteralKind | null; + decorators: K.DecoratorKind[] | null; +} +export interface ClassPrivateProperty extends Omit { + type: "ClassPrivateProperty"; + key: K.PrivateNameKind; + value: K.ExpressionKind | null; +} +export interface ClassMethod extends Omit, Omit { + type: "ClassMethod"; + key: K.LiteralKind | K.IdentifierKind | K.ExpressionKind; + kind: "get" | "set" | "method" | "constructor"; + body: K.BlockStatementKind; + computed: boolean; + static: boolean | null; + abstract: boolean | null; + access: "public" | "private" | "protected" | null; + accessibility: "public" | "private" | "protected" | null; + decorators: K.DecoratorKind[] | null; + optional: boolean | null; +} +export interface ClassPrivateMethod extends Omit, Omit { + type: "ClassPrivateMethod"; + key: K.PrivateNameKind; + kind: "get" | "set" | "method" | "constructor"; + body: K.BlockStatementKind; + computed: boolean; + static: boolean | null; + abstract: boolean | null; + access: "public" | "private" | "protected" | null; + accessibility: "public" | "private" | "protected" | null; + decorators: K.DecoratorKind[] | null; + optional: boolean | null; +} +export interface PrivateName extends Omit, Omit { + type: "PrivateName"; + id: K.IdentifierKind; +} +export interface RestProperty extends Omit { + type: "RestProperty"; + argument: K.ExpressionKind; +} +export interface ForAwaitStatement extends Omit { + type: "ForAwaitStatement"; + left: K.VariableDeclarationKind | K.ExpressionKind; + right: K.ExpressionKind; + body: K.StatementKind; +} +export interface Import extends Omit { + type: "Import"; +} +export interface TSQualifiedName extends Omit { + type: "TSQualifiedName"; + left: K.IdentifierKind | K.TSQualifiedNameKind; + right: K.IdentifierKind | K.TSQualifiedNameKind; +} +export interface TSTypeReference extends Omit, TSHasOptionalTypeParameterInstantiation { + type: "TSTypeReference"; + typeName: K.IdentifierKind | K.TSQualifiedNameKind; +} +export interface TSHasOptionalTypeParameters { + typeParameters: K.TSTypeParameterDeclarationKind | null | undefined; +} +export interface TSHasOptionalTypeAnnotation { + typeAnnotation: K.TSTypeAnnotationKind | null; +} +export interface TSAsExpression extends Omit, Omit { + type: "TSAsExpression"; + expression: K.ExpressionKind; + typeAnnotation: K.TSTypeKind; + extra: { + parenthesized: boolean; + } | null; +} +export interface TSNonNullExpression extends Omit, Omit { + type: "TSNonNullExpression"; + expression: K.ExpressionKind; +} +export interface TSAnyKeyword extends Omit { + type: "TSAnyKeyword"; +} +export interface TSBigIntKeyword extends Omit { + type: "TSBigIntKeyword"; +} +export interface TSBooleanKeyword extends Omit { + type: "TSBooleanKeyword"; +} +export interface TSNeverKeyword extends Omit { + type: "TSNeverKeyword"; +} +export interface TSNullKeyword extends Omit { + type: "TSNullKeyword"; +} +export interface TSNumberKeyword extends Omit { + type: "TSNumberKeyword"; +} +export interface TSObjectKeyword extends Omit { + type: "TSObjectKeyword"; +} +export interface TSStringKeyword extends Omit { + type: "TSStringKeyword"; +} +export interface TSSymbolKeyword extends Omit { + type: "TSSymbolKeyword"; +} +export interface TSUndefinedKeyword extends Omit { + type: "TSUndefinedKeyword"; +} +export interface TSUnknownKeyword extends Omit { + type: "TSUnknownKeyword"; +} +export interface TSVoidKeyword extends Omit { + type: "TSVoidKeyword"; +} +export interface TSThisType extends Omit { + type: "TSThisType"; +} +export interface TSArrayType extends Omit { + type: "TSArrayType"; + elementType: K.TSTypeKind; +} +export interface TSLiteralType extends Omit { + type: "TSLiteralType"; + literal: K.NumericLiteralKind | K.StringLiteralKind | K.BooleanLiteralKind | K.TemplateLiteralKind | K.UnaryExpressionKind; +} +export interface TSUnionType extends Omit { + type: "TSUnionType"; + types: K.TSTypeKind[]; +} +export interface TSIntersectionType extends Omit { + type: "TSIntersectionType"; + types: K.TSTypeKind[]; +} +export interface TSConditionalType extends Omit { + type: "TSConditionalType"; + checkType: K.TSTypeKind; + extendsType: K.TSTypeKind; + trueType: K.TSTypeKind; + falseType: K.TSTypeKind; +} +export interface TSInferType extends Omit { + type: "TSInferType"; + typeParameter: K.TSTypeParameterKind; +} +export interface TSTypeParameter extends Omit { + type: "TSTypeParameter"; + name: string; + constraint: K.TSTypeKind | undefined; + default: K.TSTypeKind | undefined; +} +export interface TSParenthesizedType extends Omit { + type: "TSParenthesizedType"; + typeAnnotation: K.TSTypeKind; +} +export interface TSFunctionType extends Omit, TSHasOptionalTypeParameters, TSHasOptionalTypeAnnotation { + type: "TSFunctionType"; + parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[]; +} +export interface TSConstructorType extends Omit, TSHasOptionalTypeParameters, TSHasOptionalTypeAnnotation { + type: "TSConstructorType"; + parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[]; +} +export interface TSDeclareFunction extends Omit, TSHasOptionalTypeParameters { + type: "TSDeclareFunction"; + declare: boolean; + async: boolean; + generator: boolean; + id: K.IdentifierKind | null; + params: K.PatternKind[]; + returnType: K.TSTypeAnnotationKind | K.NoopKind | null; +} +export interface TSDeclareMethod extends Omit, TSHasOptionalTypeParameters { + type: "TSDeclareMethod"; + async: boolean; + generator: boolean; + params: K.PatternKind[]; + abstract: boolean; + accessibility: "public" | "private" | "protected" | undefined; + static: boolean; + computed: boolean; + optional: boolean; + key: K.IdentifierKind | K.StringLiteralKind | K.NumericLiteralKind | K.ExpressionKind; + kind: "get" | "set" | "method" | "constructor"; + access: "public" | "private" | "protected" | undefined; + decorators: K.DecoratorKind[] | null; + returnType: K.TSTypeAnnotationKind | K.NoopKind | null; +} +export interface TSMappedType extends Omit { + type: "TSMappedType"; + readonly: boolean | "+" | "-"; + typeParameter: K.TSTypeParameterKind; + optional: boolean | "+" | "-"; + typeAnnotation: K.TSTypeKind | null; +} +export interface TSTupleType extends Omit { + type: "TSTupleType"; + elementTypes: K.TSTypeKind[]; +} +export interface TSRestType extends Omit { + type: "TSRestType"; + typeAnnotation: K.TSTypeKind; +} +export interface TSOptionalType extends Omit { + type: "TSOptionalType"; + typeAnnotation: K.TSTypeKind; +} +export interface TSIndexedAccessType extends Omit { + type: "TSIndexedAccessType"; + objectType: K.TSTypeKind; + indexType: K.TSTypeKind; +} +export interface TSTypeOperator extends Omit { + type: "TSTypeOperator"; + operator: string; + typeAnnotation: K.TSTypeKind; +} +export interface TSIndexSignature extends Omit, TSHasOptionalTypeAnnotation { + type: "TSIndexSignature"; + parameters: K.IdentifierKind[]; + readonly: boolean; +} +export interface TSPropertySignature extends Omit, TSHasOptionalTypeAnnotation { + type: "TSPropertySignature"; + key: K.ExpressionKind; + computed: boolean; + readonly: boolean; + optional: boolean; + initializer: K.ExpressionKind | null; +} +export interface TSMethodSignature extends Omit, TSHasOptionalTypeParameters, TSHasOptionalTypeAnnotation { + type: "TSMethodSignature"; + key: K.ExpressionKind; + computed: boolean; + optional: boolean; + parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[]; +} +export interface TSTypePredicate extends Omit { + type: "TSTypePredicate"; + parameterName: K.IdentifierKind | K.TSThisTypeKind; + typeAnnotation: K.TSTypeAnnotationKind; +} +export interface TSCallSignatureDeclaration extends Omit, TSHasOptionalTypeParameters, TSHasOptionalTypeAnnotation { + type: "TSCallSignatureDeclaration"; + parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[]; +} +export interface TSConstructSignatureDeclaration extends Omit, TSHasOptionalTypeParameters, TSHasOptionalTypeAnnotation { + type: "TSConstructSignatureDeclaration"; + parameters: (K.IdentifierKind | K.RestElementKind | K.ArrayPatternKind | K.ObjectPatternKind)[]; +} +export interface TSEnumMember extends Omit { + type: "TSEnumMember"; + id: K.IdentifierKind | K.StringLiteralKind; + initializer: K.ExpressionKind | null; +} +export interface TSTypeQuery extends Omit { + type: "TSTypeQuery"; + exprName: K.IdentifierKind | K.TSQualifiedNameKind | K.TSImportTypeKind; +} +export interface TSImportType extends Omit, TSHasOptionalTypeParameterInstantiation { + type: "TSImportType"; + argument: K.StringLiteralKind; + qualifier: K.IdentifierKind | K.TSQualifiedNameKind | undefined; +} +export interface TSTypeLiteral extends Omit { + type: "TSTypeLiteral"; + members: (K.TSCallSignatureDeclarationKind | K.TSConstructSignatureDeclarationKind | K.TSIndexSignatureKind | K.TSMethodSignatureKind | K.TSPropertySignatureKind)[]; +} +export interface TSTypeAssertion extends Omit, Omit { + type: "TSTypeAssertion"; + typeAnnotation: K.TSTypeKind; + expression: K.ExpressionKind; + extra: { + parenthesized: boolean; + } | null; +} +export interface TSEnumDeclaration extends Omit { + type: "TSEnumDeclaration"; + id: K.IdentifierKind; + const: boolean; + declare: boolean; + members: K.TSEnumMemberKind[]; + initializer: K.ExpressionKind | null; +} +export interface TSTypeAliasDeclaration extends Omit, TSHasOptionalTypeParameters { + type: "TSTypeAliasDeclaration"; + id: K.IdentifierKind; + declare: boolean; + typeAnnotation: K.TSTypeKind; +} +export interface TSModuleBlock extends Omit { + type: "TSModuleBlock"; + body: K.StatementKind[]; +} +export interface TSModuleDeclaration extends Omit { + type: "TSModuleDeclaration"; + id: K.StringLiteralKind | K.IdentifierKind | K.TSQualifiedNameKind; + declare: boolean; + global: boolean; + body: K.TSModuleBlockKind | K.TSModuleDeclarationKind | null; +} +export interface TSImportEqualsDeclaration extends Omit { + type: "TSImportEqualsDeclaration"; + id: K.IdentifierKind; + isExport: boolean; + moduleReference: K.IdentifierKind | K.TSQualifiedNameKind | K.TSExternalModuleReferenceKind; +} +export interface TSExternalModuleReference extends Omit { + type: "TSExternalModuleReference"; + expression: K.StringLiteralKind; +} +export interface TSExportAssignment extends Omit { + type: "TSExportAssignment"; + expression: K.ExpressionKind; +} +export interface TSNamespaceExportDeclaration extends Omit { + type: "TSNamespaceExportDeclaration"; + id: K.IdentifierKind; +} +export interface TSInterfaceBody extends Omit { + type: "TSInterfaceBody"; + body: (K.TSCallSignatureDeclarationKind | K.TSConstructSignatureDeclarationKind | K.TSIndexSignatureKind | K.TSMethodSignatureKind | K.TSPropertySignatureKind)[]; +} +export interface TSInterfaceDeclaration extends Omit, TSHasOptionalTypeParameters { + type: "TSInterfaceDeclaration"; + id: K.IdentifierKind | K.TSQualifiedNameKind; + declare: boolean; + extends: K.TSExpressionWithTypeArgumentsKind[] | null; + body: K.TSInterfaceBodyKind; +} +export interface TSParameterProperty extends Omit { + type: "TSParameterProperty"; + accessibility: "public" | "private" | "protected" | undefined; + readonly: boolean; + parameter: K.IdentifierKind | K.AssignmentPatternKind; +} +export interface OptionalMemberExpression extends Omit { + type: "OptionalMemberExpression"; + optional: boolean; +} +export interface OptionalCallExpression extends Omit { + type: "OptionalCallExpression"; + optional: boolean; +} +export declare type ASTNode = File | Program | Identifier | BlockStatement | EmptyStatement | ExpressionStatement | IfStatement | LabeledStatement | BreakStatement | ContinueStatement | WithStatement | SwitchStatement | SwitchCase | ReturnStatement | ThrowStatement | TryStatement | CatchClause | WhileStatement | DoWhileStatement | ForStatement | VariableDeclaration | ForInStatement | DebuggerStatement | FunctionDeclaration | FunctionExpression | VariableDeclarator | ThisExpression | ArrayExpression | ObjectExpression | Property | Literal | SequenceExpression | UnaryExpression | BinaryExpression | AssignmentExpression | MemberExpression | UpdateExpression | LogicalExpression | ConditionalExpression | NewExpression | CallExpression | RestElement | TypeAnnotation | TSTypeAnnotation | SpreadElementPattern | ArrowFunctionExpression | ForOfStatement | YieldExpression | GeneratorExpression | ComprehensionBlock | ComprehensionExpression | ObjectProperty | PropertyPattern | ObjectPattern | ArrayPattern | MethodDefinition | SpreadElement | AssignmentPattern | ClassPropertyDefinition | ClassProperty | ClassBody | ClassDeclaration | ClassExpression | ImportSpecifier | ImportNamespaceSpecifier | ImportDefaultSpecifier | ImportDeclaration | TaggedTemplateExpression | TemplateLiteral | TemplateElement | SpreadProperty | SpreadPropertyPattern | AwaitExpression | JSXAttribute | JSXIdentifier | JSXNamespacedName | JSXExpressionContainer | JSXMemberExpression | JSXSpreadAttribute | JSXElement | JSXOpeningElement | JSXClosingElement | JSXFragment | JSXText | JSXOpeningFragment | JSXClosingFragment | JSXEmptyExpression | JSXSpreadChild | TypeParameterDeclaration | TSTypeParameterDeclaration | TypeParameterInstantiation | TSTypeParameterInstantiation | ClassImplements | TSExpressionWithTypeArguments | AnyTypeAnnotation | EmptyTypeAnnotation | MixedTypeAnnotation | VoidTypeAnnotation | NumberTypeAnnotation | NumberLiteralTypeAnnotation | NumericLiteralTypeAnnotation | StringTypeAnnotation | StringLiteralTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullableTypeAnnotation | NullLiteralTypeAnnotation | NullTypeAnnotation | ThisTypeAnnotation | ExistsTypeAnnotation | ExistentialTypeParam | FunctionTypeAnnotation | FunctionTypeParam | ArrayTypeAnnotation | ObjectTypeAnnotation | ObjectTypeProperty | ObjectTypeSpreadProperty | ObjectTypeIndexer | ObjectTypeCallProperty | ObjectTypeInternalSlot | Variance | QualifiedTypeIdentifier | GenericTypeAnnotation | MemberTypeAnnotation | UnionTypeAnnotation | IntersectionTypeAnnotation | TypeofTypeAnnotation | TypeParameter | InterfaceTypeAnnotation | InterfaceExtends | InterfaceDeclaration | DeclareInterface | TypeAlias | OpaqueType | DeclareTypeAlias | DeclareOpaqueType | TypeCastExpression | TupleTypeAnnotation | DeclareVariable | DeclareFunction | DeclareClass | DeclareModule | DeclareModuleExports | DeclareExportDeclaration | ExportSpecifier | ExportBatchSpecifier | DeclareExportAllDeclaration | InferredPredicate | DeclaredPredicate | ExportDeclaration | Block | Line | Noop | DoExpression | Super | BindExpression | Decorator | MetaProperty | ParenthesizedExpression | ExportDefaultDeclaration | ExportNamedDeclaration | ExportNamespaceSpecifier | ExportDefaultSpecifier | ExportAllDeclaration | CommentBlock | CommentLine | Directive | DirectiveLiteral | InterpreterDirective | StringLiteral | NumericLiteral | BigIntLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | ObjectMethod | ClassPrivateProperty | ClassMethod | ClassPrivateMethod | PrivateName | RestProperty | ForAwaitStatement | Import | TSQualifiedName | TSTypeReference | TSAsExpression | TSNonNullExpression | TSAnyKeyword | TSBigIntKeyword | TSBooleanKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSThisType | TSArrayType | TSLiteralType | TSUnionType | TSIntersectionType | TSConditionalType | TSInferType | TSTypeParameter | TSParenthesizedType | TSFunctionType | TSConstructorType | TSDeclareFunction | TSDeclareMethod | TSMappedType | TSTupleType | TSRestType | TSOptionalType | TSIndexedAccessType | TSTypeOperator | TSIndexSignature | TSPropertySignature | TSMethodSignature | TSTypePredicate | TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSEnumMember | TSTypeQuery | TSImportType | TSTypeLiteral | TSTypeAssertion | TSEnumDeclaration | TSTypeAliasDeclaration | TSModuleBlock | TSModuleDeclaration | TSImportEqualsDeclaration | TSExternalModuleReference | TSExportAssignment | TSNamespaceExportDeclaration | TSInterfaceBody | TSInterfaceDeclaration | TSParameterProperty | OptionalMemberExpression | OptionalCallExpression; diff --git a/code/application_liste/app/node_modules/ast-types/gen/nodes.js b/code/application_liste/app/node_modules/ast-types/gen/nodes.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/gen/nodes.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/code/application_liste/app/node_modules/ast-types/gen/visitor.d.ts b/code/application_liste/app/node_modules/ast-types/gen/visitor.d.ts new file mode 100644 index 0000000..175ab23 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/gen/visitor.d.ts @@ -0,0 +1,267 @@ +import { NodePath } from "../lib/node-path"; +import { Context } from "../lib/path-visitor"; +import { namedTypes } from "./namedTypes"; +export interface Visitor { + visitPrintable?(this: Context & M, path: NodePath): any; + visitSourceLocation?(this: Context & M, path: NodePath): any; + visitNode?(this: Context & M, path: NodePath): any; + visitComment?(this: Context & M, path: NodePath): any; + visitPosition?(this: Context & M, path: NodePath): any; + visitFile?(this: Context & M, path: NodePath): any; + visitProgram?(this: Context & M, path: NodePath): any; + visitStatement?(this: Context & M, path: NodePath): any; + visitFunction?(this: Context & M, path: NodePath): any; + visitExpression?(this: Context & M, path: NodePath): any; + visitPattern?(this: Context & M, path: NodePath): any; + visitIdentifier?(this: Context & M, path: NodePath): any; + visitBlockStatement?(this: Context & M, path: NodePath): any; + visitEmptyStatement?(this: Context & M, path: NodePath): any; + visitExpressionStatement?(this: Context & M, path: NodePath): any; + visitIfStatement?(this: Context & M, path: NodePath): any; + visitLabeledStatement?(this: Context & M, path: NodePath): any; + visitBreakStatement?(this: Context & M, path: NodePath): any; + visitContinueStatement?(this: Context & M, path: NodePath): any; + visitWithStatement?(this: Context & M, path: NodePath): any; + visitSwitchStatement?(this: Context & M, path: NodePath): any; + visitSwitchCase?(this: Context & M, path: NodePath): any; + visitReturnStatement?(this: Context & M, path: NodePath): any; + visitThrowStatement?(this: Context & M, path: NodePath): any; + visitTryStatement?(this: Context & M, path: NodePath): any; + visitCatchClause?(this: Context & M, path: NodePath): any; + visitWhileStatement?(this: Context & M, path: NodePath): any; + visitDoWhileStatement?(this: Context & M, path: NodePath): any; + visitForStatement?(this: Context & M, path: NodePath): any; + visitDeclaration?(this: Context & M, path: NodePath): any; + visitVariableDeclaration?(this: Context & M, path: NodePath): any; + visitForInStatement?(this: Context & M, path: NodePath): any; + visitDebuggerStatement?(this: Context & M, path: NodePath): any; + visitFunctionDeclaration?(this: Context & M, path: NodePath): any; + visitFunctionExpression?(this: Context & M, path: NodePath): any; + visitVariableDeclarator?(this: Context & M, path: NodePath): any; + visitThisExpression?(this: Context & M, path: NodePath): any; + visitArrayExpression?(this: Context & M, path: NodePath): any; + visitObjectExpression?(this: Context & M, path: NodePath): any; + visitProperty?(this: Context & M, path: NodePath): any; + visitLiteral?(this: Context & M, path: NodePath): any; + visitSequenceExpression?(this: Context & M, path: NodePath): any; + visitUnaryExpression?(this: Context & M, path: NodePath): any; + visitBinaryExpression?(this: Context & M, path: NodePath): any; + visitAssignmentExpression?(this: Context & M, path: NodePath): any; + visitMemberExpression?(this: Context & M, path: NodePath): any; + visitUpdateExpression?(this: Context & M, path: NodePath): any; + visitLogicalExpression?(this: Context & M, path: NodePath): any; + visitConditionalExpression?(this: Context & M, path: NodePath): any; + visitNewExpression?(this: Context & M, path: NodePath): any; + visitCallExpression?(this: Context & M, path: NodePath): any; + visitRestElement?(this: Context & M, path: NodePath): any; + visitTypeAnnotation?(this: Context & M, path: NodePath): any; + visitTSTypeAnnotation?(this: Context & M, path: NodePath): any; + visitSpreadElementPattern?(this: Context & M, path: NodePath): any; + visitArrowFunctionExpression?(this: Context & M, path: NodePath): any; + visitForOfStatement?(this: Context & M, path: NodePath): any; + visitYieldExpression?(this: Context & M, path: NodePath): any; + visitGeneratorExpression?(this: Context & M, path: NodePath): any; + visitComprehensionBlock?(this: Context & M, path: NodePath): any; + visitComprehensionExpression?(this: Context & M, path: NodePath): any; + visitObjectProperty?(this: Context & M, path: NodePath): any; + visitPropertyPattern?(this: Context & M, path: NodePath): any; + visitObjectPattern?(this: Context & M, path: NodePath): any; + visitArrayPattern?(this: Context & M, path: NodePath): any; + visitMethodDefinition?(this: Context & M, path: NodePath): any; + visitSpreadElement?(this: Context & M, path: NodePath): any; + visitAssignmentPattern?(this: Context & M, path: NodePath): any; + visitClassPropertyDefinition?(this: Context & M, path: NodePath): any; + visitClassProperty?(this: Context & M, path: NodePath): any; + visitClassBody?(this: Context & M, path: NodePath): any; + visitClassDeclaration?(this: Context & M, path: NodePath): any; + visitClassExpression?(this: Context & M, path: NodePath): any; + visitSpecifier?(this: Context & M, path: NodePath): any; + visitModuleSpecifier?(this: Context & M, path: NodePath): any; + visitImportSpecifier?(this: Context & M, path: NodePath): any; + visitImportNamespaceSpecifier?(this: Context & M, path: NodePath): any; + visitImportDefaultSpecifier?(this: Context & M, path: NodePath): any; + visitImportDeclaration?(this: Context & M, path: NodePath): any; + visitTaggedTemplateExpression?(this: Context & M, path: NodePath): any; + visitTemplateLiteral?(this: Context & M, path: NodePath): any; + visitTemplateElement?(this: Context & M, path: NodePath): any; + visitSpreadProperty?(this: Context & M, path: NodePath): any; + visitSpreadPropertyPattern?(this: Context & M, path: NodePath): any; + visitAwaitExpression?(this: Context & M, path: NodePath): any; + visitImportExpression?(this: Context & M, path: NodePath): any; + visitJSXAttribute?(this: Context & M, path: NodePath): any; + visitJSXIdentifier?(this: Context & M, path: NodePath): any; + visitJSXNamespacedName?(this: Context & M, path: NodePath): any; + visitJSXExpressionContainer?(this: Context & M, path: NodePath): any; + visitJSXMemberExpression?(this: Context & M, path: NodePath): any; + visitJSXSpreadAttribute?(this: Context & M, path: NodePath): any; + visitJSXElement?(this: Context & M, path: NodePath): any; + visitJSXOpeningElement?(this: Context & M, path: NodePath): any; + visitJSXClosingElement?(this: Context & M, path: NodePath): any; + visitJSXFragment?(this: Context & M, path: NodePath): any; + visitJSXText?(this: Context & M, path: NodePath): any; + visitJSXOpeningFragment?(this: Context & M, path: NodePath): any; + visitJSXClosingFragment?(this: Context & M, path: NodePath): any; + visitJSXEmptyExpression?(this: Context & M, path: NodePath): any; + visitJSXSpreadChild?(this: Context & M, path: NodePath): any; + visitTypeParameterDeclaration?(this: Context & M, path: NodePath): any; + visitTSTypeParameterDeclaration?(this: Context & M, path: NodePath): any; + visitTypeParameterInstantiation?(this: Context & M, path: NodePath): any; + visitTSTypeParameterInstantiation?(this: Context & M, path: NodePath): any; + visitClassImplements?(this: Context & M, path: NodePath): any; + visitTSType?(this: Context & M, path: NodePath): any; + visitTSHasOptionalTypeParameterInstantiation?(this: Context & M, path: NodePath): any; + visitTSExpressionWithTypeArguments?(this: Context & M, path: NodePath): any; + visitFlow?(this: Context & M, path: NodePath): any; + visitFlowType?(this: Context & M, path: NodePath): any; + visitAnyTypeAnnotation?(this: Context & M, path: NodePath): any; + visitEmptyTypeAnnotation?(this: Context & M, path: NodePath): any; + visitMixedTypeAnnotation?(this: Context & M, path: NodePath): any; + visitVoidTypeAnnotation?(this: Context & M, path: NodePath): any; + visitNumberTypeAnnotation?(this: Context & M, path: NodePath): any; + visitNumberLiteralTypeAnnotation?(this: Context & M, path: NodePath): any; + visitNumericLiteralTypeAnnotation?(this: Context & M, path: NodePath): any; + visitStringTypeAnnotation?(this: Context & M, path: NodePath): any; + visitStringLiteralTypeAnnotation?(this: Context & M, path: NodePath): any; + visitBooleanTypeAnnotation?(this: Context & M, path: NodePath): any; + visitBooleanLiteralTypeAnnotation?(this: Context & M, path: NodePath): any; + visitNullableTypeAnnotation?(this: Context & M, path: NodePath): any; + visitNullLiteralTypeAnnotation?(this: Context & M, path: NodePath): any; + visitNullTypeAnnotation?(this: Context & M, path: NodePath): any; + visitThisTypeAnnotation?(this: Context & M, path: NodePath): any; + visitExistsTypeAnnotation?(this: Context & M, path: NodePath): any; + visitExistentialTypeParam?(this: Context & M, path: NodePath): any; + visitFunctionTypeAnnotation?(this: Context & M, path: NodePath): any; + visitFunctionTypeParam?(this: Context & M, path: NodePath): any; + visitArrayTypeAnnotation?(this: Context & M, path: NodePath): any; + visitObjectTypeAnnotation?(this: Context & M, path: NodePath): any; + visitObjectTypeProperty?(this: Context & M, path: NodePath): any; + visitObjectTypeSpreadProperty?(this: Context & M, path: NodePath): any; + visitObjectTypeIndexer?(this: Context & M, path: NodePath): any; + visitObjectTypeCallProperty?(this: Context & M, path: NodePath): any; + visitObjectTypeInternalSlot?(this: Context & M, path: NodePath): any; + visitVariance?(this: Context & M, path: NodePath): any; + visitQualifiedTypeIdentifier?(this: Context & M, path: NodePath): any; + visitGenericTypeAnnotation?(this: Context & M, path: NodePath): any; + visitMemberTypeAnnotation?(this: Context & M, path: NodePath): any; + visitUnionTypeAnnotation?(this: Context & M, path: NodePath): any; + visitIntersectionTypeAnnotation?(this: Context & M, path: NodePath): any; + visitTypeofTypeAnnotation?(this: Context & M, path: NodePath): any; + visitTypeParameter?(this: Context & M, path: NodePath): any; + visitInterfaceTypeAnnotation?(this: Context & M, path: NodePath): any; + visitInterfaceExtends?(this: Context & M, path: NodePath): any; + visitInterfaceDeclaration?(this: Context & M, path: NodePath): any; + visitDeclareInterface?(this: Context & M, path: NodePath): any; + visitTypeAlias?(this: Context & M, path: NodePath): any; + visitOpaqueType?(this: Context & M, path: NodePath): any; + visitDeclareTypeAlias?(this: Context & M, path: NodePath): any; + visitDeclareOpaqueType?(this: Context & M, path: NodePath): any; + visitTypeCastExpression?(this: Context & M, path: NodePath): any; + visitTupleTypeAnnotation?(this: Context & M, path: NodePath): any; + visitDeclareVariable?(this: Context & M, path: NodePath): any; + visitDeclareFunction?(this: Context & M, path: NodePath): any; + visitDeclareClass?(this: Context & M, path: NodePath): any; + visitDeclareModule?(this: Context & M, path: NodePath): any; + visitDeclareModuleExports?(this: Context & M, path: NodePath): any; + visitDeclareExportDeclaration?(this: Context & M, path: NodePath): any; + visitExportSpecifier?(this: Context & M, path: NodePath): any; + visitExportBatchSpecifier?(this: Context & M, path: NodePath): any; + visitDeclareExportAllDeclaration?(this: Context & M, path: NodePath): any; + visitFlowPredicate?(this: Context & M, path: NodePath): any; + visitInferredPredicate?(this: Context & M, path: NodePath): any; + visitDeclaredPredicate?(this: Context & M, path: NodePath): any; + visitExportDeclaration?(this: Context & M, path: NodePath): any; + visitBlock?(this: Context & M, path: NodePath): any; + visitLine?(this: Context & M, path: NodePath): any; + visitNoop?(this: Context & M, path: NodePath): any; + visitDoExpression?(this: Context & M, path: NodePath): any; + visitSuper?(this: Context & M, path: NodePath): any; + visitBindExpression?(this: Context & M, path: NodePath): any; + visitDecorator?(this: Context & M, path: NodePath): any; + visitMetaProperty?(this: Context & M, path: NodePath): any; + visitParenthesizedExpression?(this: Context & M, path: NodePath): any; + visitExportDefaultDeclaration?(this: Context & M, path: NodePath): any; + visitExportNamedDeclaration?(this: Context & M, path: NodePath): any; + visitExportNamespaceSpecifier?(this: Context & M, path: NodePath): any; + visitExportDefaultSpecifier?(this: Context & M, path: NodePath): any; + visitExportAllDeclaration?(this: Context & M, path: NodePath): any; + visitCommentBlock?(this: Context & M, path: NodePath): any; + visitCommentLine?(this: Context & M, path: NodePath): any; + visitDirective?(this: Context & M, path: NodePath): any; + visitDirectiveLiteral?(this: Context & M, path: NodePath): any; + visitInterpreterDirective?(this: Context & M, path: NodePath): any; + visitStringLiteral?(this: Context & M, path: NodePath): any; + visitNumericLiteral?(this: Context & M, path: NodePath): any; + visitBigIntLiteral?(this: Context & M, path: NodePath): any; + visitNullLiteral?(this: Context & M, path: NodePath): any; + visitBooleanLiteral?(this: Context & M, path: NodePath): any; + visitRegExpLiteral?(this: Context & M, path: NodePath): any; + visitObjectMethod?(this: Context & M, path: NodePath): any; + visitClassPrivateProperty?(this: Context & M, path: NodePath): any; + visitClassMethod?(this: Context & M, path: NodePath): any; + visitClassPrivateMethod?(this: Context & M, path: NodePath): any; + visitPrivateName?(this: Context & M, path: NodePath): any; + visitRestProperty?(this: Context & M, path: NodePath): any; + visitForAwaitStatement?(this: Context & M, path: NodePath): any; + visitImport?(this: Context & M, path: NodePath): any; + visitTSQualifiedName?(this: Context & M, path: NodePath): any; + visitTSTypeReference?(this: Context & M, path: NodePath): any; + visitTSHasOptionalTypeParameters?(this: Context & M, path: NodePath): any; + visitTSHasOptionalTypeAnnotation?(this: Context & M, path: NodePath): any; + visitTSAsExpression?(this: Context & M, path: NodePath): any; + visitTSNonNullExpression?(this: Context & M, path: NodePath): any; + visitTSAnyKeyword?(this: Context & M, path: NodePath): any; + visitTSBigIntKeyword?(this: Context & M, path: NodePath): any; + visitTSBooleanKeyword?(this: Context & M, path: NodePath): any; + visitTSNeverKeyword?(this: Context & M, path: NodePath): any; + visitTSNullKeyword?(this: Context & M, path: NodePath): any; + visitTSNumberKeyword?(this: Context & M, path: NodePath): any; + visitTSObjectKeyword?(this: Context & M, path: NodePath): any; + visitTSStringKeyword?(this: Context & M, path: NodePath): any; + visitTSSymbolKeyword?(this: Context & M, path: NodePath): any; + visitTSUndefinedKeyword?(this: Context & M, path: NodePath): any; + visitTSUnknownKeyword?(this: Context & M, path: NodePath): any; + visitTSVoidKeyword?(this: Context & M, path: NodePath): any; + visitTSThisType?(this: Context & M, path: NodePath): any; + visitTSArrayType?(this: Context & M, path: NodePath): any; + visitTSLiteralType?(this: Context & M, path: NodePath): any; + visitTSUnionType?(this: Context & M, path: NodePath): any; + visitTSIntersectionType?(this: Context & M, path: NodePath): any; + visitTSConditionalType?(this: Context & M, path: NodePath): any; + visitTSInferType?(this: Context & M, path: NodePath): any; + visitTSTypeParameter?(this: Context & M, path: NodePath): any; + visitTSParenthesizedType?(this: Context & M, path: NodePath): any; + visitTSFunctionType?(this: Context & M, path: NodePath): any; + visitTSConstructorType?(this: Context & M, path: NodePath): any; + visitTSDeclareFunction?(this: Context & M, path: NodePath): any; + visitTSDeclareMethod?(this: Context & M, path: NodePath): any; + visitTSMappedType?(this: Context & M, path: NodePath): any; + visitTSTupleType?(this: Context & M, path: NodePath): any; + visitTSRestType?(this: Context & M, path: NodePath): any; + visitTSOptionalType?(this: Context & M, path: NodePath): any; + visitTSIndexedAccessType?(this: Context & M, path: NodePath): any; + visitTSTypeOperator?(this: Context & M, path: NodePath): any; + visitTSIndexSignature?(this: Context & M, path: NodePath): any; + visitTSPropertySignature?(this: Context & M, path: NodePath): any; + visitTSMethodSignature?(this: Context & M, path: NodePath): any; + visitTSTypePredicate?(this: Context & M, path: NodePath): any; + visitTSCallSignatureDeclaration?(this: Context & M, path: NodePath): any; + visitTSConstructSignatureDeclaration?(this: Context & M, path: NodePath): any; + visitTSEnumMember?(this: Context & M, path: NodePath): any; + visitTSTypeQuery?(this: Context & M, path: NodePath): any; + visitTSImportType?(this: Context & M, path: NodePath): any; + visitTSTypeLiteral?(this: Context & M, path: NodePath): any; + visitTSTypeAssertion?(this: Context & M, path: NodePath): any; + visitTSEnumDeclaration?(this: Context & M, path: NodePath): any; + visitTSTypeAliasDeclaration?(this: Context & M, path: NodePath): any; + visitTSModuleBlock?(this: Context & M, path: NodePath): any; + visitTSModuleDeclaration?(this: Context & M, path: NodePath): any; + visitTSImportEqualsDeclaration?(this: Context & M, path: NodePath): any; + visitTSExternalModuleReference?(this: Context & M, path: NodePath): any; + visitTSExportAssignment?(this: Context & M, path: NodePath): any; + visitTSNamespaceExportDeclaration?(this: Context & M, path: NodePath): any; + visitTSInterfaceBody?(this: Context & M, path: NodePath): any; + visitTSInterfaceDeclaration?(this: Context & M, path: NodePath): any; + visitTSParameterProperty?(this: Context & M, path: NodePath): any; + visitOptionalMemberExpression?(this: Context & M, path: NodePath): any; + visitOptionalCallExpression?(this: Context & M, path: NodePath): any; +} diff --git a/code/application_liste/app/node_modules/ast-types/gen/visitor.js b/code/application_liste/app/node_modules/ast-types/gen/visitor.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/gen/visitor.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/code/application_liste/app/node_modules/ast-types/lib/equiv.d.ts b/code/application_liste/app/node_modules/ast-types/lib/equiv.d.ts new file mode 100644 index 0000000..bbc9e70 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/lib/equiv.d.ts @@ -0,0 +1,5 @@ +import { Fork } from "../types"; +export default function (fork: Fork): { + (a: any, b: any, problemPath?: any): boolean; + assert(a: any, b: any): void; +}; diff --git a/code/application_liste/app/node_modules/ast-types/lib/equiv.js b/code/application_liste/app/node_modules/ast-types/lib/equiv.js new file mode 100644 index 0000000..758c233 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/lib/equiv.js @@ -0,0 +1,156 @@ +"use strict";; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var types_1 = __importDefault(require("./types")); +function default_1(fork) { + var types = fork.use(types_1.default); + var getFieldNames = types.getFieldNames; + var getFieldValue = types.getFieldValue; + var isArray = types.builtInTypes.array; + var isObject = types.builtInTypes.object; + var isDate = types.builtInTypes.Date; + var isRegExp = types.builtInTypes.RegExp; + var hasOwn = Object.prototype.hasOwnProperty; + function astNodesAreEquivalent(a, b, problemPath) { + if (isArray.check(problemPath)) { + problemPath.length = 0; + } + else { + problemPath = null; + } + return areEquivalent(a, b, problemPath); + } + astNodesAreEquivalent.assert = function (a, b) { + var problemPath = []; + if (!astNodesAreEquivalent(a, b, problemPath)) { + if (problemPath.length === 0) { + if (a !== b) { + throw new Error("Nodes must be equal"); + } + } + else { + throw new Error("Nodes differ in the following path: " + + problemPath.map(subscriptForProperty).join("")); + } + } + }; + function subscriptForProperty(property) { + if (/[_$a-z][_$a-z0-9]*/i.test(property)) { + return "." + property; + } + return "[" + JSON.stringify(property) + "]"; + } + function areEquivalent(a, b, problemPath) { + if (a === b) { + return true; + } + if (isArray.check(a)) { + return arraysAreEquivalent(a, b, problemPath); + } + if (isObject.check(a)) { + return objectsAreEquivalent(a, b, problemPath); + } + if (isDate.check(a)) { + return isDate.check(b) && (+a === +b); + } + if (isRegExp.check(a)) { + return isRegExp.check(b) && (a.source === b.source && + a.global === b.global && + a.multiline === b.multiline && + a.ignoreCase === b.ignoreCase); + } + return a == b; + } + function arraysAreEquivalent(a, b, problemPath) { + isArray.assert(a); + var aLength = a.length; + if (!isArray.check(b) || b.length !== aLength) { + if (problemPath) { + problemPath.push("length"); + } + return false; + } + for (var i = 0; i < aLength; ++i) { + if (problemPath) { + problemPath.push(i); + } + if (i in a !== i in b) { + return false; + } + if (!areEquivalent(a[i], b[i], problemPath)) { + return false; + } + if (problemPath) { + var problemPathTail = problemPath.pop(); + if (problemPathTail !== i) { + throw new Error("" + problemPathTail); + } + } + } + return true; + } + function objectsAreEquivalent(a, b, problemPath) { + isObject.assert(a); + if (!isObject.check(b)) { + return false; + } + // Fast path for a common property of AST nodes. + if (a.type !== b.type) { + if (problemPath) { + problemPath.push("type"); + } + return false; + } + var aNames = getFieldNames(a); + var aNameCount = aNames.length; + var bNames = getFieldNames(b); + var bNameCount = bNames.length; + if (aNameCount === bNameCount) { + for (var i = 0; i < aNameCount; ++i) { + var name = aNames[i]; + var aChild = getFieldValue(a, name); + var bChild = getFieldValue(b, name); + if (problemPath) { + problemPath.push(name); + } + if (!areEquivalent(aChild, bChild, problemPath)) { + return false; + } + if (problemPath) { + var problemPathTail = problemPath.pop(); + if (problemPathTail !== name) { + throw new Error("" + problemPathTail); + } + } + } + return true; + } + if (!problemPath) { + return false; + } + // Since aNameCount !== bNameCount, we need to find some name that's + // missing in aNames but present in bNames, or vice-versa. + var seenNames = Object.create(null); + for (i = 0; i < aNameCount; ++i) { + seenNames[aNames[i]] = true; + } + for (i = 0; i < bNameCount; ++i) { + name = bNames[i]; + if (!hasOwn.call(seenNames, name)) { + problemPath.push(name); + return false; + } + delete seenNames[name]; + } + for (name in seenNames) { + problemPath.push(name); + break; + } + return false; + } + return astNodesAreEquivalent; +} +exports.default = default_1; +module.exports = exports["default"]; diff --git a/code/application_liste/app/node_modules/ast-types/lib/node-path.d.ts b/code/application_liste/app/node_modules/ast-types/lib/node-path.d.ts new file mode 100644 index 0000000..b8b11d1 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/lib/node-path.d.ts @@ -0,0 +1,22 @@ +import { Fork } from "../types"; +import { ASTNode } from "./types"; +import { Path } from "./path"; +import { Scope } from "./scope"; +export interface NodePath extends Path { + node: N; + parent: any; + scope: any; + replace: Path['replace']; + prune(...args: any[]): any; + _computeNode(): any; + _computeParent(): any; + _computeScope(): Scope | null; + getValueProperty(name: any): any; + needsParens(assumeExpressionContext?: boolean): boolean; + canBeFirstInStatement(): boolean; + firstInStatement(): boolean; +} +export interface NodePathConstructor { + new (value: any, parentPath?: any, name?: any): NodePath; +} +export default function nodePathPlugin(fork: Fork): NodePathConstructor; diff --git a/code/application_liste/app/node_modules/ast-types/lib/node-path.js b/code/application_liste/app/node_modules/ast-types/lib/node-path.js new file mode 100644 index 0000000..72f8e88 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/lib/node-path.js @@ -0,0 +1,413 @@ +"use strict";; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var types_1 = __importDefault(require("./types")); +var path_1 = __importDefault(require("./path")); +var scope_1 = __importDefault(require("./scope")); +function nodePathPlugin(fork) { + var types = fork.use(types_1.default); + var n = types.namedTypes; + var b = types.builders; + var isNumber = types.builtInTypes.number; + var isArray = types.builtInTypes.array; + var Path = fork.use(path_1.default); + var Scope = fork.use(scope_1.default); + var NodePath = function NodePath(value, parentPath, name) { + if (!(this instanceof NodePath)) { + throw new Error("NodePath constructor cannot be invoked without 'new'"); + } + Path.call(this, value, parentPath, name); + }; + var NPp = NodePath.prototype = Object.create(Path.prototype, { + constructor: { + value: NodePath, + enumerable: false, + writable: true, + configurable: true + } + }); + Object.defineProperties(NPp, { + node: { + get: function () { + Object.defineProperty(this, "node", { + configurable: true, + value: this._computeNode() + }); + return this.node; + } + }, + parent: { + get: function () { + Object.defineProperty(this, "parent", { + configurable: true, + value: this._computeParent() + }); + return this.parent; + } + }, + scope: { + get: function () { + Object.defineProperty(this, "scope", { + configurable: true, + value: this._computeScope() + }); + return this.scope; + } + } + }); + NPp.replace = function () { + delete this.node; + delete this.parent; + delete this.scope; + return Path.prototype.replace.apply(this, arguments); + }; + NPp.prune = function () { + var remainingNodePath = this.parent; + this.replace(); + return cleanUpNodesAfterPrune(remainingNodePath); + }; + // The value of the first ancestor Path whose value is a Node. + NPp._computeNode = function () { + var value = this.value; + if (n.Node.check(value)) { + return value; + } + var pp = this.parentPath; + return pp && pp.node || null; + }; + // The first ancestor Path whose value is a Node distinct from this.node. + NPp._computeParent = function () { + var value = this.value; + var pp = this.parentPath; + if (!n.Node.check(value)) { + while (pp && !n.Node.check(pp.value)) { + pp = pp.parentPath; + } + if (pp) { + pp = pp.parentPath; + } + } + while (pp && !n.Node.check(pp.value)) { + pp = pp.parentPath; + } + return pp || null; + }; + // The closest enclosing scope that governs this node. + NPp._computeScope = function () { + var value = this.value; + var pp = this.parentPath; + var scope = pp && pp.scope; + if (n.Node.check(value) && + Scope.isEstablishedBy(value)) { + scope = new Scope(this, scope); + } + return scope || null; + }; + NPp.getValueProperty = function (name) { + return types.getFieldValue(this.value, name); + }; + /** + * Determine whether this.node needs to be wrapped in parentheses in order + * for a parser to reproduce the same local AST structure. + * + * For instance, in the expression `(1 + 2) * 3`, the BinaryExpression + * whose operator is "+" needs parentheses, because `1 + 2 * 3` would + * parse differently. + * + * If assumeExpressionContext === true, we don't worry about edge cases + * like an anonymous FunctionExpression appearing lexically first in its + * enclosing statement and thus needing parentheses to avoid being parsed + * as a FunctionDeclaration with a missing name. + */ + NPp.needsParens = function (assumeExpressionContext) { + var pp = this.parentPath; + if (!pp) { + return false; + } + var node = this.value; + // Only expressions need parentheses. + if (!n.Expression.check(node)) { + return false; + } + // Identifiers never need parentheses. + if (node.type === "Identifier") { + return false; + } + while (!n.Node.check(pp.value)) { + pp = pp.parentPath; + if (!pp) { + return false; + } + } + var parent = pp.value; + switch (node.type) { + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + return parent.type === "MemberExpression" + && this.name === "object" + && parent.object === node; + case "BinaryExpression": + case "LogicalExpression": + switch (parent.type) { + case "CallExpression": + return this.name === "callee" + && parent.callee === node; + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + return true; + case "MemberExpression": + return this.name === "object" + && parent.object === node; + case "BinaryExpression": + case "LogicalExpression": { + var n_1 = node; + var po = parent.operator; + var pp_1 = PRECEDENCE[po]; + var no = n_1.operator; + var np = PRECEDENCE[no]; + if (pp_1 > np) { + return true; + } + if (pp_1 === np && this.name === "right") { + if (parent.right !== n_1) { + throw new Error("Nodes must be equal"); + } + return true; + } + } + default: + return false; + } + case "SequenceExpression": + switch (parent.type) { + case "ForStatement": + // Although parentheses wouldn't hurt around sequence + // expressions in the head of for loops, traditional style + // dictates that e.g. i++, j++ should not be wrapped with + // parentheses. + return false; + case "ExpressionStatement": + return this.name !== "expression"; + default: + // Otherwise err on the side of overparenthesization, adding + // explicit exceptions above if this proves overzealous. + return true; + } + case "YieldExpression": + switch (parent.type) { + case "BinaryExpression": + case "LogicalExpression": + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + case "CallExpression": + case "MemberExpression": + case "NewExpression": + case "ConditionalExpression": + case "YieldExpression": + return true; + default: + return false; + } + case "Literal": + return parent.type === "MemberExpression" + && isNumber.check(node.value) + && this.name === "object" + && parent.object === node; + case "AssignmentExpression": + case "ConditionalExpression": + switch (parent.type) { + case "UnaryExpression": + case "SpreadElement": + case "SpreadProperty": + case "BinaryExpression": + case "LogicalExpression": + return true; + case "CallExpression": + return this.name === "callee" + && parent.callee === node; + case "ConditionalExpression": + return this.name === "test" + && parent.test === node; + case "MemberExpression": + return this.name === "object" + && parent.object === node; + default: + return false; + } + default: + if (parent.type === "NewExpression" && + this.name === "callee" && + parent.callee === node) { + return containsCallExpression(node); + } + } + if (assumeExpressionContext !== true && + !this.canBeFirstInStatement() && + this.firstInStatement()) + return true; + return false; + }; + function isBinary(node) { + return n.BinaryExpression.check(node) + || n.LogicalExpression.check(node); + } + // @ts-ignore 'isUnaryLike' is declared but its value is never read. [6133] + function isUnaryLike(node) { + return n.UnaryExpression.check(node) + // I considered making SpreadElement and SpreadProperty subtypes + // of UnaryExpression, but they're not really Expression nodes. + || (n.SpreadElement && n.SpreadElement.check(node)) + || (n.SpreadProperty && n.SpreadProperty.check(node)); + } + var PRECEDENCE = {}; + [["||"], + ["&&"], + ["|"], + ["^"], + ["&"], + ["==", "===", "!=", "!=="], + ["<", ">", "<=", ">=", "in", "instanceof"], + [">>", "<<", ">>>"], + ["+", "-"], + ["*", "/", "%"] + ].forEach(function (tier, i) { + tier.forEach(function (op) { + PRECEDENCE[op] = i; + }); + }); + function containsCallExpression(node) { + if (n.CallExpression.check(node)) { + return true; + } + if (isArray.check(node)) { + return node.some(containsCallExpression); + } + if (n.Node.check(node)) { + return types.someField(node, function (_name, child) { + return containsCallExpression(child); + }); + } + return false; + } + NPp.canBeFirstInStatement = function () { + var node = this.node; + return !n.FunctionExpression.check(node) + && !n.ObjectExpression.check(node); + }; + NPp.firstInStatement = function () { + return firstInStatement(this); + }; + function firstInStatement(path) { + for (var node, parent; path.parent; path = path.parent) { + node = path.node; + parent = path.parent.node; + if (n.BlockStatement.check(parent) && + path.parent.name === "body" && + path.name === 0) { + if (parent.body[0] !== node) { + throw new Error("Nodes must be equal"); + } + return true; + } + if (n.ExpressionStatement.check(parent) && + path.name === "expression") { + if (parent.expression !== node) { + throw new Error("Nodes must be equal"); + } + return true; + } + if (n.SequenceExpression.check(parent) && + path.parent.name === "expressions" && + path.name === 0) { + if (parent.expressions[0] !== node) { + throw new Error("Nodes must be equal"); + } + continue; + } + if (n.CallExpression.check(parent) && + path.name === "callee") { + if (parent.callee !== node) { + throw new Error("Nodes must be equal"); + } + continue; + } + if (n.MemberExpression.check(parent) && + path.name === "object") { + if (parent.object !== node) { + throw new Error("Nodes must be equal"); + } + continue; + } + if (n.ConditionalExpression.check(parent) && + path.name === "test") { + if (parent.test !== node) { + throw new Error("Nodes must be equal"); + } + continue; + } + if (isBinary(parent) && + path.name === "left") { + if (parent.left !== node) { + throw new Error("Nodes must be equal"); + } + continue; + } + if (n.UnaryExpression.check(parent) && + !parent.prefix && + path.name === "argument") { + if (parent.argument !== node) { + throw new Error("Nodes must be equal"); + } + continue; + } + return false; + } + return true; + } + /** + * Pruning certain nodes will result in empty or incomplete nodes, here we clean those nodes up. + */ + function cleanUpNodesAfterPrune(remainingNodePath) { + if (n.VariableDeclaration.check(remainingNodePath.node)) { + var declarations = remainingNodePath.get('declarations').value; + if (!declarations || declarations.length === 0) { + return remainingNodePath.prune(); + } + } + else if (n.ExpressionStatement.check(remainingNodePath.node)) { + if (!remainingNodePath.get('expression').value) { + return remainingNodePath.prune(); + } + } + else if (n.IfStatement.check(remainingNodePath.node)) { + cleanUpIfStatementAfterPrune(remainingNodePath); + } + return remainingNodePath; + } + function cleanUpIfStatementAfterPrune(ifStatement) { + var testExpression = ifStatement.get('test').value; + var alternate = ifStatement.get('alternate').value; + var consequent = ifStatement.get('consequent').value; + if (!consequent && !alternate) { + var testExpressionStatement = b.expressionStatement(testExpression); + ifStatement.replace(testExpressionStatement); + } + else if (!consequent && alternate) { + var negatedTestExpression = b.unaryExpression('!', testExpression, true); + if (n.UnaryExpression.check(testExpression) && testExpression.operator === '!') { + negatedTestExpression = testExpression.argument; + } + ifStatement.get("test").replace(negatedTestExpression); + ifStatement.get("consequent").replace(alternate); + ifStatement.get("alternate").replace(); + } + } + return NodePath; +} +exports.default = nodePathPlugin; +module.exports = exports["default"]; diff --git a/code/application_liste/app/node_modules/ast-types/lib/path-visitor.d.ts b/code/application_liste/app/node_modules/ast-types/lib/path-visitor.d.ts new file mode 100644 index 0000000..b03e68f --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/lib/path-visitor.d.ts @@ -0,0 +1,52 @@ +import { Fork, Omit } from "../types"; +import { ASTNode } from "./types"; +import { NodePath } from "./node-path"; +export interface PathVisitor { + _reusableContextStack: any; + _methodNameTable: any; + _shouldVisitComments: any; + Context: any; + _visiting: any; + _changeReported: any; + _abortRequested: boolean; + visit(...args: any[]): any; + reset(...args: any[]): any; + visitWithoutReset(path: any): any; + AbortRequest: any; + abort(): void; + visitor: any; + acquireContext(path: any): any; + releaseContext(context: any): void; + reportChanged(): void; + wasChangeReported(): any; +} +export interface PathVisitorStatics { + fromMethodsObject(methods?: any): Visitor; + visit(node: ASTNode, methods?: import("../gen/visitor").Visitor): any; +} +export interface PathVisitorConstructor extends PathVisitorStatics { + new (): PathVisitor; +} +export interface Visitor extends PathVisitor { +} +export interface VisitorConstructor extends PathVisitorStatics { + new (): Visitor; +} +export interface VisitorMethods { + [visitorMethod: string]: (path: NodePath) => any; +} +export interface SharedContextMethods { + currentPath: any; + needToCallTraverse: boolean; + Context: any; + visitor: any; + reset(path: any, ...args: any[]): any; + invokeVisitorMethod(methodName: string): any; + traverse(path: any, newVisitor?: VisitorMethods): any; + visit(path: any, newVisitor?: VisitorMethods): any; + reportChanged(): void; + abort(): void; +} +export interface Context extends Omit, SharedContextMethods { +} +export default function pathVisitorPlugin(fork: Fork): PathVisitorConstructor; diff --git a/code/application_liste/app/node_modules/ast-types/lib/path-visitor.js b/code/application_liste/app/node_modules/ast-types/lib/path-visitor.js new file mode 100644 index 0000000..2f1c881 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/lib/path-visitor.js @@ -0,0 +1,345 @@ +"use strict";; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var types_1 = __importDefault(require("./types")); +var node_path_1 = __importDefault(require("./node-path")); +var hasOwn = Object.prototype.hasOwnProperty; +function pathVisitorPlugin(fork) { + var types = fork.use(types_1.default); + var NodePath = fork.use(node_path_1.default); + var isArray = types.builtInTypes.array; + var isObject = types.builtInTypes.object; + var isFunction = types.builtInTypes.function; + var undefined; + var PathVisitor = function PathVisitor() { + if (!(this instanceof PathVisitor)) { + throw new Error("PathVisitor constructor cannot be invoked without 'new'"); + } + // Permanent state. + this._reusableContextStack = []; + this._methodNameTable = computeMethodNameTable(this); + this._shouldVisitComments = + hasOwn.call(this._methodNameTable, "Block") || + hasOwn.call(this._methodNameTable, "Line"); + this.Context = makeContextConstructor(this); + // State reset every time PathVisitor.prototype.visit is called. + this._visiting = false; + this._changeReported = false; + }; + function computeMethodNameTable(visitor) { + var typeNames = Object.create(null); + for (var methodName in visitor) { + if (/^visit[A-Z]/.test(methodName)) { + typeNames[methodName.slice("visit".length)] = true; + } + } + var supertypeTable = types.computeSupertypeLookupTable(typeNames); + var methodNameTable = Object.create(null); + var typeNameKeys = Object.keys(supertypeTable); + var typeNameCount = typeNameKeys.length; + for (var i = 0; i < typeNameCount; ++i) { + var typeName = typeNameKeys[i]; + methodName = "visit" + supertypeTable[typeName]; + if (isFunction.check(visitor[methodName])) { + methodNameTable[typeName] = methodName; + } + } + return methodNameTable; + } + PathVisitor.fromMethodsObject = function fromMethodsObject(methods) { + if (methods instanceof PathVisitor) { + return methods; + } + if (!isObject.check(methods)) { + // An empty visitor? + return new PathVisitor; + } + var Visitor = function Visitor() { + if (!(this instanceof Visitor)) { + throw new Error("Visitor constructor cannot be invoked without 'new'"); + } + PathVisitor.call(this); + }; + var Vp = Visitor.prototype = Object.create(PVp); + Vp.constructor = Visitor; + extend(Vp, methods); + extend(Visitor, PathVisitor); + isFunction.assert(Visitor.fromMethodsObject); + isFunction.assert(Visitor.visit); + return new Visitor; + }; + function extend(target, source) { + for (var property in source) { + if (hasOwn.call(source, property)) { + target[property] = source[property]; + } + } + return target; + } + PathVisitor.visit = function visit(node, methods) { + return PathVisitor.fromMethodsObject(methods).visit(node); + }; + var PVp = PathVisitor.prototype; + PVp.visit = function () { + if (this._visiting) { + throw new Error("Recursively calling visitor.visit(path) resets visitor state. " + + "Try this.visit(path) or this.traverse(path) instead."); + } + // Private state that needs to be reset before every traversal. + this._visiting = true; + this._changeReported = false; + this._abortRequested = false; + var argc = arguments.length; + var args = new Array(argc); + for (var i = 0; i < argc; ++i) { + args[i] = arguments[i]; + } + if (!(args[0] instanceof NodePath)) { + args[0] = new NodePath({ root: args[0] }).get("root"); + } + // Called with the same arguments as .visit. + this.reset.apply(this, args); + var didNotThrow; + try { + var root = this.visitWithoutReset(args[0]); + didNotThrow = true; + } + finally { + this._visiting = false; + if (!didNotThrow && this._abortRequested) { + // If this.visitWithoutReset threw an exception and + // this._abortRequested was set to true, return the root of + // the AST instead of letting the exception propagate, so that + // client code does not have to provide a try-catch block to + // intercept the AbortRequest exception. Other kinds of + // exceptions will propagate without being intercepted and + // rethrown by a catch block, so their stacks will accurately + // reflect the original throwing context. + return args[0].value; + } + } + return root; + }; + PVp.AbortRequest = function AbortRequest() { }; + PVp.abort = function () { + var visitor = this; + visitor._abortRequested = true; + var request = new visitor.AbortRequest(); + // If you decide to catch this exception and stop it from propagating, + // make sure to call its cancel method to avoid silencing other + // exceptions that might be thrown later in the traversal. + request.cancel = function () { + visitor._abortRequested = false; + }; + throw request; + }; + PVp.reset = function (_path /*, additional arguments */) { + // Empty stub; may be reassigned or overridden by subclasses. + }; + PVp.visitWithoutReset = function (path) { + if (this instanceof this.Context) { + // Since this.Context.prototype === this, there's a chance we + // might accidentally call context.visitWithoutReset. If that + // happens, re-invoke the method against context.visitor. + return this.visitor.visitWithoutReset(path); + } + if (!(path instanceof NodePath)) { + throw new Error(""); + } + var value = path.value; + var methodName = value && + typeof value === "object" && + typeof value.type === "string" && + this._methodNameTable[value.type]; + if (methodName) { + var context = this.acquireContext(path); + try { + return context.invokeVisitorMethod(methodName); + } + finally { + this.releaseContext(context); + } + } + else { + // If there was no visitor method to call, visit the children of + // this node generically. + return visitChildren(path, this); + } + }; + function visitChildren(path, visitor) { + if (!(path instanceof NodePath)) { + throw new Error(""); + } + if (!(visitor instanceof PathVisitor)) { + throw new Error(""); + } + var value = path.value; + if (isArray.check(value)) { + path.each(visitor.visitWithoutReset, visitor); + } + else if (!isObject.check(value)) { + // No children to visit. + } + else { + var childNames = types.getFieldNames(value); + // The .comments field of the Node type is hidden, so we only + // visit it if the visitor defines visitBlock or visitLine, and + // value.comments is defined. + if (visitor._shouldVisitComments && + value.comments && + childNames.indexOf("comments") < 0) { + childNames.push("comments"); + } + var childCount = childNames.length; + var childPaths = []; + for (var i = 0; i < childCount; ++i) { + var childName = childNames[i]; + if (!hasOwn.call(value, childName)) { + value[childName] = types.getFieldValue(value, childName); + } + childPaths.push(path.get(childName)); + } + for (var i = 0; i < childCount; ++i) { + visitor.visitWithoutReset(childPaths[i]); + } + } + return path.value; + } + PVp.acquireContext = function (path) { + if (this._reusableContextStack.length === 0) { + return new this.Context(path); + } + return this._reusableContextStack.pop().reset(path); + }; + PVp.releaseContext = function (context) { + if (!(context instanceof this.Context)) { + throw new Error(""); + } + this._reusableContextStack.push(context); + context.currentPath = null; + }; + PVp.reportChanged = function () { + this._changeReported = true; + }; + PVp.wasChangeReported = function () { + return this._changeReported; + }; + function makeContextConstructor(visitor) { + function Context(path) { + if (!(this instanceof Context)) { + throw new Error(""); + } + if (!(this instanceof PathVisitor)) { + throw new Error(""); + } + if (!(path instanceof NodePath)) { + throw new Error(""); + } + Object.defineProperty(this, "visitor", { + value: visitor, + writable: false, + enumerable: true, + configurable: false + }); + this.currentPath = path; + this.needToCallTraverse = true; + Object.seal(this); + } + if (!(visitor instanceof PathVisitor)) { + throw new Error(""); + } + // Note that the visitor object is the prototype of Context.prototype, + // so all visitor methods are inherited by context objects. + var Cp = Context.prototype = Object.create(visitor); + Cp.constructor = Context; + extend(Cp, sharedContextProtoMethods); + return Context; + } + // Every PathVisitor has a different this.Context constructor and + // this.Context.prototype object, but those prototypes can all use the + // same reset, invokeVisitorMethod, and traverse function objects. + var sharedContextProtoMethods = Object.create(null); + sharedContextProtoMethods.reset = + function reset(path) { + if (!(this instanceof this.Context)) { + throw new Error(""); + } + if (!(path instanceof NodePath)) { + throw new Error(""); + } + this.currentPath = path; + this.needToCallTraverse = true; + return this; + }; + sharedContextProtoMethods.invokeVisitorMethod = + function invokeVisitorMethod(methodName) { + if (!(this instanceof this.Context)) { + throw new Error(""); + } + if (!(this.currentPath instanceof NodePath)) { + throw new Error(""); + } + var result = this.visitor[methodName].call(this, this.currentPath); + if (result === false) { + // Visitor methods return false to indicate that they have handled + // their own traversal needs, and we should not complain if + // this.needToCallTraverse is still true. + this.needToCallTraverse = false; + } + else if (result !== undefined) { + // Any other non-undefined value returned from the visitor method + // is interpreted as a replacement value. + this.currentPath = this.currentPath.replace(result)[0]; + if (this.needToCallTraverse) { + // If this.traverse still hasn't been called, visit the + // children of the replacement node. + this.traverse(this.currentPath); + } + } + if (this.needToCallTraverse !== false) { + throw new Error("Must either call this.traverse or return false in " + methodName); + } + var path = this.currentPath; + return path && path.value; + }; + sharedContextProtoMethods.traverse = + function traverse(path, newVisitor) { + if (!(this instanceof this.Context)) { + throw new Error(""); + } + if (!(path instanceof NodePath)) { + throw new Error(""); + } + if (!(this.currentPath instanceof NodePath)) { + throw new Error(""); + } + this.needToCallTraverse = false; + return visitChildren(path, PathVisitor.fromMethodsObject(newVisitor || this.visitor)); + }; + sharedContextProtoMethods.visit = + function visit(path, newVisitor) { + if (!(this instanceof this.Context)) { + throw new Error(""); + } + if (!(path instanceof NodePath)) { + throw new Error(""); + } + if (!(this.currentPath instanceof NodePath)) { + throw new Error(""); + } + this.needToCallTraverse = false; + return PathVisitor.fromMethodsObject(newVisitor || this.visitor).visitWithoutReset(path); + }; + sharedContextProtoMethods.reportChanged = function reportChanged() { + this.visitor.reportChanged(); + }; + sharedContextProtoMethods.abort = function abort() { + this.needToCallTraverse = false; + this.visitor.abort(); + }; + return PathVisitor; +} +exports.default = pathVisitorPlugin; +module.exports = exports["default"]; diff --git a/code/application_liste/app/node_modules/ast-types/lib/path.d.ts b/code/application_liste/app/node_modules/ast-types/lib/path.d.ts new file mode 100644 index 0000000..feef1f1 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/lib/path.d.ts @@ -0,0 +1,25 @@ +import { Fork } from "../types"; +import { ASTNode } from "./types"; +export interface Path { + value: V; + parentPath: any; + name: any; + __childCache: object | null; + getValueProperty(name: any): any; + get(...names: any[]): any; + each(callback: any, context: any): any; + map(callback: any, context: any): any; + filter(callback: any, context: any): any; + shift(): any; + unshift(...args: any[]): any; + push(...args: any[]): any; + pop(): any; + insertAt(index: number, ...args: any[]): any; + insertBefore(...args: any[]): any; + insertAfter(...args: any[]): any; + replace(replacement?: ASTNode, ...args: ASTNode[]): any; +} +export interface PathConstructor { + new (value: any, parentPath?: any, name?: any): Path; +} +export default function pathPlugin(fork: Fork): PathConstructor; diff --git a/code/application_liste/app/node_modules/ast-types/lib/path.js b/code/application_liste/app/node_modules/ast-types/lib/path.js new file mode 100644 index 0000000..22fa052 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/lib/path.js @@ -0,0 +1,333 @@ +"use strict";; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var types_1 = __importDefault(require("./types")); +var Op = Object.prototype; +var hasOwn = Op.hasOwnProperty; +function pathPlugin(fork) { + var types = fork.use(types_1.default); + var isArray = types.builtInTypes.array; + var isNumber = types.builtInTypes.number; + var Path = function Path(value, parentPath, name) { + if (!(this instanceof Path)) { + throw new Error("Path constructor cannot be invoked without 'new'"); + } + if (parentPath) { + if (!(parentPath instanceof Path)) { + throw new Error(""); + } + } + else { + parentPath = null; + name = null; + } + // The value encapsulated by this Path, generally equal to + // parentPath.value[name] if we have a parentPath. + this.value = value; + // The immediate parent Path of this Path. + this.parentPath = parentPath; + // The name of the property of parentPath.value through which this + // Path's value was reached. + this.name = name; + // Calling path.get("child") multiple times always returns the same + // child Path object, for both performance and consistency reasons. + this.__childCache = null; + }; + var Pp = Path.prototype; + function getChildCache(path) { + // Lazily create the child cache. This also cheapens cache + // invalidation, since you can just reset path.__childCache to null. + return path.__childCache || (path.__childCache = Object.create(null)); + } + function getChildPath(path, name) { + var cache = getChildCache(path); + var actualChildValue = path.getValueProperty(name); + var childPath = cache[name]; + if (!hasOwn.call(cache, name) || + // Ensure consistency between cache and reality. + childPath.value !== actualChildValue) { + childPath = cache[name] = new path.constructor(actualChildValue, path, name); + } + return childPath; + } + // This method is designed to be overridden by subclasses that need to + // handle missing properties, etc. + Pp.getValueProperty = function getValueProperty(name) { + return this.value[name]; + }; + Pp.get = function get() { + var names = []; + for (var _i = 0; _i < arguments.length; _i++) { + names[_i] = arguments[_i]; + } + var path = this; + var count = names.length; + for (var i = 0; i < count; ++i) { + path = getChildPath(path, names[i]); + } + return path; + }; + Pp.each = function each(callback, context) { + var childPaths = []; + var len = this.value.length; + var i = 0; + // Collect all the original child paths before invoking the callback. + for (var i = 0; i < len; ++i) { + if (hasOwn.call(this.value, i)) { + childPaths[i] = this.get(i); + } + } + // Invoke the callback on just the original child paths, regardless of + // any modifications made to the array by the callback. I chose these + // semantics over cleverly invoking the callback on new elements because + // this way is much easier to reason about. + context = context || this; + for (i = 0; i < len; ++i) { + if (hasOwn.call(childPaths, i)) { + callback.call(context, childPaths[i]); + } + } + }; + Pp.map = function map(callback, context) { + var result = []; + this.each(function (childPath) { + result.push(callback.call(this, childPath)); + }, context); + return result; + }; + Pp.filter = function filter(callback, context) { + var result = []; + this.each(function (childPath) { + if (callback.call(this, childPath)) { + result.push(childPath); + } + }, context); + return result; + }; + function emptyMoves() { } + function getMoves(path, offset, start, end) { + isArray.assert(path.value); + if (offset === 0) { + return emptyMoves; + } + var length = path.value.length; + if (length < 1) { + return emptyMoves; + } + var argc = arguments.length; + if (argc === 2) { + start = 0; + end = length; + } + else if (argc === 3) { + start = Math.max(start, 0); + end = length; + } + else { + start = Math.max(start, 0); + end = Math.min(end, length); + } + isNumber.assert(start); + isNumber.assert(end); + var moves = Object.create(null); + var cache = getChildCache(path); + for (var i = start; i < end; ++i) { + if (hasOwn.call(path.value, i)) { + var childPath = path.get(i); + if (childPath.name !== i) { + throw new Error(""); + } + var newIndex = i + offset; + childPath.name = newIndex; + moves[newIndex] = childPath; + delete cache[i]; + } + } + delete cache.length; + return function () { + for (var newIndex in moves) { + var childPath = moves[newIndex]; + if (childPath.name !== +newIndex) { + throw new Error(""); + } + cache[newIndex] = childPath; + path.value[newIndex] = childPath.value; + } + }; + } + Pp.shift = function shift() { + var move = getMoves(this, -1); + var result = this.value.shift(); + move(); + return result; + }; + Pp.unshift = function unshift() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var move = getMoves(this, args.length); + var result = this.value.unshift.apply(this.value, args); + move(); + return result; + }; + Pp.push = function push() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + isArray.assert(this.value); + delete getChildCache(this).length; + return this.value.push.apply(this.value, args); + }; + Pp.pop = function pop() { + isArray.assert(this.value); + var cache = getChildCache(this); + delete cache[this.value.length - 1]; + delete cache.length; + return this.value.pop(); + }; + Pp.insertAt = function insertAt(index) { + var argc = arguments.length; + var move = getMoves(this, argc - 1, index); + if (move === emptyMoves && argc <= 1) { + return this; + } + index = Math.max(index, 0); + for (var i = 1; i < argc; ++i) { + this.value[index + i - 1] = arguments[i]; + } + move(); + return this; + }; + Pp.insertBefore = function insertBefore() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var pp = this.parentPath; + var argc = args.length; + var insertAtArgs = [this.name]; + for (var i = 0; i < argc; ++i) { + insertAtArgs.push(args[i]); + } + return pp.insertAt.apply(pp, insertAtArgs); + }; + Pp.insertAfter = function insertAfter() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var pp = this.parentPath; + var argc = args.length; + var insertAtArgs = [this.name + 1]; + for (var i = 0; i < argc; ++i) { + insertAtArgs.push(args[i]); + } + return pp.insertAt.apply(pp, insertAtArgs); + }; + function repairRelationshipWithParent(path) { + if (!(path instanceof Path)) { + throw new Error(""); + } + var pp = path.parentPath; + if (!pp) { + // Orphan paths have no relationship to repair. + return path; + } + var parentValue = pp.value; + var parentCache = getChildCache(pp); + // Make sure parentCache[path.name] is populated. + if (parentValue[path.name] === path.value) { + parentCache[path.name] = path; + } + else if (isArray.check(parentValue)) { + // Something caused path.name to become out of date, so attempt to + // recover by searching for path.value in parentValue. + var i = parentValue.indexOf(path.value); + if (i >= 0) { + parentCache[path.name = i] = path; + } + } + else { + // If path.value disagrees with parentValue[path.name], and + // path.name is not an array index, let path.value become the new + // parentValue[path.name] and update parentCache accordingly. + parentValue[path.name] = path.value; + parentCache[path.name] = path; + } + if (parentValue[path.name] !== path.value) { + throw new Error(""); + } + if (path.parentPath.get(path.name) !== path) { + throw new Error(""); + } + return path; + } + Pp.replace = function replace(replacement) { + var results = []; + var parentValue = this.parentPath.value; + var parentCache = getChildCache(this.parentPath); + var count = arguments.length; + repairRelationshipWithParent(this); + if (isArray.check(parentValue)) { + var originalLength = parentValue.length; + var move = getMoves(this.parentPath, count - 1, this.name + 1); + var spliceArgs = [this.name, 1]; + for (var i = 0; i < count; ++i) { + spliceArgs.push(arguments[i]); + } + var splicedOut = parentValue.splice.apply(parentValue, spliceArgs); + if (splicedOut[0] !== this.value) { + throw new Error(""); + } + if (parentValue.length !== (originalLength - 1 + count)) { + throw new Error(""); + } + move(); + if (count === 0) { + delete this.value; + delete parentCache[this.name]; + this.__childCache = null; + } + else { + if (parentValue[this.name] !== replacement) { + throw new Error(""); + } + if (this.value !== replacement) { + this.value = replacement; + this.__childCache = null; + } + for (i = 0; i < count; ++i) { + results.push(this.parentPath.get(this.name + i)); + } + if (results[0] !== this) { + throw new Error(""); + } + } + } + else if (count === 1) { + if (this.value !== replacement) { + this.__childCache = null; + } + this.value = parentValue[this.name] = replacement; + results.push(this); + } + else if (count === 0) { + delete parentValue[this.name]; + delete this.value; + this.__childCache = null; + // Leave this path cached as parentCache[this.name], even though + // it no longer has a value defined. + } + else { + throw new Error("Could not replace path"); + } + return results; + }; + return Path; +} +exports.default = pathPlugin; +module.exports = exports["default"]; diff --git a/code/application_liste/app/node_modules/ast-types/lib/scope.d.ts b/code/application_liste/app/node_modules/ast-types/lib/scope.d.ts new file mode 100644 index 0000000..c4687d1 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/lib/scope.d.ts @@ -0,0 +1,26 @@ +import { Fork } from "../types"; +export interface Scope { + path: any; + node: any; + isGlobal: boolean; + depth: number; + parent: any; + bindings: any; + types: any; + didScan: boolean; + declares(name: any): any; + declaresType(name: any): any; + declareTemporary(prefix?: any): any; + injectTemporary(identifier: any, init: any): any; + scan(force?: any): any; + getBindings(): any; + getTypes(): any; + lookup(name: any): any; + lookupType(name: any): any; + getGlobalScope(): Scope; +} +export interface ScopeConstructor { + new (path: any, parentScope: any): Scope; + isEstablishedBy(node: any): any; +} +export default function scopePlugin(fork: Fork): ScopeConstructor; diff --git a/code/application_liste/app/node_modules/ast-types/lib/scope.js b/code/application_liste/app/node_modules/ast-types/lib/scope.js new file mode 100644 index 0000000..a80fe4c --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/lib/scope.js @@ -0,0 +1,317 @@ +"use strict";; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var types_1 = __importDefault(require("./types")); +var hasOwn = Object.prototype.hasOwnProperty; +function scopePlugin(fork) { + var types = fork.use(types_1.default); + var Type = types.Type; + var namedTypes = types.namedTypes; + var Node = namedTypes.Node; + var Expression = namedTypes.Expression; + var isArray = types.builtInTypes.array; + var b = types.builders; + var Scope = function Scope(path, parentScope) { + if (!(this instanceof Scope)) { + throw new Error("Scope constructor cannot be invoked without 'new'"); + } + ScopeType.assert(path.value); + var depth; + if (parentScope) { + if (!(parentScope instanceof Scope)) { + throw new Error(""); + } + depth = parentScope.depth + 1; + } + else { + parentScope = null; + depth = 0; + } + Object.defineProperties(this, { + path: { value: path }, + node: { value: path.value }, + isGlobal: { value: !parentScope, enumerable: true }, + depth: { value: depth }, + parent: { value: parentScope }, + bindings: { value: {} }, + types: { value: {} }, + }); + }; + var scopeTypes = [ + // Program nodes introduce global scopes. + namedTypes.Program, + // Function is the supertype of FunctionExpression, + // FunctionDeclaration, ArrowExpression, etc. + namedTypes.Function, + // In case you didn't know, the caught parameter shadows any variable + // of the same name in an outer scope. + namedTypes.CatchClause + ]; + var ScopeType = Type.or.apply(Type, scopeTypes); + Scope.isEstablishedBy = function (node) { + return ScopeType.check(node); + }; + var Sp = Scope.prototype; + // Will be overridden after an instance lazily calls scanScope. + Sp.didScan = false; + Sp.declares = function (name) { + this.scan(); + return hasOwn.call(this.bindings, name); + }; + Sp.declaresType = function (name) { + this.scan(); + return hasOwn.call(this.types, name); + }; + Sp.declareTemporary = function (prefix) { + if (prefix) { + if (!/^[a-z$_]/i.test(prefix)) { + throw new Error(""); + } + } + else { + prefix = "t$"; + } + // Include this.depth in the name to make sure the name does not + // collide with any variables in nested/enclosing scopes. + prefix += this.depth.toString(36) + "$"; + this.scan(); + var index = 0; + while (this.declares(prefix + index)) { + ++index; + } + var name = prefix + index; + return this.bindings[name] = types.builders.identifier(name); + }; + Sp.injectTemporary = function (identifier, init) { + identifier || (identifier = this.declareTemporary()); + var bodyPath = this.path.get("body"); + if (namedTypes.BlockStatement.check(bodyPath.value)) { + bodyPath = bodyPath.get("body"); + } + bodyPath.unshift(b.variableDeclaration("var", [b.variableDeclarator(identifier, init || null)])); + return identifier; + }; + Sp.scan = function (force) { + if (force || !this.didScan) { + for (var name in this.bindings) { + // Empty out this.bindings, just in cases. + delete this.bindings[name]; + } + scanScope(this.path, this.bindings, this.types); + this.didScan = true; + } + }; + Sp.getBindings = function () { + this.scan(); + return this.bindings; + }; + Sp.getTypes = function () { + this.scan(); + return this.types; + }; + function scanScope(path, bindings, scopeTypes) { + var node = path.value; + ScopeType.assert(node); + if (namedTypes.CatchClause.check(node)) { + // A catch clause establishes a new scope but the only variable + // bound in that scope is the catch parameter. Any other + // declarations create bindings in the outer scope. + addPattern(path.get("param"), bindings); + } + else { + recursiveScanScope(path, bindings, scopeTypes); + } + } + function recursiveScanScope(path, bindings, scopeTypes) { + var node = path.value; + if (path.parent && + namedTypes.FunctionExpression.check(path.parent.node) && + path.parent.node.id) { + addPattern(path.parent.get("id"), bindings); + } + if (!node) { + // None of the remaining cases matter if node is falsy. + } + else if (isArray.check(node)) { + path.each(function (childPath) { + recursiveScanChild(childPath, bindings, scopeTypes); + }); + } + else if (namedTypes.Function.check(node)) { + path.get("params").each(function (paramPath) { + addPattern(paramPath, bindings); + }); + recursiveScanChild(path.get("body"), bindings, scopeTypes); + } + else if ((namedTypes.TypeAlias && namedTypes.TypeAlias.check(node)) || + (namedTypes.InterfaceDeclaration && namedTypes.InterfaceDeclaration.check(node)) || + (namedTypes.TSTypeAliasDeclaration && namedTypes.TSTypeAliasDeclaration.check(node)) || + (namedTypes.TSInterfaceDeclaration && namedTypes.TSInterfaceDeclaration.check(node))) { + addTypePattern(path.get("id"), scopeTypes); + } + else if (namedTypes.VariableDeclarator.check(node)) { + addPattern(path.get("id"), bindings); + recursiveScanChild(path.get("init"), bindings, scopeTypes); + } + else if (node.type === "ImportSpecifier" || + node.type === "ImportNamespaceSpecifier" || + node.type === "ImportDefaultSpecifier") { + addPattern( + // Esprima used to use the .name field to refer to the local + // binding identifier for ImportSpecifier nodes, but .id for + // ImportNamespaceSpecifier and ImportDefaultSpecifier nodes. + // ESTree/Acorn/ESpree use .local for all three node types. + path.get(node.local ? "local" : + node.name ? "name" : "id"), bindings); + } + else if (Node.check(node) && !Expression.check(node)) { + types.eachField(node, function (name, child) { + var childPath = path.get(name); + if (!pathHasValue(childPath, child)) { + throw new Error(""); + } + recursiveScanChild(childPath, bindings, scopeTypes); + }); + } + } + function pathHasValue(path, value) { + if (path.value === value) { + return true; + } + // Empty arrays are probably produced by defaults.emptyArray, in which + // case is makes sense to regard them as equivalent, if not ===. + if (Array.isArray(path.value) && + path.value.length === 0 && + Array.isArray(value) && + value.length === 0) { + return true; + } + return false; + } + function recursiveScanChild(path, bindings, scopeTypes) { + var node = path.value; + if (!node || Expression.check(node)) { + // Ignore falsy values and Expressions. + } + else if (namedTypes.FunctionDeclaration.check(node) && + node.id !== null) { + addPattern(path.get("id"), bindings); + } + else if (namedTypes.ClassDeclaration && + namedTypes.ClassDeclaration.check(node)) { + addPattern(path.get("id"), bindings); + } + else if (ScopeType.check(node)) { + if (namedTypes.CatchClause.check(node) && + // TODO Broaden this to accept any pattern. + namedTypes.Identifier.check(node.param)) { + var catchParamName = node.param.name; + var hadBinding = hasOwn.call(bindings, catchParamName); + // Any declarations that occur inside the catch body that do + // not have the same name as the catch parameter should count + // as bindings in the outer scope. + recursiveScanScope(path.get("body"), bindings, scopeTypes); + // If a new binding matching the catch parameter name was + // created while scanning the catch body, ignore it because it + // actually refers to the catch parameter and not the outer + // scope that we're currently scanning. + if (!hadBinding) { + delete bindings[catchParamName]; + } + } + } + else { + recursiveScanScope(path, bindings, scopeTypes); + } + } + function addPattern(patternPath, bindings) { + var pattern = patternPath.value; + namedTypes.Pattern.assert(pattern); + if (namedTypes.Identifier.check(pattern)) { + if (hasOwn.call(bindings, pattern.name)) { + bindings[pattern.name].push(patternPath); + } + else { + bindings[pattern.name] = [patternPath]; + } + } + else if (namedTypes.AssignmentPattern && + namedTypes.AssignmentPattern.check(pattern)) { + addPattern(patternPath.get('left'), bindings); + } + else if (namedTypes.ObjectPattern && + namedTypes.ObjectPattern.check(pattern)) { + patternPath.get('properties').each(function (propertyPath) { + var property = propertyPath.value; + if (namedTypes.Pattern.check(property)) { + addPattern(propertyPath, bindings); + } + else if (namedTypes.Property.check(property)) { + addPattern(propertyPath.get('value'), bindings); + } + else if (namedTypes.SpreadProperty && + namedTypes.SpreadProperty.check(property)) { + addPattern(propertyPath.get('argument'), bindings); + } + }); + } + else if (namedTypes.ArrayPattern && + namedTypes.ArrayPattern.check(pattern)) { + patternPath.get('elements').each(function (elementPath) { + var element = elementPath.value; + if (namedTypes.Pattern.check(element)) { + addPattern(elementPath, bindings); + } + else if (namedTypes.SpreadElement && + namedTypes.SpreadElement.check(element)) { + addPattern(elementPath.get("argument"), bindings); + } + }); + } + else if (namedTypes.PropertyPattern && + namedTypes.PropertyPattern.check(pattern)) { + addPattern(patternPath.get('pattern'), bindings); + } + else if ((namedTypes.SpreadElementPattern && + namedTypes.SpreadElementPattern.check(pattern)) || + (namedTypes.SpreadPropertyPattern && + namedTypes.SpreadPropertyPattern.check(pattern))) { + addPattern(patternPath.get('argument'), bindings); + } + } + function addTypePattern(patternPath, types) { + var pattern = patternPath.value; + namedTypes.Pattern.assert(pattern); + if (namedTypes.Identifier.check(pattern)) { + if (hasOwn.call(types, pattern.name)) { + types[pattern.name].push(patternPath); + } + else { + types[pattern.name] = [patternPath]; + } + } + } + Sp.lookup = function (name) { + for (var scope = this; scope; scope = scope.parent) + if (scope.declares(name)) + break; + return scope; + }; + Sp.lookupType = function (name) { + for (var scope = this; scope; scope = scope.parent) + if (scope.declaresType(name)) + break; + return scope; + }; + Sp.getGlobalScope = function () { + var scope = this; + while (!scope.isGlobal) + scope = scope.parent; + return scope; + }; + return Scope; +} +exports.default = scopePlugin; +module.exports = exports["default"]; diff --git a/code/application_liste/app/node_modules/ast-types/lib/shared.d.ts b/code/application_liste/app/node_modules/ast-types/lib/shared.d.ts new file mode 100644 index 0000000..4a3044b --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/lib/shared.d.ts @@ -0,0 +1,13 @@ +import { Fork } from "../types"; +export default function (fork: Fork): { + geq: (than: any) => import("./types").Type<{}>; + defaults: { + "null": () => null; + "emptyArray": () => never[]; + "false": () => boolean; + "true": () => boolean; + "undefined": () => void; + "use strict": () => string; + }; + isPrimitive: import("./types").Type<{}>; +}; diff --git a/code/application_liste/app/node_modules/ast-types/lib/shared.js b/code/application_liste/app/node_modules/ast-types/lib/shared.js new file mode 100644 index 0000000..b29985c --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/lib/shared.js @@ -0,0 +1,49 @@ +"use strict";; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var types_1 = __importDefault(require("./types")); +function default_1(fork) { + var types = fork.use(types_1.default); + var Type = types.Type; + var builtin = types.builtInTypes; + var isNumber = builtin.number; + // An example of constructing a new type with arbitrary constraints from + // an existing type. + function geq(than) { + return Type.from(function (value) { return isNumber.check(value) && value >= than; }, isNumber + " >= " + than); + } + ; + // Default value-returning functions that may optionally be passed as a + // third argument to Def.prototype.field. + var defaults = { + // Functions were used because (among other reasons) that's the most + // elegant way to allow for the emptyArray one always to give a new + // array instance. + "null": function () { return null; }, + "emptyArray": function () { return []; }, + "false": function () { return false; }, + "true": function () { return true; }, + "undefined": function () { }, + "use strict": function () { return "use strict"; } + }; + var naiveIsPrimitive = Type.or(builtin.string, builtin.number, builtin.boolean, builtin.null, builtin.undefined); + var isPrimitive = Type.from(function (value) { + if (value === null) + return true; + var type = typeof value; + if (type === "object" || + type === "function") { + return false; + } + return true; + }, naiveIsPrimitive.toString()); + return { + geq: geq, + defaults: defaults, + isPrimitive: isPrimitive, + }; +} +exports.default = default_1; +module.exports = exports["default"]; diff --git a/code/application_liste/app/node_modules/ast-types/lib/types.d.ts b/code/application_liste/app/node_modules/ast-types/lib/types.d.ts new file mode 100644 index 0000000..b0dd533 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/lib/types.d.ts @@ -0,0 +1,136 @@ +import { Fork } from "../types"; +declare type Deep = boolean | ((type: Type, value: any) => void); +export declare type Type = ArrayType | IdentityType | ObjectType | OrType | PredicateType; +export interface AnyType { + toString(): string; + check(value: any, deep?: Deep): boolean; + assert(value: any, deep?: Deep): boolean; + arrayOf(): AnyType; +} +declare abstract class BaseType { + abstract toString(): string; + abstract check(value: any, deep?: Deep): value is T; + assert(value: any, deep?: Deep): value is T; + arrayOf(): Type; +} +declare class ArrayType extends BaseType { + readonly elemType: Type; + readonly kind: "ArrayType"; + constructor(elemType: Type); + toString(): string; + check(value: any, deep?: Deep): value is T; +} +declare class IdentityType extends BaseType { + readonly value: T; + readonly kind: "IdentityType"; + constructor(value: T); + toString(): string; + check(value: any, deep?: Deep): value is T; +} +declare class ObjectType extends BaseType { + readonly fields: Field[]; + readonly kind: "ObjectType"; + constructor(fields: Field[]); + toString(): string; + check(value: any, deep?: Deep): value is T; +} +declare class OrType extends BaseType { + readonly types: Type[]; + readonly kind: "OrType"; + constructor(types: Type[]); + toString(): string; + check(value: any, deep?: Deep): value is T; +} +declare class PredicateType extends BaseType { + readonly name: string; + readonly predicate: (value: any, deep?: Deep) => boolean; + readonly kind: "PredicateType"; + constructor(name: string, predicate: (value: any, deep?: Deep) => boolean); + toString(): string; + check(value: any, deep?: Deep): value is T; +} +export declare abstract class Def { + readonly type: Type; + readonly typeName: string; + baseNames: string[]; + ownFields: { + [name: string]: Field; + }; + allSupertypes: { + [name: string]: Def; + }; + supertypeList: string[]; + allFields: { + [name: string]: Field; + }; + fieldNames: string[]; + finalized: boolean; + buildable: boolean; + buildParams: string[]; + constructor(type: Type, typeName: string); + isSupertypeOf(that: Def): boolean; + checkAllFields(value: any, deep?: any): boolean; + abstract check(value: any, deep?: any): boolean; + bases(...supertypeNames: string[]): this; + abstract build(...buildParams: string[]): this; + abstract field(name: string, type: any, defaultFn?: Function, hidden?: boolean): this; + abstract finalize(): void; +} +declare class Field { + readonly name: string; + readonly type: Type; + readonly defaultFn?: Function | undefined; + readonly hidden: boolean; + constructor(name: string, type: Type, defaultFn?: Function | undefined, hidden?: boolean); + toString(): string; + getValue(obj: { + [key: string]: any; + }): any; +} +declare type FieldType = Field; +export { FieldType as Field }; +export interface ASTNode { + type: string; +} +export interface Builder { + (...args: any[]): ASTNode; + from(obj: { + [param: string]: any; + }): ASTNode; +} +export default function typesPlugin(_fork: Fork): { + Type: { + or(...types: any[]): Type; + from(value: any, name?: string | undefined): Type; + def(typeName: string): Def; + hasDef(typeName: string): boolean; + }; + builtInTypes: { + string: Type; + function: Type; + array: Type; + object: Type<{ + [key: string]: any; + }>; + RegExp: Type; + Date: Type; + number: Type; + boolean: Type; + null: Type; + undefined: Type; + }; + getSupertypeNames: (typeName: string) => string[]; + computeSupertypeLookupTable: (candidates: any) => { + [typeName: string]: any; + }; + builders: import("../gen/builders").builders; + defineMethod: (name: any, func?: Function | undefined) => Function; + getBuilderName: (typeName: any) => any; + getStatementBuilderName: (typeName: any) => any; + namedTypes: import("../gen/namedTypes").NamedTypes; + getFieldNames: (object: any) => string[]; + getFieldValue: (object: any, fieldName: any) => any; + eachField: (object: any, callback: (name: any, value: any) => any, context?: any) => void; + someField: (object: any, callback: (name: any, value: any) => any, context?: any) => boolean; + finalize: () => void; +}; diff --git a/code/application_liste/app/node_modules/ast-types/lib/types.js b/code/application_liste/app/node_modules/ast-types/lib/types.js new file mode 100644 index 0000000..5e4703a --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/lib/types.js @@ -0,0 +1,781 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Op = Object.prototype; +var objToStr = Op.toString; +var hasOwn = Op.hasOwnProperty; +var BaseType = /** @class */ (function () { + function BaseType() { + } + BaseType.prototype.assert = function (value, deep) { + if (!this.check(value, deep)) { + var str = shallowStringify(value); + throw new Error(str + " does not match type " + this); + } + return true; + }; + BaseType.prototype.arrayOf = function () { + var elemType = this; + return new ArrayType(elemType); + }; + return BaseType; +}()); +var ArrayType = /** @class */ (function (_super) { + __extends(ArrayType, _super); + function ArrayType(elemType) { + var _this = _super.call(this) || this; + _this.elemType = elemType; + _this.kind = "ArrayType"; + return _this; + } + ArrayType.prototype.toString = function () { + return "[" + this.elemType + "]"; + }; + ArrayType.prototype.check = function (value, deep) { + var _this = this; + return Array.isArray(value) && value.every(function (elem) { return _this.elemType.check(elem, deep); }); + }; + return ArrayType; +}(BaseType)); +var IdentityType = /** @class */ (function (_super) { + __extends(IdentityType, _super); + function IdentityType(value) { + var _this = _super.call(this) || this; + _this.value = value; + _this.kind = "IdentityType"; + return _this; + } + IdentityType.prototype.toString = function () { + return String(this.value); + }; + IdentityType.prototype.check = function (value, deep) { + var result = value === this.value; + if (!result && typeof deep === "function") { + deep(this, value); + } + return result; + }; + return IdentityType; +}(BaseType)); +var ObjectType = /** @class */ (function (_super) { + __extends(ObjectType, _super); + function ObjectType(fields) { + var _this = _super.call(this) || this; + _this.fields = fields; + _this.kind = "ObjectType"; + return _this; + } + ObjectType.prototype.toString = function () { + return "{ " + this.fields.join(", ") + " }"; + }; + ObjectType.prototype.check = function (value, deep) { + return (objToStr.call(value) === objToStr.call({}) && + this.fields.every(function (field) { + return field.type.check(value[field.name], deep); + })); + }; + return ObjectType; +}(BaseType)); +var OrType = /** @class */ (function (_super) { + __extends(OrType, _super); + function OrType(types) { + var _this = _super.call(this) || this; + _this.types = types; + _this.kind = "OrType"; + return _this; + } + OrType.prototype.toString = function () { + return this.types.join(" | "); + }; + OrType.prototype.check = function (value, deep) { + return this.types.some(function (type) { + return type.check(value, deep); + }); + }; + return OrType; +}(BaseType)); +var PredicateType = /** @class */ (function (_super) { + __extends(PredicateType, _super); + function PredicateType(name, predicate) { + var _this = _super.call(this) || this; + _this.name = name; + _this.predicate = predicate; + _this.kind = "PredicateType"; + return _this; + } + PredicateType.prototype.toString = function () { + return this.name; + }; + PredicateType.prototype.check = function (value, deep) { + var result = this.predicate(value, deep); + if (!result && typeof deep === "function") { + deep(this, value); + } + return result; + }; + return PredicateType; +}(BaseType)); +var Def = /** @class */ (function () { + function Def(type, typeName) { + this.type = type; + this.typeName = typeName; + this.baseNames = []; + this.ownFields = Object.create(null); + // Includes own typeName. Populated during finalization. + this.allSupertypes = Object.create(null); + // Linear inheritance hierarchy. Populated during finalization. + this.supertypeList = []; + // Includes inherited fields. + this.allFields = Object.create(null); + // Non-hidden keys of allFields. + this.fieldNames = []; + // This property will be overridden as true by individual Def instances + // when they are finalized. + this.finalized = false; + // False by default until .build(...) is called on an instance. + this.buildable = false; + this.buildParams = []; + } + Def.prototype.isSupertypeOf = function (that) { + if (that instanceof Def) { + if (this.finalized !== true || + that.finalized !== true) { + throw new Error(""); + } + return hasOwn.call(that.allSupertypes, this.typeName); + } + else { + throw new Error(that + " is not a Def"); + } + }; + Def.prototype.checkAllFields = function (value, deep) { + var allFields = this.allFields; + if (this.finalized !== true) { + throw new Error("" + this.typeName); + } + function checkFieldByName(name) { + var field = allFields[name]; + var type = field.type; + var child = field.getValue(value); + return type.check(child, deep); + } + return value !== null && + typeof value === "object" && + Object.keys(allFields).every(checkFieldByName); + }; + Def.prototype.bases = function () { + var supertypeNames = []; + for (var _i = 0; _i < arguments.length; _i++) { + supertypeNames[_i] = arguments[_i]; + } + var bases = this.baseNames; + if (this.finalized) { + if (supertypeNames.length !== bases.length) { + throw new Error(""); + } + for (var i = 0; i < supertypeNames.length; i++) { + if (supertypeNames[i] !== bases[i]) { + throw new Error(""); + } + } + return this; + } + supertypeNames.forEach(function (baseName) { + // This indexOf lookup may be O(n), but the typical number of base + // names is very small, and indexOf is a native Array method. + if (bases.indexOf(baseName) < 0) { + bases.push(baseName); + } + }); + return this; // For chaining. + }; + return Def; +}()); +exports.Def = Def; +var Field = /** @class */ (function () { + function Field(name, type, defaultFn, hidden) { + this.name = name; + this.type = type; + this.defaultFn = defaultFn; + this.hidden = !!hidden; + } + Field.prototype.toString = function () { + return JSON.stringify(this.name) + ": " + this.type; + }; + Field.prototype.getValue = function (obj) { + var value = obj[this.name]; + if (typeof value !== "undefined") { + return value; + } + if (typeof this.defaultFn === "function") { + value = this.defaultFn.call(obj); + } + return value; + }; + return Field; +}()); +function shallowStringify(value) { + if (Array.isArray(value)) { + return "[" + value.map(shallowStringify).join(", ") + "]"; + } + if (value && typeof value === "object") { + return "{ " + Object.keys(value).map(function (key) { + return key + ": " + value[key]; + }).join(", ") + " }"; + } + return JSON.stringify(value); +} +function typesPlugin(_fork) { + var Type = { + or: function () { + var types = []; + for (var _i = 0; _i < arguments.length; _i++) { + types[_i] = arguments[_i]; + } + return new OrType(types.map(function (type) { return Type.from(type); })); + }, + from: function (value, name) { + if (value instanceof ArrayType || + value instanceof IdentityType || + value instanceof ObjectType || + value instanceof OrType || + value instanceof PredicateType) { + return value; + } + // The Def type is used as a helper for constructing compound + // interface types for AST nodes. + if (value instanceof Def) { + return value.type; + } + // Support [ElemType] syntax. + if (isArray.check(value)) { + if (value.length !== 1) { + throw new Error("only one element type is permitted for typed arrays"); + } + return new ArrayType(Type.from(value[0])); + } + // Support { someField: FieldType, ... } syntax. + if (isObject.check(value)) { + return new ObjectType(Object.keys(value).map(function (name) { + return new Field(name, Type.from(value[name], name)); + })); + } + if (typeof value === "function") { + var bicfIndex = builtInCtorFns.indexOf(value); + if (bicfIndex >= 0) { + return builtInCtorTypes[bicfIndex]; + } + if (typeof name !== "string") { + throw new Error("missing name"); + } + return new PredicateType(name, value); + } + // As a last resort, toType returns a type that matches any value that + // is === from. This is primarily useful for literal values like + // toType(null), but it has the additional advantage of allowing + // toType to be a total function. + return new IdentityType(value); + }, + // Define a type whose name is registered in a namespace (the defCache) so + // that future definitions will return the same type given the same name. + // In particular, this system allows for circular and forward definitions. + // The Def object d returned from Type.def may be used to configure the + // type d.type by calling methods such as d.bases, d.build, and d.field. + def: function (typeName) { + return hasOwn.call(defCache, typeName) + ? defCache[typeName] + : defCache[typeName] = new DefImpl(typeName); + }, + hasDef: function (typeName) { + return hasOwn.call(defCache, typeName); + } + }; + var builtInCtorFns = []; + var builtInCtorTypes = []; + var builtInTypes = {}; + function defBuiltInType(example, name) { + var objStr = objToStr.call(example); + var type = new PredicateType(name, function (value) { return objToStr.call(value) === objStr; }); + builtInTypes[name] = type; + if (example && typeof example.constructor === "function") { + builtInCtorFns.push(example.constructor); + builtInCtorTypes.push(type); + } + return type; + } + // These types check the underlying [[Class]] attribute of the given + // value, rather than using the problematic typeof operator. Note however + // that no subtyping is considered; so, for instance, isObject.check + // returns false for [], /./, new Date, and null. + var isString = defBuiltInType("truthy", "string"); + var isFunction = defBuiltInType(function () { }, "function"); + var isArray = defBuiltInType([], "array"); + var isObject = defBuiltInType({}, "object"); + var isRegExp = defBuiltInType(/./, "RegExp"); + var isDate = defBuiltInType(new Date, "Date"); + var isNumber = defBuiltInType(3, "number"); + var isBoolean = defBuiltInType(true, "boolean"); + var isNull = defBuiltInType(null, "null"); + var isUndefined = defBuiltInType(void 0, "undefined"); + // In order to return the same Def instance every time Type.def is called + // with a particular name, those instances need to be stored in a cache. + var defCache = Object.create(null); + function defFromValue(value) { + if (value && typeof value === "object") { + var type = value.type; + if (typeof type === "string" && + hasOwn.call(defCache, type)) { + var d = defCache[type]; + if (d.finalized) { + return d; + } + } + } + return null; + } + var DefImpl = /** @class */ (function (_super) { + __extends(DefImpl, _super); + function DefImpl(typeName) { + var _this = _super.call(this, new PredicateType(typeName, function (value, deep) { return _this.check(value, deep); }), typeName) || this; + return _this; + } + DefImpl.prototype.check = function (value, deep) { + if (this.finalized !== true) { + throw new Error("prematurely checking unfinalized type " + this.typeName); + } + // A Def type can only match an object value. + if (value === null || typeof value !== "object") { + return false; + } + var vDef = defFromValue(value); + if (!vDef) { + // If we couldn't infer the Def associated with the given value, + // and we expected it to be a SourceLocation or a Position, it was + // probably just missing a "type" field (because Esprima does not + // assign a type property to such nodes). Be optimistic and let + // this.checkAllFields make the final decision. + if (this.typeName === "SourceLocation" || + this.typeName === "Position") { + return this.checkAllFields(value, deep); + } + // Calling this.checkAllFields for any other type of node is both + // bad for performance and way too forgiving. + return false; + } + // If checking deeply and vDef === this, then we only need to call + // checkAllFields once. Calling checkAllFields is too strict when deep + // is false, because then we only care about this.isSupertypeOf(vDef). + if (deep && vDef === this) { + return this.checkAllFields(value, deep); + } + // In most cases we rely exclusively on isSupertypeOf to make O(1) + // subtyping determinations. This suffices in most situations outside + // of unit tests, since interface conformance is checked whenever new + // instances are created using builder functions. + if (!this.isSupertypeOf(vDef)) { + return false; + } + // The exception is when deep is true; then, we recursively check all + // fields. + if (!deep) { + return true; + } + // Use the more specific Def (vDef) to perform the deep check, but + // shallow-check fields defined by the less specific Def (this). + return vDef.checkAllFields(value, deep) + && this.checkAllFields(value, false); + }; + DefImpl.prototype.build = function () { + var _this = this; + var buildParams = []; + for (var _i = 0; _i < arguments.length; _i++) { + buildParams[_i] = arguments[_i]; + } + // Calling Def.prototype.build multiple times has the effect of merely + // redefining this property. + this.buildParams = buildParams; + if (this.buildable) { + // If this Def is already buildable, update self.buildParams and + // continue using the old builder function. + return this; + } + // Every buildable type will have its "type" field filled in + // automatically. This includes types that are not subtypes of Node, + // like SourceLocation, but that seems harmless (TODO?). + this.field("type", String, function () { return _this.typeName; }); + // Override Dp.buildable for this Def instance. + this.buildable = true; + var addParam = function (built, param, arg, isArgAvailable) { + if (hasOwn.call(built, param)) + return; + var all = _this.allFields; + if (!hasOwn.call(all, param)) { + throw new Error("" + param); + } + var field = all[param]; + var type = field.type; + var value; + if (isArgAvailable) { + value = arg; + } + else if (field.defaultFn) { + // Expose the partially-built object to the default + // function as its `this` object. + value = field.defaultFn.call(built); + } + else { + var message = "no value or default function given for field " + + JSON.stringify(param) + " of " + _this.typeName + "(" + + _this.buildParams.map(function (name) { + return all[name]; + }).join(", ") + ")"; + throw new Error(message); + } + if (!type.check(value)) { + throw new Error(shallowStringify(value) + + " does not match field " + field + + " of type " + _this.typeName); + } + built[param] = value; + }; + // Calling the builder function will construct an instance of the Def, + // with positional arguments mapped to the fields original passed to .build. + // If not enough arguments are provided, the default value for the remaining fields + // will be used. + var builder = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var argc = args.length; + if (!_this.finalized) { + throw new Error("attempting to instantiate unfinalized type " + + _this.typeName); + } + var built = Object.create(nodePrototype); + _this.buildParams.forEach(function (param, i) { + if (i < argc) { + addParam(built, param, args[i], true); + } + else { + addParam(built, param, null, false); + } + }); + Object.keys(_this.allFields).forEach(function (param) { + // Use the default value. + addParam(built, param, null, false); + }); + // Make sure that the "type" field was filled automatically. + if (built.type !== _this.typeName) { + throw new Error(""); + } + return built; + }; + // Calling .from on the builder function will construct an instance of the Def, + // using field values from the passed object. For fields missing from the passed object, + // their default value will be used. + builder.from = function (obj) { + if (!_this.finalized) { + throw new Error("attempting to instantiate unfinalized type " + + _this.typeName); + } + var built = Object.create(nodePrototype); + Object.keys(_this.allFields).forEach(function (param) { + if (hasOwn.call(obj, param)) { + addParam(built, param, obj[param], true); + } + else { + addParam(built, param, null, false); + } + }); + // Make sure that the "type" field was filled automatically. + if (built.type !== _this.typeName) { + throw new Error(""); + } + return built; + }; + Object.defineProperty(builders, getBuilderName(this.typeName), { + enumerable: true, + value: builder + }); + return this; + }; + // The reason fields are specified using .field(...) instead of an object + // literal syntax is somewhat subtle: the object literal syntax would + // support only one key and one value, but with .field(...) we can pass + // any number of arguments to specify the field. + DefImpl.prototype.field = function (name, type, defaultFn, hidden) { + if (this.finalized) { + console.error("Ignoring attempt to redefine field " + + JSON.stringify(name) + " of finalized type " + + JSON.stringify(this.typeName)); + return this; + } + this.ownFields[name] = new Field(name, Type.from(type), defaultFn, hidden); + return this; // For chaining. + }; + DefImpl.prototype.finalize = function () { + var _this = this; + // It's not an error to finalize a type more than once, but only the + // first call to .finalize does anything. + if (!this.finalized) { + var allFields = this.allFields; + var allSupertypes = this.allSupertypes; + this.baseNames.forEach(function (name) { + var def = defCache[name]; + if (def instanceof Def) { + def.finalize(); + extend(allFields, def.allFields); + extend(allSupertypes, def.allSupertypes); + } + else { + var message = "unknown supertype name " + + JSON.stringify(name) + + " for subtype " + + JSON.stringify(_this.typeName); + throw new Error(message); + } + }); + // TODO Warn if fields are overridden with incompatible types. + extend(allFields, this.ownFields); + allSupertypes[this.typeName] = this; + this.fieldNames.length = 0; + for (var fieldName in allFields) { + if (hasOwn.call(allFields, fieldName) && + !allFields[fieldName].hidden) { + this.fieldNames.push(fieldName); + } + } + // Types are exported only once they have been finalized. + Object.defineProperty(namedTypes, this.typeName, { + enumerable: true, + value: this.type + }); + this.finalized = true; + // A linearization of the inheritance hierarchy. + populateSupertypeList(this.typeName, this.supertypeList); + if (this.buildable && + this.supertypeList.lastIndexOf("Expression") >= 0) { + wrapExpressionBuilderWithStatement(this.typeName); + } + } + }; + return DefImpl; + }(Def)); + // Note that the list returned by this function is a copy of the internal + // supertypeList, *without* the typeName itself as the first element. + function getSupertypeNames(typeName) { + if (!hasOwn.call(defCache, typeName)) { + throw new Error(""); + } + var d = defCache[typeName]; + if (d.finalized !== true) { + throw new Error(""); + } + return d.supertypeList.slice(1); + } + // Returns an object mapping from every known type in the defCache to the + // most specific supertype whose name is an own property of the candidates + // object. + function computeSupertypeLookupTable(candidates) { + var table = {}; + var typeNames = Object.keys(defCache); + var typeNameCount = typeNames.length; + for (var i = 0; i < typeNameCount; ++i) { + var typeName = typeNames[i]; + var d = defCache[typeName]; + if (d.finalized !== true) { + throw new Error("" + typeName); + } + for (var j = 0; j < d.supertypeList.length; ++j) { + var superTypeName = d.supertypeList[j]; + if (hasOwn.call(candidates, superTypeName)) { + table[typeName] = superTypeName; + break; + } + } + } + return table; + } + var builders = Object.create(null); + // This object is used as prototype for any node created by a builder. + var nodePrototype = {}; + // Call this function to define a new method to be shared by all AST + // nodes. The replaced method (if any) is returned for easy wrapping. + function defineMethod(name, func) { + var old = nodePrototype[name]; + // Pass undefined as func to delete nodePrototype[name]. + if (isUndefined.check(func)) { + delete nodePrototype[name]; + } + else { + isFunction.assert(func); + Object.defineProperty(nodePrototype, name, { + enumerable: true, + configurable: true, + value: func + }); + } + return old; + } + function getBuilderName(typeName) { + return typeName.replace(/^[A-Z]+/, function (upperCasePrefix) { + var len = upperCasePrefix.length; + switch (len) { + case 0: return ""; + // If there's only one initial capital letter, just lower-case it. + case 1: return upperCasePrefix.toLowerCase(); + default: + // If there's more than one initial capital letter, lower-case + // all but the last one, so that XMLDefaultDeclaration (for + // example) becomes xmlDefaultDeclaration. + return upperCasePrefix.slice(0, len - 1).toLowerCase() + + upperCasePrefix.charAt(len - 1); + } + }); + } + function getStatementBuilderName(typeName) { + typeName = getBuilderName(typeName); + return typeName.replace(/(Expression)?$/, "Statement"); + } + var namedTypes = {}; + // Like Object.keys, but aware of what fields each AST type should have. + function getFieldNames(object) { + var d = defFromValue(object); + if (d) { + return d.fieldNames.slice(0); + } + if ("type" in object) { + throw new Error("did not recognize object of type " + + JSON.stringify(object.type)); + } + return Object.keys(object); + } + // Get the value of an object property, taking object.type and default + // functions into account. + function getFieldValue(object, fieldName) { + var d = defFromValue(object); + if (d) { + var field = d.allFields[fieldName]; + if (field) { + return field.getValue(object); + } + } + return object && object[fieldName]; + } + // Iterate over all defined fields of an object, including those missing + // or undefined, passing each field name and effective value (as returned + // by getFieldValue) to the callback. If the object has no corresponding + // Def, the callback will never be called. + function eachField(object, callback, context) { + getFieldNames(object).forEach(function (name) { + callback.call(this, name, getFieldValue(object, name)); + }, context); + } + // Similar to eachField, except that iteration stops as soon as the + // callback returns a truthy value. Like Array.prototype.some, the final + // result is either true or false to indicates whether the callback + // returned true for any element or not. + function someField(object, callback, context) { + return getFieldNames(object).some(function (name) { + return callback.call(this, name, getFieldValue(object, name)); + }, context); + } + // Adds an additional builder for Expression subtypes + // that wraps the built Expression in an ExpressionStatements. + function wrapExpressionBuilderWithStatement(typeName) { + var wrapperName = getStatementBuilderName(typeName); + // skip if the builder already exists + if (builders[wrapperName]) + return; + // the builder function to wrap with builders.ExpressionStatement + var wrapped = builders[getBuilderName(typeName)]; + // skip if there is nothing to wrap + if (!wrapped) + return; + var builder = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return builders.expressionStatement(wrapped.apply(builders, args)); + }; + builder.from = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return builders.expressionStatement(wrapped.from.apply(builders, args)); + }; + builders[wrapperName] = builder; + } + function populateSupertypeList(typeName, list) { + list.length = 0; + list.push(typeName); + var lastSeen = Object.create(null); + for (var pos = 0; pos < list.length; ++pos) { + typeName = list[pos]; + var d = defCache[typeName]; + if (d.finalized !== true) { + throw new Error(""); + } + // If we saw typeName earlier in the breadth-first traversal, + // delete the last-seen occurrence. + if (hasOwn.call(lastSeen, typeName)) { + delete list[lastSeen[typeName]]; + } + // Record the new index of the last-seen occurrence of typeName. + lastSeen[typeName] = pos; + // Enqueue the base names of this type. + list.push.apply(list, d.baseNames); + } + // Compaction loop to remove array holes. + for (var to = 0, from = to, len = list.length; from < len; ++from) { + if (hasOwn.call(list, from)) { + list[to++] = list[from]; + } + } + list.length = to; + } + function extend(into, from) { + Object.keys(from).forEach(function (name) { + into[name] = from[name]; + }); + return into; + } + function finalize() { + Object.keys(defCache).forEach(function (name) { + defCache[name].finalize(); + }); + } + return { + Type: Type, + builtInTypes: builtInTypes, + getSupertypeNames: getSupertypeNames, + computeSupertypeLookupTable: computeSupertypeLookupTable, + builders: builders, + defineMethod: defineMethod, + getBuilderName: getBuilderName, + getStatementBuilderName: getStatementBuilderName, + namedTypes: namedTypes, + getFieldNames: getFieldNames, + getFieldValue: getFieldValue, + eachField: eachField, + someField: someField, + finalize: finalize, + }; +} +exports.default = typesPlugin; +; diff --git a/code/application_liste/app/node_modules/ast-types/main.d.ts b/code/application_liste/app/node_modules/ast-types/main.d.ts new file mode 100644 index 0000000..6b9a8d0 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/main.d.ts @@ -0,0 +1,28 @@ +import { ASTNode, Type, AnyType, Field } from "./lib/types"; +import { NodePath } from "./lib/node-path"; +import { namedTypes } from "./gen/namedTypes"; +import { builders } from "./gen/builders"; +import { Visitor } from "./gen/visitor"; +declare const astNodesAreEquivalent: { + (a: any, b: any, problemPath?: any): boolean; + assert(a: any, b: any): void; +}, builders: builders, builtInTypes: { + string: Type; + function: Type; + array: Type; + object: Type<{ + [key: string]: any; + }>; + RegExp: Type; + Date: Type; + number: Type; + boolean: Type; + null: Type; + undefined: Type; +}, defineMethod: (name: any, func?: Function | undefined) => Function, eachField: (object: any, callback: (name: any, value: any) => any, context?: any) => void, finalize: () => void, getBuilderName: (typeName: any) => any, getFieldNames: (object: any) => string[], getFieldValue: (object: any, fieldName: any) => any, getSupertypeNames: (typeName: string) => string[], NodePath: import("./lib/node-path").NodePathConstructor, Path: import("./lib/path").PathConstructor, PathVisitor: import("./lib/path-visitor").PathVisitorConstructor, someField: (object: any, callback: (name: any, value: any) => any, context?: any) => boolean, Type: { + or(...types: any[]): Type; + from(value: any, name?: string | undefined): Type; + def(typeName: string): import("./lib/types").Def; + hasDef(typeName: string): boolean; +}, use: (plugin: import("./types").Plugin) => T, visit: (node: ASTNode, methods?: Visitor | undefined) => any; +export { AnyType, ASTNode, astNodesAreEquivalent, builders, builtInTypes, defineMethod, eachField, Field, finalize, getBuilderName, getFieldNames, getFieldValue, getSupertypeNames, namedTypes, NodePath, Path, PathVisitor, someField, Type, use, visit, Visitor, }; diff --git a/code/application_liste/app/node_modules/ast-types/main.js b/code/application_liste/app/node_modules/ast-types/main.js new file mode 100644 index 0000000..d042b29 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/main.js @@ -0,0 +1,54 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var fork_1 = __importDefault(require("./fork")); +var core_1 = __importDefault(require("./def/core")); +var es6_1 = __importDefault(require("./def/es6")); +var es7_1 = __importDefault(require("./def/es7")); +var es2020_1 = __importDefault(require("./def/es2020")); +var jsx_1 = __importDefault(require("./def/jsx")); +var flow_1 = __importDefault(require("./def/flow")); +var esprima_1 = __importDefault(require("./def/esprima")); +var babel_1 = __importDefault(require("./def/babel")); +var typescript_1 = __importDefault(require("./def/typescript")); +var es_proposals_1 = __importDefault(require("./def/es-proposals")); +var namedTypes_1 = require("./gen/namedTypes"); +exports.namedTypes = namedTypes_1.namedTypes; +var _a = fork_1.default([ + // This core module of AST types captures ES5 as it is parsed today by + // git://github.com/ariya/esprima.git#master. + core_1.default, + // Feel free to add to or remove from this list of extension modules to + // configure the precise type hierarchy that you need. + es6_1.default, + es7_1.default, + es2020_1.default, + jsx_1.default, + flow_1.default, + esprima_1.default, + babel_1.default, + typescript_1.default, + es_proposals_1.default, +]), astNodesAreEquivalent = _a.astNodesAreEquivalent, builders = _a.builders, builtInTypes = _a.builtInTypes, defineMethod = _a.defineMethod, eachField = _a.eachField, finalize = _a.finalize, getBuilderName = _a.getBuilderName, getFieldNames = _a.getFieldNames, getFieldValue = _a.getFieldValue, getSupertypeNames = _a.getSupertypeNames, n = _a.namedTypes, NodePath = _a.NodePath, Path = _a.Path, PathVisitor = _a.PathVisitor, someField = _a.someField, Type = _a.Type, use = _a.use, visit = _a.visit; +exports.astNodesAreEquivalent = astNodesAreEquivalent; +exports.builders = builders; +exports.builtInTypes = builtInTypes; +exports.defineMethod = defineMethod; +exports.eachField = eachField; +exports.finalize = finalize; +exports.getBuilderName = getBuilderName; +exports.getFieldNames = getFieldNames; +exports.getFieldValue = getFieldValue; +exports.getSupertypeNames = getSupertypeNames; +exports.NodePath = NodePath; +exports.Path = Path; +exports.PathVisitor = PathVisitor; +exports.someField = someField; +exports.Type = Type; +exports.use = use; +exports.visit = visit; +// Populate the exported fields of the namedTypes namespace, while still +// retaining its member types. +Object.assign(namedTypes_1.namedTypes, n); diff --git a/code/application_liste/app/node_modules/ast-types/package.json b/code/application_liste/app/node_modules/ast-types/package.json new file mode 100644 index 0000000..da5099a --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/package.json @@ -0,0 +1,94 @@ +{ + "_from": "ast-types@0.x.x", + "_id": "ast-types@0.13.3", + "_inBundle": false, + "_integrity": "sha512-XTZ7xGML849LkQP86sWdQzfhwbt3YwIO6MqbX9mUNYY98VKaaVZP7YNNm70IpwecbkkxmfC5IYAzOQ/2p29zRA==", + "_location": "/ast-types", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "ast-types@0.x.x", + "name": "ast-types", + "escapedName": "ast-types", + "rawSpec": "0.x.x", + "saveSpec": null, + "fetchSpec": "0.x.x" + }, + "_requiredBy": [ + "/degenerator" + ], + "_resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.3.tgz", + "_shasum": "50da3f28d17bdbc7969a3a2d83a0e4a72ae755a7", + "_spec": "ast-types@0.x.x", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\degenerator", + "author": { + "name": "Ben Newman", + "email": "bn@cs.stanford.edu" + }, + "bugs": { + "url": "https://github.com/benjamn/ast-types/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "Esprima-compatible implementation of the Mozilla JS Parser API", + "devDependencies": { + "@babel/parser": "7.4.4", + "@babel/types": "7.4.4", + "@types/esprima": "4.0.2", + "@types/glob": "7.1.1", + "@types/mocha": "5.2.6", + "@types/node": "12.0.0", + "espree": "6.1.1", + "esprima": "4.0.1", + "esprima-fb": "15001.1001.0-dev-harmony-fb", + "flow-parser": "0.98.1", + "glob": "7.1.4", + "mocha": "6.1.4", + "recast": "0.18.1", + "reify": "0.20.6", + "ts-add-module-exports": "1.0.0", + "ts-emit-clean": "1.0.0", + "ts-node": "7.0.1", + "typescript": "3.4.5" + }, + "engines": { + "node": ">=4" + }, + "homepage": "http://github.com/benjamn/ast-types", + "keywords": [ + "ast", + "abstract syntax tree", + "hierarchy", + "mozilla", + "spidermonkey", + "parser api", + "esprima", + "types", + "type system", + "type checking", + "dynamic types", + "parsing", + "transformation", + "syntax" + ], + "license": "MIT", + "main": "main.js", + "name": "ast-types", + "repository": { + "type": "git", + "url": "git://github.com/benjamn/ast-types.git" + }, + "scripts": { + "build": "tsc && ts-add-module-exports", + "clean": "ts-emit-clean", + "gen": "ts-node --transpile-only script/gen-types.ts", + "mocha": "test/run.sh", + "postpack": "npm run clean", + "prepack": "npm run clean && npm run gen && npm run build", + "test": "npm run gen && npm run build && npm run mocha" + }, + "types": "main.d.ts", + "version": "0.13.3" +} diff --git a/code/application_liste/app/node_modules/ast-types/tsconfig.json b/code/application_liste/app/node_modules/ast-types/tsconfig.json new file mode 100644 index 0000000..494f4e4 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "declaration": true, + "rootDir": ".", + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noImplicitReturns": true, + "moduleResolution": "node", + "esModuleInterop": true, + "stripInternal": true, + "lib": ["es2015"] + }, + "exclude": [ + "node_modules", + "test/data" + ] +} diff --git a/code/application_liste/app/node_modules/ast-types/types.d.ts b/code/application_liste/app/node_modules/ast-types/types.d.ts new file mode 100644 index 0000000..0465896 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/types.d.ts @@ -0,0 +1,6 @@ +export declare type Fork = { + use(plugin: Plugin): T; +}; +export declare type Plugin = (fork: Fork) => T; +export declare type Def = Plugin; +export declare type Omit = Pick>; diff --git a/code/application_liste/app/node_modules/ast-types/types.js b/code/application_liste/app/node_modules/ast-types/types.js new file mode 100644 index 0000000..c8ad2e5 --- /dev/null +++ b/code/application_liste/app/node_modules/ast-types/types.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/code/application_liste/app/node_modules/async-done/LICENSE b/code/application_liste/app/node_modules/async-done/LICENSE new file mode 100644 index 0000000..9aedc0d --- /dev/null +++ b/code/application_liste/app/node_modules/async-done/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Blaine Bublitz, Eric Schoffstall and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/code/application_liste/app/node_modules/async-done/README.md b/code/application_liste/app/node_modules/async-done/README.md new file mode 100644 index 0000000..93545c2 --- /dev/null +++ b/code/application_liste/app/node_modules/async-done/README.md @@ -0,0 +1,121 @@ +

+ + + +

+ +# async-done + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Azure Pipelines Build Status][azure-pipelines-image]][azure-pipelines-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url] + +Allows libraries to handle various caller provided asynchronous functions uniformly. Maps promises, observables, child processes and streams, and callbacks to callback style. + +As async conventions evolve, it is useful to be able to deal with several different *styles* of async completion uniformly. With this module you can handle completion using a node-style callback, regardless of a return value that's a promise, observable, child process or stream. + +## Usage + +### Successful completion + +```js +var asyncDone = require('async-done'); + +asyncDone(function(done){ + // do async things + done(null, 2); +}, function(error, result){ + // `error` will be null on successful execution of the first function. + // `result` will be the result from the first function. +}); +``` + +### Failed completion + +```js +var asyncDone = require('async-done'); + +asyncDone(function(done){ + // do async things + done(new Error('Some Error Occurred')); +}, function(error, result){ + // `error` will be an error from the first function. + // `result` will be undefined on failed execution of the first function. +}); +``` + +## API + +### `asyncDone(fn, callback)` + +Takes a function to execute (`fn`) and a function to call on completion (`callback`). + +#### `fn([done])` + +Optionally takes a callback to call when async tasks are complete. + +#### Completion and Error Resolution + +* `Callback` (`done`) called + - Completion: called with null error + - Error: called with non-null error +* `Stream` or `EventEmitter` returned + - Completion: [end-of-stream][end-of-stream] module + - Error: [domains][domains] + - __Note:__ Only actual streams are supported, not faux-streams; Therefore, modules like [`event-stream`][event-stream] are not supported. +* `Child Process` returned + - Completion [end-of-stream][end-of-stream] module + - Error: [domains][domains] +* `Promise` returned + - Completion: [onFulfilled][promise-onfulfilled] method called + - Error: [onRejected][promise-onrejected] method called +* `Observable` (e.g. from [RxJS v5][rxjs5-observable] or [RxJS v4][rxjs5-observable]) returned + - Completion: [complete][rxjs5-observer-complete] method called + - Error: [error][rxjs5-observer-error] method called + +__Warning:__ Sync tasks are __not supported__ and your function will never complete if the one of the above strategies is not used to signal completion. However, thrown errors will be caught by the domain. + +#### `callback(error, result)` + +If an error doesn't occur in the execution of the `fn` function, the `callback` method will receive the results as its second argument. Note: Some streams don't received any results. + +If an error occurred in the execution of the `fn` function, The `callback` method will receive an error as its first argument. + +Errors can be caused by: + +* A thrown error +* An error passed to a `done` callback +* An `error` event emitted on a returned `Stream`, `EventEmitter` or `Child Process` +* A rejection of a returned `Promise` - If the `Promise` is not rejected with a value, we generate a new `Error` +* The `onError` handler being called on an `Observable` + +## License + +MIT + +[downloads-image]: https://img.shields.io/npm/dm/async-done.svg +[npm-url]: https://www.npmjs.com/package/async-done +[npm-image]: https://img.shields.io/npm/v/async-done.svg + +[azure-pipelines-url]: https://dev.azure.com/gulpjs/gulp/_build/latest?definitionId=6&branchName=master +[azure-pipelines-image]: https://dev.azure.com/gulpjs/gulp/_apis/build/status/async-done?branchName=master + +[travis-url]: https://travis-ci.org/gulpjs/async-done +[travis-image]: https://img.shields.io/travis/gulpjs/async-done.svg?label=travis-ci + +[appveyor-url]: https://ci.appveyor.com/project/gulpjs/async-done +[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/async-done.svg?label=appveyor + +[coveralls-url]: https://coveralls.io/r/gulpjs/async-done +[coveralls-image]: https://img.shields.io/coveralls/gulpjs/async-done/master.svg + +[gitter-url]: https://gitter.im/gulpjs/gulp +[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg + +[end-of-stream]: https://www.npmjs.com/package/end-of-stream +[domains]: http://nodejs.org/api/domain.html +[event-stream]: https://github.com/dominictarr/event-stream +[promise-onfulfilled]: http://promisesaplus.com/#point-26 +[promise-onrejected]: http://promisesaplus.com/#point-30 +[rx4-observable]: https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/observable.md +[rxjs5-observable]: http://reactivex.io/rxjs/class/es6/Observable.js~Observable.html +[rxjs5-observer-complete]: http://reactivex.io/rxjs/class/es6/MiscJSDoc.js~ObserverDoc.html#instance-method-complete +[rxjs5-observer-error]: http://reactivex.io/rxjs/class/es6/MiscJSDoc.js~ObserverDoc.html#instance-method-error diff --git a/code/application_liste/app/node_modules/async-done/index.d.ts b/code/application_liste/app/node_modules/async-done/index.d.ts new file mode 100644 index 0000000..2c4ab93 --- /dev/null +++ b/code/application_liste/app/node_modules/async-done/index.d.ts @@ -0,0 +1,101 @@ +/** + * Notes about these type definitions: + * + * - Callbacks returning multiple completion values using multiple arguments are not supported by these types. + * Prefer to use Node's style by grouping your values in a single object or array. + * Support for this kind of callback is blocked by Microsoft/TypeScript#5453 + * + * - For ease of use, `asyncDone` lets you pass callback functions with a result type `T` instead of `T | undefined`. + * This matches Node's types but can lead to unsound code being typechecked. + * + * The following code typechecks but fails at runtime: + * ```typescript + * async function getString(): Promise { + * return "Hello, World!"; + * } + * + * async function evilGetString(): Promise { + * throw new Error("Hello, World!"); + * } + * + * function cb(err: Error | null, result: string): void { + * // This is unsound because `result` is `undefined` when `err` is not `null`. + * console.log(result.toLowerCase()); + * } + * + * asyncDone(getString, cb); // Prints `hello, world!` + * asyncDone(evilGetString, cb); // Runtime error: `TypeError: Cannot read property 'toLowerCase' of undefined` + * ``` + * + * Enforcing stricter callbacks would require developers to use `result?: string` and assert the existence + * of the result either by checking it directly or using the `!` assertion operator after testing for errors. + * ```typescript + * function stricterCb1(err: Error | null, result?: string): void { + * if (err !== null) { + * console.error(err); + * return; + * } + * console.log(result!.toLowerCase()); + * } + * + * function stricterCb2(err: Error | null, result?: string): void { + * if (result === undefined) { + * console.error("Undefined result. Error:); + * console.error(err); + * return; + * } + * console.log(result.toLowerCase()); + * } + * ``` + */ +import { ChildProcess } from "child_process"; +import { EventEmitter } from "events"; +import { Stream } from "stream"; + +declare namespace asyncDone { + + /** + * Represents a callback function used to signal the completion of a + * task without any result value. + */ + type VoidCallback = (err: Error | null) => void; + + /** + * Represents a callback function used to signal the completion of a + * task with a single result value. + */ + interface Callback { + (err: null, result: T): void; + + // Use `result?: T` or `result: undefined` to require the consumer to assert the existence of the result + // (even in case of success). See comment at the top of the file. + (err: Error, result?: any): void; + } + + /** + * Minimal `Observable` interface compatible with `async-done`. + * + * @see https://github.com/ReactiveX/rxjs/blob/c3c56867eaf93f302ac7cd588034c7d8712f2834/src/internal/Observable.ts#L77 + */ + interface Observable { + subscribe(next?: (value: T) => void, error?: (error: any) => void, complete?: () => void): any; + } + + /** + * Represents an async operation. + */ + export type AsyncTask = + ((done: VoidCallback) => void) + | ((done: Callback) => void) + | (() => ChildProcess | EventEmitter | Observable | PromiseLike | Stream); +} + +/** + * Takes a function to execute (`fn`) and a function to call on completion (`callback`). + * + * @param fn Function to execute. + * @param callback Function to call on completion. + */ +declare function asyncDone(fn: asyncDone.AsyncTask, callback: asyncDone.Callback): void; + +export = asyncDone; diff --git a/code/application_liste/app/node_modules/async-done/index.js b/code/application_liste/app/node_modules/async-done/index.js new file mode 100644 index 0000000..e5be989 --- /dev/null +++ b/code/application_liste/app/node_modules/async-done/index.js @@ -0,0 +1,88 @@ +'use strict'; + +var domain = require('domain'); + +var eos = require('end-of-stream'); +var p = require('process-nextick-args'); +var once = require('once'); +var exhaust = require('stream-exhaust'); + +var eosConfig = { + error: false, +}; + +function rethrowAsync(err) { + process.nextTick(rethrow); + + function rethrow() { + throw err; + } +} + +function tryCatch(fn, args) { + try { + return fn.apply(null, args); + } catch (err) { + rethrowAsync(err); + } +} + +function asyncDone(fn, cb) { + cb = once(cb); + + var d = domain.create(); + d.once('error', onError); + var domainBoundFn = d.bind(fn); + + function done() { + d.removeListener('error', onError); + d.exit(); + return tryCatch(cb, arguments); + } + + function onSuccess(result) { + done(null, result); + } + + function onError(error) { + if (!error) { + error = new Error('Promise rejected without Error'); + } + done(error); + } + + function asyncRunner() { + var result = domainBoundFn(done); + + function onNext(state) { + onNext.state = state; + } + + function onCompleted() { + onSuccess(onNext.state); + } + + if (result && typeof result.on === 'function') { + // Assume node stream + d.add(result); + eos(exhaust(result), eosConfig, done); + return; + } + + if (result && typeof result.subscribe === 'function') { + // Assume RxJS observable + result.subscribe(onNext, onError, onCompleted); + return; + } + + if (result && typeof result.then === 'function') { + // Assume promise + result.then(onSuccess, onError); + return; + } + } + + p.nextTick(asyncRunner); +} + +module.exports = asyncDone; diff --git a/code/application_liste/app/node_modules/async-done/package.json b/code/application_liste/app/node_modules/async-done/package.json new file mode 100644 index 0000000..890d0e2 --- /dev/null +++ b/code/application_liste/app/node_modules/async-done/package.json @@ -0,0 +1,115 @@ +{ + "_from": "async-done@^1.2.0", + "_id": "async-done@1.3.2", + "_inBundle": false, + "_integrity": "sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw==", + "_location": "/async-done", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "async-done@^1.2.0", + "name": "async-done", + "escapedName": "async-done", + "rawSpec": "^1.2.0", + "saveSpec": null, + "fetchSpec": "^1.2.0" + }, + "_requiredBy": [ + "/async-settle", + "/bach", + "/glob-watcher" + ], + "_resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.2.tgz", + "_shasum": "5e15aa729962a4b07414f528a88cdf18e0b290a2", + "_spec": "async-done@^1.2.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\glob-watcher", + "author": { + "name": "Gulp Team", + "email": "team@gulpjs.com", + "url": "https://gulpjs.com/" + }, + "bugs": { + "url": "https://github.com/gulpjs/async-done/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Blaine Bublitz", + "email": "blaine.bublitz@gmail.com" + }, + { + "name": "Pawel Kozlowski", + "email": "pkozlowski.opensource@gmail.com" + }, + { + "name": "Matthew Podwysocki", + "email": "matthew.podwysocki@gmail.com" + }, + { + "name": "Charles Samborski", + "email": "demurgos@demurgos.net" + } + ], + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.2", + "process-nextick-args": "^2.0.0", + "stream-exhaust": "^1.0.1" + }, + "deprecated": false, + "description": "Allows libraries to handle various caller provided asynchronous functions uniformly. Maps promises, observables, child processes and streams, and callbacks to callback style.", + "devDependencies": { + "@types/node": "^9.3.0", + "coveralls": "github:phated/node-coveralls#2.x", + "eslint": "^2.13.1", + "eslint-config-gulp": "^3.0.1", + "expect": "^1.20.2", + "mocha": "^3.0.0", + "nyc": "^10.3.2", + "pumpify": "^1.3.6", + "rxjs": "^5.5.6", + "through2": "^2.0.0", + "typescript": "^2.6.2", + "when": "^3.7.3" + }, + "engines": { + "node": ">= 0.10" + }, + "files": [ + "index.js", + "index.d.ts", + "LICENSE" + ], + "homepage": "https://github.com/gulpjs/async-done#readme", + "keywords": [ + "promises", + "callbacks", + "observables", + "streams", + "end", + "completion", + "complete", + "finish", + "done", + "async", + "error handling" + ], + "license": "MIT", + "main": "index.js", + "name": "async-done", + "repository": { + "type": "git", + "url": "git+https://github.com/gulpjs/async-done.git" + }, + "scripts": { + "azure-pipelines": "nyc mocha --async-only --reporter xunit -O output=test.xunit", + "coveralls": "nyc report --reporter=text-lcov | coveralls", + "lint": "eslint .", + "pretest": "npm run lint", + "test": "nyc mocha --async-only", + "test-types": "tsc -p test/types" + }, + "types": "index.d.ts", + "version": "1.3.2" +} diff --git a/code/application_liste/app/node_modules/async-each/README.md b/code/application_liste/app/node_modules/async-each/README.md new file mode 100644 index 0000000..6444d95 --- /dev/null +++ b/code/application_liste/app/node_modules/async-each/README.md @@ -0,0 +1,52 @@ +# async-each + +No-bullshit, ultra-simple, 35-lines-of-code async parallel forEach function for JavaScript. + +We don't need junky 30K async libs. Really. + +For browsers and node.js. + +## Installation +* Just include async-each before your scripts. +* `npm install async-each` if you’re using node.js. + +## Usage + +* `each(array, iterator, callback);` — `Array`, `Function`, `(optional) Function` +* `iterator(item, next)` receives current item and a callback that will mark the item as done. `next` callback receives optional `error, transformedItem` arguments. +* `callback(error, transformedArray)` optionally receives first error and transformed result `Array`. + +```javascript +var each = require('async-each'); +each(['a.js', 'b.js', 'c.js'], fs.readFile, function(error, contents) { + if (error) console.error(error); + console.log('Contents for a, b and c:', contents); +}); + +// Alternatively in browser: +asyncEach(list, fn, callback); +``` + +## License + +The MIT License (MIT) + +Copyright (c) 2016 Paul Miller [(paulmillr.com)](http://paulmillr.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/async-each/index.js b/code/application_liste/app/node_modules/async-each/index.js new file mode 100644 index 0000000..277217d --- /dev/null +++ b/code/application_liste/app/node_modules/async-each/index.js @@ -0,0 +1,38 @@ +// async-each MIT license (by Paul Miller from https://paulmillr.com). +(function(globals) { + 'use strict'; + var each = function(items, next, callback) { + if (!Array.isArray(items)) throw new TypeError('each() expects array as first argument'); + if (typeof next !== 'function') throw new TypeError('each() expects function as second argument'); + if (typeof callback !== 'function') callback = Function.prototype; // no-op + + if (items.length === 0) return callback(undefined, items); + + var transformed = new Array(items.length); + var count = 0; + var returned = false; + + items.forEach(function(item, index) { + next(item, function(error, transformedItem) { + if (returned) return; + if (error) { + returned = true; + return callback(error); + } + transformed[index] = transformedItem; + count += 1; + if (count === items.length) return callback(undefined, transformed); + }); + }); + }; + + if (typeof define !== 'undefined' && define.amd) { + define([], function() { + return each; + }); // RequireJS + } else if (typeof module !== 'undefined' && module.exports) { + module.exports = each; // CommonJS + } else { + globals.asyncEach = each; // + +``` + +## Documentation + +Some functions are also available in the following forms: +* `Series` - the same as `` but runs only a single async operation at a time +* `Limit` - the same as `` but runs a maximum of `limit` async operations at a time + +### Collections + +* [`each`](#each), `eachSeries`, `eachLimit` +* [`forEachOf`](#forEachOf), `forEachOfSeries`, `forEachOfLimit` +* [`map`](#map), `mapSeries`, `mapLimit` +* [`filter`](#filter), `filterSeries`, `filterLimit` +* [`reject`](#reject), `rejectSeries`, `rejectLimit` +* [`reduce`](#reduce), [`reduceRight`](#reduceRight) +* [`detect`](#detect), `detectSeries`, `detectLimit` +* [`sortBy`](#sortBy) +* [`some`](#some), `someLimit` +* [`every`](#every), `everyLimit` +* [`concat`](#concat), `concatSeries` + +### Control Flow + +* [`series`](#seriestasks-callback) +* [`parallel`](#parallel), `parallelLimit` +* [`whilst`](#whilst), [`doWhilst`](#doWhilst) +* [`until`](#until), [`doUntil`](#doUntil) +* [`during`](#during), [`doDuring`](#doDuring) +* [`forever`](#forever) +* [`waterfall`](#waterfall) +* [`compose`](#compose) +* [`seq`](#seq) +* [`applyEach`](#applyEach), `applyEachSeries` +* [`queue`](#queue), [`priorityQueue`](#priorityQueue) +* [`cargo`](#cargo) +* [`auto`](#auto) +* [`retry`](#retry) +* [`iterator`](#iterator) +* [`times`](#times), `timesSeries`, `timesLimit` + +### Utils + +* [`apply`](#apply) +* [`nextTick`](#nextTick) +* [`memoize`](#memoize) +* [`unmemoize`](#unmemoize) +* [`ensureAsync`](#ensureAsync) +* [`constant`](#constant) +* [`asyncify`](#asyncify) +* [`wrapSync`](#wrapSync) +* [`log`](#log) +* [`dir`](#dir) +* [`noConflict`](#noConflict) + +## Collections + + + +### each(arr, iterator, [callback]) + +Applies the function `iterator` to each item in `arr`, in parallel. +The `iterator` is called with an item from the list, and a callback for when it +has finished. If the `iterator` passes an error to its `callback`, the main +`callback` (for the `each` function) is immediately called with the error. + +Note, that since this function applies `iterator` to each item in parallel, +there is no guarantee that the iterator functions will complete in order. + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A function to apply to each item in `arr`. + The iterator is passed a `callback(err)` which must be called once it has + completed. If no error has occurred, the `callback` should be run without + arguments or with an explicit `null` argument. The array index is not passed + to the iterator. If you need the index, use [`forEachOf`](#forEachOf). +* `callback(err)` - *Optional* A callback which is called when all `iterator` functions + have finished, or an error occurs. + +__Examples__ + + +```js +// assuming openFiles is an array of file names and saveFile is a function +// to save the modified contents of that file: + +async.each(openFiles, saveFile, function(err){ + // if any of the saves produced an error, err would equal that error +}); +``` + +```js +// assuming openFiles is an array of file names + +async.each(openFiles, function(file, callback) { + + // Perform operation on file here. + console.log('Processing file ' + file); + + if( file.length > 32 ) { + console.log('This file name is too long'); + callback('File name too long'); + } else { + // Do work to process file here + console.log('File processed'); + callback(); + } +}, function(err){ + // if any of the file processing produced an error, err would equal that error + if( err ) { + // One of the iterations produced an error. + // All processing will now stop. + console.log('A file failed to process'); + } else { + console.log('All files have been processed successfully'); + } +}); +``` + +__Related__ + +* eachSeries(arr, iterator, [callback]) +* eachLimit(arr, limit, iterator, [callback]) + +--------------------------------------- + + + + +### forEachOf(obj, iterator, [callback]) + +Like `each`, except that it iterates over objects, and passes the key as the second argument to the iterator. + +__Arguments__ + +* `obj` - An object or array to iterate over. +* `iterator(item, key, callback)` - A function to apply to each item in `obj`. +The `key` is the item's key, or index in the case of an array. The iterator is +passed a `callback(err)` which must be called once it has completed. If no +error has occurred, the callback should be run without arguments or with an +explicit `null` argument. +* `callback(err)` - *Optional* A callback which is called when all `iterator` functions have finished, or an error occurs. + +__Example__ + +```js +var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"}; +var configs = {}; + +async.forEachOf(obj, function (value, key, callback) { + fs.readFile(__dirname + value, "utf8", function (err, data) { + if (err) return callback(err); + try { + configs[key] = JSON.parse(data); + } catch (e) { + return callback(e); + } + callback(); + }) +}, function (err) { + if (err) console.error(err.message); + // configs is now a map of JSON data + doSomethingWith(configs); +}) +``` + +__Related__ + +* forEachOfSeries(obj, iterator, [callback]) +* forEachOfLimit(obj, limit, iterator, [callback]) + +--------------------------------------- + + +### map(arr, iterator, [callback]) + +Produces a new array of values by mapping each value in `arr` through +the `iterator` function. The `iterator` is called with an item from `arr` and a +callback for when it has finished processing. Each of these callback takes 2 arguments: +an `error`, and the transformed item from `arr`. If `iterator` passes an error to its +callback, the main `callback` (for the `map` function) is immediately called with the error. + +Note, that since this function applies the `iterator` to each item in parallel, +there is no guarantee that the `iterator` functions will complete in order. +However, the results array will be in the same order as the original `arr`. + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A function to apply to each item in `arr`. + The iterator is passed a `callback(err, transformed)` which must be called once + it has completed with an error (which can be `null`) and a transformed item. +* `callback(err, results)` - *Optional* A callback which is called when all `iterator` + functions have finished, or an error occurs. Results is an array of the + transformed items from the `arr`. + +__Example__ + +```js +async.map(['file1','file2','file3'], fs.stat, function(err, results){ + // results is now an array of stats for each file +}); +``` + +__Related__ +* mapSeries(arr, iterator, [callback]) +* mapLimit(arr, limit, iterator, [callback]) + +--------------------------------------- + + + +### filter(arr, iterator, [callback]) + +__Alias:__ `select` + +Returns a new array of all the values in `arr` which pass an async truth test. +_The callback for each `iterator` call only accepts a single argument of `true` or +`false`; it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like `fs.exists`. This operation is +performed in parallel, but the results array will be in the same order as the +original. + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A truth test to apply to each item in `arr`. + The `iterator` is passed a `callback(truthValue)`, which must be called with a + boolean argument once it has completed. +* `callback(results)` - *Optional* A callback which is called after all the `iterator` + functions have finished. + +__Example__ + +```js +async.filter(['file1','file2','file3'], fs.exists, function(results){ + // results now equals an array of the existing files +}); +``` + +__Related__ + +* filterSeries(arr, iterator, [callback]) +* filterLimit(arr, limit, iterator, [callback]) + +--------------------------------------- + + +### reject(arr, iterator, [callback]) + +The opposite of [`filter`](#filter). Removes values that pass an `async` truth test. + +__Related__ + +* rejectSeries(arr, iterator, [callback]) +* rejectLimit(arr, limit, iterator, [callback]) + +--------------------------------------- + + +### reduce(arr, memo, iterator, [callback]) + +__Aliases:__ `inject`, `foldl` + +Reduces `arr` into a single value using an async `iterator` to return +each successive step. `memo` is the initial state of the reduction. +This function only operates in series. + +For performance reasons, it may make sense to split a call to this function into +a parallel map, and then use the normal `Array.prototype.reduce` on the results. +This function is for situations where each step in the reduction needs to be async; +if you can get the data before reducing it, then it's probably a good idea to do so. + +__Arguments__ + +* `arr` - An array to iterate over. +* `memo` - The initial state of the reduction. +* `iterator(memo, item, callback)` - A function applied to each item in the + array to produce the next step in the reduction. The `iterator` is passed a + `callback(err, reduction)` which accepts an optional error as its first + argument, and the state of the reduction as the second. If an error is + passed to the callback, the reduction is stopped and the main `callback` is + immediately called with the error. +* `callback(err, result)` - *Optional* A callback which is called after all the `iterator` + functions have finished. Result is the reduced value. + +__Example__ + +```js +async.reduce([1,2,3], 0, function(memo, item, callback){ + // pointless async: + process.nextTick(function(){ + callback(null, memo + item) + }); +}, function(err, result){ + // result is now equal to the last value of memo, which is 6 +}); +``` + +--------------------------------------- + + +### reduceRight(arr, memo, iterator, [callback]) + +__Alias:__ `foldr` + +Same as [`reduce`](#reduce), only operates on `arr` in reverse order. + + +--------------------------------------- + + +### detect(arr, iterator, [callback]) + +Returns the first value in `arr` that passes an async truth test. The +`iterator` is applied in parallel, meaning the first iterator to return `true` will +fire the detect `callback` with that result. That means the result might not be +the first item in the original `arr` (in terms of order) that passes the test. + +If order within the original `arr` is important, then look at [`detectSeries`](#detectSeries). + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A truth test to apply to each item in `arr`. + The iterator is passed a `callback(truthValue)` which must be called with a + boolean argument once it has completed. **Note: this callback does not take an error as its first argument.** +* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns + `true`, or after all the `iterator` functions have finished. Result will be + the first item in the array that passes the truth test (iterator) or the + value `undefined` if none passed. **Note: this callback does not take an error as its first argument.** + +__Example__ + +```js +async.detect(['file1','file2','file3'], fs.exists, function(result){ + // result now equals the first file in the list that exists +}); +``` + +__Related__ + +* detectSeries(arr, iterator, [callback]) +* detectLimit(arr, limit, iterator, [callback]) + +--------------------------------------- + + +### sortBy(arr, iterator, [callback]) + +Sorts a list by the results of running each `arr` value through an async `iterator`. + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A function to apply to each item in `arr`. + The iterator is passed a `callback(err, sortValue)` which must be called once it + has completed with an error (which can be `null`) and a value to use as the sort + criteria. +* `callback(err, results)` - *Optional* A callback which is called after all the `iterator` + functions have finished, or an error occurs. Results is the items from + the original `arr` sorted by the values returned by the `iterator` calls. + +__Example__ + +```js +async.sortBy(['file1','file2','file3'], function(file, callback){ + fs.stat(file, function(err, stats){ + callback(err, stats.mtime); + }); +}, function(err, results){ + // results is now the original array of files sorted by + // modified date +}); +``` + +__Sort Order__ + +By modifying the callback parameter the sorting order can be influenced: + +```js +//ascending order +async.sortBy([1,9,3,5], function(x, callback){ + callback(null, x); +}, function(err,result){ + //result callback +} ); + +//descending order +async.sortBy([1,9,3,5], function(x, callback){ + callback(null, x*-1); //<- x*-1 instead of x, turns the order around +}, function(err,result){ + //result callback +} ); +``` + +--------------------------------------- + + +### some(arr, iterator, [callback]) + +__Alias:__ `any` + +Returns `true` if at least one element in the `arr` satisfies an async test. +_The callback for each iterator call only accepts a single argument of `true` or +`false`; it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like `fs.exists`. Once any iterator +call returns `true`, the main `callback` is immediately called. + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A truth test to apply to each item in the array + in parallel. The iterator is passed a `callback(truthValue)`` which must be + called with a boolean argument once it has completed. +* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns + `true`, or after all the iterator functions have finished. Result will be + either `true` or `false` depending on the values of the async tests. + + **Note: the callbacks do not take an error as their first argument.** +__Example__ + +```js +async.some(['file1','file2','file3'], fs.exists, function(result){ + // if result is true then at least one of the files exists +}); +``` + +__Related__ + +* someLimit(arr, limit, iterator, callback) + +--------------------------------------- + + +### every(arr, iterator, [callback]) + +__Alias:__ `all` + +Returns `true` if every element in `arr` satisfies an async test. +_The callback for each `iterator` call only accepts a single argument of `true` or +`false`; it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like `fs.exists`. + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A truth test to apply to each item in the array + in parallel. The iterator is passed a `callback(truthValue)` which must be + called with a boolean argument once it has completed. +* `callback(result)` - *Optional* A callback which is called as soon as any iterator returns + `false`, or after all the iterator functions have finished. Result will be + either `true` or `false` depending on the values of the async tests. + + **Note: the callbacks do not take an error as their first argument.** + +__Example__ + +```js +async.every(['file1','file2','file3'], fs.exists, function(result){ + // if result is true then every file exists +}); +``` + +__Related__ + +* everyLimit(arr, limit, iterator, callback) + +--------------------------------------- + + +### concat(arr, iterator, [callback]) + +Applies `iterator` to each item in `arr`, concatenating the results. Returns the +concatenated list. The `iterator`s are called in parallel, and the results are +concatenated as they return. There is no guarantee that the results array will +be returned in the original order of `arr` passed to the `iterator` function. + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A function to apply to each item in `arr`. + The iterator is passed a `callback(err, results)` which must be called once it + has completed with an error (which can be `null`) and an array of results. +* `callback(err, results)` - *Optional* A callback which is called after all the `iterator` + functions have finished, or an error occurs. Results is an array containing + the concatenated results of the `iterator` function. + +__Example__ + +```js +async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){ + // files is now a list of filenames that exist in the 3 directories +}); +``` + +__Related__ + +* concatSeries(arr, iterator, [callback]) + + +## Control Flow + + +### series(tasks, [callback]) + +Run the functions in the `tasks` array in series, each one running once the previous +function has completed. If any functions in the series pass an error to its +callback, no more functions are run, and `callback` is immediately called with the value of the error. +Otherwise, `callback` receives an array of results when `tasks` have completed. + +It is also possible to use an object instead of an array. Each property will be +run as a function, and the results will be passed to the final `callback` as an object +instead of an array. This can be a more readable way of handling results from +[`series`](#series). + +**Note** that while many implementations preserve the order of object properties, the +[ECMAScript Language Specification](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6) +explicitly states that + +> The mechanics and order of enumerating the properties is not specified. + +So if you rely on the order in which your series of functions are executed, and want +this to work on all platforms, consider using an array. + +__Arguments__ + +* `tasks` - An array or object containing functions to run, each function is passed + a `callback(err, result)` it must call on completion with an error `err` (which can + be `null`) and an optional `result` value. +* `callback(err, results)` - An optional callback to run once all the functions + have completed. This function gets a results array (or object) containing all + the result arguments passed to the `task` callbacks. + +__Example__ + +```js +async.series([ + function(callback){ + // do some stuff ... + callback(null, 'one'); + }, + function(callback){ + // do some more stuff ... + callback(null, 'two'); + } +], +// optional callback +function(err, results){ + // results is now equal to ['one', 'two'] +}); + + +// an example using an object instead of an array +async.series({ + one: function(callback){ + setTimeout(function(){ + callback(null, 1); + }, 200); + }, + two: function(callback){ + setTimeout(function(){ + callback(null, 2); + }, 100); + } +}, +function(err, results) { + // results is now equal to: {one: 1, two: 2} +}); +``` + +--------------------------------------- + + +### parallel(tasks, [callback]) + +Run the `tasks` array of functions in parallel, without waiting until the previous +function has completed. If any of the functions pass an error to its +callback, the main `callback` is immediately called with the value of the error. +Once the `tasks` have completed, the results are passed to the final `callback` as an +array. + +**Note:** `parallel` is about kicking-off I/O tasks in parallel, not about parallel execution of code. If your tasks do not use any timers or perform any I/O, they will actually be executed in series. Any synchronous setup sections for each task will happen one after the other. JavaScript remains single-threaded. + +It is also possible to use an object instead of an array. Each property will be +run as a function and the results will be passed to the final `callback` as an object +instead of an array. This can be a more readable way of handling results from +[`parallel`](#parallel). + + +__Arguments__ + +* `tasks` - An array or object containing functions to run. Each function is passed + a `callback(err, result)` which it must call on completion with an error `err` + (which can be `null`) and an optional `result` value. +* `callback(err, results)` - An optional callback to run once all the functions + have completed successfully. This function gets a results array (or object) containing all + the result arguments passed to the task callbacks. + +__Example__ + +```js +async.parallel([ + function(callback){ + setTimeout(function(){ + callback(null, 'one'); + }, 200); + }, + function(callback){ + setTimeout(function(){ + callback(null, 'two'); + }, 100); + } +], +// optional callback +function(err, results){ + // the results array will equal ['one','two'] even though + // the second function had a shorter timeout. +}); + + +// an example using an object instead of an array +async.parallel({ + one: function(callback){ + setTimeout(function(){ + callback(null, 1); + }, 200); + }, + two: function(callback){ + setTimeout(function(){ + callback(null, 2); + }, 100); + } +}, +function(err, results) { + // results is now equals to: {one: 1, two: 2} +}); +``` + +__Related__ + +* parallelLimit(tasks, limit, [callback]) + +--------------------------------------- + + +### whilst(test, fn, callback) + +Repeatedly call `fn`, while `test` returns `true`. Calls `callback` when stopped, +or an error occurs. + +__Arguments__ + +* `test()` - synchronous truth test to perform before each execution of `fn`. +* `fn(callback)` - A function which is called each time `test` passes. The function is + passed a `callback(err)`, which must be called once it has completed with an + optional `err` argument. +* `callback(err, [results])` - A callback which is called after the test + function has failed and repeated execution of `fn` has stopped. `callback` + will be passed an error and any arguments passed to the final `fn`'s callback. + +__Example__ + +```js +var count = 0; + +async.whilst( + function () { return count < 5; }, + function (callback) { + count++; + setTimeout(function () { + callback(null, count); + }, 1000); + }, + function (err, n) { + // 5 seconds have passed, n = 5 + } +); +``` + +--------------------------------------- + + +### doWhilst(fn, test, callback) + +The post-check version of [`whilst`](#whilst). To reflect the difference in +the order of operations, the arguments `test` and `fn` are switched. + +`doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript. + +--------------------------------------- + + +### until(test, fn, callback) + +Repeatedly call `fn` until `test` returns `true`. Calls `callback` when stopped, +or an error occurs. `callback` will be passed an error and any arguments passed +to the final `fn`'s callback. + +The inverse of [`whilst`](#whilst). + +--------------------------------------- + + +### doUntil(fn, test, callback) + +Like [`doWhilst`](#doWhilst), except the `test` is inverted. Note the argument ordering differs from `until`. + +--------------------------------------- + + +### during(test, fn, callback) + +Like [`whilst`](#whilst), except the `test` is an asynchronous function that is passed a callback in the form of `function (err, truth)`. If error is passed to `test` or `fn`, the main callback is immediately called with the value of the error. + +__Example__ + +```js +var count = 0; + +async.during( + function (callback) { + return callback(null, count < 5); + }, + function (callback) { + count++; + setTimeout(callback, 1000); + }, + function (err) { + // 5 seconds have passed + } +); +``` + +--------------------------------------- + + +### doDuring(fn, test, callback) + +The post-check version of [`during`](#during). To reflect the difference in +the order of operations, the arguments `test` and `fn` are switched. + +Also a version of [`doWhilst`](#doWhilst) with asynchronous `test` function. + +--------------------------------------- + + +### forever(fn, [errback]) + +Calls the asynchronous function `fn` with a callback parameter that allows it to +call itself again, in series, indefinitely. + +If an error is passed to the callback then `errback` is called with the +error, and execution stops, otherwise it will never be called. + +```js +async.forever( + function(next) { + // next is suitable for passing to things that need a callback(err [, whatever]); + // it will result in this function being called again. + }, + function(err) { + // if next is called with a value in its first parameter, it will appear + // in here as 'err', and execution will stop. + } +); +``` + +--------------------------------------- + + +### waterfall(tasks, [callback]) + +Runs the `tasks` array of functions in series, each passing their results to the next in +the array. However, if any of the `tasks` pass an error to their own callback, the +next function is not executed, and the main `callback` is immediately called with +the error. + +__Arguments__ + +* `tasks` - An array of functions to run, each function is passed a + `callback(err, result1, result2, ...)` it must call on completion. The first + argument is an error (which can be `null`) and any further arguments will be + passed as arguments in order to the next task. +* `callback(err, [results])` - An optional callback to run once all the functions + have completed. This will be passed the results of the last task's callback. + + + +__Example__ + +```js +async.waterfall([ + function(callback) { + callback(null, 'one', 'two'); + }, + function(arg1, arg2, callback) { + // arg1 now equals 'one' and arg2 now equals 'two' + callback(null, 'three'); + }, + function(arg1, callback) { + // arg1 now equals 'three' + callback(null, 'done'); + } +], function (err, result) { + // result now equals 'done' +}); +``` +Or, with named functions: + +```js +async.waterfall([ + myFirstFunction, + mySecondFunction, + myLastFunction, +], function (err, result) { + // result now equals 'done' +}); +function myFirstFunction(callback) { + callback(null, 'one', 'two'); +} +function mySecondFunction(arg1, arg2, callback) { + // arg1 now equals 'one' and arg2 now equals 'two' + callback(null, 'three'); +} +function myLastFunction(arg1, callback) { + // arg1 now equals 'three' + callback(null, 'done'); +} +``` + +Or, if you need to pass any argument to the first function: + +```js +async.waterfall([ + async.apply(myFirstFunction, 'zero'), + mySecondFunction, + myLastFunction, +], function (err, result) { + // result now equals 'done' +}); +function myFirstFunction(arg1, callback) { + // arg1 now equals 'zero' + callback(null, 'one', 'two'); +} +function mySecondFunction(arg1, arg2, callback) { + // arg1 now equals 'one' and arg2 now equals 'two' + callback(null, 'three'); +} +function myLastFunction(arg1, callback) { + // arg1 now equals 'three' + callback(null, 'done'); +} +``` + +--------------------------------------- + +### compose(fn1, fn2...) + +Creates a function which is a composition of the passed asynchronous +functions. Each function consumes the return value of the function that +follows. Composing functions `f()`, `g()`, and `h()` would produce the result of +`f(g(h()))`, only this version uses callbacks to obtain the return values. + +Each function is executed with the `this` binding of the composed function. + +__Arguments__ + +* `functions...` - the asynchronous functions to compose + + +__Example__ + +```js +function add1(n, callback) { + setTimeout(function () { + callback(null, n + 1); + }, 10); +} + +function mul3(n, callback) { + setTimeout(function () { + callback(null, n * 3); + }, 10); +} + +var add1mul3 = async.compose(mul3, add1); + +add1mul3(4, function (err, result) { + // result now equals 15 +}); +``` + +--------------------------------------- + +### seq(fn1, fn2...) + +Version of the compose function that is more natural to read. +Each function consumes the return value of the previous function. +It is the equivalent of [`compose`](#compose) with the arguments reversed. + +Each function is executed with the `this` binding of the composed function. + +__Arguments__ + +* `functions...` - the asynchronous functions to compose + + +__Example__ + +```js +// Requires lodash (or underscore), express3 and dresende's orm2. +// Part of an app, that fetches cats of the logged user. +// This example uses `seq` function to avoid overnesting and error +// handling clutter. +app.get('/cats', function(request, response) { + var User = request.models.User; + async.seq( + _.bind(User.get, User), // 'User.get' has signature (id, callback(err, data)) + function(user, fn) { + user.getCats(fn); // 'getCats' has signature (callback(err, data)) + } + )(req.session.user_id, function (err, cats) { + if (err) { + console.error(err); + response.json({ status: 'error', message: err.message }); + } else { + response.json({ status: 'ok', message: 'Cats found', data: cats }); + } + }); +}); +``` + +--------------------------------------- + +### applyEach(fns, args..., callback) + +Applies the provided arguments to each function in the array, calling +`callback` after all functions have completed. If you only provide the first +argument, then it will return a function which lets you pass in the +arguments as if it were a single function call. + +__Arguments__ + +* `fns` - the asynchronous functions to all call with the same arguments +* `args...` - any number of separate arguments to pass to the function +* `callback` - the final argument should be the callback, called when all + functions have completed processing + + +__Example__ + +```js +async.applyEach([enableSearch, updateSchema], 'bucket', callback); + +// partial application example: +async.each( + buckets, + async.applyEach([enableSearch, updateSchema]), + callback +); +``` + +__Related__ + +* applyEachSeries(tasks, args..., [callback]) + +--------------------------------------- + + +### queue(worker, [concurrency]) + +Creates a `queue` object with the specified `concurrency`. Tasks added to the +`queue` are processed in parallel (up to the `concurrency` limit). If all +`worker`s are in progress, the task is queued until one becomes available. +Once a `worker` completes a `task`, that `task`'s callback is called. + +__Arguments__ + +* `worker(task, callback)` - An asynchronous function for processing a queued + task, which must call its `callback(err)` argument when finished, with an + optional `error` as an argument. If you want to handle errors from an individual task, pass a callback to `q.push()`. +* `concurrency` - An `integer` for determining how many `worker` functions should be + run in parallel. If omitted, the concurrency defaults to `1`. If the concurrency is `0`, an error is thrown. + +__Queue objects__ + +The `queue` object returned by this function has the following properties and +methods: + +* `length()` - a function returning the number of items waiting to be processed. +* `started` - a function returning whether or not any items have been pushed and processed by the queue +* `running()` - a function returning the number of items currently being processed. +* `workersList()` - a function returning the array of items currently being processed. +* `idle()` - a function returning false if there are items waiting or being processed, or true if not. +* `concurrency` - an integer for determining how many `worker` functions should be + run in parallel. This property can be changed after a `queue` is created to + alter the concurrency on-the-fly. +* `push(task, [callback])` - add a new task to the `queue`. Calls `callback` once + the `worker` has finished processing the task. Instead of a single task, a `tasks` array + can be submitted. The respective callback is used for every task in the list. +* `unshift(task, [callback])` - add a new task to the front of the `queue`. +* `saturated` - a callback that is called when the `queue` length hits the `concurrency` limit, + and further tasks will be queued. +* `empty` - a callback that is called when the last item from the `queue` is given to a `worker`. +* `drain` - a callback that is called when the last item from the `queue` has returned from the `worker`. +* `paused` - a boolean for determining whether the queue is in a paused state +* `pause()` - a function that pauses the processing of tasks until `resume()` is called. +* `resume()` - a function that resumes the processing of queued tasks when the queue is paused. +* `kill()` - a function that removes the `drain` callback and empties remaining tasks from the queue forcing it to go idle. + +__Example__ + +```js +// create a queue object with concurrency 2 + +var q = async.queue(function (task, callback) { + console.log('hello ' + task.name); + callback(); +}, 2); + + +// assign a callback +q.drain = function() { + console.log('all items have been processed'); +} + +// add some items to the queue + +q.push({name: 'foo'}, function (err) { + console.log('finished processing foo'); +}); +q.push({name: 'bar'}, function (err) { + console.log('finished processing bar'); +}); + +// add some items to the queue (batch-wise) + +q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) { + console.log('finished processing item'); +}); + +// add some items to the front of the queue + +q.unshift({name: 'bar'}, function (err) { + console.log('finished processing bar'); +}); +``` + + +--------------------------------------- + + +### priorityQueue(worker, concurrency) + +The same as [`queue`](#queue) only tasks are assigned a priority and completed in ascending priority order. There are two differences between `queue` and `priorityQueue` objects: + +* `push(task, priority, [callback])` - `priority` should be a number. If an array of + `tasks` is given, all tasks will be assigned the same priority. +* The `unshift` method was removed. + +--------------------------------------- + + +### cargo(worker, [payload]) + +Creates a `cargo` object with the specified payload. Tasks added to the +cargo will be processed altogether (up to the `payload` limit). If the +`worker` is in progress, the task is queued until it becomes available. Once +the `worker` has completed some tasks, each callback of those tasks is called. +Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966) for how `cargo` and `queue` work. + +While [queue](#queue) passes only one task to one of a group of workers +at a time, cargo passes an array of tasks to a single worker, repeating +when the worker is finished. + +__Arguments__ + +* `worker(tasks, callback)` - An asynchronous function for processing an array of + queued tasks, which must call its `callback(err)` argument when finished, with + an optional `err` argument. +* `payload` - An optional `integer` for determining how many tasks should be + processed per round; if omitted, the default is unlimited. + +__Cargo objects__ + +The `cargo` object returned by this function has the following properties and +methods: + +* `length()` - A function returning the number of items waiting to be processed. +* `payload` - An `integer` for determining how many tasks should be + process per round. This property can be changed after a `cargo` is created to + alter the payload on-the-fly. +* `push(task, [callback])` - Adds `task` to the `queue`. The callback is called + once the `worker` has finished processing the task. Instead of a single task, an array of `tasks` + can be submitted. The respective callback is used for every task in the list. +* `saturated` - A callback that is called when the `queue.length()` hits the concurrency and further tasks will be queued. +* `empty` - A callback that is called when the last item from the `queue` is given to a `worker`. +* `drain` - A callback that is called when the last item from the `queue` has returned from the `worker`. +* `idle()`, `pause()`, `resume()`, `kill()` - cargo inherits all of the same methods and event calbacks as [`queue`](#queue) + +__Example__ + +```js +// create a cargo object with payload 2 + +var cargo = async.cargo(function (tasks, callback) { + for(var i=0; i +### auto(tasks, [concurrency], [callback]) + +Determines the best order for running the functions in `tasks`, based on their requirements. Each function can optionally depend on other functions being completed first, and each function is run as soon as its requirements are satisfied. + +If any of the functions pass an error to their callback, the `auto` sequence will stop. Further tasks will not execute (so any other functions depending on it will not run), and the main `callback` is immediately called with the error. Functions also receive an object containing the results of functions which have completed so far. + +Note, all functions are called with a `results` object as a second argument, +so it is unsafe to pass functions in the `tasks` object which cannot handle the +extra argument. + +For example, this snippet of code: + +```js +async.auto({ + readData: async.apply(fs.readFile, 'data.txt', 'utf-8') +}, callback); +``` + +will have the effect of calling `readFile` with the results object as the last +argument, which will fail: + +```js +fs.readFile('data.txt', 'utf-8', cb, {}); +``` + +Instead, wrap the call to `readFile` in a function which does not forward the +`results` object: + +```js +async.auto({ + readData: function(cb, results){ + fs.readFile('data.txt', 'utf-8', cb); + } +}, callback); +``` + +__Arguments__ + +* `tasks` - An object. Each of its properties is either a function or an array of + requirements, with the function itself the last item in the array. The object's key + of a property serves as the name of the task defined by that property, + i.e. can be used when specifying requirements for other tasks. + The function receives two arguments: (1) a `callback(err, result)` which must be + called when finished, passing an `error` (which can be `null`) and the result of + the function's execution, and (2) a `results` object, containing the results of + the previously executed functions. +* `concurrency` - An optional `integer` for determining the maximum number of tasks that can be run in parallel. By default, as many as possible. +* `callback(err, results)` - An optional callback which is called when all the + tasks have been completed. It receives the `err` argument if any `tasks` + pass an error to their callback. Results are always returned; however, if + an error occurs, no further `tasks` will be performed, and the results + object will only contain partial results. + + +__Example__ + +```js +async.auto({ + get_data: function(callback){ + console.log('in get_data'); + // async code to get some data + callback(null, 'data', 'converted to array'); + }, + make_folder: function(callback){ + console.log('in make_folder'); + // async code to create a directory to store a file in + // this is run at the same time as getting the data + callback(null, 'folder'); + }, + write_file: ['get_data', 'make_folder', function(callback, results){ + console.log('in write_file', JSON.stringify(results)); + // once there is some data and the directory exists, + // write the data to a file in the directory + callback(null, 'filename'); + }], + email_link: ['write_file', function(callback, results){ + console.log('in email_link', JSON.stringify(results)); + // once the file is written let's email a link to it... + // results.write_file contains the filename returned by write_file. + callback(null, {'file':results.write_file, 'email':'user@example.com'}); + }] +}, function(err, results) { + console.log('err = ', err); + console.log('results = ', results); +}); +``` + +This is a fairly trivial example, but to do this using the basic parallel and +series functions would look like this: + +```js +async.parallel([ + function(callback){ + console.log('in get_data'); + // async code to get some data + callback(null, 'data', 'converted to array'); + }, + function(callback){ + console.log('in make_folder'); + // async code to create a directory to store a file in + // this is run at the same time as getting the data + callback(null, 'folder'); + } +], +function(err, results){ + async.series([ + function(callback){ + console.log('in write_file', JSON.stringify(results)); + // once there is some data and the directory exists, + // write the data to a file in the directory + results.push('filename'); + callback(null); + }, + function(callback){ + console.log('in email_link', JSON.stringify(results)); + // once the file is written let's email a link to it... + callback(null, {'file':results.pop(), 'email':'user@example.com'}); + } + ]); +}); +``` + +For a complicated series of `async` tasks, using the [`auto`](#auto) function makes adding +new tasks much easier (and the code more readable). + + +--------------------------------------- + + +### retry([opts = {times: 5, interval: 0}| 5], task, [callback]) + +Attempts to get a successful response from `task` no more than `times` times before +returning an error. If the task is successful, the `callback` will be passed the result +of the successful task. If all attempts fail, the callback will be passed the error and +result (if any) of the final attempt. + +__Arguments__ + +* `opts` - Can be either an object with `times` and `interval` or a number. + * `times` - The number of attempts to make before giving up. The default is `5`. + * `interval` - The time to wait between retries, in milliseconds. The default is `0`. + * If `opts` is a number, the number specifies the number of times to retry, with the default interval of `0`. +* `task(callback, results)` - A function which receives two arguments: (1) a `callback(err, result)` + which must be called when finished, passing `err` (which can be `null`) and the `result` of + the function's execution, and (2) a `results` object, containing the results of + the previously executed functions (if nested inside another control flow). +* `callback(err, results)` - An optional callback which is called when the + task has succeeded, or after the final failed attempt. It receives the `err` and `result` arguments of the last attempt at completing the `task`. + +The [`retry`](#retry) function can be used as a stand-alone control flow by passing a callback, as shown below: + +```js +// try calling apiMethod 3 times +async.retry(3, apiMethod, function(err, result) { + // do something with the result +}); +``` + +```js +// try calling apiMethod 3 times, waiting 200 ms between each retry +async.retry({times: 3, interval: 200}, apiMethod, function(err, result) { + // do something with the result +}); +``` + +```js +// try calling apiMethod the default 5 times no delay between each retry +async.retry(apiMethod, function(err, result) { + // do something with the result +}); +``` + +It can also be embedded within other control flow functions to retry individual methods +that are not as reliable, like this: + +```js +async.auto({ + users: api.getUsers.bind(api), + payments: async.retry(3, api.getPayments.bind(api)) +}, function(err, results) { + // do something with the results +}); +``` + + +--------------------------------------- + + +### iterator(tasks) + +Creates an iterator function which calls the next function in the `tasks` array, +returning a continuation to call the next one after that. It's also possible to +“peek” at the next iterator with `iterator.next()`. + +This function is used internally by the `async` module, but can be useful when +you want to manually control the flow of functions in series. + +__Arguments__ + +* `tasks` - An array of functions to run. + +__Example__ + +```js +var iterator = async.iterator([ + function(){ sys.p('one'); }, + function(){ sys.p('two'); }, + function(){ sys.p('three'); } +]); + +node> var iterator2 = iterator(); +'one' +node> var iterator3 = iterator2(); +'two' +node> iterator3(); +'three' +node> var nextfn = iterator2.next(); +node> nextfn(); +'three' +``` + +--------------------------------------- + + +### apply(function, arguments..) + +Creates a continuation function with some arguments already applied. + +Useful as a shorthand when combined with other control flow functions. Any arguments +passed to the returned function are added to the arguments originally passed +to apply. + +__Arguments__ + +* `function` - The function you want to eventually apply all arguments to. +* `arguments...` - Any number of arguments to automatically apply when the + continuation is called. + +__Example__ + +```js +// using apply + +async.parallel([ + async.apply(fs.writeFile, 'testfile1', 'test1'), + async.apply(fs.writeFile, 'testfile2', 'test2'), +]); + + +// the same process without using apply + +async.parallel([ + function(callback){ + fs.writeFile('testfile1', 'test1', callback); + }, + function(callback){ + fs.writeFile('testfile2', 'test2', callback); + } +]); +``` + +It's possible to pass any number of additional arguments when calling the +continuation: + +```js +node> var fn = async.apply(sys.puts, 'one'); +node> fn('two', 'three'); +one +two +three +``` + +--------------------------------------- + + +### nextTick(callback), setImmediate(callback) + +Calls `callback` on a later loop around the event loop. In Node.js this just +calls `process.nextTick`; in the browser it falls back to `setImmediate(callback)` +if available, otherwise `setTimeout(callback, 0)`, which means other higher priority +events may precede the execution of `callback`. + +This is used internally for browser-compatibility purposes. + +__Arguments__ + +* `callback` - The function to call on a later loop around the event loop. + +__Example__ + +```js +var call_order = []; +async.nextTick(function(){ + call_order.push('two'); + // call_order now equals ['one','two'] +}); +call_order.push('one') +``` + + +### times(n, iterator, [callback]) + +Calls the `iterator` function `n` times, and accumulates results in the same manner +you would use with [`map`](#map). + +__Arguments__ + +* `n` - The number of times to run the function. +* `iterator` - The function to call `n` times. +* `callback` - see [`map`](#map) + +__Example__ + +```js +// Pretend this is some complicated async factory +var createUser = function(id, callback) { + callback(null, { + id: 'user' + id + }) +} +// generate 5 users +async.times(5, function(n, next){ + createUser(n, function(err, user) { + next(err, user) + }) +}, function(err, users) { + // we should now have 5 users +}); +``` + +__Related__ + +* timesSeries(n, iterator, [callback]) +* timesLimit(n, limit, iterator, [callback]) + + +## Utils + + +### memoize(fn, [hasher]) + +Caches the results of an `async` function. When creating a hash to store function +results against, the callback is omitted from the hash and an optional hash +function can be used. + +If no hash function is specified, the first argument is used as a hash key, which may work reasonably if it is a string or a data type that converts to a distinct string. Note that objects and arrays will not behave reasonably. Neither will cases where the other arguments are significant. In such cases, specify your own hash function. + +The cache of results is exposed as the `memo` property of the function returned +by `memoize`. + +__Arguments__ + +* `fn` - The function to proxy and cache results from. +* `hasher` - An optional function for generating a custom hash for storing + results. It has all the arguments applied to it apart from the callback, and + must be synchronous. + +__Example__ + +```js +var slow_fn = function (name, callback) { + // do something + callback(null, result); +}; +var fn = async.memoize(slow_fn); + +// fn can now be used as if it were slow_fn +fn('some name', function () { + // callback +}); +``` + + +### unmemoize(fn) + +Undoes a [`memoize`](#memoize)d function, reverting it to the original, unmemoized +form. Handy for testing. + +__Arguments__ + +* `fn` - the memoized function + +--------------------------------------- + + +### ensureAsync(fn) + +Wrap an async function and ensure it calls its callback on a later tick of the event loop. If the function already calls its callback on a next tick, no extra deferral is added. This is useful for preventing stack overflows (`RangeError: Maximum call stack size exceeded`) and generally keeping [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony) contained. + +__Arguments__ + +* `fn` - an async function, one that expects a node-style callback as its last argument + +Returns a wrapped function with the exact same call signature as the function passed in. + +__Example__ + +```js +function sometimesAsync(arg, callback) { + if (cache[arg]) { + return callback(null, cache[arg]); // this would be synchronous!! + } else { + doSomeIO(arg, callback); // this IO would be asynchronous + } +} + +// this has a risk of stack overflows if many results are cached in a row +async.mapSeries(args, sometimesAsync, done); + +// this will defer sometimesAsync's callback if necessary, +// preventing stack overflows +async.mapSeries(args, async.ensureAsync(sometimesAsync), done); + +``` + +--------------------------------------- + + +### constant(values...) + +Returns a function that when called, calls-back with the values provided. Useful as the first function in a `waterfall`, or for plugging values in to `auto`. + +__Example__ + +```js +async.waterfall([ + async.constant(42), + function (value, next) { + // value === 42 + }, + //... +], callback); + +async.waterfall([ + async.constant(filename, "utf8"), + fs.readFile, + function (fileData, next) { + //... + } + //... +], callback); + +async.auto({ + hostname: async.constant("https://server.net/"), + port: findFreePort, + launchServer: ["hostname", "port", function (cb, options) { + startServer(options, cb); + }], + //... +}, callback); + +``` + +--------------------------------------- + + + +### asyncify(func) + +__Alias:__ `wrapSync` + +Take a sync function and make it async, passing its return value to a callback. This is useful for plugging sync functions into a waterfall, series, or other async functions. Any arguments passed to the generated function will be passed to the wrapped function (except for the final callback argument). Errors thrown will be passed to the callback. + +__Example__ + +```js +async.waterfall([ + async.apply(fs.readFile, filename, "utf8"), + async.asyncify(JSON.parse), + function (data, next) { + // data is the result of parsing the text. + // If there was a parsing error, it would have been caught. + } +], callback) +``` + +If the function passed to `asyncify` returns a Promise, that promises's resolved/rejected state will be used to call the callback, rather than simply the synchronous return value. Example: + +```js +async.waterfall([ + async.apply(fs.readFile, filename, "utf8"), + async.asyncify(function (contents) { + return db.model.create(contents); + }), + function (model, next) { + // `model` is the instantiated model object. + // If there was an error, this function would be skipped. + } +], callback) +``` + +This also means you can asyncify ES2016 `async` functions. + +```js +var q = async.queue(async.asyncify(async function (file) { + var intermediateStep = await processFile(file); + return await somePromise(intermediateStep) +})); + +q.push(files); +``` + +--------------------------------------- + + +### log(function, arguments) + +Logs the result of an `async` function to the `console`. Only works in Node.js or +in browsers that support `console.log` and `console.error` (such as FF and Chrome). +If multiple arguments are returned from the async function, `console.log` is +called on each argument in order. + +__Arguments__ + +* `function` - The function you want to eventually apply all arguments to. +* `arguments...` - Any number of arguments to apply to the function. + +__Example__ + +```js +var hello = function(name, callback){ + setTimeout(function(){ + callback(null, 'hello ' + name); + }, 1000); +}; +``` +```js +node> async.log(hello, 'world'); +'hello world' +``` + +--------------------------------------- + + +### dir(function, arguments) + +Logs the result of an `async` function to the `console` using `console.dir` to +display the properties of the resulting object. Only works in Node.js or +in browsers that support `console.dir` and `console.error` (such as FF and Chrome). +If multiple arguments are returned from the async function, `console.dir` is +called on each argument in order. + +__Arguments__ + +* `function` - The function you want to eventually apply all arguments to. +* `arguments...` - Any number of arguments to apply to the function. + +__Example__ + +```js +var hello = function(name, callback){ + setTimeout(function(){ + callback(null, {hello: name}); + }, 1000); +}; +``` +```js +node> async.dir(hello, 'world'); +{hello: 'world'} +``` + +--------------------------------------- + + +### noConflict() + +Changes the value of `async` back to its original value, returning a reference to the +`async` object. diff --git a/code/application_liste/app/node_modules/async/dist/async.js b/code/application_liste/app/node_modules/async/dist/async.js new file mode 100644 index 0000000..31e7620 --- /dev/null +++ b/code/application_liste/app/node_modules/async/dist/async.js @@ -0,0 +1,1265 @@ +/*! + * async + * https://github.com/caolan/async + * + * Copyright 2010-2014 Caolan McMahon + * Released under the MIT license + */ +(function () { + + var async = {}; + function noop() {} + function identity(v) { + return v; + } + function toBool(v) { + return !!v; + } + function notId(v) { + return !v; + } + + // global on the server, window in the browser + var previous_async; + + // Establish the root object, `window` (`self`) in the browser, `global` + // on the server, or `this` in some virtual machines. We use `self` + // instead of `window` for `WebWorker` support. + var root = typeof self === 'object' && self.self === self && self || + typeof global === 'object' && global.global === global && global || + this; + + if (root != null) { + previous_async = root.async; + } + + async.noConflict = function () { + root.async = previous_async; + return async; + }; + + function only_once(fn) { + return function() { + if (fn === null) throw new Error("Callback was already called."); + fn.apply(this, arguments); + fn = null; + }; + } + + function _once(fn) { + return function() { + if (fn === null) return; + fn.apply(this, arguments); + fn = null; + }; + } + + //// cross-browser compatiblity functions //// + + var _toString = Object.prototype.toString; + + var _isArray = Array.isArray || function (obj) { + return _toString.call(obj) === '[object Array]'; + }; + + // Ported from underscore.js isObject + var _isObject = function(obj) { + var type = typeof obj; + return type === 'function' || type === 'object' && !!obj; + }; + + function _isArrayLike(arr) { + return _isArray(arr) || ( + // has a positive integer length property + typeof arr.length === "number" && + arr.length >= 0 && + arr.length % 1 === 0 + ); + } + + function _arrayEach(arr, iterator) { + var index = -1, + length = arr.length; + + while (++index < length) { + iterator(arr[index], index, arr); + } + } + + function _map(arr, iterator) { + var index = -1, + length = arr.length, + result = Array(length); + + while (++index < length) { + result[index] = iterator(arr[index], index, arr); + } + return result; + } + + function _range(count) { + return _map(Array(count), function (v, i) { return i; }); + } + + function _reduce(arr, iterator, memo) { + _arrayEach(arr, function (x, i, a) { + memo = iterator(memo, x, i, a); + }); + return memo; + } + + function _forEachOf(object, iterator) { + _arrayEach(_keys(object), function (key) { + iterator(object[key], key); + }); + } + + function _indexOf(arr, item) { + for (var i = 0; i < arr.length; i++) { + if (arr[i] === item) return i; + } + return -1; + } + + var _keys = Object.keys || function (obj) { + var keys = []; + for (var k in obj) { + if (obj.hasOwnProperty(k)) { + keys.push(k); + } + } + return keys; + }; + + function _keyIterator(coll) { + var i = -1; + var len; + var keys; + if (_isArrayLike(coll)) { + len = coll.length; + return function next() { + i++; + return i < len ? i : null; + }; + } else { + keys = _keys(coll); + len = keys.length; + return function next() { + i++; + return i < len ? keys[i] : null; + }; + } + } + + // Similar to ES6's rest param (http://ariya.ofilabs.com/2013/03/es6-and-rest-parameter.html) + // This accumulates the arguments passed into an array, after a given index. + // From underscore.js (https://github.com/jashkenas/underscore/pull/2140). + function _restParam(func, startIndex) { + startIndex = startIndex == null ? func.length - 1 : +startIndex; + return function() { + var length = Math.max(arguments.length - startIndex, 0); + var rest = Array(length); + for (var index = 0; index < length; index++) { + rest[index] = arguments[index + startIndex]; + } + switch (startIndex) { + case 0: return func.call(this, rest); + case 1: return func.call(this, arguments[0], rest); + } + // Currently unused but handle cases outside of the switch statement: + // var args = Array(startIndex + 1); + // for (index = 0; index < startIndex; index++) { + // args[index] = arguments[index]; + // } + // args[startIndex] = rest; + // return func.apply(this, args); + }; + } + + function _withoutIndex(iterator) { + return function (value, index, callback) { + return iterator(value, callback); + }; + } + + //// exported async module functions //// + + //// nextTick implementation with browser-compatible fallback //// + + // capture the global reference to guard against fakeTimer mocks + var _setImmediate = typeof setImmediate === 'function' && setImmediate; + + var _delay = _setImmediate ? function(fn) { + // not a direct alias for IE10 compatibility + _setImmediate(fn); + } : function(fn) { + setTimeout(fn, 0); + }; + + if (typeof process === 'object' && typeof process.nextTick === 'function') { + async.nextTick = process.nextTick; + } else { + async.nextTick = _delay; + } + async.setImmediate = _setImmediate ? _delay : async.nextTick; + + + async.forEach = + async.each = function (arr, iterator, callback) { + return async.eachOf(arr, _withoutIndex(iterator), callback); + }; + + async.forEachSeries = + async.eachSeries = function (arr, iterator, callback) { + return async.eachOfSeries(arr, _withoutIndex(iterator), callback); + }; + + + async.forEachLimit = + async.eachLimit = function (arr, limit, iterator, callback) { + return _eachOfLimit(limit)(arr, _withoutIndex(iterator), callback); + }; + + async.forEachOf = + async.eachOf = function (object, iterator, callback) { + callback = _once(callback || noop); + object = object || []; + + var iter = _keyIterator(object); + var key, completed = 0; + + while ((key = iter()) != null) { + completed += 1; + iterator(object[key], key, only_once(done)); + } + + if (completed === 0) callback(null); + + function done(err) { + completed--; + if (err) { + callback(err); + } + // Check key is null in case iterator isn't exhausted + // and done resolved synchronously. + else if (key === null && completed <= 0) { + callback(null); + } + } + }; + + async.forEachOfSeries = + async.eachOfSeries = function (obj, iterator, callback) { + callback = _once(callback || noop); + obj = obj || []; + var nextKey = _keyIterator(obj); + var key = nextKey(); + function iterate() { + var sync = true; + if (key === null) { + return callback(null); + } + iterator(obj[key], key, only_once(function (err) { + if (err) { + callback(err); + } + else { + key = nextKey(); + if (key === null) { + return callback(null); + } else { + if (sync) { + async.setImmediate(iterate); + } else { + iterate(); + } + } + } + })); + sync = false; + } + iterate(); + }; + + + + async.forEachOfLimit = + async.eachOfLimit = function (obj, limit, iterator, callback) { + _eachOfLimit(limit)(obj, iterator, callback); + }; + + function _eachOfLimit(limit) { + + return function (obj, iterator, callback) { + callback = _once(callback || noop); + obj = obj || []; + var nextKey = _keyIterator(obj); + if (limit <= 0) { + return callback(null); + } + var done = false; + var running = 0; + var errored = false; + + (function replenish () { + if (done && running <= 0) { + return callback(null); + } + + while (running < limit && !errored) { + var key = nextKey(); + if (key === null) { + done = true; + if (running <= 0) { + callback(null); + } + return; + } + running += 1; + iterator(obj[key], key, only_once(function (err) { + running -= 1; + if (err) { + callback(err); + errored = true; + } + else { + replenish(); + } + })); + } + })(); + }; + } + + + function doParallel(fn) { + return function (obj, iterator, callback) { + return fn(async.eachOf, obj, iterator, callback); + }; + } + function doParallelLimit(fn) { + return function (obj, limit, iterator, callback) { + return fn(_eachOfLimit(limit), obj, iterator, callback); + }; + } + function doSeries(fn) { + return function (obj, iterator, callback) { + return fn(async.eachOfSeries, obj, iterator, callback); + }; + } + + function _asyncMap(eachfn, arr, iterator, callback) { + callback = _once(callback || noop); + arr = arr || []; + var results = _isArrayLike(arr) ? [] : {}; + eachfn(arr, function (value, index, callback) { + iterator(value, function (err, v) { + results[index] = v; + callback(err); + }); + }, function (err) { + callback(err, results); + }); + } + + async.map = doParallel(_asyncMap); + async.mapSeries = doSeries(_asyncMap); + async.mapLimit = doParallelLimit(_asyncMap); + + // reduce only has a series version, as doing reduce in parallel won't + // work in many situations. + async.inject = + async.foldl = + async.reduce = function (arr, memo, iterator, callback) { + async.eachOfSeries(arr, function (x, i, callback) { + iterator(memo, x, function (err, v) { + memo = v; + callback(err); + }); + }, function (err) { + callback(err, memo); + }); + }; + + async.foldr = + async.reduceRight = function (arr, memo, iterator, callback) { + var reversed = _map(arr, identity).reverse(); + async.reduce(reversed, memo, iterator, callback); + }; + + async.transform = function (arr, memo, iterator, callback) { + if (arguments.length === 3) { + callback = iterator; + iterator = memo; + memo = _isArray(arr) ? [] : {}; + } + + async.eachOf(arr, function(v, k, cb) { + iterator(memo, v, k, cb); + }, function(err) { + callback(err, memo); + }); + }; + + function _filter(eachfn, arr, iterator, callback) { + var results = []; + eachfn(arr, function (x, index, callback) { + iterator(x, function (v) { + if (v) { + results.push({index: index, value: x}); + } + callback(); + }); + }, function () { + callback(_map(results.sort(function (a, b) { + return a.index - b.index; + }), function (x) { + return x.value; + })); + }); + } + + async.select = + async.filter = doParallel(_filter); + + async.selectLimit = + async.filterLimit = doParallelLimit(_filter); + + async.selectSeries = + async.filterSeries = doSeries(_filter); + + function _reject(eachfn, arr, iterator, callback) { + _filter(eachfn, arr, function(value, cb) { + iterator(value, function(v) { + cb(!v); + }); + }, callback); + } + async.reject = doParallel(_reject); + async.rejectLimit = doParallelLimit(_reject); + async.rejectSeries = doSeries(_reject); + + function _createTester(eachfn, check, getResult) { + return function(arr, limit, iterator, cb) { + function done() { + if (cb) cb(getResult(false, void 0)); + } + function iteratee(x, _, callback) { + if (!cb) return callback(); + iterator(x, function (v) { + if (cb && check(v)) { + cb(getResult(true, x)); + cb = iterator = false; + } + callback(); + }); + } + if (arguments.length > 3) { + eachfn(arr, limit, iteratee, done); + } else { + cb = iterator; + iterator = limit; + eachfn(arr, iteratee, done); + } + }; + } + + async.any = + async.some = _createTester(async.eachOf, toBool, identity); + + async.someLimit = _createTester(async.eachOfLimit, toBool, identity); + + async.all = + async.every = _createTester(async.eachOf, notId, notId); + + async.everyLimit = _createTester(async.eachOfLimit, notId, notId); + + function _findGetResult(v, x) { + return x; + } + async.detect = _createTester(async.eachOf, identity, _findGetResult); + async.detectSeries = _createTester(async.eachOfSeries, identity, _findGetResult); + async.detectLimit = _createTester(async.eachOfLimit, identity, _findGetResult); + + async.sortBy = function (arr, iterator, callback) { + async.map(arr, function (x, callback) { + iterator(x, function (err, criteria) { + if (err) { + callback(err); + } + else { + callback(null, {value: x, criteria: criteria}); + } + }); + }, function (err, results) { + if (err) { + return callback(err); + } + else { + callback(null, _map(results.sort(comparator), function (x) { + return x.value; + })); + } + + }); + + function comparator(left, right) { + var a = left.criteria, b = right.criteria; + return a < b ? -1 : a > b ? 1 : 0; + } + }; + + async.auto = function (tasks, concurrency, callback) { + if (typeof arguments[1] === 'function') { + // concurrency is optional, shift the args. + callback = concurrency; + concurrency = null; + } + callback = _once(callback || noop); + var keys = _keys(tasks); + var remainingTasks = keys.length; + if (!remainingTasks) { + return callback(null); + } + if (!concurrency) { + concurrency = remainingTasks; + } + + var results = {}; + var runningTasks = 0; + + var hasError = false; + + var listeners = []; + function addListener(fn) { + listeners.unshift(fn); + } + function removeListener(fn) { + var idx = _indexOf(listeners, fn); + if (idx >= 0) listeners.splice(idx, 1); + } + function taskComplete() { + remainingTasks--; + _arrayEach(listeners.slice(0), function (fn) { + fn(); + }); + } + + addListener(function () { + if (!remainingTasks) { + callback(null, results); + } + }); + + _arrayEach(keys, function (k) { + if (hasError) return; + var task = _isArray(tasks[k]) ? tasks[k]: [tasks[k]]; + var taskCallback = _restParam(function(err, args) { + runningTasks--; + if (args.length <= 1) { + args = args[0]; + } + if (err) { + var safeResults = {}; + _forEachOf(results, function(val, rkey) { + safeResults[rkey] = val; + }); + safeResults[k] = args; + hasError = true; + + callback(err, safeResults); + } + else { + results[k] = args; + async.setImmediate(taskComplete); + } + }); + var requires = task.slice(0, task.length - 1); + // prevent dead-locks + var len = requires.length; + var dep; + while (len--) { + if (!(dep = tasks[requires[len]])) { + throw new Error('Has nonexistent dependency in ' + requires.join(', ')); + } + if (_isArray(dep) && _indexOf(dep, k) >= 0) { + throw new Error('Has cyclic dependencies'); + } + } + function ready() { + return runningTasks < concurrency && _reduce(requires, function (a, x) { + return (a && results.hasOwnProperty(x)); + }, true) && !results.hasOwnProperty(k); + } + if (ready()) { + runningTasks++; + task[task.length - 1](taskCallback, results); + } + else { + addListener(listener); + } + function listener() { + if (ready()) { + runningTasks++; + removeListener(listener); + task[task.length - 1](taskCallback, results); + } + } + }); + }; + + + + async.retry = function(times, task, callback) { + var DEFAULT_TIMES = 5; + var DEFAULT_INTERVAL = 0; + + var attempts = []; + + var opts = { + times: DEFAULT_TIMES, + interval: DEFAULT_INTERVAL + }; + + function parseTimes(acc, t){ + if(typeof t === 'number'){ + acc.times = parseInt(t, 10) || DEFAULT_TIMES; + } else if(typeof t === 'object'){ + acc.times = parseInt(t.times, 10) || DEFAULT_TIMES; + acc.interval = parseInt(t.interval, 10) || DEFAULT_INTERVAL; + } else { + throw new Error('Unsupported argument type for \'times\': ' + typeof t); + } + } + + var length = arguments.length; + if (length < 1 || length > 3) { + throw new Error('Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)'); + } else if (length <= 2 && typeof times === 'function') { + callback = task; + task = times; + } + if (typeof times !== 'function') { + parseTimes(opts, times); + } + opts.callback = callback; + opts.task = task; + + function wrappedTask(wrappedCallback, wrappedResults) { + function retryAttempt(task, finalAttempt) { + return function(seriesCallback) { + task(function(err, result){ + seriesCallback(!err || finalAttempt, {err: err, result: result}); + }, wrappedResults); + }; + } + + function retryInterval(interval){ + return function(seriesCallback){ + setTimeout(function(){ + seriesCallback(null); + }, interval); + }; + } + + while (opts.times) { + + var finalAttempt = !(opts.times-=1); + attempts.push(retryAttempt(opts.task, finalAttempt)); + if(!finalAttempt && opts.interval > 0){ + attempts.push(retryInterval(opts.interval)); + } + } + + async.series(attempts, function(done, data){ + data = data[data.length - 1]; + (wrappedCallback || opts.callback)(data.err, data.result); + }); + } + + // If a callback is passed, run this as a controll flow + return opts.callback ? wrappedTask() : wrappedTask; + }; + + async.waterfall = function (tasks, callback) { + callback = _once(callback || noop); + if (!_isArray(tasks)) { + var err = new Error('First argument to waterfall must be an array of functions'); + return callback(err); + } + if (!tasks.length) { + return callback(); + } + function wrapIterator(iterator) { + return _restParam(function (err, args) { + if (err) { + callback.apply(null, [err].concat(args)); + } + else { + var next = iterator.next(); + if (next) { + args.push(wrapIterator(next)); + } + else { + args.push(callback); + } + ensureAsync(iterator).apply(null, args); + } + }); + } + wrapIterator(async.iterator(tasks))(); + }; + + function _parallel(eachfn, tasks, callback) { + callback = callback || noop; + var results = _isArrayLike(tasks) ? [] : {}; + + eachfn(tasks, function (task, key, callback) { + task(_restParam(function (err, args) { + if (args.length <= 1) { + args = args[0]; + } + results[key] = args; + callback(err); + })); + }, function (err) { + callback(err, results); + }); + } + + async.parallel = function (tasks, callback) { + _parallel(async.eachOf, tasks, callback); + }; + + async.parallelLimit = function(tasks, limit, callback) { + _parallel(_eachOfLimit(limit), tasks, callback); + }; + + async.series = function(tasks, callback) { + _parallel(async.eachOfSeries, tasks, callback); + }; + + async.iterator = function (tasks) { + function makeCallback(index) { + function fn() { + if (tasks.length) { + tasks[index].apply(null, arguments); + } + return fn.next(); + } + fn.next = function () { + return (index < tasks.length - 1) ? makeCallback(index + 1): null; + }; + return fn; + } + return makeCallback(0); + }; + + async.apply = _restParam(function (fn, args) { + return _restParam(function (callArgs) { + return fn.apply( + null, args.concat(callArgs) + ); + }); + }); + + function _concat(eachfn, arr, fn, callback) { + var result = []; + eachfn(arr, function (x, index, cb) { + fn(x, function (err, y) { + result = result.concat(y || []); + cb(err); + }); + }, function (err) { + callback(err, result); + }); + } + async.concat = doParallel(_concat); + async.concatSeries = doSeries(_concat); + + async.whilst = function (test, iterator, callback) { + callback = callback || noop; + if (test()) { + var next = _restParam(function(err, args) { + if (err) { + callback(err); + } else if (test.apply(this, args)) { + iterator(next); + } else { + callback.apply(null, [null].concat(args)); + } + }); + iterator(next); + } else { + callback(null); + } + }; + + async.doWhilst = function (iterator, test, callback) { + var calls = 0; + return async.whilst(function() { + return ++calls <= 1 || test.apply(this, arguments); + }, iterator, callback); + }; + + async.until = function (test, iterator, callback) { + return async.whilst(function() { + return !test.apply(this, arguments); + }, iterator, callback); + }; + + async.doUntil = function (iterator, test, callback) { + return async.doWhilst(iterator, function() { + return !test.apply(this, arguments); + }, callback); + }; + + async.during = function (test, iterator, callback) { + callback = callback || noop; + + var next = _restParam(function(err, args) { + if (err) { + callback(err); + } else { + args.push(check); + test.apply(this, args); + } + }); + + var check = function(err, truth) { + if (err) { + callback(err); + } else if (truth) { + iterator(next); + } else { + callback(null); + } + }; + + test(check); + }; + + async.doDuring = function (iterator, test, callback) { + var calls = 0; + async.during(function(next) { + if (calls++ < 1) { + next(null, true); + } else { + test.apply(this, arguments); + } + }, iterator, callback); + }; + + function _queue(worker, concurrency, payload) { + if (concurrency == null) { + concurrency = 1; + } + else if(concurrency === 0) { + throw new Error('Concurrency must not be zero'); + } + function _insert(q, data, pos, callback) { + if (callback != null && typeof callback !== "function") { + throw new Error("task callback must be a function"); + } + q.started = true; + if (!_isArray(data)) { + data = [data]; + } + if(data.length === 0 && q.idle()) { + // call drain immediately if there are no tasks + return async.setImmediate(function() { + q.drain(); + }); + } + _arrayEach(data, function(task) { + var item = { + data: task, + callback: callback || noop + }; + + if (pos) { + q.tasks.unshift(item); + } else { + q.tasks.push(item); + } + + if (q.tasks.length === q.concurrency) { + q.saturated(); + } + }); + async.setImmediate(q.process); + } + function _next(q, tasks) { + return function(){ + workers -= 1; + + var removed = false; + var args = arguments; + _arrayEach(tasks, function (task) { + _arrayEach(workersList, function (worker, index) { + if (worker === task && !removed) { + workersList.splice(index, 1); + removed = true; + } + }); + + task.callback.apply(task, args); + }); + if (q.tasks.length + workers === 0) { + q.drain(); + } + q.process(); + }; + } + + var workers = 0; + var workersList = []; + var q = { + tasks: [], + concurrency: concurrency, + payload: payload, + saturated: noop, + empty: noop, + drain: noop, + started: false, + paused: false, + push: function (data, callback) { + _insert(q, data, false, callback); + }, + kill: function () { + q.drain = noop; + q.tasks = []; + }, + unshift: function (data, callback) { + _insert(q, data, true, callback); + }, + process: function () { + while(!q.paused && workers < q.concurrency && q.tasks.length){ + + var tasks = q.payload ? + q.tasks.splice(0, q.payload) : + q.tasks.splice(0, q.tasks.length); + + var data = _map(tasks, function (task) { + return task.data; + }); + + if (q.tasks.length === 0) { + q.empty(); + } + workers += 1; + workersList.push(tasks[0]); + var cb = only_once(_next(q, tasks)); + worker(data, cb); + } + }, + length: function () { + return q.tasks.length; + }, + running: function () { + return workers; + }, + workersList: function () { + return workersList; + }, + idle: function() { + return q.tasks.length + workers === 0; + }, + pause: function () { + q.paused = true; + }, + resume: function () { + if (q.paused === false) { return; } + q.paused = false; + var resumeCount = Math.min(q.concurrency, q.tasks.length); + // Need to call q.process once per concurrent + // worker to preserve full concurrency after pause + for (var w = 1; w <= resumeCount; w++) { + async.setImmediate(q.process); + } + } + }; + return q; + } + + async.queue = function (worker, concurrency) { + var q = _queue(function (items, cb) { + worker(items[0], cb); + }, concurrency, 1); + + return q; + }; + + async.priorityQueue = function (worker, concurrency) { + + function _compareTasks(a, b){ + return a.priority - b.priority; + } + + function _binarySearch(sequence, item, compare) { + var beg = -1, + end = sequence.length - 1; + while (beg < end) { + var mid = beg + ((end - beg + 1) >>> 1); + if (compare(item, sequence[mid]) >= 0) { + beg = mid; + } else { + end = mid - 1; + } + } + return beg; + } + + function _insert(q, data, priority, callback) { + if (callback != null && typeof callback !== "function") { + throw new Error("task callback must be a function"); + } + q.started = true; + if (!_isArray(data)) { + data = [data]; + } + if(data.length === 0) { + // call drain immediately if there are no tasks + return async.setImmediate(function() { + q.drain(); + }); + } + _arrayEach(data, function(task) { + var item = { + data: task, + priority: priority, + callback: typeof callback === 'function' ? callback : noop + }; + + q.tasks.splice(_binarySearch(q.tasks, item, _compareTasks) + 1, 0, item); + + if (q.tasks.length === q.concurrency) { + q.saturated(); + } + async.setImmediate(q.process); + }); + } + + // Start with a normal queue + var q = async.queue(worker, concurrency); + + // Override push to accept second parameter representing priority + q.push = function (data, priority, callback) { + _insert(q, data, priority, callback); + }; + + // Remove unshift function + delete q.unshift; + + return q; + }; + + async.cargo = function (worker, payload) { + return _queue(worker, 1, payload); + }; + + function _console_fn(name) { + return _restParam(function (fn, args) { + fn.apply(null, args.concat([_restParam(function (err, args) { + if (typeof console === 'object') { + if (err) { + if (console.error) { + console.error(err); + } + } + else if (console[name]) { + _arrayEach(args, function (x) { + console[name](x); + }); + } + } + })])); + }); + } + async.log = _console_fn('log'); + async.dir = _console_fn('dir'); + /*async.info = _console_fn('info'); + async.warn = _console_fn('warn'); + async.error = _console_fn('error');*/ + + async.memoize = function (fn, hasher) { + var memo = {}; + var queues = {}; + var has = Object.prototype.hasOwnProperty; + hasher = hasher || identity; + var memoized = _restParam(function memoized(args) { + var callback = args.pop(); + var key = hasher.apply(null, args); + if (has.call(memo, key)) { + async.setImmediate(function () { + callback.apply(null, memo[key]); + }); + } + else if (has.call(queues, key)) { + queues[key].push(callback); + } + else { + queues[key] = [callback]; + fn.apply(null, args.concat([_restParam(function (args) { + memo[key] = args; + var q = queues[key]; + delete queues[key]; + for (var i = 0, l = q.length; i < l; i++) { + q[i].apply(null, args); + } + })])); + } + }); + memoized.memo = memo; + memoized.unmemoized = fn; + return memoized; + }; + + async.unmemoize = function (fn) { + return function () { + return (fn.unmemoized || fn).apply(null, arguments); + }; + }; + + function _times(mapper) { + return function (count, iterator, callback) { + mapper(_range(count), iterator, callback); + }; + } + + async.times = _times(async.map); + async.timesSeries = _times(async.mapSeries); + async.timesLimit = function (count, limit, iterator, callback) { + return async.mapLimit(_range(count), limit, iterator, callback); + }; + + async.seq = function (/* functions... */) { + var fns = arguments; + return _restParam(function (args) { + var that = this; + + var callback = args[args.length - 1]; + if (typeof callback == 'function') { + args.pop(); + } else { + callback = noop; + } + + async.reduce(fns, args, function (newargs, fn, cb) { + fn.apply(that, newargs.concat([_restParam(function (err, nextargs) { + cb(err, nextargs); + })])); + }, + function (err, results) { + callback.apply(that, [err].concat(results)); + }); + }); + }; + + async.compose = function (/* functions... */) { + return async.seq.apply(null, Array.prototype.reverse.call(arguments)); + }; + + + function _applyEach(eachfn) { + return _restParam(function(fns, args) { + var go = _restParam(function(args) { + var that = this; + var callback = args.pop(); + return eachfn(fns, function (fn, _, cb) { + fn.apply(that, args.concat([cb])); + }, + callback); + }); + if (args.length) { + return go.apply(this, args); + } + else { + return go; + } + }); + } + + async.applyEach = _applyEach(async.eachOf); + async.applyEachSeries = _applyEach(async.eachOfSeries); + + + async.forever = function (fn, callback) { + var done = only_once(callback || noop); + var task = ensureAsync(fn); + function next(err) { + if (err) { + return done(err); + } + task(next); + } + next(); + }; + + function ensureAsync(fn) { + return _restParam(function (args) { + var callback = args.pop(); + args.push(function () { + var innerArgs = arguments; + if (sync) { + async.setImmediate(function () { + callback.apply(null, innerArgs); + }); + } else { + callback.apply(null, innerArgs); + } + }); + var sync = true; + fn.apply(this, args); + sync = false; + }); + } + + async.ensureAsync = ensureAsync; + + async.constant = _restParam(function(values) { + var args = [null].concat(values); + return function (callback) { + return callback.apply(this, args); + }; + }); + + async.wrapSync = + async.asyncify = function asyncify(func) { + return _restParam(function (args) { + var callback = args.pop(); + var result; + try { + result = func.apply(this, args); + } catch (e) { + return callback(e); + } + // if result is Promise object + if (_isObject(result) && typeof result.then === "function") { + result.then(function(value) { + callback(null, value); + })["catch"](function(err) { + callback(err.message ? err : new Error(err)); + }); + } else { + callback(null, result); + } + }); + }; + + // Node.js + if (typeof module === 'object' && module.exports) { + module.exports = async; + } + // AMD / RequireJS + else if (typeof define === 'function' && define.amd) { + define([], function () { + return async; + }); + } + // included directly via ` + +## methods + +`base64js` has three exposed functions, `byteLength`, `toByteArray` and `fromByteArray`, which both take a single argument. + +* `byteLength` - Takes a base64 string and returns length of byte array +* `toByteArray` - Takes a base64 string and returns a byte array +* `fromByteArray` - Takes a byte array and returns a base64 string + +## license + +MIT diff --git a/code/application_liste/app/node_modules/base64-js/base64js.min.js b/code/application_liste/app/node_modules/base64-js/base64js.min.js new file mode 100644 index 0000000..b0279c0 --- /dev/null +++ b/code/application_liste/app/node_modules/base64-js/base64js.min.js @@ -0,0 +1 @@ +(function(r){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=r()}else if(typeof define==="function"&&define.amd){define([],r)}else{var e;if(typeof window!=="undefined"){e=window}else if(typeof global!=="undefined"){e=global}else if(typeof self!=="undefined"){e=self}else{e=this}e.base64js=r()}})(function(){var r,e,n;return function(){function d(a,f,i){function u(n,r){if(!f[n]){if(!a[n]){var e="function"==typeof require&&require;if(!r&&e)return e(n,!0);if(v)return v(n,!0);var t=new Error("Cannot find module '"+n+"'");throw t.code="MODULE_NOT_FOUND",t}var o=f[n]={exports:{}};a[n][0].call(o.exports,function(r){var e=a[n][1][r];return u(e||r)},o,o.exports,d,a,f,i)}return f[n].exports}for(var v="function"==typeof require&&require,r=0;r0){throw new Error("Invalid string. Length must be a multiple of 4")}var n=r.indexOf("=");if(n===-1)n=e;var t=n===e?0:4-n%4;return[n,t]}function f(r){var e=c(r);var n=e[0];var t=e[1];return(n+t)*3/4-t}function h(r,e,n){return(e+n)*3/4-n}function i(r){var e;var n=c(r);var t=n[0];var o=n[1];var a=new d(h(r,t,o));var f=0;var i=o>0?t-4:t;var u;for(u=0;u>16&255;a[f++]=e>>8&255;a[f++]=e&255}if(o===2){e=v[r.charCodeAt(u)]<<2|v[r.charCodeAt(u+1)]>>4;a[f++]=e&255}if(o===1){e=v[r.charCodeAt(u)]<<10|v[r.charCodeAt(u+1)]<<4|v[r.charCodeAt(u+2)]>>2;a[f++]=e>>8&255;a[f++]=e&255}return a}function s(r){return u[r>>18&63]+u[r>>12&63]+u[r>>6&63]+u[r&63]}function l(r,e,n){var t;var o=[];for(var a=e;ai?i:f+a))}if(t===1){e=r[n-1];o.push(u[e>>2]+u[e<<4&63]+"==")}else if(t===2){e=(r[n-2]<<8)+r[n-1];o.push(u[e>>10]+u[e>>4&63]+u[e<<2&63]+"=")}return o.join("")}},{}]},{},[])("/")}); diff --git a/code/application_liste/app/node_modules/base64-js/index.js b/code/application_liste/app/node_modules/base64-js/index.js new file mode 100644 index 0000000..f087f5b --- /dev/null +++ b/code/application_liste/app/node_modules/base64-js/index.js @@ -0,0 +1,152 @@ +'use strict' + +exports.byteLength = byteLength +exports.toByteArray = toByteArray +exports.fromByteArray = fromByteArray + +var lookup = [] +var revLookup = [] +var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array + +var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' +for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i] + revLookup[code.charCodeAt(i)] = i +} + +// Support decoding URL-safe base64 strings, as Node.js does. +// See: https://en.wikipedia.org/wiki/Base64#URL_applications +revLookup['-'.charCodeAt(0)] = 62 +revLookup['_'.charCodeAt(0)] = 63 + +function getLens (b64) { + var len = b64.length + + if (len % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // Trim off extra bytes after placeholder bytes are found + // See: https://github.com/beatgammit/base64-js/issues/42 + var validLen = b64.indexOf('=') + if (validLen === -1) validLen = len + + var placeHoldersLen = validLen === len + ? 0 + : 4 - (validLen % 4) + + return [validLen, placeHoldersLen] +} + +// base64 is 4/3 + up to two characters of the original data +function byteLength (b64) { + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function _byteLength (b64, validLen, placeHoldersLen) { + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function toByteArray (b64) { + var tmp + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + + var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) + + var curByte = 0 + + // if there are placeholders, only get up to the last complete 4 chars + var len = placeHoldersLen > 0 + ? validLen - 4 + : validLen + + var i + for (i = 0; i < len; i += 4) { + tmp = + (revLookup[b64.charCodeAt(i)] << 18) | + (revLookup[b64.charCodeAt(i + 1)] << 12) | + (revLookup[b64.charCodeAt(i + 2)] << 6) | + revLookup[b64.charCodeAt(i + 3)] + arr[curByte++] = (tmp >> 16) & 0xFF + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 2) { + tmp = + (revLookup[b64.charCodeAt(i)] << 2) | + (revLookup[b64.charCodeAt(i + 1)] >> 4) + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 1) { + tmp = + (revLookup[b64.charCodeAt(i)] << 10) | + (revLookup[b64.charCodeAt(i + 1)] << 4) | + (revLookup[b64.charCodeAt(i + 2)] >> 2) + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + return arr +} + +function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + + lookup[num >> 12 & 0x3F] + + lookup[num >> 6 & 0x3F] + + lookup[num & 0x3F] +} + +function encodeChunk (uint8, start, end) { + var tmp + var output = [] + for (var i = start; i < end; i += 3) { + tmp = + ((uint8[i] << 16) & 0xFF0000) + + ((uint8[i + 1] << 8) & 0xFF00) + + (uint8[i + 2] & 0xFF) + output.push(tripletToBase64(tmp)) + } + return output.join('') +} + +function fromByteArray (uint8) { + var tmp + var len = uint8.length + var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes + var parts = [] + var maxChunkLength = 16383 // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk( + uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength) + )) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1] + parts.push( + lookup[tmp >> 2] + + lookup[(tmp << 4) & 0x3F] + + '==' + ) + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + uint8[len - 1] + parts.push( + lookup[tmp >> 10] + + lookup[(tmp >> 4) & 0x3F] + + lookup[(tmp << 2) & 0x3F] + + '=' + ) + } + + return parts.join('') +} diff --git a/code/application_liste/app/node_modules/base64-js/package.json b/code/application_liste/app/node_modules/base64-js/package.json new file mode 100644 index 0000000..88616d0 --- /dev/null +++ b/code/application_liste/app/node_modules/base64-js/package.json @@ -0,0 +1,60 @@ +{ + "_from": "base64-js@^1.0.2", + "_id": "base64-js@1.3.1", + "_inBundle": false, + "_integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==", + "_location": "/base64-js", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "base64-js@^1.0.2", + "name": "base64-js", + "escapedName": "base64-js", + "rawSpec": "^1.0.2", + "saveSpec": null, + "fetchSpec": "^1.0.2" + }, + "_requiredBy": [ + "/buffer" + ], + "_resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", + "_shasum": "58ece8cb75dd07e71ed08c736abc5fac4dbf8df1", + "_spec": "base64-js@^1.0.2", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\buffer", + "author": { + "name": "T. Jameson Little", + "email": "t.jameson.little@gmail.com" + }, + "bugs": { + "url": "https://github.com/beatgammit/base64-js/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Base64 encoding/decoding in pure JS", + "devDependencies": { + "benchmark": "^2.1.4", + "browserify": "^16.3.0", + "standard": "*", + "tape": "4.x", + "uglify-js": "^3.6.0" + }, + "homepage": "https://github.com/beatgammit/base64-js", + "keywords": [ + "base64" + ], + "license": "MIT", + "main": "index.js", + "name": "base64-js", + "repository": { + "type": "git", + "url": "git://github.com/beatgammit/base64-js.git" + }, + "scripts": { + "build": "browserify -s base64js -r ./ | uglifyjs -m > base64js.min.js", + "lint": "standard", + "test": "npm run lint && npm run unit", + "unit": "tape test/*.js" + }, + "version": "1.3.1" +} diff --git a/code/application_liste/app/node_modules/batch/.npmignore b/code/application_liste/app/node_modules/batch/.npmignore new file mode 100644 index 0000000..f1250e5 --- /dev/null +++ b/code/application_liste/app/node_modules/batch/.npmignore @@ -0,0 +1,4 @@ +support +test +examples +*.sock diff --git a/code/application_liste/app/node_modules/batch/History.md b/code/application_liste/app/node_modules/batch/History.md new file mode 100644 index 0000000..f7e9b76 --- /dev/null +++ b/code/application_liste/app/node_modules/batch/History.md @@ -0,0 +1,93 @@ +0.6.1 / 2017-05-16 +================== + + * fix `process.nextTick` detection in Node.js + +0.6.0 / 2017-03-25 +================== + + * always invoke end callback asynchronously + * fix compatibility with component v1 + * fix license field + +0.5.3 / 2015-10-01 +================== + + * fix for browserify + +0.5.2 / 2014-12-22 +================== + + * add brower field + * add license to package.json + +0.5.1 / 2014-06-19 +================== + + * add repository field to readme (exciting) + +0.5.0 / 2013-07-29 +================== + + * add `.throws(true)` to opt-in to responding with an array of error objects + * make `new` optional + +0.4.0 / 2013-06-05 +================== + + * add catching of immediate callback errors + +0.3.2 / 2013-03-15 +================== + + * remove Emitter call in constructor + +0.3.1 / 2013-03-13 +================== + + * add Emitter() mixin for client. Closes #8 + +0.3.0 / 2013-03-13 +================== + + * add component.json + * add result example + * add .concurrency support + * add concurrency example + * add parallel example + +0.2.1 / 2012-11-08 +================== + + * add .start, .end, and .duration properties + * change dependencies to devDependencies + +0.2.0 / 2012-10-04 +================== + + * add progress events. Closes #5 (__BREAKING CHANGE__) + +0.1.1 / 2012-07-03 +================== + + * change "complete" event to "progress" + +0.1.0 / 2012-07-03 +================== + + * add Emitter inheritance and emit "complete" [burcu] + +0.0.3 / 2012-06-02 +================== + + * Callback results should be in the order of the queued functions. + +0.0.2 / 2012-02-12 +================== + + * any node + +0.0.1 / 2010-01-03 +================== + + * Initial release diff --git a/code/application_liste/app/node_modules/batch/LICENSE b/code/application_liste/app/node_modules/batch/LICENSE new file mode 100644 index 0000000..b740930 --- /dev/null +++ b/code/application_liste/app/node_modules/batch/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2013 TJ Holowaychuk + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/batch/Makefile b/code/application_liste/app/node_modules/batch/Makefile new file mode 100644 index 0000000..634e372 --- /dev/null +++ b/code/application_liste/app/node_modules/batch/Makefile @@ -0,0 +1,6 @@ + +test: + @./node_modules/.bin/mocha \ + --require should + +.PHONY: test \ No newline at end of file diff --git a/code/application_liste/app/node_modules/batch/Readme.md b/code/application_liste/app/node_modules/batch/Readme.md new file mode 100644 index 0000000..c2b4d3d --- /dev/null +++ b/code/application_liste/app/node_modules/batch/Readme.md @@ -0,0 +1,53 @@ + +# batch + + Simple async batch with concurrency control and progress reporting. + +## Installation + +``` +$ npm install batch +``` + +## API + +```js +var Batch = require('batch') + , batch = new Batch; + +batch.concurrency(4); + +ids.forEach(function(id){ + batch.push(function(done){ + User.get(id, done); + }); +}); + +batch.on('progress', function(e){ + +}); + +batch.end(function(err, users){ + +}); +``` + +### Progress events + + Contain the "job" index, response value, duration information, and completion data. + +``` +{ index: 1, + value: 'bar', + pending: 2, + total: 3, + complete: 2, + percent: 66, + start: Thu Oct 04 2012 12:25:53 GMT-0700 (PDT), + end: Thu Oct 04 2012 12:25:53 GMT-0700 (PDT), + duration: 0 } +``` + +## License + +[MIT](LICENSE) diff --git a/code/application_liste/app/node_modules/batch/component.json b/code/application_liste/app/node_modules/batch/component.json new file mode 100644 index 0000000..2715596 --- /dev/null +++ b/code/application_liste/app/node_modules/batch/component.json @@ -0,0 +1,14 @@ +{ + "name": "batch", + "repo": "visionmedia/batch", + "description": "Async task batching", + "version": "0.6.1", + "keywords": ["batch", "async", "utility", "concurrency", "concurrent"], + "dependencies": { + "component/emitter": "*" + }, + "development": {}, + "scripts": [ + "index.js" + ] +} diff --git a/code/application_liste/app/node_modules/batch/index.js b/code/application_liste/app/node_modules/batch/index.js new file mode 100644 index 0000000..5b40255 --- /dev/null +++ b/code/application_liste/app/node_modules/batch/index.js @@ -0,0 +1,173 @@ +/** + * Module dependencies. + */ + +try { + var EventEmitter = require('events').EventEmitter; + if (!EventEmitter) throw new Error(); +} catch (err) { + var Emitter = require('emitter'); +} + +/** + * Defer. + */ + +var defer = typeof process !== 'undefined' && process && typeof process.nextTick === 'function' + ? process.nextTick + : function(fn){ setTimeout(fn); }; + +/** + * Noop. + */ + +function noop(){} + +/** + * Expose `Batch`. + */ + +module.exports = Batch; + +/** + * Create a new Batch. + */ + +function Batch() { + if (!(this instanceof Batch)) return new Batch; + this.fns = []; + this.concurrency(Infinity); + this.throws(true); + for (var i = 0, len = arguments.length; i < len; ++i) { + this.push(arguments[i]); + } +} + +/** + * Inherit from `EventEmitter.prototype`. + */ + +if (EventEmitter) { + Batch.prototype.__proto__ = EventEmitter.prototype; +} else { + Emitter(Batch.prototype); +} + +/** + * Set concurrency to `n`. + * + * @param {Number} n + * @return {Batch} + * @api public + */ + +Batch.prototype.concurrency = function(n){ + this.n = n; + return this; +}; + +/** + * Queue a function. + * + * @param {Function} fn + * @return {Batch} + * @api public + */ + +Batch.prototype.push = function(fn){ + this.fns.push(fn); + return this; +}; + +/** + * Set wether Batch will or will not throw up. + * + * @param {Boolean} throws + * @return {Batch} + * @api public + */ +Batch.prototype.throws = function(throws) { + this.e = !!throws; + return this; +}; + +/** + * Execute all queued functions in parallel, + * executing `cb(err, results)`. + * + * @param {Function} cb + * @return {Batch} + * @api public + */ + +Batch.prototype.end = function(cb){ + var self = this + , total = this.fns.length + , pending = total + , results = [] + , errors = [] + , cb = cb || noop + , fns = this.fns + , max = this.n + , throws = this.e + , index = 0 + , done; + + // empty + if (!fns.length) return defer(function(){ + cb(null, results); + }); + + // process + function next() { + var i = index++; + var fn = fns[i]; + if (!fn) return; + var start = new Date; + + try { + fn(callback); + } catch (err) { + callback(err); + } + + function callback(err, res){ + if (done) return; + if (err && throws) return done = true, defer(function(){ + cb(err); + }); + var complete = total - pending + 1; + var end = new Date; + + results[i] = res; + errors[i] = err; + + self.emit('progress', { + index: i, + value: res, + error: err, + pending: pending, + total: total, + complete: complete, + percent: complete / total * 100 | 0, + start: start, + end: end, + duration: end - start + }); + + if (--pending) next(); + else defer(function(){ + if(!throws) cb(errors, results); + else cb(null, results); + }); + } + } + + // concurrency + for (var i = 0; i < fns.length; i++) { + if (i == max) break; + next(); + } + + return this; +}; diff --git a/code/application_liste/app/node_modules/batch/package.json b/code/application_liste/app/node_modules/batch/package.json new file mode 100644 index 0000000..4140cba --- /dev/null +++ b/code/application_liste/app/node_modules/batch/package.json @@ -0,0 +1,51 @@ +{ + "_from": "batch@^0.6.1", + "_id": "batch@0.6.1", + "_inBundle": false, + "_integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=", + "_location": "/batch", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "batch@^0.6.1", + "name": "batch", + "escapedName": "batch", + "rawSpec": "^0.6.1", + "saveSpec": null, + "fetchSpec": "^0.6.1" + }, + "_requiredBy": [ + "/extract-css" + ], + "_resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "_shasum": "dc34314f4e679318093fc760272525f94bf25c16", + "_spec": "batch@^0.6.1", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\extract-css", + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca" + }, + "browser": { + "emitter": "events" + }, + "bugs": { + "url": "https://github.com/visionmedia/batch/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Simple async batch with concurrency control and progress reporting.", + "devDependencies": { + "mocha": "*", + "should": "*" + }, + "homepage": "https://github.com/visionmedia/batch#readme", + "license": "MIT", + "main": "index", + "name": "batch", + "repository": { + "type": "git", + "url": "git+https://github.com/visionmedia/batch.git" + }, + "version": "0.6.1" +} diff --git a/code/application_liste/app/node_modules/bin-build/index.js b/code/application_liste/app/node_modules/bin-build/index.js new file mode 100644 index 0000000..525968a --- /dev/null +++ b/code/application_liste/app/node_modules/bin-build/index.js @@ -0,0 +1,43 @@ +'use strict'; +const decompress = require('decompress'); +const download = require('download'); +const execa = require('execa'); +const pMapSeries = require('p-map-series'); +const tempfile = require('tempfile'); + +const exec = (cmd, cwd) => pMapSeries(cmd, x => execa.shell(x, {cwd})); + +exports.directory = (dir, cmd) => { + if (typeof dir !== 'string') { + return Promise.reject(new TypeError(`Expected a \`string\`, got \`${typeof dir}\``)); + } + + return exec(cmd, dir); +}; + +exports.file = (file, cmd, opts) => { + opts = Object.assign({strip: 1}, opts); + + if (typeof file !== 'string') { + return Promise.reject(new TypeError(`Expected a \`string\`, got \`${typeof file}\``)); + } + + const tmp = tempfile(); + + return decompress(file, tmp, opts).then(() => exec(cmd, tmp)); +}; + +exports.url = (url, cmd, opts) => { + opts = Object.assign({ + extract: true, + strip: 1 + }, opts); + + if (typeof url !== 'string') { + return Promise.reject(new TypeError(`Expected a \`string\`, got \`${typeof url}\``)); + } + + const tmp = tempfile(); + + return download(url, tmp, opts).then(() => exec(cmd, tmp)); +}; diff --git a/code/application_liste/app/node_modules/bin-build/license b/code/application_liste/app/node_modules/bin-build/license new file mode 100644 index 0000000..0f8cf79 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-build/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Kevin Martensson (github.com/kevva) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/bin-build/package.json b/code/application_liste/app/node_modules/bin-build/package.json new file mode 100644 index 0000000..b5756bf --- /dev/null +++ b/code/application_liste/app/node_modules/bin-build/package.json @@ -0,0 +1,80 @@ +{ + "_from": "bin-build@^3.0.0", + "_id": "bin-build@3.0.0", + "_inBundle": false, + "_integrity": "sha512-jcUOof71/TNAI2uM5uoUaDq2ePcVBQ3R/qhxAz1rX7UfvduAL/RXD3jXzvn8cVcDJdGVkiR1shal3OH0ImpuhA==", + "_location": "/bin-build", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "bin-build@^3.0.0", + "name": "bin-build", + "escapedName": "bin-build", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/gifsicle", + "/guetzli", + "/mozjpeg", + "/optipng-bin", + "/pngquant-bin", + "/zopflipng-bin" + ], + "_resolved": "https://registry.npmjs.org/bin-build/-/bin-build-3.0.0.tgz", + "_shasum": "c5780a25a8a9f966d8244217e6c1f5082a143861", + "_spec": "bin-build@^3.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\gifsicle", + "author": { + "name": "Kevin Mårtensson", + "email": "kevinmartensson@gmail.com", + "url": "https://github.com/kevva" + }, + "bugs": { + "url": "https://github.com/kevva/bin-build/issues" + }, + "bundleDependencies": false, + "dependencies": { + "decompress": "^4.0.0", + "download": "^6.2.2", + "execa": "^0.7.0", + "p-map-series": "^1.0.0", + "tempfile": "^2.0.0" + }, + "deprecated": false, + "description": "Easily build binaries", + "devDependencies": { + "ava": "*", + "del": "^3.0.0", + "nock": "^9.0.0", + "path-exists": "^3.0.0", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/kevva/bin-build#readme", + "keywords": [ + "binary", + "build", + "make" + ], + "license": "MIT", + "name": "bin-build", + "repository": { + "type": "git", + "url": "git+https://github.com/kevva/bin-build.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.0.0", + "xo": { + "esnext": true + } +} diff --git a/code/application_liste/app/node_modules/bin-build/readme.md b/code/application_liste/app/node_modules/bin-build/readme.md new file mode 100644 index 0000000..31b559b --- /dev/null +++ b/code/application_liste/app/node_modules/bin-build/readme.md @@ -0,0 +1,103 @@ +# bin-build [![Build Status](https://travis-ci.org/kevva/bin-build.svg?branch=master)](https://travis-ci.org/kevva/bin-build) + +> Easily build binaries + + +## Install + +``` +$ npm install --save bin-build +``` + + +## Usage + +```js +const binBuild = require('bin-build'); + +binBuild.url('http://www.lcdf.org/gifsicle/gifsicle-1.80.tar.gz', [ + './configure --disable-gifview --disable-gifdiff', + 'make install' +]).then(() => { + console.log('gifsicle built successfully'); +}); + +binBuild.file('gifsicle-1.80.tar.gz', [ + './configure --disable-gifview --disable-gifdiff', + 'make install' +]).then(() => { + console.log('gifsicle built successfully'); +}); +``` + + +## API + +### binBuild.directory(directory, commands) + +#### directory + +Type: `string` + +Path to a directory containing the source code. + +#### commands + +Type: `Array` + +Commands to run when building. + +### binBuild.file(file, commands, [options]) + +#### file + +Type: `string` + +Path to a archive file containing the source code. + +#### commands + +Type: `Array` + +Commands to run when building. + +#### options + +Type: `Object` + +##### strip + +Type: `number`
+Default: `1` + +Strip a number of leading paths from file names on extraction. + +### binBuild.url(url, commands, [options]) + +#### url + +Type: `string` + +URL to a archive file containing the source code. + +#### commands + +Type: `Array` + +Commands to run when building. + +#### options + +Type: `Object` + +##### strip + +Type: `number`
+Default: `1` + +Strip a number of leading paths from file names on extraction. + + +## License + +MIT © [Kevin Mårtensson](https://github.com/kevva) diff --git a/code/application_liste/app/node_modules/bin-check/index.js b/code/application_liste/app/node_modules/bin-check/index.js new file mode 100644 index 0000000..49100bd --- /dev/null +++ b/code/application_liste/app/node_modules/bin-check/index.js @@ -0,0 +1,31 @@ +'use strict'; +const execa = require('execa'); +const executable = require('executable'); + +module.exports = (bin, args) => { + if (!Array.isArray(args)) { + args = ['--help']; + } + + return executable(bin) + .then(works => { + if (!works) { + throw new Error(`Couldn't execute the \`${bin}\` binary. Make sure it has the right permissions.`); + } + + return execa(bin, args); + }) + .then(res => res.code === 0); +}; + +module.exports.sync = (bin, args) => { + if (!Array.isArray(args)) { + args = ['--help']; + } + + if (!executable.sync(bin)) { + throw new Error(`Couldn't execute the \`${bin}\` binary. Make sure it has the right permissions.`); + } + + return execa.sync(bin, args).status === 0; +}; diff --git a/code/application_liste/app/node_modules/bin-check/license b/code/application_liste/app/node_modules/bin-check/license new file mode 100644 index 0000000..e0e9158 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-check/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Kevin Mårtensson (github.com/kevva) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/bin-check/package.json b/code/application_liste/app/node_modules/bin-check/package.json new file mode 100644 index 0000000..78cee0e --- /dev/null +++ b/code/application_liste/app/node_modules/bin-check/package.json @@ -0,0 +1,67 @@ +{ + "_from": "bin-check@^4.1.0", + "_id": "bin-check@4.1.0", + "_inBundle": false, + "_integrity": "sha512-b6weQyEUKsDGFlACWSIOfveEnImkJyK/FGW6FAG42loyoquvjdtOIqO6yBFzHyqyVVhNgNkQxxx09SFLK28YnA==", + "_location": "/bin-check", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "bin-check@^4.1.0", + "name": "bin-check", + "escapedName": "bin-check", + "rawSpec": "^4.1.0", + "saveSpec": null, + "fetchSpec": "^4.1.0" + }, + "_requiredBy": [ + "/bin-wrapper" + ], + "_resolved": "https://registry.npmjs.org/bin-check/-/bin-check-4.1.0.tgz", + "_shasum": "fc495970bdc88bb1d5a35fc17e65c4a149fc4a49", + "_spec": "bin-check@^4.1.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\bin-wrapper", + "author": { + "name": "Kevin Mårtensson", + "email": "kevinmartensson@gmail.com", + "url": "https://github.com/kevva" + }, + "bugs": { + "url": "https://github.com/kevva/bin-check/issues" + }, + "bundleDependencies": false, + "dependencies": { + "execa": "^0.7.0", + "executable": "^4.1.0" + }, + "deprecated": false, + "description": "Check if a binary is working", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/kevva/bin-check#readme", + "keywords": [ + "binary", + "check", + "executable", + "test" + ], + "license": "MIT", + "name": "bin-check", + "repository": { + "type": "git", + "url": "git+https://github.com/kevva/bin-check.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "4.1.0" +} diff --git a/code/application_liste/app/node_modules/bin-check/readme.md b/code/application_liste/app/node_modules/bin-check/readme.md new file mode 100644 index 0000000..111f1f2 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-check/readme.md @@ -0,0 +1,51 @@ +# bin-check [![Build Status](https://travis-ci.org/kevva/bin-check.svg?branch=master)](https://travis-ci.org/kevva/bin-check) + +> Check if a binary is working by checking its exit code + + +## Install + +``` +$ npm install bin-check +``` + + +## Usage + +```js +const binCheck = require('bin-check'); + +binCheck('/bin/sh', ['--version']).then(works => { + console.log(works); + //=> true +}); +``` + + +## API + +### binCheck(binary, [arguments]) + +Returns a `Promise` for a `boolean`. + +### binCheck.sync(binary, [arguments]) + +Returns a `boolean`. + +#### binary + +Type: `string` + +Path to the binary. + +#### arguments + +Type: `Array`
+Default: `['--help']` + +Arguments to run the binary with. + + +## License + +MIT © [Kevin Mårtensson](https://github.com/kevva) diff --git a/code/application_liste/app/node_modules/bin-version-check/index.js b/code/application_liste/app/node_modules/bin-version-check/index.js new file mode 100644 index 0000000..5d3ae82 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version-check/index.js @@ -0,0 +1,22 @@ +'use strict'; +const semver = require('semver'); +const binVersion = require('bin-version'); +const semverTruncate = require('semver-truncate'); + +module.exports = (binary, semverRange, options) => { + if (typeof binary !== 'string' || typeof semverRange !== 'string') { + return Promise.reject(new Error('`binary` and `semverRange` arguments required')); + } + + if (!semver.validRange(semverRange)) { + return Promise.reject(new Error('Invalid version range')); + } + + return binVersion(binary, options).then(binaryVersion => { + if (!semver.satisfies(semverTruncate(binaryVersion, 'patch'), semverRange)) { + const error = new Error(`${binary} ${binaryVersion} doesn't satisfy the version requirement of ${semverRange}`); + error.name = 'InvalidBinaryVersion'; + throw error; + } + }); +}; diff --git a/code/application_liste/app/node_modules/bin-version-check/license b/code/application_liste/app/node_modules/bin-version-check/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version-check/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/bin-version-check/package.json b/code/application_liste/app/node_modules/bin-version-check/package.json new file mode 100644 index 0000000..b839a03 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version-check/package.json @@ -0,0 +1,75 @@ +{ + "_from": "bin-version-check@^4.0.0", + "_id": "bin-version-check@4.0.0", + "_inBundle": false, + "_integrity": "sha512-sR631OrhC+1f8Cvs8WyVWOA33Y8tgwjETNPyyD/myRBXLkfS/vl74FmH/lFcRl9KY3zwGh7jFhvyk9vV3/3ilQ==", + "_location": "/bin-version-check", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "bin-version-check@^4.0.0", + "name": "bin-version-check", + "escapedName": "bin-version-check", + "rawSpec": "^4.0.0", + "saveSpec": null, + "fetchSpec": "^4.0.0" + }, + "_requiredBy": [ + "/bin-wrapper" + ], + "_resolved": "https://registry.npmjs.org/bin-version-check/-/bin-version-check-4.0.0.tgz", + "_shasum": "7d819c62496991f80d893e6e02a3032361608f71", + "_spec": "bin-version-check@^4.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\bin-wrapper", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/bin-version-check/issues" + }, + "bundleDependencies": false, + "dependencies": { + "bin-version": "^3.0.0", + "semver": "^5.6.0", + "semver-truncate": "^1.1.2" + }, + "deprecated": false, + "description": "Check whether a binary version satisfies a semver range", + "devDependencies": { + "ava": "^1.0.0-rc.1", + "xo": "^0.23.0" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/bin-version-check#readme", + "keywords": [ + "cli", + "bin", + "binary", + "executable", + "version", + "semver", + "semantic", + "range", + "satisfy", + "check", + "validate" + ], + "license": "MIT", + "name": "bin-version-check", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/bin-version-check.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "4.0.0" +} diff --git a/code/application_liste/app/node_modules/bin-version-check/readme.md b/code/application_liste/app/node_modules/bin-version-check/readme.md new file mode 100644 index 0000000..6c48c92 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version-check/readme.md @@ -0,0 +1,71 @@ +# bin-version-check [![Build Status](https://travis-ci.org/sindresorhus/bin-version-check.svg?branch=master)](https://travis-ci.org/sindresorhus/bin-version-check) + +> Check whether a binary version satisfies a [semver range](https://github.com/npm/node-semver#ranges) + +Useful when you have a thing that only works with specific versions of a binary. + + +## Install + +``` +$ npm install bin-version-check +``` + + +## Usage + +``` +$ curl --version +curl 7.30.0 (x86_64-apple-darwin13.0) +``` + +```js +const binVersionCheck = require('bin-version-check'); + +(async () => { + try { + await binVersionCheck('curl', '>=8'); + } catch (error) { + console.log(error); + //=> 'InvalidBinVersion: curl 7.30.0 doesn't satisfy the version requirement of >=8' + } +})(); +``` + + +## API + +### binVersionCheck(binary, semverRange, [options]) + +#### binary + +Type: `string` + +Name or path of the binary to check. + +#### semverRange + +Type: `string` + +[Semver range](https://github.com/npm/node-semver#ranges) to check against. + +#### options + +Type: `Object` + +##### args + +Type: `string[]` +Default: `['--version']` + +CLI arguments used to get the binary version. + + +## Related + +- [bin-version-check-cli](https://github.com/sindresorhus/bin-version-check-cli) - CLI for this module + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/code/application_liste/app/node_modules/bin-version/index.d.ts b/code/application_liste/app/node_modules/bin-version/index.d.ts new file mode 100644 index 0000000..00287ae --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/index.d.ts @@ -0,0 +1,43 @@ +declare namespace binVersion { + interface Options { + /** + The arguments to pass to `binary` so that it will print its version. + + @default ['--version'] + */ + args?: string[]; + } +} + +/** +Get the version of a binary in [semver](https://github.com/npm/node-semver) format. + +@param binary - The name of or path to the binary to get the version from. +@returns The version of the `binary`. + +@example +``` +import binVersion = require('bin-version'); + +(async () => { + // $ curl --version + // curl 7.30.0 (x86_64-apple-darwin13.0) + + console.log(await binVersion('curl')); + //=> '7.30.0' + + + // $ openssl version + // OpenSSL 1.0.2d 9 Jul 2015 + + console.log(await binVersion('openssl', {args: ['version']})); + //=> '1.0.2' +})(); +``` +*/ +declare function binVersion( + binary: string, + options?: binVersion.Options +): Promise; + +export = binVersion; diff --git a/code/application_liste/app/node_modules/bin-version/index.js b/code/application_liste/app/node_modules/bin-version/index.js new file mode 100644 index 0000000..303e996 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/index.js @@ -0,0 +1,15 @@ +'use strict'; +const execa = require('execa'); +const findVersions = require('find-versions'); + +module.exports = (binary, options = {}) => { + return execa(binary, options.args || ['--version']) + .then(result => findVersions(result.stdout || result.stderr, {loose: true})[0]) + .catch(error => { + if (error.code === 'ENOENT') { + error.message = `Couldn't find the \`${binary}\` binary. Make sure it's installed and in your $PATH.`; + } + + throw error; + }); +}; diff --git a/code/application_liste/app/node_modules/bin-version/license b/code/application_liste/app/node_modules/bin-version/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/bin-version/node_modules/cross-spawn/CHANGELOG.md b/code/application_liste/app/node_modules/bin-version/node_modules/cross-spawn/CHANGELOG.md new file mode 100644 index 0000000..ded9620 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/node_modules/cross-spawn/CHANGELOG.md @@ -0,0 +1,100 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +
+## [6.0.5](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.4...v6.0.5) (2018-03-02) + + +### Bug Fixes + +* avoid using deprecated Buffer constructor ([#94](https://github.com/moxystudio/node-cross-spawn/issues/94)) ([d5770df](https://github.com/moxystudio/node-cross-spawn/commit/d5770df)), closes [/nodejs.org/api/deprecations.html#deprecations_dep0005](https://github.com//nodejs.org/api/deprecations.html/issues/deprecations_dep0005) + + + + +## [6.0.4](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.3...v6.0.4) (2018-01-31) + + +### Bug Fixes + +* fix paths being incorrectly normalized on unix ([06ee3c6](https://github.com/moxystudio/node-cross-spawn/commit/06ee3c6)), closes [#90](https://github.com/moxystudio/node-cross-spawn/issues/90) + + + + +## [6.0.3](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.2...v6.0.3) (2018-01-23) + + + + +## [6.0.2](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.1...v6.0.2) (2018-01-23) + + + + +## [6.0.1](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.0...v6.0.1) (2018-01-23) + + + + +# [6.0.0](https://github.com/moxystudio/node-cross-spawn/compare/5.1.0...6.0.0) (2018-01-23) + + +### Bug Fixes + +* fix certain arguments not being correctly escaped or causing batch syntax error ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)), closes [#82](https://github.com/moxystudio/node-cross-spawn/issues/82) [#51](https://github.com/moxystudio/node-cross-spawn/issues/51) +* fix commands as posix relatixe paths not working correctly, e.g.: `./my-command` ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) +* fix `options` argument being mutated ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) +* fix commands resolution when PATH was actually Path ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) + + +### Features + +* improve compliance with node's ENOENT errors ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) +* improve detection of node's shell option support ([900cf10](https://github.com/moxystudio/node-cross-spawn/commit/900cf10)) + + +### Chores + +* upgrade tooling +* upgrate project to es6 (node v4) + + +### BREAKING CHANGES + +* remove support for older nodejs versions, only `node >= 4` is supported + + + +## [5.1.0](https://github.com/moxystudio/node-cross-spawn/compare/5.0.1...5.1.0) (2017-02-26) + + +### Bug Fixes + +* fix `options.shell` support for NodeJS [v4.8](https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V4.md#4.8.0) + + + +## [5.0.1](https://github.com/moxystudio/node-cross-spawn/compare/5.0.0...5.0.1) (2016-11-04) + + +### Bug Fixes + +* fix `options.shell` support for NodeJS v7 + + + +# [5.0.0](https://github.com/moxystudio/node-cross-spawn/compare/4.0.2...5.0.0) (2016-10-30) + + +## Features + +* add support for `options.shell` +* improve parsing of shebangs by using [`shebang-command`](https://github.com/kevva/shebang-command) module + + +## Chores + +* refactor some code to make it more clear +* update README caveats diff --git a/code/application_liste/app/node_modules/bin-version/node_modules/cross-spawn/LICENSE b/code/application_liste/app/node_modules/bin-version/node_modules/cross-spawn/LICENSE new file mode 100644 index 0000000..8407b9a --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/node_modules/cross-spawn/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2018 Made With MOXY Lda + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/bin-version/node_modules/cross-spawn/README.md b/code/application_liste/app/node_modules/bin-version/node_modules/cross-spawn/README.md new file mode 100644 index 0000000..e895cd7 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/node_modules/cross-spawn/README.md @@ -0,0 +1,94 @@ +# cross-spawn + +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Build status][appveyor-image]][appveyor-url] [![Coverage Status][codecov-image]][codecov-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url] [![Greenkeeper badge][greenkeeper-image]][greenkeeper-url] + +[npm-url]:https://npmjs.org/package/cross-spawn +[downloads-image]:http://img.shields.io/npm/dm/cross-spawn.svg +[npm-image]:http://img.shields.io/npm/v/cross-spawn.svg +[travis-url]:https://travis-ci.org/moxystudio/node-cross-spawn +[travis-image]:http://img.shields.io/travis/moxystudio/node-cross-spawn/master.svg +[appveyor-url]:https://ci.appveyor.com/project/satazor/node-cross-spawn +[appveyor-image]:https://img.shields.io/appveyor/ci/satazor/node-cross-spawn/master.svg +[codecov-url]:https://codecov.io/gh/moxystudio/node-cross-spawn +[codecov-image]:https://img.shields.io/codecov/c/github/moxystudio/node-cross-spawn/master.svg +[david-dm-url]:https://david-dm.org/moxystudio/node-cross-spawn +[david-dm-image]:https://img.shields.io/david/moxystudio/node-cross-spawn.svg +[david-dm-dev-url]:https://david-dm.org/moxystudio/node-cross-spawn?type=dev +[david-dm-dev-image]:https://img.shields.io/david/dev/moxystudio/node-cross-spawn.svg +[greenkeeper-image]:https://badges.greenkeeper.io/moxystudio/node-cross-spawn.svg +[greenkeeper-url]:https://greenkeeper.io/ + +A cross platform solution to node's spawn and spawnSync. + + +## Installation + +`$ npm install cross-spawn` + + +## Why + +Node has issues when using spawn on Windows: + +- It ignores [PATHEXT](https://github.com/joyent/node/issues/2318) +- It does not support [shebangs](https://en.wikipedia.org/wiki/Shebang_(Unix)) +- Has problems running commands with [spaces](https://github.com/nodejs/node/issues/7367) +- Has problems running commands with posix relative paths (e.g.: `./my-folder/my-executable`) +- Has an [issue](https://github.com/moxystudio/node-cross-spawn/issues/82) with command shims (files in `node_modules/.bin/`), where arguments with quotes and parenthesis would result in [invalid syntax error](https://github.com/moxystudio/node-cross-spawn/blob/e77b8f22a416db46b6196767bcd35601d7e11d54/test/index.test.js#L149) +- No `options.shell` support on node `` where `` must not contain any arguments. +If you would like to have the shebang support improved, feel free to contribute via a pull-request. + +Remember to always test your code on Windows! + + +## Tests + +`$ npm test` +`$ npm test -- --watch` during development + +## License + +Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php). diff --git a/code/application_liste/app/node_modules/bin-version/node_modules/cross-spawn/index.js b/code/application_liste/app/node_modules/bin-version/node_modules/cross-spawn/index.js new file mode 100644 index 0000000..5509742 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/node_modules/cross-spawn/index.js @@ -0,0 +1,39 @@ +'use strict'; + +const cp = require('child_process'); +const parse = require('./lib/parse'); +const enoent = require('./lib/enoent'); + +function spawn(command, args, options) { + // Parse the arguments + const parsed = parse(command, args, options); + + // Spawn the child process + const spawned = cp.spawn(parsed.command, parsed.args, parsed.options); + + // Hook into child process "exit" event to emit an error if the command + // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 + enoent.hookChildProcess(spawned, parsed); + + return spawned; +} + +function spawnSync(command, args, options) { + // Parse the arguments + const parsed = parse(command, args, options); + + // Spawn the child process + const result = cp.spawnSync(parsed.command, parsed.args, parsed.options); + + // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16 + result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); + + return result; +} + +module.exports = spawn; +module.exports.spawn = spawn; +module.exports.sync = spawnSync; + +module.exports._parse = parse; +module.exports._enoent = enoent; diff --git a/code/application_liste/app/node_modules/bin-version/node_modules/cross-spawn/lib/enoent.js b/code/application_liste/app/node_modules/bin-version/node_modules/cross-spawn/lib/enoent.js new file mode 100644 index 0000000..14df9b6 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/node_modules/cross-spawn/lib/enoent.js @@ -0,0 +1,59 @@ +'use strict'; + +const isWin = process.platform === 'win32'; + +function notFoundError(original, syscall) { + return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), { + code: 'ENOENT', + errno: 'ENOENT', + syscall: `${syscall} ${original.command}`, + path: original.command, + spawnargs: original.args, + }); +} + +function hookChildProcess(cp, parsed) { + if (!isWin) { + return; + } + + const originalEmit = cp.emit; + + cp.emit = function (name, arg1) { + // If emitting "exit" event and exit code is 1, we need to check if + // the command exists and emit an "error" instead + // See https://github.com/IndigoUnited/node-cross-spawn/issues/16 + if (name === 'exit') { + const err = verifyENOENT(arg1, parsed, 'spawn'); + + if (err) { + return originalEmit.call(cp, 'error', err); + } + } + + return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params + }; +} + +function verifyENOENT(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, 'spawn'); + } + + return null; +} + +function verifyENOENTSync(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, 'spawnSync'); + } + + return null; +} + +module.exports = { + hookChildProcess, + verifyENOENT, + verifyENOENTSync, + notFoundError, +}; diff --git a/code/application_liste/app/node_modules/bin-version/node_modules/cross-spawn/lib/parse.js b/code/application_liste/app/node_modules/bin-version/node_modules/cross-spawn/lib/parse.js new file mode 100644 index 0000000..962827a --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/node_modules/cross-spawn/lib/parse.js @@ -0,0 +1,125 @@ +'use strict'; + +const path = require('path'); +const niceTry = require('nice-try'); +const resolveCommand = require('./util/resolveCommand'); +const escape = require('./util/escape'); +const readShebang = require('./util/readShebang'); +const semver = require('semver'); + +const isWin = process.platform === 'win32'; +const isExecutableRegExp = /\.(?:com|exe)$/i; +const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; + +// `options.shell` is supported in Node ^4.8.0, ^5.7.0 and >= 6.0.0 +const supportsShellOption = niceTry(() => semver.satisfies(process.version, '^4.8.0 || ^5.7.0 || >= 6.0.0', true)) || false; + +function detectShebang(parsed) { + parsed.file = resolveCommand(parsed); + + const shebang = parsed.file && readShebang(parsed.file); + + if (shebang) { + parsed.args.unshift(parsed.file); + parsed.command = shebang; + + return resolveCommand(parsed); + } + + return parsed.file; +} + +function parseNonShell(parsed) { + if (!isWin) { + return parsed; + } + + // Detect & add support for shebangs + const commandFile = detectShebang(parsed); + + // We don't need a shell if the command filename is an executable + const needsShell = !isExecutableRegExp.test(commandFile); + + // If a shell is required, use cmd.exe and take care of escaping everything correctly + // Note that `forceShell` is an hidden option used only in tests + if (parsed.options.forceShell || needsShell) { + // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/` + // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument + // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called, + // we need to double escape them + const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile); + + // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\bar) + // This is necessary otherwise it will always fail with ENOENT in those cases + parsed.command = path.normalize(parsed.command); + + // Escape command & arguments + parsed.command = escape.command(parsed.command); + parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars)); + + const shellCommand = [parsed.command].concat(parsed.args).join(' '); + + parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`]; + parsed.command = process.env.comspec || 'cmd.exe'; + parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped + } + + return parsed; +} + +function parseShell(parsed) { + // If node supports the shell option, there's no need to mimic its behavior + if (supportsShellOption) { + return parsed; + } + + // Mimic node shell option + // See https://github.com/nodejs/node/blob/b9f6a2dc059a1062776133f3d4fd848c4da7d150/lib/child_process.js#L335 + const shellCommand = [parsed.command].concat(parsed.args).join(' '); + + if (isWin) { + parsed.command = typeof parsed.options.shell === 'string' ? parsed.options.shell : process.env.comspec || 'cmd.exe'; + parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`]; + parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped + } else { + if (typeof parsed.options.shell === 'string') { + parsed.command = parsed.options.shell; + } else if (process.platform === 'android') { + parsed.command = '/system/bin/sh'; + } else { + parsed.command = '/bin/sh'; + } + + parsed.args = ['-c', shellCommand]; + } + + return parsed; +} + +function parse(command, args, options) { + // Normalize arguments, similar to nodejs + if (args && !Array.isArray(args)) { + options = args; + args = null; + } + + args = args ? args.slice(0) : []; // Clone array to avoid changing the original + options = Object.assign({}, options); // Clone object to avoid changing the original + + // Build our parsed object + const parsed = { + command, + args, + options, + file: undefined, + original: { + command, + args, + }, + }; + + // Delegate further parsing to shell or non-shell + return options.shell ? parseShell(parsed) : parseNonShell(parsed); +} + +module.exports = parse; diff --git a/code/application_liste/app/node_modules/bin-version/node_modules/cross-spawn/lib/util/escape.js b/code/application_liste/app/node_modules/bin-version/node_modules/cross-spawn/lib/util/escape.js new file mode 100644 index 0000000..b0bb84c --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/node_modules/cross-spawn/lib/util/escape.js @@ -0,0 +1,45 @@ +'use strict'; + +// See http://www.robvanderwoude.com/escapechars.php +const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g; + +function escapeCommand(arg) { + // Escape meta chars + arg = arg.replace(metaCharsRegExp, '^$1'); + + return arg; +} + +function escapeArgument(arg, doubleEscapeMetaChars) { + // Convert to string + arg = `${arg}`; + + // Algorithm below is based on https://qntm.org/cmd + + // Sequence of backslashes followed by a double quote: + // double up all the backslashes and escape the double quote + arg = arg.replace(/(\\*)"/g, '$1$1\\"'); + + // Sequence of backslashes followed by the end of the string + // (which will become a double quote later): + // double up all the backslashes + arg = arg.replace(/(\\*)$/, '$1$1'); + + // All other backslashes occur literally + + // Quote the whole thing: + arg = `"${arg}"`; + + // Escape meta chars + arg = arg.replace(metaCharsRegExp, '^$1'); + + // Double escape meta chars if necessary + if (doubleEscapeMetaChars) { + arg = arg.replace(metaCharsRegExp, '^$1'); + } + + return arg; +} + +module.exports.command = escapeCommand; +module.exports.argument = escapeArgument; diff --git a/code/application_liste/app/node_modules/bin-version/node_modules/cross-spawn/lib/util/readShebang.js b/code/application_liste/app/node_modules/bin-version/node_modules/cross-spawn/lib/util/readShebang.js new file mode 100644 index 0000000..bd4f128 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/node_modules/cross-spawn/lib/util/readShebang.js @@ -0,0 +1,32 @@ +'use strict'; + +const fs = require('fs'); +const shebangCommand = require('shebang-command'); + +function readShebang(command) { + // Read the first 150 bytes from the file + const size = 150; + let buffer; + + if (Buffer.alloc) { + // Node.js v4.5+ / v5.10+ + buffer = Buffer.alloc(size); + } else { + // Old Node.js API + buffer = new Buffer(size); + buffer.fill(0); // zero-fill + } + + let fd; + + try { + fd = fs.openSync(command, 'r'); + fs.readSync(fd, buffer, 0, size, 0); + fs.closeSync(fd); + } catch (e) { /* Empty */ } + + // Attempt to extract shebang (null is returned if not a shebang) + return shebangCommand(buffer.toString()); +} + +module.exports = readShebang; diff --git a/code/application_liste/app/node_modules/bin-version/node_modules/cross-spawn/lib/util/resolveCommand.js b/code/application_liste/app/node_modules/bin-version/node_modules/cross-spawn/lib/util/resolveCommand.js new file mode 100644 index 0000000..2fd5ad2 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/node_modules/cross-spawn/lib/util/resolveCommand.js @@ -0,0 +1,47 @@ +'use strict'; + +const path = require('path'); +const which = require('which'); +const pathKey = require('path-key')(); + +function resolveCommandAttempt(parsed, withoutPathExt) { + const cwd = process.cwd(); + const hasCustomCwd = parsed.options.cwd != null; + + // If a custom `cwd` was specified, we need to change the process cwd + // because `which` will do stat calls but does not support a custom cwd + if (hasCustomCwd) { + try { + process.chdir(parsed.options.cwd); + } catch (err) { + /* Empty */ + } + } + + let resolved; + + try { + resolved = which.sync(parsed.command, { + path: (parsed.options.env || process.env)[pathKey], + pathExt: withoutPathExt ? path.delimiter : undefined, + }); + } catch (e) { + /* Empty */ + } finally { + process.chdir(cwd); + } + + // If we successfully resolved, ensure that an absolute path is returned + // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it + if (resolved) { + resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved); + } + + return resolved; +} + +function resolveCommand(parsed) { + return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true); +} + +module.exports = resolveCommand; diff --git a/code/application_liste/app/node_modules/bin-version/node_modules/cross-spawn/package.json b/code/application_liste/app/node_modules/bin-version/node_modules/cross-spawn/package.json new file mode 100644 index 0000000..bfa5044 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/node_modules/cross-spawn/package.json @@ -0,0 +1,107 @@ +{ + "_from": "cross-spawn@^6.0.0", + "_id": "cross-spawn@6.0.5", + "_inBundle": false, + "_integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "_location": "/bin-version/cross-spawn", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "cross-spawn@^6.0.0", + "name": "cross-spawn", + "escapedName": "cross-spawn", + "rawSpec": "^6.0.0", + "saveSpec": null, + "fetchSpec": "^6.0.0" + }, + "_requiredBy": [ + "/bin-version/execa" + ], + "_resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "_shasum": "4a5ec7c64dfae22c3a14124dbacdee846d80cbc4", + "_spec": "cross-spawn@^6.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\bin-version\\node_modules\\execa", + "author": { + "name": "André Cruz", + "email": "andre@moxy.studio" + }, + "bugs": { + "url": "https://github.com/moxystudio/node-cross-spawn/issues" + }, + "bundleDependencies": false, + "commitlint": { + "extends": [ + "@commitlint/config-conventional" + ] + }, + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "deprecated": false, + "description": "Cross platform child_process#spawn and child_process#spawnSync", + "devDependencies": { + "@commitlint/cli": "^6.0.0", + "@commitlint/config-conventional": "^6.0.2", + "babel-core": "^6.26.0", + "babel-jest": "^22.1.0", + "babel-preset-moxy": "^2.2.1", + "eslint": "^4.3.0", + "eslint-config-moxy": "^5.0.0", + "husky": "^0.14.3", + "jest": "^22.0.0", + "lint-staged": "^7.0.0", + "mkdirp": "^0.5.1", + "regenerator-runtime": "^0.11.1", + "rimraf": "^2.6.2", + "standard-version": "^4.2.0" + }, + "engines": { + "node": ">=4.8" + }, + "files": [ + "lib" + ], + "homepage": "https://github.com/moxystudio/node-cross-spawn", + "keywords": [ + "spawn", + "spawnSync", + "windows", + "cross-platform", + "path-ext", + "shebang", + "cmd", + "execute" + ], + "license": "MIT", + "lint-staged": { + "*.js": [ + "eslint --fix", + "git add" + ] + }, + "main": "index.js", + "name": "cross-spawn", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/moxystudio/node-cross-spawn.git" + }, + "scripts": { + "commitmsg": "commitlint -e $GIT_PARAMS", + "lint": "eslint .", + "precommit": "lint-staged", + "prerelease": "npm t && npm run lint", + "release": "standard-version", + "test": "jest --env node --coverage" + }, + "standard-version": { + "scripts": { + "posttag": "git push --follow-tags origin master && npm publish" + } + }, + "version": "6.0.5" +} diff --git a/code/application_liste/app/node_modules/bin-version/node_modules/execa/index.js b/code/application_liste/app/node_modules/bin-version/node_modules/execa/index.js new file mode 100644 index 0000000..aad9ac8 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/node_modules/execa/index.js @@ -0,0 +1,361 @@ +'use strict'; +const path = require('path'); +const childProcess = require('child_process'); +const crossSpawn = require('cross-spawn'); +const stripEof = require('strip-eof'); +const npmRunPath = require('npm-run-path'); +const isStream = require('is-stream'); +const _getStream = require('get-stream'); +const pFinally = require('p-finally'); +const onExit = require('signal-exit'); +const errname = require('./lib/errname'); +const stdio = require('./lib/stdio'); + +const TEN_MEGABYTES = 1000 * 1000 * 10; + +function handleArgs(cmd, args, opts) { + let parsed; + + opts = Object.assign({ + extendEnv: true, + env: {} + }, opts); + + if (opts.extendEnv) { + opts.env = Object.assign({}, process.env, opts.env); + } + + if (opts.__winShell === true) { + delete opts.__winShell; + parsed = { + command: cmd, + args, + options: opts, + file: cmd, + original: { + cmd, + args + } + }; + } else { + parsed = crossSpawn._parse(cmd, args, opts); + } + + opts = Object.assign({ + maxBuffer: TEN_MEGABYTES, + buffer: true, + stripEof: true, + preferLocal: true, + localDir: parsed.options.cwd || process.cwd(), + encoding: 'utf8', + reject: true, + cleanup: true + }, parsed.options); + + opts.stdio = stdio(opts); + + if (opts.preferLocal) { + opts.env = npmRunPath.env(Object.assign({}, opts, {cwd: opts.localDir})); + } + + if (opts.detached) { + // #115 + opts.cleanup = false; + } + + if (process.platform === 'win32' && path.basename(parsed.command) === 'cmd.exe') { + // #116 + parsed.args.unshift('/q'); + } + + return { + cmd: parsed.command, + args: parsed.args, + opts, + parsed + }; +} + +function handleInput(spawned, input) { + if (input === null || input === undefined) { + return; + } + + if (isStream(input)) { + input.pipe(spawned.stdin); + } else { + spawned.stdin.end(input); + } +} + +function handleOutput(opts, val) { + if (val && opts.stripEof) { + val = stripEof(val); + } + + return val; +} + +function handleShell(fn, cmd, opts) { + let file = '/bin/sh'; + let args = ['-c', cmd]; + + opts = Object.assign({}, opts); + + if (process.platform === 'win32') { + opts.__winShell = true; + file = process.env.comspec || 'cmd.exe'; + args = ['/s', '/c', `"${cmd}"`]; + opts.windowsVerbatimArguments = true; + } + + if (opts.shell) { + file = opts.shell; + delete opts.shell; + } + + return fn(file, args, opts); +} + +function getStream(process, stream, {encoding, buffer, maxBuffer}) { + if (!process[stream]) { + return null; + } + + let ret; + + if (!buffer) { + // TODO: Use `ret = util.promisify(stream.finished)(process[stream]);` when targeting Node.js 10 + ret = new Promise((resolve, reject) => { + process[stream] + .once('end', resolve) + .once('error', reject); + }); + } else if (encoding) { + ret = _getStream(process[stream], { + encoding, + maxBuffer + }); + } else { + ret = _getStream.buffer(process[stream], {maxBuffer}); + } + + return ret.catch(err => { + err.stream = stream; + err.message = `${stream} ${err.message}`; + throw err; + }); +} + +function makeError(result, options) { + const {stdout, stderr} = result; + + let err = result.error; + const {code, signal} = result; + + const {parsed, joinedCmd} = options; + const timedOut = options.timedOut || false; + + if (!err) { + let output = ''; + + if (Array.isArray(parsed.opts.stdio)) { + if (parsed.opts.stdio[2] !== 'inherit') { + output += output.length > 0 ? stderr : `\n${stderr}`; + } + + if (parsed.opts.stdio[1] !== 'inherit') { + output += `\n${stdout}`; + } + } else if (parsed.opts.stdio !== 'inherit') { + output = `\n${stderr}${stdout}`; + } + + err = new Error(`Command failed: ${joinedCmd}${output}`); + err.code = code < 0 ? errname(code) : code; + } + + err.stdout = stdout; + err.stderr = stderr; + err.failed = true; + err.signal = signal || null; + err.cmd = joinedCmd; + err.timedOut = timedOut; + + return err; +} + +function joinCmd(cmd, args) { + let joinedCmd = cmd; + + if (Array.isArray(args) && args.length > 0) { + joinedCmd += ' ' + args.join(' '); + } + + return joinedCmd; +} + +module.exports = (cmd, args, opts) => { + const parsed = handleArgs(cmd, args, opts); + const {encoding, buffer, maxBuffer} = parsed.opts; + const joinedCmd = joinCmd(cmd, args); + + let spawned; + try { + spawned = childProcess.spawn(parsed.cmd, parsed.args, parsed.opts); + } catch (err) { + return Promise.reject(err); + } + + let removeExitHandler; + if (parsed.opts.cleanup) { + removeExitHandler = onExit(() => { + spawned.kill(); + }); + } + + let timeoutId = null; + let timedOut = false; + + const cleanup = () => { + if (timeoutId) { + clearTimeout(timeoutId); + timeoutId = null; + } + + if (removeExitHandler) { + removeExitHandler(); + } + }; + + if (parsed.opts.timeout > 0) { + timeoutId = setTimeout(() => { + timeoutId = null; + timedOut = true; + spawned.kill(parsed.opts.killSignal); + }, parsed.opts.timeout); + } + + const processDone = new Promise(resolve => { + spawned.on('exit', (code, signal) => { + cleanup(); + resolve({code, signal}); + }); + + spawned.on('error', err => { + cleanup(); + resolve({error: err}); + }); + + if (spawned.stdin) { + spawned.stdin.on('error', err => { + cleanup(); + resolve({error: err}); + }); + } + }); + + function destroy() { + if (spawned.stdout) { + spawned.stdout.destroy(); + } + + if (spawned.stderr) { + spawned.stderr.destroy(); + } + } + + const handlePromise = () => pFinally(Promise.all([ + processDone, + getStream(spawned, 'stdout', {encoding, buffer, maxBuffer}), + getStream(spawned, 'stderr', {encoding, buffer, maxBuffer}) + ]).then(arr => { + const result = arr[0]; + result.stdout = arr[1]; + result.stderr = arr[2]; + + if (result.error || result.code !== 0 || result.signal !== null) { + const err = makeError(result, { + joinedCmd, + parsed, + timedOut + }); + + // TODO: missing some timeout logic for killed + // https://github.com/nodejs/node/blob/master/lib/child_process.js#L203 + // err.killed = spawned.killed || killed; + err.killed = err.killed || spawned.killed; + + if (!parsed.opts.reject) { + return err; + } + + throw err; + } + + return { + stdout: handleOutput(parsed.opts, result.stdout), + stderr: handleOutput(parsed.opts, result.stderr), + code: 0, + failed: false, + killed: false, + signal: null, + cmd: joinedCmd, + timedOut: false + }; + }), destroy); + + crossSpawn._enoent.hookChildProcess(spawned, parsed.parsed); + + handleInput(spawned, parsed.opts.input); + + spawned.then = (onfulfilled, onrejected) => handlePromise().then(onfulfilled, onrejected); + spawned.catch = onrejected => handlePromise().catch(onrejected); + + return spawned; +}; + +// TODO: set `stderr: 'ignore'` when that option is implemented +module.exports.stdout = (...args) => module.exports(...args).then(x => x.stdout); + +// TODO: set `stdout: 'ignore'` when that option is implemented +module.exports.stderr = (...args) => module.exports(...args).then(x => x.stderr); + +module.exports.shell = (cmd, opts) => handleShell(module.exports, cmd, opts); + +module.exports.sync = (cmd, args, opts) => { + const parsed = handleArgs(cmd, args, opts); + const joinedCmd = joinCmd(cmd, args); + + if (isStream(parsed.opts.input)) { + throw new TypeError('The `input` option cannot be a stream in sync mode'); + } + + const result = childProcess.spawnSync(parsed.cmd, parsed.args, parsed.opts); + result.code = result.status; + + if (result.error || result.status !== 0 || result.signal !== null) { + const err = makeError(result, { + joinedCmd, + parsed + }); + + if (!parsed.opts.reject) { + return err; + } + + throw err; + } + + return { + stdout: handleOutput(parsed.opts, result.stdout), + stderr: handleOutput(parsed.opts, result.stderr), + code: 0, + failed: false, + signal: null, + cmd: joinedCmd, + timedOut: false + }; +}; + +module.exports.shellSync = (cmd, opts) => handleShell(module.exports.sync, cmd, opts); diff --git a/code/application_liste/app/node_modules/bin-version/node_modules/execa/lib/errname.js b/code/application_liste/app/node_modules/bin-version/node_modules/execa/lib/errname.js new file mode 100644 index 0000000..e367837 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/node_modules/execa/lib/errname.js @@ -0,0 +1,39 @@ +'use strict'; +// Older verions of Node.js might not have `util.getSystemErrorName()`. +// In that case, fall back to a deprecated internal. +const util = require('util'); + +let uv; + +if (typeof util.getSystemErrorName === 'function') { + module.exports = util.getSystemErrorName; +} else { + try { + uv = process.binding('uv'); + + if (typeof uv.errname !== 'function') { + throw new TypeError('uv.errname is not a function'); + } + } catch (err) { + console.error('execa/lib/errname: unable to establish process.binding(\'uv\')', err); + uv = null; + } + + module.exports = code => errname(uv, code); +} + +// Used for testing the fallback behavior +module.exports.__test__ = errname; + +function errname(uv, code) { + if (uv) { + return uv.errname(code); + } + + if (!(code < 0)) { + throw new Error('err >= 0'); + } + + return `Unknown system error ${code}`; +} + diff --git a/code/application_liste/app/node_modules/bin-version/node_modules/execa/lib/stdio.js b/code/application_liste/app/node_modules/bin-version/node_modules/execa/lib/stdio.js new file mode 100644 index 0000000..a82d468 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/node_modules/execa/lib/stdio.js @@ -0,0 +1,41 @@ +'use strict'; +const alias = ['stdin', 'stdout', 'stderr']; + +const hasAlias = opts => alias.some(x => Boolean(opts[x])); + +module.exports = opts => { + if (!opts) { + return null; + } + + if (opts.stdio && hasAlias(opts)) { + throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${alias.map(x => `\`${x}\``).join(', ')}`); + } + + if (typeof opts.stdio === 'string') { + return opts.stdio; + } + + const stdio = opts.stdio || []; + + if (!Array.isArray(stdio)) { + throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``); + } + + const result = []; + const len = Math.max(stdio.length, alias.length); + + for (let i = 0; i < len; i++) { + let value = null; + + if (stdio[i] !== undefined) { + value = stdio[i]; + } else if (opts[alias[i]] !== undefined) { + value = opts[alias[i]]; + } + + result[i] = value; + } + + return result; +}; diff --git a/code/application_liste/app/node_modules/bin-version/node_modules/execa/license b/code/application_liste/app/node_modules/bin-version/node_modules/execa/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/node_modules/execa/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/bin-version/node_modules/execa/package.json b/code/application_liste/app/node_modules/bin-version/node_modules/execa/package.json new file mode 100644 index 0000000..3ec81d6 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/node_modules/execa/package.json @@ -0,0 +1,101 @@ +{ + "_from": "execa@^1.0.0", + "_id": "execa@1.0.0", + "_inBundle": false, + "_integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "_location": "/bin-version/execa", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "execa@^1.0.0", + "name": "execa", + "escapedName": "execa", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/bin-version" + ], + "_resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "_shasum": "c6236a5bb4df6d6f15e88e7f017798216749ddd8", + "_spec": "execa@^1.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\bin-version", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/execa/issues" + }, + "bundleDependencies": false, + "dependencies": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "deprecated": false, + "description": "A better `child_process`", + "devDependencies": { + "ava": "*", + "cat-names": "^1.0.2", + "coveralls": "^3.0.1", + "delay": "^3.0.0", + "is-running": "^2.0.0", + "nyc": "^13.0.1", + "tempfile": "^2.0.0", + "xo": "*" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js", + "lib" + ], + "homepage": "https://github.com/sindresorhus/execa#readme", + "keywords": [ + "exec", + "child", + "process", + "execute", + "fork", + "execfile", + "spawn", + "file", + "shell", + "bin", + "binary", + "binaries", + "npm", + "path", + "local" + ], + "license": "MIT", + "name": "execa", + "nyc": { + "reporter": [ + "text", + "lcov" + ], + "exclude": [ + "**/fixtures/**", + "**/test.js", + "**/test/**" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/execa.git" + }, + "scripts": { + "test": "xo && nyc ava" + }, + "version": "1.0.0" +} diff --git a/code/application_liste/app/node_modules/bin-version/node_modules/execa/readme.md b/code/application_liste/app/node_modules/bin-version/node_modules/execa/readme.md new file mode 100644 index 0000000..f3f533d --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/node_modules/execa/readme.md @@ -0,0 +1,327 @@ +# execa [![Build Status: Linux](https://travis-ci.org/sindresorhus/execa.svg?branch=master)](https://travis-ci.org/sindresorhus/execa) [![Build status: Windows](https://ci.appveyor.com/api/projects/status/x5ajamxtjtt93cqv/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/execa/branch/master) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/execa/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/execa?branch=master) + +> A better [`child_process`](https://nodejs.org/api/child_process.html) + + +## Why + +- Promise interface. +- [Strips EOF](https://github.com/sindresorhus/strip-eof) from the output so you don't have to `stdout.trim()`. +- Supports [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) binaries cross-platform. +- [Improved Windows support.](https://github.com/IndigoUnited/node-cross-spawn#why) +- Higher max buffer. 10 MB instead of 200 KB. +- [Executes locally installed binaries by name.](#preferlocal) +- [Cleans up spawned processes when the parent process dies.](#cleanup) + + +## Install + +``` +$ npm install execa +``` + + + + + + +## Usage + +```js +const execa = require('execa'); + +(async () => { + const {stdout} = await execa('echo', ['unicorns']); + console.log(stdout); + //=> 'unicorns' +})(); +``` + +Additional examples: + +```js +const execa = require('execa'); + +(async () => { + // Pipe the child process stdout to the current stdout + execa('echo', ['unicorns']).stdout.pipe(process.stdout); + + + // Run a shell command + const {stdout} = await execa.shell('echo unicorns'); + //=> 'unicorns' + + + // Catching an error + try { + await execa.shell('exit 3'); + } catch (error) { + console.log(error); + /* + { + message: 'Command failed: /bin/sh -c exit 3' + killed: false, + code: 3, + signal: null, + cmd: '/bin/sh -c exit 3', + stdout: '', + stderr: '', + timedOut: false + } + */ + } +})(); + +// Catching an error with a sync method +try { + execa.shellSync('exit 3'); +} catch (error) { + console.log(error); + /* + { + message: 'Command failed: /bin/sh -c exit 3' + code: 3, + signal: null, + cmd: '/bin/sh -c exit 3', + stdout: '', + stderr: '', + timedOut: false + } + */ +} +``` + + +## API + +### execa(file, [arguments], [options]) + +Execute a file. + +Think of this as a mix of `child_process.execFile` and `child_process.spawn`. + +Returns a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess), which is enhanced to also be a `Promise` for a result `Object` with `stdout` and `stderr` properties. + +### execa.stdout(file, [arguments], [options]) + +Same as `execa()`, but returns only `stdout`. + +### execa.stderr(file, [arguments], [options]) + +Same as `execa()`, but returns only `stderr`. + +### execa.shell(command, [options]) + +Execute a command through the system shell. Prefer `execa()` whenever possible, as it's both faster and safer. + +Returns a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess). + +The `child_process` instance is enhanced to also be promise for a result object with `stdout` and `stderr` properties. + +### execa.sync(file, [arguments], [options]) + +Execute a file synchronously. + +Returns the same result object as [`child_process.spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options). + +This method throws an `Error` if the command fails. + +### execa.shellSync(file, [options]) + +Execute a command synchronously through the system shell. + +Returns the same result object as [`child_process.spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options). + +### options + +Type: `Object` + +#### cwd + +Type: `string`
+Default: `process.cwd()` + +Current working directory of the child process. + +#### env + +Type: `Object`
+Default: `process.env` + +Environment key-value pairs. Extends automatically from `process.env`. Set `extendEnv` to `false` if you don't want this. + +#### extendEnv + +Type: `boolean`
+Default: `true` + +Set to `false` if you don't want to extend the environment variables when providing the `env` property. + +#### argv0 + +Type: `string` + +Explicitly set the value of `argv[0]` sent to the child process. This will be set to `command` or `file` if not specified. + +#### stdio + +Type: `string[]` `string`
+Default: `pipe` + +Child's [stdio](https://nodejs.org/api/child_process.html#child_process_options_stdio) configuration. + +#### detached + +Type: `boolean` + +Prepare child to run independently of its parent process. Specific behavior [depends on the platform](https://nodejs.org/api/child_process.html#child_process_options_detached). + +#### uid + +Type: `number` + +Sets the user identity of the process. + +#### gid + +Type: `number` + +Sets the group identity of the process. + +#### shell + +Type: `boolean` `string`
+Default: `false` + +If `true`, runs `command` inside of a shell. Uses `/bin/sh` on UNIX and `cmd.exe` on Windows. A different shell can be specified as a string. The shell should understand the `-c` switch on UNIX or `/d /s /c` on Windows. + +#### stripEof + +Type: `boolean`
+Default: `true` + +[Strip EOF](https://github.com/sindresorhus/strip-eof) (last newline) from the output. + +#### preferLocal + +Type: `boolean`
+Default: `true` + +Prefer locally installed binaries when looking for a binary to execute.
+If you `$ npm install foo`, you can then `execa('foo')`. + +#### localDir + +Type: `string`
+Default: `process.cwd()` + +Preferred path to find locally installed binaries in (use with `preferLocal`). + +#### input + +Type: `string` `Buffer` `stream.Readable` + +Write some input to the `stdin` of your binary.
+Streams are not allowed when using the synchronous methods. + +#### reject + +Type: `boolean`
+Default: `true` + +Setting this to `false` resolves the promise with the error instead of rejecting it. + +#### cleanup + +Type: `boolean`
+Default: `true` + +Keep track of the spawned process and `kill` it when the parent process exits. + +#### encoding + +Type: `string`
+Default: `utf8` + +Specify the character encoding used to decode the `stdout` and `stderr` output. + +#### timeout + +Type: `number`
+Default: `0` + +If timeout is greater than `0`, the parent will send the signal identified by the `killSignal` property (the default is `SIGTERM`) if the child runs longer than timeout milliseconds. + +#### buffer + +Type: `boolean`
+Default: `true` + +Buffer the output from the spawned process. When buffering is disabled you must consume the output of the `stdout` and `stderr` streams because the promise will not be resolved/rejected until they have completed. + +#### maxBuffer + +Type: `number`
+Default: `10000000` (10MB) + +Largest amount of data in bytes allowed on `stdout` or `stderr`. + +#### killSignal + +Type: `string` `number`
+Default: `SIGTERM` + +Signal value to be used when the spawned process will be killed. + +#### stdin + +Type: `string` `number` `Stream` `undefined` `null`
+Default: `pipe` + +Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio). + +#### stdout + +Type: `string` `number` `Stream` `undefined` `null`
+Default: `pipe` + +Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio). + +#### stderr + +Type: `string` `number` `Stream` `undefined` `null`
+Default: `pipe` + +Same options as [`stdio`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio). + +#### windowsVerbatimArguments + +Type: `boolean`
+Default: `false` + +If `true`, no quoting or escaping of arguments is done on Windows. Ignored on other platforms. This is set to `true` automatically when the `shell` option is `true`. + + +## Tips + +### Save and pipe output from a child process + +Let's say you want to show the output of a child process in real-time while also saving it to a variable. + +```js +const execa = require('execa'); +const getStream = require('get-stream'); + +const stream = execa('echo', ['foo']).stdout; + +stream.pipe(process.stdout); + +getStream(stream).then(value => { + console.log('child output:', value); +}); +``` + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/code/application_liste/app/node_modules/bin-version/node_modules/get-stream/buffer-stream.js b/code/application_liste/app/node_modules/bin-version/node_modules/get-stream/buffer-stream.js new file mode 100644 index 0000000..4121c8e --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/node_modules/get-stream/buffer-stream.js @@ -0,0 +1,51 @@ +'use strict'; +const {PassThrough} = require('stream'); + +module.exports = options => { + options = Object.assign({}, options); + + const {array} = options; + let {encoding} = options; + const buffer = encoding === 'buffer'; + let objectMode = false; + + if (array) { + objectMode = !(encoding || buffer); + } else { + encoding = encoding || 'utf8'; + } + + if (buffer) { + encoding = null; + } + + let len = 0; + const ret = []; + const stream = new PassThrough({objectMode}); + + if (encoding) { + stream.setEncoding(encoding); + } + + stream.on('data', chunk => { + ret.push(chunk); + + if (objectMode) { + len = ret.length; + } else { + len += chunk.length; + } + }); + + stream.getBufferedValue = () => { + if (array) { + return ret; + } + + return buffer ? Buffer.concat(ret, len) : ret.join(''); + }; + + stream.getBufferedLength = () => len; + + return stream; +}; diff --git a/code/application_liste/app/node_modules/bin-version/node_modules/get-stream/index.js b/code/application_liste/app/node_modules/bin-version/node_modules/get-stream/index.js new file mode 100644 index 0000000..7e5584a --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/node_modules/get-stream/index.js @@ -0,0 +1,50 @@ +'use strict'; +const pump = require('pump'); +const bufferStream = require('./buffer-stream'); + +class MaxBufferError extends Error { + constructor() { + super('maxBuffer exceeded'); + this.name = 'MaxBufferError'; + } +} + +function getStream(inputStream, options) { + if (!inputStream) { + return Promise.reject(new Error('Expected a stream')); + } + + options = Object.assign({maxBuffer: Infinity}, options); + + const {maxBuffer} = options; + + let stream; + return new Promise((resolve, reject) => { + const rejectPromise = error => { + if (error) { // A null check + error.bufferedData = stream.getBufferedValue(); + } + reject(error); + }; + + stream = pump(inputStream, bufferStream(options), error => { + if (error) { + rejectPromise(error); + return; + } + + resolve(); + }); + + stream.on('data', () => { + if (stream.getBufferedLength() > maxBuffer) { + rejectPromise(new MaxBufferError()); + } + }); + }).then(() => stream.getBufferedValue()); +} + +module.exports = getStream; +module.exports.buffer = (stream, options) => getStream(stream, Object.assign({}, options, {encoding: 'buffer'})); +module.exports.array = (stream, options) => getStream(stream, Object.assign({}, options, {array: true})); +module.exports.MaxBufferError = MaxBufferError; diff --git a/code/application_liste/app/node_modules/bin-version/node_modules/get-stream/license b/code/application_liste/app/node_modules/bin-version/node_modules/get-stream/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/node_modules/get-stream/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/bin-version/node_modules/get-stream/package.json b/code/application_liste/app/node_modules/bin-version/node_modules/get-stream/package.json new file mode 100644 index 0000000..ea13f7c --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/node_modules/get-stream/package.json @@ -0,0 +1,78 @@ +{ + "_from": "get-stream@^4.0.0", + "_id": "get-stream@4.1.0", + "_inBundle": false, + "_integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "_location": "/bin-version/get-stream", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "get-stream@^4.0.0", + "name": "get-stream", + "escapedName": "get-stream", + "rawSpec": "^4.0.0", + "saveSpec": null, + "fetchSpec": "^4.0.0" + }, + "_requiredBy": [ + "/bin-version/execa" + ], + "_resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "_shasum": "c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5", + "_spec": "get-stream@^4.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\bin-version\\node_modules\\execa", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/get-stream/issues" + }, + "bundleDependencies": false, + "dependencies": { + "pump": "^3.0.0" + }, + "deprecated": false, + "description": "Get a stream as a string, buffer, or array", + "devDependencies": { + "ava": "*", + "into-stream": "^3.0.0", + "xo": "*" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js", + "buffer-stream.js" + ], + "homepage": "https://github.com/sindresorhus/get-stream#readme", + "keywords": [ + "get", + "stream", + "promise", + "concat", + "string", + "text", + "buffer", + "read", + "data", + "consume", + "readable", + "readablestream", + "array", + "object" + ], + "license": "MIT", + "name": "get-stream", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/get-stream.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "4.1.0" +} diff --git a/code/application_liste/app/node_modules/bin-version/node_modules/get-stream/readme.md b/code/application_liste/app/node_modules/bin-version/node_modules/get-stream/readme.md new file mode 100644 index 0000000..b87a4d3 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/node_modules/get-stream/readme.md @@ -0,0 +1,123 @@ +# get-stream [![Build Status](https://travis-ci.org/sindresorhus/get-stream.svg?branch=master)](https://travis-ci.org/sindresorhus/get-stream) + +> Get a stream as a string, buffer, or array + + +## Install + +``` +$ npm install get-stream +``` + + +## Usage + +```js +const fs = require('fs'); +const getStream = require('get-stream'); + +(async () => { + const stream = fs.createReadStream('unicorn.txt'); + + console.log(await getStream(stream)); + /* + ,,))))))));, + __)))))))))))))), + \|/ -\(((((''''((((((((. + -*-==//////(('' . `)))))), + /|\ ))| o ;-. '((((( ,(, + ( `| / ) ;))))' ,_))^;(~ + | | | ,))((((_ _____------~~~-. %,;(;(>';'~ + o_); ; )))(((` ~---~ `:: \ %%~~)(v;(`('~ + ; ''''```` `: `:::|\,__,%% );`'; ~ + | _ ) / `:|`----' `-' + ______/\/~ | / / + /~;;.____/;;' / ___--,-( `;;;/ + / // _;______;'------~~~~~ /;;/\ / + // | | / ; \;;,\ + (<_ | ; /',/-----' _> + \_| ||_ //~;~~~~~~~~~ + `\_| (,~~ + \~\ + ~~ + */ +})(); +``` + + +## API + +The methods returns a promise that resolves when the `end` event fires on the stream, indicating that there is no more data to be read. The stream is switched to flowing mode. + +### getStream(stream, [options]) + +Get the `stream` as a string. + +#### options + +Type: `Object` + +##### encoding + +Type: `string`
+Default: `utf8` + +[Encoding](https://nodejs.org/api/buffer.html#buffer_buffer) of the incoming stream. + +##### maxBuffer + +Type: `number`
+Default: `Infinity` + +Maximum length of the returned string. If it exceeds this value before the stream ends, the promise will be rejected with a `getStream.MaxBufferError` error. + +### getStream.buffer(stream, [options]) + +Get the `stream` as a buffer. + +It honors the `maxBuffer` option as above, but it refers to byte length rather than string length. + +### getStream.array(stream, [options]) + +Get the `stream` as an array of values. + +It honors both the `maxBuffer` and `encoding` options. The behavior changes slightly based on the encoding chosen: + +- When `encoding` is unset, it assumes an [object mode stream](https://nodesource.com/blog/understanding-object-streams/) and collects values emitted from `stream` unmodified. In this case `maxBuffer` refers to the number of items in the array (not the sum of their sizes). + +- When `encoding` is set to `buffer`, it collects an array of buffers. `maxBuffer` refers to the summed byte lengths of every buffer in the array. + +- When `encoding` is set to anything else, it collects an array of strings. `maxBuffer` refers to the summed character lengths of every string in the array. + + +## Errors + +If the input stream emits an `error` event, the promise will be rejected with the error. The buffered data will be attached to the `bufferedData` property of the error. + +```js +(async () => { + try { + await getStream(streamThatErrorsAtTheEnd('unicorn')); + } catch (error) { + console.log(error.bufferedData); + //=> 'unicorn' + } +})() +``` + + +## FAQ + +### How is this different from [`concat-stream`](https://github.com/maxogden/concat-stream)? + +This module accepts a stream instead of being one and returns a promise instead of using a callback. The API is simpler and it only supports returning a string, buffer, or array. It doesn't have a fragile type inference. You explicitly choose what you want. And it doesn't depend on the huge `readable-stream` package. + + +## Related + +- [get-stdin](https://github.com/sindresorhus/get-stdin) - Get stdin as a string or buffer + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/code/application_liste/app/node_modules/bin-version/node_modules/pump/.travis.yml b/code/application_liste/app/node_modules/bin-version/node_modules/pump/.travis.yml new file mode 100644 index 0000000..17f9433 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/node_modules/pump/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - "0.10" + +script: "npm test" diff --git a/code/application_liste/app/node_modules/bin-version/node_modules/pump/LICENSE b/code/application_liste/app/node_modules/bin-version/node_modules/pump/LICENSE new file mode 100644 index 0000000..757562e --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/node_modules/pump/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Mathias Buus + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/code/application_liste/app/node_modules/bin-version/node_modules/pump/README.md b/code/application_liste/app/node_modules/bin-version/node_modules/pump/README.md new file mode 100644 index 0000000..4c81471 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/node_modules/pump/README.md @@ -0,0 +1,65 @@ +# pump + +pump is a small node module that pipes streams together and destroys all of them if one of them closes. + +``` +npm install pump +``` + +[![build status](http://img.shields.io/travis/mafintosh/pump.svg?style=flat)](http://travis-ci.org/mafintosh/pump) + +## What problem does it solve? + +When using standard `source.pipe(dest)` source will _not_ be destroyed if dest emits close or an error. +You are also not able to provide a callback to tell when then pipe has finished. + +pump does these two things for you + +## Usage + +Simply pass the streams you want to pipe together to pump and add an optional callback + +``` js +var pump = require('pump') +var fs = require('fs') + +var source = fs.createReadStream('/dev/random') +var dest = fs.createWriteStream('/dev/null') + +pump(source, dest, function(err) { + console.log('pipe finished', err) +}) + +setTimeout(function() { + dest.destroy() // when dest is closed pump will destroy source +}, 1000) +``` + +You can use pump to pipe more than two streams together as well + +``` js +var transform = someTransformStream() + +pump(source, transform, anotherTransform, dest, function(err) { + console.log('pipe finished', err) +}) +``` + +If `source`, `transform`, `anotherTransform` or `dest` closes all of them will be destroyed. + +Similarly to `stream.pipe()`, `pump()` returns the last stream passed in, so you can do: + +``` +return pump(s1, s2) // returns s2 +``` + +If you want to return a stream that combines *both* s1 and s2 to a single stream use +[pumpify](https://github.com/mafintosh/pumpify) instead. + +## License + +MIT + +## Related + +`pump` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one. diff --git a/code/application_liste/app/node_modules/bin-version/node_modules/pump/index.js b/code/application_liste/app/node_modules/bin-version/node_modules/pump/index.js new file mode 100644 index 0000000..c15059f --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/node_modules/pump/index.js @@ -0,0 +1,82 @@ +var once = require('once') +var eos = require('end-of-stream') +var fs = require('fs') // we only need fs to get the ReadStream and WriteStream prototypes + +var noop = function () {} +var ancient = /^v?\.0/.test(process.version) + +var isFn = function (fn) { + return typeof fn === 'function' +} + +var isFS = function (stream) { + if (!ancient) return false // newer node version do not need to care about fs is a special way + if (!fs) return false // browser + return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close) +} + +var isRequest = function (stream) { + return stream.setHeader && isFn(stream.abort) +} + +var destroyer = function (stream, reading, writing, callback) { + callback = once(callback) + + var closed = false + stream.on('close', function () { + closed = true + }) + + eos(stream, {readable: reading, writable: writing}, function (err) { + if (err) return callback(err) + closed = true + callback() + }) + + var destroyed = false + return function (err) { + if (closed) return + if (destroyed) return + destroyed = true + + if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks + if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want + + if (isFn(stream.destroy)) return stream.destroy() + + callback(err || new Error('stream was destroyed')) + } +} + +var call = function (fn) { + fn() +} + +var pipe = function (from, to) { + return from.pipe(to) +} + +var pump = function () { + var streams = Array.prototype.slice.call(arguments) + var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop + + if (Array.isArray(streams[0])) streams = streams[0] + if (streams.length < 2) throw new Error('pump requires two streams per minimum') + + var error + var destroys = streams.map(function (stream, i) { + var reading = i < streams.length - 1 + var writing = i > 0 + return destroyer(stream, reading, writing, function (err) { + if (!error) error = err + if (err) destroys.forEach(call) + if (reading) return + destroys.forEach(call) + callback(error) + }) + }) + + return streams.reduce(pipe) +} + +module.exports = pump diff --git a/code/application_liste/app/node_modules/bin-version/node_modules/pump/package.json b/code/application_liste/app/node_modules/bin-version/node_modules/pump/package.json new file mode 100644 index 0000000..55a0036 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/node_modules/pump/package.json @@ -0,0 +1,59 @@ +{ + "_from": "pump@^3.0.0", + "_id": "pump@3.0.0", + "_inBundle": false, + "_integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "_location": "/bin-version/pump", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "pump@^3.0.0", + "name": "pump", + "escapedName": "pump", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/bin-version/get-stream" + ], + "_resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "_shasum": "b4a2116815bde2f4e1ea602354e8c75565107a64", + "_spec": "pump@^3.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\bin-version\\node_modules\\get-stream", + "author": { + "name": "Mathias Buus Madsen", + "email": "mathiasbuus@gmail.com" + }, + "browser": { + "fs": false + }, + "bugs": { + "url": "https://github.com/mafintosh/pump/issues" + }, + "bundleDependencies": false, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + }, + "deprecated": false, + "description": "pipe streams together and close all of them if one of them closes", + "homepage": "https://github.com/mafintosh/pump#readme", + "keywords": [ + "streams", + "pipe", + "destroy", + "callback" + ], + "license": "MIT", + "name": "pump", + "repository": { + "type": "git", + "url": "git://github.com/mafintosh/pump.git" + }, + "scripts": { + "test": "node test-browser.js && node test-node.js" + }, + "version": "3.0.0" +} diff --git a/code/application_liste/app/node_modules/bin-version/node_modules/pump/test-browser.js b/code/application_liste/app/node_modules/bin-version/node_modules/pump/test-browser.js new file mode 100644 index 0000000..9a06c8a --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/node_modules/pump/test-browser.js @@ -0,0 +1,66 @@ +var stream = require('stream') +var pump = require('./index') + +var rs = new stream.Readable() +var ws = new stream.Writable() + +rs._read = function (size) { + this.push(Buffer(size).fill('abc')) +} + +ws._write = function (chunk, encoding, cb) { + setTimeout(function () { + cb() + }, 100) +} + +var toHex = function () { + var reverse = new (require('stream').Transform)() + + reverse._transform = function (chunk, enc, callback) { + reverse.push(chunk.toString('hex')) + callback() + } + + return reverse +} + +var wsClosed = false +var rsClosed = false +var callbackCalled = false + +var check = function () { + if (wsClosed && rsClosed && callbackCalled) { + console.log('test-browser.js passes') + clearTimeout(timeout) + } +} + +ws.on('finish', function () { + wsClosed = true + check() +}) + +rs.on('end', function () { + rsClosed = true + check() +}) + +var res = pump(rs, toHex(), toHex(), toHex(), ws, function () { + callbackCalled = true + check() +}) + +if (res !== ws) { + throw new Error('should return last stream') +} + +setTimeout(function () { + rs.push(null) + rs.emit('close') +}, 1000) + +var timeout = setTimeout(function () { + check() + throw new Error('timeout') +}, 5000) diff --git a/code/application_liste/app/node_modules/bin-version/node_modules/pump/test-node.js b/code/application_liste/app/node_modules/bin-version/node_modules/pump/test-node.js new file mode 100644 index 0000000..561251a --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/node_modules/pump/test-node.js @@ -0,0 +1,53 @@ +var pump = require('./index') + +var rs = require('fs').createReadStream('/dev/random') +var ws = require('fs').createWriteStream('/dev/null') + +var toHex = function () { + var reverse = new (require('stream').Transform)() + + reverse._transform = function (chunk, enc, callback) { + reverse.push(chunk.toString('hex')) + callback() + } + + return reverse +} + +var wsClosed = false +var rsClosed = false +var callbackCalled = false + +var check = function () { + if (wsClosed && rsClosed && callbackCalled) { + console.log('test-node.js passes') + clearTimeout(timeout) + } +} + +ws.on('close', function () { + wsClosed = true + check() +}) + +rs.on('close', function () { + rsClosed = true + check() +}) + +var res = pump(rs, toHex(), toHex(), toHex(), ws, function () { + callbackCalled = true + check() +}) + +if (res !== ws) { + throw new Error('should return last stream') +} + +setTimeout(function () { + rs.destroy() +}, 1000) + +var timeout = setTimeout(function () { + throw new Error('timeout') +}, 5000) diff --git a/code/application_liste/app/node_modules/bin-version/package.json b/code/application_liste/app/node_modules/bin-version/package.json new file mode 100644 index 0000000..a1a8d30 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/package.json @@ -0,0 +1,85 @@ +{ + "_from": "bin-version@^3.0.0", + "_id": "bin-version@3.1.0", + "_inBundle": false, + "_integrity": "sha512-Mkfm4iE1VFt4xd4vH+gx+0/71esbfus2LsnCGe8Pi4mndSPyT+NGES/Eg99jx8/lUGWfu3z2yuB/bt5UB+iVbQ==", + "_location": "/bin-version", + "_phantomChildren": { + "end-of-stream": "1.4.4", + "is-stream": "1.1.0", + "nice-try": "1.0.5", + "npm-run-path": "2.0.2", + "once": "1.4.0", + "p-finally": "1.0.0", + "path-key": "2.0.1", + "semver": "5.7.1", + "shebang-command": "1.2.0", + "signal-exit": "3.0.3", + "strip-eof": "1.0.0", + "which": "1.3.1" + }, + "_requested": { + "type": "range", + "registry": true, + "raw": "bin-version@^3.0.0", + "name": "bin-version", + "escapedName": "bin-version", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/bin-version-check" + ], + "_resolved": "https://registry.npmjs.org/bin-version/-/bin-version-3.1.0.tgz", + "_shasum": "5b09eb280752b1bd28f0c9db3f96f2f43b6c0839", + "_spec": "bin-version@^3.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\bin-version-check", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/bin-version/issues" + }, + "bundleDependencies": false, + "dependencies": { + "execa": "^1.0.0", + "find-versions": "^3.0.0" + }, + "deprecated": false, + "description": "Get the version of a binary in semver format", + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "homepage": "https://github.com/sindresorhus/bin-version#readme", + "keywords": [ + "bin", + "binary", + "executable", + "version", + "semver", + "semantic", + "cli" + ], + "license": "MIT", + "name": "bin-version", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/bin-version.git" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "version": "3.1.0" +} diff --git a/code/application_liste/app/node_modules/bin-version/readme.md b/code/application_liste/app/node_modules/bin-version/readme.md new file mode 100644 index 0000000..4152faa --- /dev/null +++ b/code/application_liste/app/node_modules/bin-version/readme.md @@ -0,0 +1,72 @@ +# bin-version [![Build Status](https://travis-ci.com/sindresorhus/bin-version.svg?branch=master)](https://travis-ci.com/sindresorhus/bin-version) + +> Get the version of a binary in [semver](https://github.com/npm/node-semver) format + + +## Install + +``` +$ npm install bin-version +``` + + +## Usage + +``` +$ curl --version +curl 7.30.0 (x86_64-apple-darwin13.0) +``` + +```js +const binVersion = require('bin-version'); + +(async () => { + console.log(await binVersion('curl')); + //=> '7.30.0' +})(); +``` + +``` +$ openssl version +OpenSSL 1.0.2d 9 Jul 2015 +``` + +```js +(async () => { + console.log(await binVersion('openssl', {args: ['version']})); + //=> '1.0.2' +})(); +``` + +## API + +### binVersion(binary, [options]) + +Returns a `Promise` with the version of the `binary`. + +#### binary + +Type: `string` + +The name of or path to the binary to get the version from. + +#### options + +Type: `object` + +##### args + +Type: `string[]` +Default: `['--version']` + +The arguments to pass to `binary` so that it will print its version. + +## Related + +- [bin-version-cli](https://github.com/sindresorhus/bin-version-cli) - CLI for this module +- [find-versions](https://github.com/sindresorhus/find-versions) - Find semver versions in a string + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/code/application_liste/app/node_modules/bin-wrapper/index.js b/code/application_liste/app/node_modules/bin-wrapper/index.js new file mode 100644 index 0000000..1aba001 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/index.js @@ -0,0 +1,208 @@ +'use strict'; +const fs = require('fs'); +const path = require('path'); +const url = require('url'); +const pify = require('pify'); +const importLazy = require('import-lazy')(require); + +const binCheck = importLazy('bin-check'); +const binVersionCheck = importLazy('bin-version-check'); +const download = importLazy('download'); +const osFilterObj = importLazy('os-filter-obj'); + +const statAsync = pify(fs.stat); +const chmodAsync = pify(fs.chmod); + +/** + * Initialize a new `BinWrapper` + * + * @param {Object} options + * @api public + */ +module.exports = class BinWrapper { + constructor(options = {}) { + this.options = options; + + if (this.options.strip <= 0) { + this.options.strip = 0; + } else if (!this.options.strip) { + this.options.strip = 1; + } + } + + /** + * Get or set files to download + * + * @param {String} src + * @param {String} os + * @param {String} arch + * @api public + */ + src(src, os, arch) { + if (arguments.length === 0) { + return this._src; + } + + this._src = this._src || []; + this._src.push({ + url: src, + os, + arch + }); + + return this; + } + + /** + * Get or set the destination + * + * @param {String} dest + * @api public + */ + dest(dest) { + if (arguments.length === 0) { + return this._dest; + } + + this._dest = dest; + return this; + } + + /** + * Get or set the binary + * + * @param {String} bin + * @api public + */ + use(bin) { + if (arguments.length === 0) { + return this._use; + } + + this._use = bin; + return this; + } + + /** + * Get or set a semver range to test the binary against + * + * @param {String} range + * @api public + */ + version(range) { + if (arguments.length === 0) { + return this._version; + } + + this._version = range; + return this; + } + + /** + * Get path to the binary + * + * @api public + */ + path() { + return path.join(this.dest(), this.use()); + } + + /** + * Run + * + * @param {Array} cmd + * @api public + */ + run(cmd = ['--version']) { + return this.findExisting().then(() => { + if (this.options.skipCheck) { + return; + } + + return this.runCheck(cmd); + }); + } + + /** + * Run binary check + * + * @param {Array} cmd + * @api private + */ + runCheck(cmd) { + return binCheck(this.path(), cmd).then(works => { + if (!works) { + throw new Error(`The \`${this.path()}\` binary doesn't seem to work correctly`); + } + + if (this.version()) { + return binVersionCheck(this.path(), this.version()); + } + + return Promise.resolve(); + }); + } + + /** + * Find existing files + * + * @api private + */ + findExisting() { + return statAsync(this.path()).catch(error => { + if (error && error.code === 'ENOENT') { + return this.download(); + } + + return Promise.reject(error); + }); + } + + /** + * Download files + * + * @api private + */ + download() { + const files = osFilterObj(this.src() || []); + const urls = []; + + if (files.length === 0) { + return Promise.reject(new Error('No binary found matching your system. It\'s probably not supported.')); + } + + files.forEach(file => urls.push(file.url)); + + return Promise.all(urls.map(url => download(url, this.dest(), { + extract: true, + strip: this.options.strip + }))).then(result => { + const resultingFiles = flatten(result.map((item, index) => { + if (Array.isArray(item)) { + return item.map(file => file.path); + } + + const parsedUrl = url.parse(files[index].url); + const parsedPath = path.parse(parsedUrl.pathname); + + return parsedPath.base; + })); + + return Promise.all(resultingFiles.map(fileName => { + return chmodAsync(path.join(this.dest(), fileName), 0o755); + })); + }); + } +}; + +function flatten(arr) { + return arr.reduce((acc, elem) => { + if (Array.isArray(elem)) { + acc.push(...elem); + } else { + acc.push(elem); + } + + return acc; + }, []); +} diff --git a/code/application_liste/app/node_modules/bin-wrapper/license b/code/application_liste/app/node_modules/bin-wrapper/license new file mode 100644 index 0000000..1c7c975 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Kevin Mårtensson + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/download/index.js b/code/application_liste/app/node_modules/bin-wrapper/node_modules/download/index.js new file mode 100644 index 0000000..342ff47 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/download/index.js @@ -0,0 +1,119 @@ +'use strict'; +const fs = require('fs'); +const path = require('path'); +const url = require('url'); +const caw = require('caw'); +const contentDisposition = require('content-disposition'); +const archiveType = require('archive-type'); +const decompress = require('decompress'); +const filenamify = require('filenamify'); +const getStream = require('get-stream'); +const got = require('got'); +const makeDir = require('make-dir'); +const pify = require('pify'); +const pEvent = require('p-event'); +const fileType = require('file-type'); +const extName = require('ext-name'); + +const fsP = pify(fs); +const filenameFromPath = res => path.basename(url.parse(res.requestUrl).pathname); + +const getExtFromMime = res => { + const header = res.headers['content-type']; + + if (!header) { + return null; + } + + const exts = extName.mime(header); + + if (exts.length !== 1) { + return null; + } + + return exts[0].ext; +}; + +const getFilename = (res, data) => { + const header = res.headers['content-disposition']; + + if (header) { + const parsed = contentDisposition.parse(header); + + if (parsed.parameters && parsed.parameters.filename) { + return parsed.parameters.filename; + } + } + + let filename = filenameFromPath(res); + + if (!path.extname(filename)) { + const ext = (fileType(data) || {}).ext || getExtFromMime(res); + + if (ext) { + filename = `${filename}.${ext}`; + } + } + + return filename; +}; + +const getProtocolFromUri = uri => { + let {protocol} = url.parse(uri); + + if (protocol) { + protocol = protocol.slice(0, -1); + } + + return protocol; +}; + +module.exports = (uri, output, opts) => { + if (typeof output === 'object') { + opts = output; + output = null; + } + + const protocol = getProtocolFromUri(uri); + + opts = Object.assign({ + encoding: null, + rejectUnauthorized: process.env.npm_config_strict_ssl !== 'false' + }, opts); + + const agent = caw(opts.proxy, {protocol}); + const stream = got.stream(uri, Object.assign({agent}, opts)) + .on('redirect', (response, nextOptions) => { + const redirectProtocol = getProtocolFromUri(nextOptions.href); + if (redirectProtocol && redirectProtocol !== protocol) { + nextOptions.agent = caw(opts.proxy, {protocol: redirectProtocol}); + } + }); + + const promise = pEvent(stream, 'response').then(res => { + const encoding = opts.encoding === null ? 'buffer' : opts.encoding; + return Promise.all([getStream(stream, {encoding}), res]); + }).then(result => { + const [data, res] = result; + + if (!output) { + return opts.extract && archiveType(data) ? decompress(data, opts) : data; + } + + const filename = opts.filename || filenamify(getFilename(res, data)); + const outputFilepath = path.join(output, filename); + + if (opts.extract && archiveType(data)) { + return decompress(data, path.dirname(outputFilepath), opts); + } + + return makeDir(path.dirname(outputFilepath)) + .then(() => fsP.writeFile(outputFilepath, data)) + .then(() => data); + }); + + stream.then = promise.then.bind(promise); + stream.catch = promise.catch.bind(promise); + + return stream; +}; diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/download/license b/code/application_liste/app/node_modules/bin-wrapper/node_modules/download/license new file mode 100644 index 0000000..db6bc32 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/download/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Kevin Mårtensson (github.com/kevva) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/download/node_modules/pify/index.js b/code/application_liste/app/node_modules/bin-wrapper/node_modules/download/node_modules/pify/index.js new file mode 100644 index 0000000..1dee43a --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/download/node_modules/pify/index.js @@ -0,0 +1,84 @@ +'use strict'; + +const processFn = (fn, opts) => function () { + const P = opts.promiseModule; + const args = new Array(arguments.length); + + for (let i = 0; i < arguments.length; i++) { + args[i] = arguments[i]; + } + + return new P((resolve, reject) => { + if (opts.errorFirst) { + args.push(function (err, result) { + if (opts.multiArgs) { + const results = new Array(arguments.length - 1); + + for (let i = 1; i < arguments.length; i++) { + results[i - 1] = arguments[i]; + } + + if (err) { + results.unshift(err); + reject(results); + } else { + resolve(results); + } + } else if (err) { + reject(err); + } else { + resolve(result); + } + }); + } else { + args.push(function (result) { + if (opts.multiArgs) { + const results = new Array(arguments.length - 1); + + for (let i = 0; i < arguments.length; i++) { + results[i] = arguments[i]; + } + + resolve(results); + } else { + resolve(result); + } + }); + } + + fn.apply(this, args); + }); +}; + +module.exports = (obj, opts) => { + opts = Object.assign({ + exclude: [/.+(Sync|Stream)$/], + errorFirst: true, + promiseModule: Promise + }, opts); + + const filter = key => { + const match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key); + return opts.include ? opts.include.some(match) : !opts.exclude.some(match); + }; + + let ret; + if (typeof obj === 'function') { + ret = function () { + if (opts.excludeMain) { + return obj.apply(this, arguments); + } + + return processFn(obj, opts).apply(this, arguments); + }; + } else { + ret = Object.create(Object.getPrototypeOf(obj)); + } + + for (const key in obj) { // eslint-disable-line guard-for-in + const x = obj[key]; + ret[key] = typeof x === 'function' && filter(key) ? processFn(x, opts) : x; + } + + return ret; +}; diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/download/node_modules/pify/license b/code/application_liste/app/node_modules/bin-wrapper/node_modules/download/node_modules/pify/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/download/node_modules/pify/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/download/node_modules/pify/package.json b/code/application_liste/app/node_modules/bin-wrapper/node_modules/download/node_modules/pify/package.json new file mode 100644 index 0000000..123e7d0 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/download/node_modules/pify/package.json @@ -0,0 +1,83 @@ +{ + "_from": "pify@^3.0.0", + "_id": "pify@3.0.0", + "_inBundle": false, + "_integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "_location": "/bin-wrapper/download/pify", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "pify@^3.0.0", + "name": "pify", + "escapedName": "pify", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/bin-wrapper/download" + ], + "_resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "_shasum": "e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176", + "_spec": "pify@^3.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\bin-wrapper\\node_modules\\download", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/pify/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Promisify a callback-style function", + "devDependencies": { + "ava": "*", + "pinkie-promise": "^2.0.0", + "v8-natives": "^1.0.0", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/pify#readme", + "keywords": [ + "promise", + "promises", + "promisify", + "all", + "denodify", + "denodeify", + "callback", + "cb", + "node", + "then", + "thenify", + "convert", + "transform", + "wrap", + "wrapper", + "bind", + "to", + "async", + "await", + "es2015", + "bluebird" + ], + "license": "MIT", + "name": "pify", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/pify.git" + }, + "scripts": { + "optimization-test": "node --allow-natives-syntax optimization-test.js", + "test": "xo && ava && npm run optimization-test" + }, + "version": "3.0.0" +} diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/download/node_modules/pify/readme.md b/code/application_liste/app/node_modules/bin-wrapper/node_modules/download/node_modules/pify/readme.md new file mode 100644 index 0000000..376ca4e --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/download/node_modules/pify/readme.md @@ -0,0 +1,131 @@ +# pify [![Build Status](https://travis-ci.org/sindresorhus/pify.svg?branch=master)](https://travis-ci.org/sindresorhus/pify) + +> Promisify a callback-style function + + +## Install + +``` +$ npm install --save pify +``` + + +## Usage + +```js +const fs = require('fs'); +const pify = require('pify'); + +// Promisify a single function +pify(fs.readFile)('package.json', 'utf8').then(data => { + console.log(JSON.parse(data).name); + //=> 'pify' +}); + +// Promisify all methods in a module +pify(fs).readFile('package.json', 'utf8').then(data => { + console.log(JSON.parse(data).name); + //=> 'pify' +}); +``` + + +## API + +### pify(input, [options]) + +Returns a `Promise` wrapped version of the supplied function or module. + +#### input + +Type: `Function` `Object` + +Callback-style function or module whose methods you want to promisify. + +#### options + +##### multiArgs + +Type: `boolean`
+Default: `false` + +By default, the promisified function will only return the second argument from the callback, which works fine for most APIs. This option can be useful for modules like `request` that return multiple arguments. Turning this on will make it return an array of all arguments from the callback, excluding the error argument, instead of just the second argument. This also applies to rejections, where it returns an array of all the callback arguments, including the error. + +```js +const request = require('request'); +const pify = require('pify'); + +pify(request, {multiArgs: true})('https://sindresorhus.com').then(result => { + const [httpResponse, body] = result; +}); +``` + +##### include + +Type: `string[]` `RegExp[]` + +Methods in a module to promisify. Remaining methods will be left untouched. + +##### exclude + +Type: `string[]` `RegExp[]`
+Default: `[/.+(Sync|Stream)$/]` + +Methods in a module **not** to promisify. Methods with names ending with `'Sync'` are excluded by default. + +##### excludeMain + +Type: `boolean`
+Default: `false` + +If given module is a function itself, it will be promisified. Turn this option on if you want to promisify only methods of the module. + +```js +const pify = require('pify'); + +function fn() { + return true; +} + +fn.method = (data, callback) => { + setImmediate(() => { + callback(null, data); + }); +}; + +// Promisify methods but not `fn()` +const promiseFn = pify(fn, {excludeMain: true}); + +if (promiseFn()) { + promiseFn.method('hi').then(data => { + console.log(data); + }); +} +``` + +##### errorFirst + +Type: `boolean`
+Default: `true` + +Whether the callback has an error as the first argument. You'll want to set this to `false` if you're dealing with an API that doesn't have an error as the first argument, like `fs.exists()`, some browser APIs, Chrome Extension APIs, etc. + +##### promiseModule + +Type: `Function` + +Custom promise module to use instead of the native one. + +Check out [`pinkie-promise`](https://github.com/floatdrop/pinkie-promise) if you need a tiny promise polyfill. + + +## Related + +- [p-event](https://github.com/sindresorhus/p-event) - Promisify an event by waiting for it to be emitted +- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently +- [More…](https://github.com/sindresorhus/promise-fun) + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/download/package.json b/code/application_liste/app/node_modules/bin-wrapper/node_modules/download/package.json new file mode 100644 index 0000000..e180d0f --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/download/package.json @@ -0,0 +1,83 @@ +{ + "_from": "download@^7.1.0", + "_id": "download@7.1.0", + "_inBundle": false, + "_integrity": "sha512-xqnBTVd/E+GxJVrX5/eUJiLYjCGPwMpdL+jGhGU57BvtcA7wwhtHVbXBeUk51kOpW3S7Jn3BQbN9Q1R1Km2qDQ==", + "_location": "/bin-wrapper/download", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "download@^7.1.0", + "name": "download", + "escapedName": "download", + "rawSpec": "^7.1.0", + "saveSpec": null, + "fetchSpec": "^7.1.0" + }, + "_requiredBy": [ + "/bin-wrapper" + ], + "_resolved": "https://registry.npmjs.org/download/-/download-7.1.0.tgz", + "_shasum": "9059aa9d70b503ee76a132897be6dec8e5587233", + "_spec": "download@^7.1.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\bin-wrapper", + "author": { + "name": "Kevin Mårtensson", + "email": "kevinmartensson@gmail.com", + "url": "github.com/kevva" + }, + "bugs": { + "url": "https://github.com/kevva/download/issues" + }, + "bundleDependencies": false, + "dependencies": { + "archive-type": "^4.0.0", + "caw": "^2.0.1", + "content-disposition": "^0.5.2", + "decompress": "^4.2.0", + "ext-name": "^5.0.0", + "file-type": "^8.1.0", + "filenamify": "^2.0.0", + "get-stream": "^3.0.0", + "got": "^8.3.1", + "make-dir": "^1.2.0", + "p-event": "^2.1.0", + "pify": "^3.0.0" + }, + "deprecated": false, + "description": "Download and extract files", + "devDependencies": { + "ava": "*", + "is-zip": "^1.0.0", + "nock": "^9.2.5", + "path-exists": "^3.0.0", + "random-buffer": "^0.1.0", + "rimraf": "^2.6.2", + "xo": "*" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/kevva/download#readme", + "keywords": [ + "download", + "extract", + "http", + "request", + "url" + ], + "license": "MIT", + "name": "download", + "repository": { + "type": "git", + "url": "git+https://github.com/kevva/download.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "7.1.0" +} diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/download/readme.md b/code/application_liste/app/node_modules/bin-wrapper/node_modules/download/readme.md new file mode 100644 index 0000000..dfb3fcf --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/download/readme.md @@ -0,0 +1,86 @@ +# download [![Build Status](https://travis-ci.org/kevva/download.svg?branch=master)](https://travis-ci.org/kevva/download) + +> Download and extract files + +*See [download-cli](https://github.com/kevva/download-cli) for the command-line version.* + + +## Install + +``` +$ npm install download +``` + + +## Usage + +```js +const fs = require('fs'); +const download = require('download'); + +download('http://unicorn.com/foo.jpg', 'dist').then(() => { + console.log('done!'); +}); + +download('http://unicorn.com/foo.jpg').then(data => { + fs.writeFileSync('dist/foo.jpg', data); +}); + +download('unicorn.com/foo.jpg').pipe(fs.createWriteStream('dist/foo.jpg')); + +Promise.all([ + 'unicorn.com/foo.jpg', + 'cats.com/dancing.gif' +].map(x => download(x, 'dist'))).then(() => { + console.log('files downloaded!'); +}); +``` + + +## API + +### download(url, [destination], [options]) + +Returns both a `Promise` and a [Duplex stream](https://nodejs.org/api/stream.html#stream_class_stream_duplex) with [additional events](https://github.com/sindresorhus/got#streams-1). + +#### url + +Type: `string` + +URL to download. + +#### destination + +Type: `string` + +Path to where your file will be written. + +#### options + +Type: `Object` + +Same options as [`got`](https://github.com/sindresorhus/got#options) and [`decompress`](https://github.com/kevva/decompress#options) in addition to the ones below. + +##### extract + +Type: `boolean`
+Default: `false` + +If set to `true`, try extracting the file using [`decompress`](https://github.com/kevva/decompress). + +##### filename + +Type: `string` + +Name of the saved file. + +##### proxy + +Type: `string` + +Proxy endpoint. + + +## License + +MIT © [Kevin Mårtensson](https://github.com/kevva) diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/file-type/index.js b/code/application_liste/app/node_modules/bin-wrapper/node_modules/file-type/index.js new file mode 100644 index 0000000..669fb55 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/file-type/index.js @@ -0,0 +1,809 @@ +'use strict'; +const toBytes = s => [...s].map(c => c.charCodeAt(0)); +const xpiZipFilename = toBytes('META-INF/mozilla.rsa'); +const oxmlContentTypes = toBytes('[Content_Types].xml'); +const oxmlRels = toBytes('_rels/.rels'); + +module.exports = input => { + const buf = input instanceof Uint8Array ? input : new Uint8Array(input); + + if (!(buf && buf.length > 1)) { + return null; + } + + const check = (header, options) => { + options = Object.assign({ + offset: 0 + }, options); + + for (let i = 0; i < header.length; i++) { + // If a bitmask is set + if (options.mask) { + // If header doesn't equal `buf` with bits masked off + if (header[i] !== (options.mask[i] & buf[i + options.offset])) { + return false; + } + } else if (header[i] !== buf[i + options.offset]) { + return false; + } + } + + return true; + }; + + const checkString = (header, options) => check(toBytes(header), options); + + if (check([0xFF, 0xD8, 0xFF])) { + return { + ext: 'jpg', + mime: 'image/jpeg' + }; + } + + if (check([0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A])) { + return { + ext: 'png', + mime: 'image/png' + }; + } + + if (check([0x47, 0x49, 0x46])) { + return { + ext: 'gif', + mime: 'image/gif' + }; + } + + if (check([0x57, 0x45, 0x42, 0x50], {offset: 8})) { + return { + ext: 'webp', + mime: 'image/webp' + }; + } + + if (check([0x46, 0x4C, 0x49, 0x46])) { + return { + ext: 'flif', + mime: 'image/flif' + }; + } + + // Needs to be before `tif` check + if ( + (check([0x49, 0x49, 0x2A, 0x0]) || check([0x4D, 0x4D, 0x0, 0x2A])) && + check([0x43, 0x52], {offset: 8}) + ) { + return { + ext: 'cr2', + mime: 'image/x-canon-cr2' + }; + } + + if ( + check([0x49, 0x49, 0x2A, 0x0]) || + check([0x4D, 0x4D, 0x0, 0x2A]) + ) { + return { + ext: 'tif', + mime: 'image/tiff' + }; + } + + if (check([0x42, 0x4D])) { + return { + ext: 'bmp', + mime: 'image/bmp' + }; + } + + if (check([0x49, 0x49, 0xBC])) { + return { + ext: 'jxr', + mime: 'image/vnd.ms-photo' + }; + } + + if (check([0x38, 0x42, 0x50, 0x53])) { + return { + ext: 'psd', + mime: 'image/vnd.adobe.photoshop' + }; + } + + // Zip-based file formats + // Need to be before the `zip` check + if (check([0x50, 0x4B, 0x3, 0x4])) { + if ( + check([0x6D, 0x69, 0x6D, 0x65, 0x74, 0x79, 0x70, 0x65, 0x61, 0x70, 0x70, 0x6C, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x2F, 0x65, 0x70, 0x75, 0x62, 0x2B, 0x7A, 0x69, 0x70], {offset: 30}) + ) { + return { + ext: 'epub', + mime: 'application/epub+zip' + }; + } + + // Assumes signed `.xpi` from addons.mozilla.org + if (check(xpiZipFilename, {offset: 30})) { + return { + ext: 'xpi', + mime: 'application/x-xpinstall' + }; + } + + if (checkString('mimetypeapplication/vnd.oasis.opendocument.text', {offset: 30})) { + return { + ext: 'odt', + mime: 'application/vnd.oasis.opendocument.text' + }; + } + + if (checkString('mimetypeapplication/vnd.oasis.opendocument.spreadsheet', {offset: 30})) { + return { + ext: 'ods', + mime: 'application/vnd.oasis.opendocument.spreadsheet' + }; + } + + if (checkString('mimetypeapplication/vnd.oasis.opendocument.presentation', {offset: 30})) { + return { + ext: 'odp', + mime: 'application/vnd.oasis.opendocument.presentation' + }; + } + + // https://github.com/file/file/blob/master/magic/Magdir/msooxml + if (check(oxmlContentTypes, {offset: 30}) || check(oxmlRels, {offset: 30})) { + const sliced = buf.subarray(4, 4 + 2000); + const nextZipHeaderIndex = arr => arr.findIndex((el, i, arr) => arr[i] === 0x50 && arr[i + 1] === 0x4B && arr[i + 2] === 0x3 && arr[i + 3] === 0x4); + const header2Pos = nextZipHeaderIndex(sliced); + + if (header2Pos !== -1) { + const slicedAgain = buf.subarray(header2Pos + 8, header2Pos + 8 + 1000); + const header3Pos = nextZipHeaderIndex(slicedAgain); + + if (header3Pos !== -1) { + const offset = 8 + header2Pos + header3Pos + 30; + + if (checkString('word/', {offset})) { + return { + ext: 'docx', + mime: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' + }; + } + + if (checkString('ppt/', {offset})) { + return { + ext: 'pptx', + mime: 'application/vnd.openxmlformats-officedocument.presentationml.presentation' + }; + } + + if (checkString('xl/', {offset})) { + return { + ext: 'xlsx', + mime: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' + }; + } + } + } + } + } + + if ( + check([0x50, 0x4B]) && + (buf[2] === 0x3 || buf[2] === 0x5 || buf[2] === 0x7) && + (buf[3] === 0x4 || buf[3] === 0x6 || buf[3] === 0x8) + ) { + return { + ext: 'zip', + mime: 'application/zip' + }; + } + + if (check([0x75, 0x73, 0x74, 0x61, 0x72], {offset: 257})) { + return { + ext: 'tar', + mime: 'application/x-tar' + }; + } + + if ( + check([0x52, 0x61, 0x72, 0x21, 0x1A, 0x7]) && + (buf[6] === 0x0 || buf[6] === 0x1) + ) { + return { + ext: 'rar', + mime: 'application/x-rar-compressed' + }; + } + + if (check([0x1F, 0x8B, 0x8])) { + return { + ext: 'gz', + mime: 'application/gzip' + }; + } + + if (check([0x42, 0x5A, 0x68])) { + return { + ext: 'bz2', + mime: 'application/x-bzip2' + }; + } + + if (check([0x37, 0x7A, 0xBC, 0xAF, 0x27, 0x1C])) { + return { + ext: '7z', + mime: 'application/x-7z-compressed' + }; + } + + if (check([0x78, 0x01])) { + return { + ext: 'dmg', + mime: 'application/x-apple-diskimage' + }; + } + + if (check([0x33, 0x67, 0x70, 0x35]) || // 3gp5 + ( + check([0x0, 0x0, 0x0]) && check([0x66, 0x74, 0x79, 0x70], {offset: 4}) && + ( + check([0x6D, 0x70, 0x34, 0x31], {offset: 8}) || // MP41 + check([0x6D, 0x70, 0x34, 0x32], {offset: 8}) || // MP42 + check([0x69, 0x73, 0x6F, 0x6D], {offset: 8}) || // ISOM + check([0x69, 0x73, 0x6F, 0x32], {offset: 8}) || // ISO2 + check([0x6D, 0x6D, 0x70, 0x34], {offset: 8}) || // MMP4 + check([0x4D, 0x34, 0x56], {offset: 8}) || // M4V + check([0x64, 0x61, 0x73, 0x68], {offset: 8}) // DASH + ) + )) { + return { + ext: 'mp4', + mime: 'video/mp4' + }; + } + + if (check([0x4D, 0x54, 0x68, 0x64])) { + return { + ext: 'mid', + mime: 'audio/midi' + }; + } + + // https://github.com/threatstack/libmagic/blob/master/magic/Magdir/matroska + if (check([0x1A, 0x45, 0xDF, 0xA3])) { + const sliced = buf.subarray(4, 4 + 4096); + const idPos = sliced.findIndex((el, i, arr) => arr[i] === 0x42 && arr[i + 1] === 0x82); + + if (idPos !== -1) { + const docTypePos = idPos + 3; + const findDocType = type => [...type].every((c, i) => sliced[docTypePos + i] === c.charCodeAt(0)); + + if (findDocType('matroska')) { + return { + ext: 'mkv', + mime: 'video/x-matroska' + }; + } + + if (findDocType('webm')) { + return { + ext: 'webm', + mime: 'video/webm' + }; + } + } + } + + if (check([0x0, 0x0, 0x0, 0x14, 0x66, 0x74, 0x79, 0x70, 0x71, 0x74, 0x20, 0x20]) || + check([0x66, 0x72, 0x65, 0x65], {offset: 4}) || + check([0x66, 0x74, 0x79, 0x70, 0x71, 0x74, 0x20, 0x20], {offset: 4}) || + check([0x6D, 0x64, 0x61, 0x74], {offset: 4}) || // MJPEG + check([0x77, 0x69, 0x64, 0x65], {offset: 4})) { + return { + ext: 'mov', + mime: 'video/quicktime' + }; + } + + // RIFF file format which might be AVI, WAV, QCP, etc + if (check([0x52, 0x49, 0x46, 0x46])) { + if (check([0x41, 0x56, 0x49], {offset: 8})) { + return { + ext: 'avi', + mime: 'video/x-msvideo' + }; + } + if (check([0x57, 0x41, 0x56, 0x45], {offset: 8})) { + return { + ext: 'wav', + mime: 'audio/x-wav' + }; + } + // QLCM, QCP file + if (check([0x51, 0x4C, 0x43, 0x4D], {offset: 8})) { + return { + ext: 'qcp', + mime: 'audio/qcelp' + }; + } + } + + if (check([0x30, 0x26, 0xB2, 0x75, 0x8E, 0x66, 0xCF, 0x11, 0xA6, 0xD9])) { + return { + ext: 'wmv', + mime: 'video/x-ms-wmv' + }; + } + + if ( + check([0x0, 0x0, 0x1, 0xBA]) || + check([0x0, 0x0, 0x1, 0xB3]) + ) { + return { + ext: 'mpg', + mime: 'video/mpeg' + }; + } + + if (check([0x66, 0x74, 0x79, 0x70, 0x33, 0x67], {offset: 4})) { + return { + ext: '3gp', + mime: 'video/3gpp' + }; + } + + // Check for MPEG header at different starting offsets + for (let start = 0; start < 2 && start < (buf.length - 16); start++) { + if ( + check([0x49, 0x44, 0x33], {offset: start}) || // ID3 header + check([0xFF, 0xE2], {offset: start, mask: [0xFF, 0xE2]}) // MPEG 1 or 2 Layer 3 header + ) { + return { + ext: 'mp3', + mime: 'audio/mpeg' + }; + } + + if ( + check([0xFF, 0xE4], {offset: start, mask: [0xFF, 0xE4]}) // MPEG 1 or 2 Layer 2 header + ) { + return { + ext: 'mp2', + mime: 'audio/mpeg' + }; + } + + if ( + check([0xFF, 0xF8], {offset: start, mask: [0xFF, 0xFC]}) // MPEG 2 layer 0 using ADTS + ) { + return { + ext: 'mp2', + mime: 'audio/mpeg' + }; + } + + if ( + check([0xFF, 0xF0], {offset: start, mask: [0xFF, 0xFC]}) // MPEG 4 layer 0 using ADTS + ) { + return { + ext: 'mp4', + mime: 'audio/mpeg' + }; + } + } + + if ( + check([0x66, 0x74, 0x79, 0x70, 0x4D, 0x34, 0x41], {offset: 4}) || + check([0x4D, 0x34, 0x41, 0x20]) + ) { + return { + ext: 'm4a', + mime: 'audio/m4a' + }; + } + + // Needs to be before `ogg` check + if (check([0x4F, 0x70, 0x75, 0x73, 0x48, 0x65, 0x61, 0x64], {offset: 28})) { + return { + ext: 'opus', + mime: 'audio/opus' + }; + } + + // If 'OggS' in first bytes, then OGG container + if (check([0x4F, 0x67, 0x67, 0x53])) { + // This is a OGG container + + // If ' theora' in header. + if (check([0x80, 0x74, 0x68, 0x65, 0x6F, 0x72, 0x61], {offset: 28})) { + return { + ext: 'ogv', + mime: 'video/ogg' + }; + } + // If '\x01video' in header. + if (check([0x01, 0x76, 0x69, 0x64, 0x65, 0x6F, 0x00], {offset: 28})) { + return { + ext: 'ogm', + mime: 'video/ogg' + }; + } + // If ' FLAC' in header https://xiph.org/flac/faq.html + if (check([0x7F, 0x46, 0x4C, 0x41, 0x43], {offset: 28})) { + return { + ext: 'oga', + mime: 'audio/ogg' + }; + } + + // 'Speex ' in header https://en.wikipedia.org/wiki/Speex + if (check([0x53, 0x70, 0x65, 0x65, 0x78, 0x20, 0x20], {offset: 28})) { + return { + ext: 'spx', + mime: 'audio/ogg' + }; + } + + // If '\x01vorbis' in header + if (check([0x01, 0x76, 0x6F, 0x72, 0x62, 0x69, 0x73], {offset: 28})) { + return { + ext: 'ogg', + mime: 'audio/ogg' + }; + } + + // Default OGG container https://www.iana.org/assignments/media-types/application/ogg + return { + ext: 'ogx', + mime: 'application/ogg' + }; + } + + if (check([0x66, 0x4C, 0x61, 0x43])) { + return { + ext: 'flac', + mime: 'audio/x-flac' + }; + } + + if (check([0x4D, 0x41, 0x43, 0x20])) { + return { + ext: 'ape', + mime: 'audio/ape' + }; + } + + if (check([0x23, 0x21, 0x41, 0x4D, 0x52, 0x0A])) { + return { + ext: 'amr', + mime: 'audio/amr' + }; + } + + if (check([0x25, 0x50, 0x44, 0x46])) { + return { + ext: 'pdf', + mime: 'application/pdf' + }; + } + + if (check([0x4D, 0x5A])) { + return { + ext: 'exe', + mime: 'application/x-msdownload' + }; + } + + if ( + (buf[0] === 0x43 || buf[0] === 0x46) && + check([0x57, 0x53], {offset: 1}) + ) { + return { + ext: 'swf', + mime: 'application/x-shockwave-flash' + }; + } + + if (check([0x7B, 0x5C, 0x72, 0x74, 0x66])) { + return { + ext: 'rtf', + mime: 'application/rtf' + }; + } + + if (check([0x00, 0x61, 0x73, 0x6D])) { + return { + ext: 'wasm', + mime: 'application/wasm' + }; + } + + if ( + check([0x77, 0x4F, 0x46, 0x46]) && + ( + check([0x00, 0x01, 0x00, 0x00], {offset: 4}) || + check([0x4F, 0x54, 0x54, 0x4F], {offset: 4}) + ) + ) { + return { + ext: 'woff', + mime: 'font/woff' + }; + } + + if ( + check([0x77, 0x4F, 0x46, 0x32]) && + ( + check([0x00, 0x01, 0x00, 0x00], {offset: 4}) || + check([0x4F, 0x54, 0x54, 0x4F], {offset: 4}) + ) + ) { + return { + ext: 'woff2', + mime: 'font/woff2' + }; + } + + if ( + check([0x4C, 0x50], {offset: 34}) && + ( + check([0x00, 0x00, 0x01], {offset: 8}) || + check([0x01, 0x00, 0x02], {offset: 8}) || + check([0x02, 0x00, 0x02], {offset: 8}) + ) + ) { + return { + ext: 'eot', + mime: 'application/octet-stream' + }; + } + + if (check([0x00, 0x01, 0x00, 0x00, 0x00])) { + return { + ext: 'ttf', + mime: 'font/ttf' + }; + } + + if (check([0x4F, 0x54, 0x54, 0x4F, 0x00])) { + return { + ext: 'otf', + mime: 'font/otf' + }; + } + + if (check([0x00, 0x00, 0x01, 0x00])) { + return { + ext: 'ico', + mime: 'image/x-icon' + }; + } + + if (check([0x00, 0x00, 0x02, 0x00])) { + return { + ext: 'cur', + mime: 'image/x-icon' + }; + } + + if (check([0x46, 0x4C, 0x56, 0x01])) { + return { + ext: 'flv', + mime: 'video/x-flv' + }; + } + + if (check([0x25, 0x21])) { + return { + ext: 'ps', + mime: 'application/postscript' + }; + } + + if (check([0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00])) { + return { + ext: 'xz', + mime: 'application/x-xz' + }; + } + + if (check([0x53, 0x51, 0x4C, 0x69])) { + return { + ext: 'sqlite', + mime: 'application/x-sqlite3' + }; + } + + if (check([0x4E, 0x45, 0x53, 0x1A])) { + return { + ext: 'nes', + mime: 'application/x-nintendo-nes-rom' + }; + } + + if (check([0x43, 0x72, 0x32, 0x34])) { + return { + ext: 'crx', + mime: 'application/x-google-chrome-extension' + }; + } + + if ( + check([0x4D, 0x53, 0x43, 0x46]) || + check([0x49, 0x53, 0x63, 0x28]) + ) { + return { + ext: 'cab', + mime: 'application/vnd.ms-cab-compressed' + }; + } + + // Needs to be before `ar` check + if (check([0x21, 0x3C, 0x61, 0x72, 0x63, 0x68, 0x3E, 0x0A, 0x64, 0x65, 0x62, 0x69, 0x61, 0x6E, 0x2D, 0x62, 0x69, 0x6E, 0x61, 0x72, 0x79])) { + return { + ext: 'deb', + mime: 'application/x-deb' + }; + } + + if (check([0x21, 0x3C, 0x61, 0x72, 0x63, 0x68, 0x3E])) { + return { + ext: 'ar', + mime: 'application/x-unix-archive' + }; + } + + if (check([0xED, 0xAB, 0xEE, 0xDB])) { + return { + ext: 'rpm', + mime: 'application/x-rpm' + }; + } + + if ( + check([0x1F, 0xA0]) || + check([0x1F, 0x9D]) + ) { + return { + ext: 'Z', + mime: 'application/x-compress' + }; + } + + if (check([0x4C, 0x5A, 0x49, 0x50])) { + return { + ext: 'lz', + mime: 'application/x-lzip' + }; + } + + if (check([0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1])) { + return { + ext: 'msi', + mime: 'application/x-msi' + }; + } + + if (check([0x06, 0x0E, 0x2B, 0x34, 0x02, 0x05, 0x01, 0x01, 0x0D, 0x01, 0x02, 0x01, 0x01, 0x02])) { + return { + ext: 'mxf', + mime: 'application/mxf' + }; + } + + if (check([0x47], {offset: 4}) && (check([0x47], {offset: 192}) || check([0x47], {offset: 196}))) { + return { + ext: 'mts', + mime: 'video/mp2t' + }; + } + + if (check([0x42, 0x4C, 0x45, 0x4E, 0x44, 0x45, 0x52])) { + return { + ext: 'blend', + mime: 'application/x-blender' + }; + } + + if (check([0x42, 0x50, 0x47, 0xFB])) { + return { + ext: 'bpg', + mime: 'image/bpg' + }; + } + + if (check([0x00, 0x00, 0x00, 0x0C, 0x6A, 0x50, 0x20, 0x20, 0x0D, 0x0A, 0x87, 0x0A])) { + // JPEG-2000 family + + if (check([0x6A, 0x70, 0x32, 0x20], {offset: 20})) { + return { + ext: 'jp2', + mime: 'image/jp2' + }; + } + + if (check([0x6A, 0x70, 0x78, 0x20], {offset: 20})) { + return { + ext: 'jpx', + mime: 'image/jpx' + }; + } + + if (check([0x6A, 0x70, 0x6D, 0x20], {offset: 20})) { + return { + ext: 'jpm', + mime: 'image/jpm' + }; + } + + if (check([0x6D, 0x6A, 0x70, 0x32], {offset: 20})) { + return { + ext: 'mj2', + mime: 'image/mj2' + }; + } + } + + if (check([0x46, 0x4F, 0x52, 0x4D, 0x00])) { + return { + ext: 'aif', + mime: 'audio/aiff' + }; + } + + if (checkString(' (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/file-type/package.json b/code/application_liste/app/node_modules/bin-wrapper/node_modules/file-type/package.json new file mode 100644 index 0000000..9e02743 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/file-type/package.json @@ -0,0 +1,155 @@ +{ + "_from": "file-type@^8.1.0", + "_id": "file-type@8.1.0", + "_inBundle": false, + "_integrity": "sha512-qyQ0pzAy78gVoJsmYeNgl8uH8yKhr1lVhW7JbzJmnlRi0I4R2eEDEJZVKG8agpDnLpacwNbDhLNG/LMdxHD2YQ==", + "_location": "/bin-wrapper/file-type", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "file-type@^8.1.0", + "name": "file-type", + "escapedName": "file-type", + "rawSpec": "^8.1.0", + "saveSpec": null, + "fetchSpec": "^8.1.0" + }, + "_requiredBy": [ + "/bin-wrapper/download" + ], + "_resolved": "https://registry.npmjs.org/file-type/-/file-type-8.1.0.tgz", + "_shasum": "244f3b7ef641bbe0cca196c7276e4b332399f68c", + "_spec": "file-type@^8.1.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\bin-wrapper\\node_modules\\download", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/file-type/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Detect the file type of a Buffer/Uint8Array", + "devDependencies": { + "ava": "*", + "read-chunk": "^2.0.0", + "xo": "*" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/file-type#readme", + "keywords": [ + "mime", + "file", + "type", + "archive", + "image", + "img", + "pic", + "picture", + "flash", + "photo", + "video", + "detect", + "check", + "is", + "exif", + "exe", + "binary", + "buffer", + "uint8array", + "jpg", + "png", + "gif", + "webp", + "flif", + "cr2", + "tif", + "bmp", + "jxr", + "psd", + "zip", + "tar", + "rar", + "gz", + "bz2", + "7z", + "dmg", + "mp4", + "m4v", + "mid", + "mkv", + "webm", + "mov", + "avi", + "mpg", + "mp2", + "mp3", + "m4a", + "ogg", + "opus", + "flac", + "wav", + "amr", + "pdf", + "epub", + "mobi", + "swf", + "rtf", + "woff", + "woff2", + "eot", + "ttf", + "otf", + "ico", + "flv", + "ps", + "xz", + "sqlite", + "xpi", + "cab", + "deb", + "ar", + "rpm", + "Z", + "lz", + "msi", + "mxf", + "mts", + "wasm", + "webassembly", + "blend", + "bpg", + "docx", + "pptx", + "xlsx", + "3gp", + "jp2", + "jpm", + "jpx", + "mj2", + "aif", + "odt", + "ods", + "odp", + "xml", + "heic" + ], + "license": "MIT", + "name": "file-type", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/file-type.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "8.1.0" +} diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/file-type/readme.md b/code/application_liste/app/node_modules/bin-wrapper/node_modules/file-type/readme.md new file mode 100644 index 0000000..bd04b8d --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/file-type/readme.md @@ -0,0 +1,186 @@ +# file-type [![Build Status](https://travis-ci.org/sindresorhus/file-type.svg?branch=master)](https://travis-ci.org/sindresorhus/file-type) + +> Detect the file type of a Buffer/Uint8Array + +The file type is detected by checking the [magic number](http://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files) of the buffer. + + +## Install + +``` +$ npm install file-type +``` + + + + + + +## Usage + +##### Node.js + +```js +const readChunk = require('read-chunk'); +const fileType = require('file-type'); +const buffer = readChunk.sync('unicorn.png', 0, 4100); + +fileType(buffer); +//=> {ext: 'png', mime: 'image/png'} +``` + +Or from a remote location: + +```js +const http = require('http'); +const fileType = require('file-type'); +const url = 'http://assets-cdn.github.com/images/spinners/octocat-spinner-32.gif'; + +http.get(url, res => { + res.once('data', chunk => { + res.destroy(); + console.log(fileType(chunk)); + //=> {ext: 'gif', mime: 'image/gif'} + }); +}); +``` + +##### Browser + +```js +const xhr = new XMLHttpRequest(); +xhr.open('GET', 'unicorn.png'); +xhr.responseType = 'arraybuffer'; + +xhr.onload = () => { + fileType(new Uint8Array(this.response)); + //=> {ext: 'png', mime: 'image/png'} +}; + +xhr.send(); +``` + + +## API + +### fileType(input) + +Returns an `Object` with: + +- `ext` - One of the [supported file types](#supported-file-types) +- `mime` - The [MIME type](http://en.wikipedia.org/wiki/Internet_media_type) + +Or `null` when no match. + +#### input + +Type: `Buffer` `Uint8Array` + +It only needs the first 4100 bytes. + + +## Supported file types + +- [`jpg`](https://en.wikipedia.org/wiki/JPEG) +- [`png`](https://en.wikipedia.org/wiki/Portable_Network_Graphics) +- [`gif`](https://en.wikipedia.org/wiki/GIF) +- [`webp`](https://en.wikipedia.org/wiki/WebP) +- [`flif`](https://en.wikipedia.org/wiki/Free_Lossless_Image_Format) +- [`cr2`](http://fileinfo.com/extension/cr2) +- [`tif`](https://en.wikipedia.org/wiki/Tagged_Image_File_Format) +- [`bmp`](https://en.wikipedia.org/wiki/BMP_file_format) +- [`jxr`](https://en.wikipedia.org/wiki/JPEG_XR) +- [`psd`](https://en.wikipedia.org/wiki/Adobe_Photoshop#File_format) +- [`zip`](https://en.wikipedia.org/wiki/Zip_(file_format)) +- [`tar`](https://en.wikipedia.org/wiki/Tar_(computing)#File_format) +- [`rar`](https://en.wikipedia.org/wiki/RAR_(file_format)) +- [`gz`](https://en.wikipedia.org/wiki/Gzip) +- [`bz2`](https://en.wikipedia.org/wiki/Bzip2) +- [`7z`](https://en.wikipedia.org/wiki/7z) +- [`dmg`](https://en.wikipedia.org/wiki/Apple_Disk_Image) +- [`mp4`](https://en.wikipedia.org/wiki/MPEG-4_Part_14#Filename_extensions) +- [`m4v`](https://en.wikipedia.org/wiki/M4V) +- [`mid`](https://en.wikipedia.org/wiki/MIDI) +- [`mkv`](https://en.wikipedia.org/wiki/Matroska) +- [`webm`](https://en.wikipedia.org/wiki/WebM) +- [`mov`](https://en.wikipedia.org/wiki/QuickTime_File_Format) +- [`avi`](https://en.wikipedia.org/wiki/Audio_Video_Interleave) +- [`wmv`](https://en.wikipedia.org/wiki/Windows_Media_Video) +- [`mpg`](https://en.wikipedia.org/wiki/MPEG-1) +- [`mp2`](https://en.wikipedia.org/wiki/MPEG-1_Audio_Layer_II) +- [`mp3`](https://en.wikipedia.org/wiki/MP3) +- [`m4a`](https://en.wikipedia.org/wiki/MPEG-4_Part_14#.MP4_versus_.M4A) +- [`ogg`](https://en.wikipedia.org/wiki/Ogg) +- [`opus`](https://en.wikipedia.org/wiki/Opus_(audio_format)) +- [`flac`](https://en.wikipedia.org/wiki/FLAC) +- [`wav`](https://en.wikipedia.org/wiki/WAV) +- [`qcp`](https://en.wikipedia.org/wiki/QCP) +- [`amr`](https://en.wikipedia.org/wiki/Adaptive_Multi-Rate_audio_codec) +- [`pdf`](https://en.wikipedia.org/wiki/Portable_Document_Format) +- [`epub`](https://en.wikipedia.org/wiki/EPUB) +- [`mobi`](https://en.wikipedia.org/wiki/Mobipocket) - Mobipocket +- [`exe`](https://en.wikipedia.org/wiki/.exe) +- [`swf`](https://en.wikipedia.org/wiki/SWF) +- [`rtf`](https://en.wikipedia.org/wiki/Rich_Text_Format) +- [`woff`](https://en.wikipedia.org/wiki/Web_Open_Font_Format) +- [`woff2`](https://en.wikipedia.org/wiki/Web_Open_Font_Format) +- [`eot`](https://en.wikipedia.org/wiki/Embedded_OpenType) +- [`ttf`](https://en.wikipedia.org/wiki/TrueType) +- [`otf`](https://en.wikipedia.org/wiki/OpenType) +- [`ico`](https://en.wikipedia.org/wiki/ICO_(file_format)) +- [`flv`](https://en.wikipedia.org/wiki/Flash_Video) +- [`ps`](https://en.wikipedia.org/wiki/Postscript) +- [`xz`](https://en.wikipedia.org/wiki/Xz) +- [`sqlite`](https://www.sqlite.org/fileformat2.html) +- [`nes`](http://fileinfo.com/extension/nes) +- [`crx`](https://developer.chrome.com/extensions/crx) +- [`xpi`](https://en.wikipedia.org/wiki/XPInstall) +- [`cab`](https://en.wikipedia.org/wiki/Cabinet_(file_format)) +- [`deb`](https://en.wikipedia.org/wiki/Deb_(file_format)) +- [`ar`](https://en.wikipedia.org/wiki/Ar_(Unix)) +- [`rpm`](http://fileinfo.com/extension/rpm) +- [`Z`](http://fileinfo.com/extension/z) +- [`lz`](https://en.wikipedia.org/wiki/Lzip) +- [`msi`](https://en.wikipedia.org/wiki/Windows_Installer) +- [`mxf`](https://en.wikipedia.org/wiki/Material_Exchange_Format) +- [`mts`](https://en.wikipedia.org/wiki/.m2ts) +- [`wasm`](https://en.wikipedia.org/wiki/WebAssembly) +- [`blend`](https://wiki.blender.org/index.php/Dev:Source/Architecture/File_Format) +- [`bpg`](https://bellard.org/bpg/) +- [`docx`](https://en.wikipedia.org/wiki/Office_Open_XML) +- [`pptx`](https://en.wikipedia.org/wiki/Office_Open_XML) +- [`xlsx`](https://en.wikipedia.org/wiki/Office_Open_XML) +- [`3gp`](https://en.wikipedia.org/wiki/3GP_and_3G2) +- [`jp2`](https://en.wikipedia.org/wiki/JPEG_2000) - JPEG 2000 +- [`jpm`](https://en.wikipedia.org/wiki/JPEG_2000) - JPEG 2000 +- [`jpx`](https://en.wikipedia.org/wiki/JPEG_2000) - JPEG 2000 +- [`mj2`](https://en.wikipedia.org/wiki/Motion_JPEG_2000) - Motion JPEG 2000 +- [`aif`](https://en.wikipedia.org/wiki/Audio_Interchange_File_Format) +- [`odt`](https://en.wikipedia.org/wiki/OpenDocument) - OpenDocument for word processing +- [`ods`](https://en.wikipedia.org/wiki/OpenDocument) - OpenDocument for spreadsheets +- [`odp`](https://en.wikipedia.org/wiki/OpenDocument) - OpenDocument for presentations +- [`xml`](https://en.wikipedia.org/wiki/XML) +- [`heic`](http://nokiatech.github.io/heif/technical.html) +- [`cur`](https://en.wikipedia.org/wiki/ICO_(file_format)) +- [`ktx`](https://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/) +- [`ape`](https://en.wikipedia.org/wiki/Monkey%27s_Audio) - Monkey's Audio + +*SVG isn't included as it requires the whole file to be read, but you can get it [here](https://github.com/sindresorhus/is-svg).* + +*Pull request welcome for additional commonly used file types.* + + +## Related + +- [file-type-cli](https://github.com/sindresorhus/file-type-cli) - CLI for this module + + +## Created by + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Mikael Finstad](https://github.com/mifi) + + +## License + +MIT diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/got/errors.js b/code/application_liste/app/node_modules/bin-wrapper/node_modules/got/errors.js new file mode 100644 index 0000000..ad83388 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/got/errors.js @@ -0,0 +1,92 @@ +'use strict'; +const urlLib = require('url'); +const http = require('http'); +const PCancelable = require('p-cancelable'); +const is = require('@sindresorhus/is'); + +class GotError extends Error { + constructor(message, error, opts) { + super(message); + Error.captureStackTrace(this, this.constructor); + this.name = 'GotError'; + + if (!is.undefined(error.code)) { + this.code = error.code; + } + + Object.assign(this, { + host: opts.host, + hostname: opts.hostname, + method: opts.method, + path: opts.path, + protocol: opts.protocol, + url: opts.href + }); + } +} + +module.exports.GotError = GotError; + +module.exports.CacheError = class extends GotError { + constructor(error, opts) { + super(error.message, error, opts); + this.name = 'CacheError'; + } +}; + +module.exports.RequestError = class extends GotError { + constructor(error, opts) { + super(error.message, error, opts); + this.name = 'RequestError'; + } +}; + +module.exports.ReadError = class extends GotError { + constructor(error, opts) { + super(error.message, error, opts); + this.name = 'ReadError'; + } +}; + +module.exports.ParseError = class extends GotError { + constructor(error, statusCode, opts, data) { + super(`${error.message} in "${urlLib.format(opts)}": \n${data.slice(0, 77)}...`, error, opts); + this.name = 'ParseError'; + this.statusCode = statusCode; + this.statusMessage = http.STATUS_CODES[this.statusCode]; + } +}; + +module.exports.HTTPError = class extends GotError { + constructor(statusCode, statusMessage, headers, opts) { + if (statusMessage) { + statusMessage = statusMessage.replace(/\r?\n/g, ' ').trim(); + } else { + statusMessage = http.STATUS_CODES[statusCode]; + } + super(`Response code ${statusCode} (${statusMessage})`, {}, opts); + this.name = 'HTTPError'; + this.statusCode = statusCode; + this.statusMessage = statusMessage; + this.headers = headers; + } +}; + +module.exports.MaxRedirectsError = class extends GotError { + constructor(statusCode, redirectUrls, opts) { + super('Redirected 10 times. Aborting.', {}, opts); + this.name = 'MaxRedirectsError'; + this.statusCode = statusCode; + this.statusMessage = http.STATUS_CODES[this.statusCode]; + this.redirectUrls = redirectUrls; + } +}; + +module.exports.UnsupportedProtocolError = class extends GotError { + constructor(opts) { + super(`Unsupported protocol "${opts.protocol}"`, {}, opts); + this.name = 'UnsupportedProtocolError'; + } +}; + +module.exports.CancelError = PCancelable.CancelError; diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/got/index.js b/code/application_liste/app/node_modules/bin-wrapper/node_modules/got/index.js new file mode 100644 index 0000000..9d83b77 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/got/index.js @@ -0,0 +1,675 @@ +'use strict'; +const EventEmitter = require('events'); +const http = require('http'); +const https = require('https'); +const PassThrough = require('stream').PassThrough; +const Transform = require('stream').Transform; +const urlLib = require('url'); +const fs = require('fs'); +const querystring = require('querystring'); +const CacheableRequest = require('cacheable-request'); +const duplexer3 = require('duplexer3'); +const intoStream = require('into-stream'); +const is = require('@sindresorhus/is'); +const getStream = require('get-stream'); +const timedOut = require('timed-out'); +const urlParseLax = require('url-parse-lax'); +const urlToOptions = require('url-to-options'); +const lowercaseKeys = require('lowercase-keys'); +const decompressResponse = require('decompress-response'); +const mimicResponse = require('mimic-response'); +const isRetryAllowed = require('is-retry-allowed'); +const isURL = require('isurl'); +const PCancelable = require('p-cancelable'); +const pTimeout = require('p-timeout'); +const pify = require('pify'); +const Buffer = require('safe-buffer').Buffer; +const pkg = require('./package.json'); +const errors = require('./errors'); + +const getMethodRedirectCodes = new Set([300, 301, 302, 303, 304, 305, 307, 308]); +const allMethodRedirectCodes = new Set([300, 303, 307, 308]); + +const isFormData = body => is.nodeStream(body) && is.function(body.getBoundary); + +const getBodySize = opts => { + const body = opts.body; + + if (opts.headers['content-length']) { + return Number(opts.headers['content-length']); + } + + if (!body && !opts.stream) { + return 0; + } + + if (is.string(body)) { + return Buffer.byteLength(body); + } + + if (isFormData(body)) { + return pify(body.getLength.bind(body))(); + } + + if (body instanceof fs.ReadStream) { + return pify(fs.stat)(body.path).then(stat => stat.size); + } + + if (is.nodeStream(body) && is.buffer(body._buffer)) { + return body._buffer.length; + } + + return null; +}; + +function requestAsEventEmitter(opts) { + opts = opts || {}; + + const ee = new EventEmitter(); + const requestUrl = opts.href || urlLib.resolve(urlLib.format(opts), opts.path); + const redirects = []; + const agents = is.object(opts.agent) ? opts.agent : null; + let retryCount = 0; + let redirectUrl; + let uploadBodySize; + let uploaded = 0; + + const get = opts => { + if (opts.protocol !== 'http:' && opts.protocol !== 'https:') { + ee.emit('error', new got.UnsupportedProtocolError(opts)); + return; + } + + let fn = opts.protocol === 'https:' ? https : http; + + if (agents) { + const protocolName = opts.protocol === 'https:' ? 'https' : 'http'; + opts.agent = agents[protocolName] || opts.agent; + } + + if (opts.useElectronNet && process.versions.electron) { + const electron = require('electron'); + fn = electron.net || electron.remote.net; + } + + let progressInterval; + + const cacheableRequest = new CacheableRequest(fn.request, opts.cache); + const cacheReq = cacheableRequest(opts, res => { + clearInterval(progressInterval); + + ee.emit('uploadProgress', { + percent: 1, + transferred: uploaded, + total: uploadBodySize + }); + + const statusCode = res.statusCode; + + res.url = redirectUrl || requestUrl; + res.requestUrl = requestUrl; + + const followRedirect = opts.followRedirect && 'location' in res.headers; + const redirectGet = followRedirect && getMethodRedirectCodes.has(statusCode); + const redirectAll = followRedirect && allMethodRedirectCodes.has(statusCode); + + if (redirectAll || (redirectGet && (opts.method === 'GET' || opts.method === 'HEAD'))) { + res.resume(); + + if (statusCode === 303) { + // Server responded with "see other", indicating that the resource exists at another location, + // and the client should request it from that location via GET or HEAD. + opts.method = 'GET'; + } + + if (redirects.length >= 10) { + ee.emit('error', new got.MaxRedirectsError(statusCode, redirects, opts), null, res); + return; + } + + const bufferString = Buffer.from(res.headers.location, 'binary').toString(); + + redirectUrl = urlLib.resolve(urlLib.format(opts), bufferString); + + redirects.push(redirectUrl); + + const redirectOpts = Object.assign({}, opts, urlLib.parse(redirectUrl)); + + ee.emit('redirect', res, redirectOpts); + + get(redirectOpts); + + return; + } + + setImmediate(() => { + try { + getResponse(res, opts, ee, redirects); + } catch (e) { + ee.emit('error', e); + } + }); + }); + + cacheReq.on('error', err => { + if (err instanceof CacheableRequest.RequestError) { + ee.emit('error', new got.RequestError(err, opts)); + } else { + ee.emit('error', new got.CacheError(err, opts)); + } + }); + + cacheReq.once('request', req => { + let aborted = false; + req.once('abort', _ => { + aborted = true; + }); + + req.once('error', err => { + clearInterval(progressInterval); + + if (aborted) { + return; + } + + const backoff = opts.retries(++retryCount, err); + + if (backoff) { + setTimeout(get, backoff, opts); + return; + } + + ee.emit('error', new got.RequestError(err, opts)); + }); + + ee.once('request', req => { + ee.emit('uploadProgress', { + percent: 0, + transferred: 0, + total: uploadBodySize + }); + + const socket = req.connection; + if (socket) { + // `._connecting` was the old property which was made public in node v6.1.0 + const isConnecting = socket.connecting === undefined ? socket._connecting : socket.connecting; + + const onSocketConnect = () => { + const uploadEventFrequency = 150; + + progressInterval = setInterval(() => { + if (socket.destroyed) { + clearInterval(progressInterval); + return; + } + + const lastUploaded = uploaded; + const headersSize = req._header ? Buffer.byteLength(req._header) : 0; + uploaded = socket.bytesWritten - headersSize; + + // Prevent the known issue of `bytesWritten` being larger than body size + if (uploadBodySize && uploaded > uploadBodySize) { + uploaded = uploadBodySize; + } + + // Don't emit events with unchanged progress and + // prevent last event from being emitted, because + // it's emitted when `response` is emitted + if (uploaded === lastUploaded || uploaded === uploadBodySize) { + return; + } + + ee.emit('uploadProgress', { + percent: uploadBodySize ? uploaded / uploadBodySize : 0, + transferred: uploaded, + total: uploadBodySize + }); + }, uploadEventFrequency); + }; + + // Only subscribe to 'connect' event if we're actually connecting a new + // socket, otherwise if we're already connected (because this is a + // keep-alive connection) do not bother. This is important since we won't + // get a 'connect' event for an already connected socket. + if (isConnecting) { + socket.once('connect', onSocketConnect); + } else { + onSocketConnect(); + } + } + }); + + if (opts.gotTimeout) { + clearInterval(progressInterval); + timedOut(req, opts.gotTimeout); + } + + setImmediate(() => { + ee.emit('request', req); + }); + }); + }; + + setImmediate(() => { + Promise.resolve(getBodySize(opts)) + .then(size => { + uploadBodySize = size; + + if ( + is.undefined(opts.headers['content-length']) && + is.undefined(opts.headers['transfer-encoding']) && + isFormData(opts.body) + ) { + opts.headers['content-length'] = size; + } + + get(opts); + }) + .catch(err => { + ee.emit('error', err); + }); + }); + + return ee; +} + +function getResponse(res, opts, ee, redirects) { + const downloadBodySize = Number(res.headers['content-length']) || null; + let downloaded = 0; + + const progressStream = new Transform({ + transform(chunk, encoding, callback) { + downloaded += chunk.length; + + const percent = downloadBodySize ? downloaded / downloadBodySize : 0; + + // Let flush() be responsible for emitting the last event + if (percent < 1) { + ee.emit('downloadProgress', { + percent, + transferred: downloaded, + total: downloadBodySize + }); + } + + callback(null, chunk); + }, + + flush(callback) { + ee.emit('downloadProgress', { + percent: 1, + transferred: downloaded, + total: downloadBodySize + }); + + callback(); + } + }); + + mimicResponse(res, progressStream); + progressStream.redirectUrls = redirects; + + const response = opts.decompress === true && + is.function(decompressResponse) && + opts.method !== 'HEAD' ? decompressResponse(progressStream) : progressStream; + + if (!opts.decompress && ['gzip', 'deflate'].indexOf(res.headers['content-encoding']) !== -1) { + opts.encoding = null; + } + + ee.emit('response', response); + + ee.emit('downloadProgress', { + percent: 0, + transferred: 0, + total: downloadBodySize + }); + + res.pipe(progressStream); +} + +function asPromise(opts) { + const timeoutFn = requestPromise => opts.gotTimeout && opts.gotTimeout.request ? + pTimeout(requestPromise, opts.gotTimeout.request, new got.RequestError({message: 'Request timed out', code: 'ETIMEDOUT'}, opts)) : + requestPromise; + + const proxy = new EventEmitter(); + + const cancelable = new PCancelable((resolve, reject, onCancel) => { + const ee = requestAsEventEmitter(opts); + let cancelOnRequest = false; + + onCancel(() => { + cancelOnRequest = true; + }); + + ee.on('request', req => { + if (cancelOnRequest) { + req.abort(); + } + + onCancel(() => { + req.abort(); + }); + + if (is.nodeStream(opts.body)) { + opts.body.pipe(req); + opts.body = undefined; + return; + } + + req.end(opts.body); + }); + + ee.on('response', res => { + const stream = is.null(opts.encoding) ? getStream.buffer(res) : getStream(res, opts); + + stream + .catch(err => reject(new got.ReadError(err, opts))) + .then(data => { + const statusCode = res.statusCode; + const limitStatusCode = opts.followRedirect ? 299 : 399; + + res.body = data; + + if (opts.json && res.body) { + try { + res.body = JSON.parse(res.body); + } catch (err) { + if (statusCode >= 200 && statusCode < 300) { + throw new got.ParseError(err, statusCode, opts, data); + } + } + } + + if (opts.throwHttpErrors && statusCode !== 304 && (statusCode < 200 || statusCode > limitStatusCode)) { + throw new got.HTTPError(statusCode, res.statusMessage, res.headers, opts); + } + + resolve(res); + }) + .catch(err => { + Object.defineProperty(err, 'response', {value: res}); + reject(err); + }); + }); + + ee.once('error', reject); + ee.on('redirect', proxy.emit.bind(proxy, 'redirect')); + ee.on('uploadProgress', proxy.emit.bind(proxy, 'uploadProgress')); + ee.on('downloadProgress', proxy.emit.bind(proxy, 'downloadProgress')); + }); + + // Preserve backwards-compatibility + // TODO: Remove this in the next major version + Object.defineProperty(cancelable, 'canceled', { + get() { + return cancelable.isCanceled; + } + }); + + const promise = timeoutFn(cancelable); + + promise.cancel = cancelable.cancel.bind(cancelable); + + promise.on = (name, fn) => { + proxy.on(name, fn); + return promise; + }; + + return promise; +} + +function asStream(opts) { + opts.stream = true; + + const input = new PassThrough(); + const output = new PassThrough(); + const proxy = duplexer3(input, output); + let timeout; + + if (opts.gotTimeout && opts.gotTimeout.request) { + timeout = setTimeout(() => { + proxy.emit('error', new got.RequestError({message: 'Request timed out', code: 'ETIMEDOUT'}, opts)); + }, opts.gotTimeout.request); + } + + if (opts.json) { + throw new Error('Got can not be used as a stream when the `json` option is used'); + } + + if (opts.body) { + proxy.write = () => { + throw new Error('Got\'s stream is not writable when the `body` option is used'); + }; + } + + const ee = requestAsEventEmitter(opts); + + ee.on('request', req => { + proxy.emit('request', req); + + if (is.nodeStream(opts.body)) { + opts.body.pipe(req); + return; + } + + if (opts.body) { + req.end(opts.body); + return; + } + + if (opts.method === 'POST' || opts.method === 'PUT' || opts.method === 'PATCH') { + input.pipe(req); + return; + } + + req.end(); + }); + + ee.on('response', res => { + clearTimeout(timeout); + + const statusCode = res.statusCode; + + res.on('error', err => { + proxy.emit('error', new got.ReadError(err, opts)); + }); + + res.pipe(output); + + if (opts.throwHttpErrors && statusCode !== 304 && (statusCode < 200 || statusCode > 299)) { + proxy.emit('error', new got.HTTPError(statusCode, res.statusMessage, res.headers, opts), null, res); + return; + } + + proxy.emit('response', res); + }); + + ee.on('error', proxy.emit.bind(proxy, 'error')); + ee.on('redirect', proxy.emit.bind(proxy, 'redirect')); + ee.on('uploadProgress', proxy.emit.bind(proxy, 'uploadProgress')); + ee.on('downloadProgress', proxy.emit.bind(proxy, 'downloadProgress')); + + return proxy; +} + +function normalizeArguments(url, opts) { + if (!is.string(url) && !is.object(url)) { + throw new TypeError(`Parameter \`url\` must be a string or object, not ${is(url)}`); + } else if (is.string(url)) { + url = url.replace(/^unix:/, 'http://$&'); + + try { + decodeURI(url); + } catch (err) { + throw new Error('Parameter `url` must contain valid UTF-8 character sequences'); + } + + url = urlParseLax(url); + if (url.auth) { + throw new Error('Basic authentication must be done with the `auth` option'); + } + } else if (isURL.lenient(url)) { + url = urlToOptions(url); + } + + opts = Object.assign( + { + path: '', + retries: 2, + cache: false, + decompress: true, + useElectronNet: false, + throwHttpErrors: true + }, + url, + { + protocol: url.protocol || 'http:' // Override both null/undefined with default protocol + }, + opts + ); + + const headers = lowercaseKeys(opts.headers); + for (const key of Object.keys(headers)) { + if (is.nullOrUndefined(headers[key])) { + delete headers[key]; + } + } + + opts.headers = Object.assign({ + 'user-agent': `${pkg.name}/${pkg.version} (https://github.com/sindresorhus/got)` + }, headers); + + if (opts.decompress && is.undefined(opts.headers['accept-encoding'])) { + opts.headers['accept-encoding'] = 'gzip, deflate'; + } + + const query = opts.query; + + if (query) { + if (!is.string(query)) { + opts.query = querystring.stringify(query); + } + + opts.path = `${opts.path.split('?')[0]}?${opts.query}`; + delete opts.query; + } + + if (opts.json && is.undefined(opts.headers.accept)) { + opts.headers.accept = 'application/json'; + } + + const body = opts.body; + if (is.nullOrUndefined(body)) { + opts.method = (opts.method || 'GET').toUpperCase(); + } else { + const headers = opts.headers; + if (!is.nodeStream(body) && !is.string(body) && !is.buffer(body) && !(opts.form || opts.json)) { + throw new TypeError('The `body` option must be a stream.Readable, string, Buffer or plain Object'); + } + + const canBodyBeStringified = is.plainObject(body) || is.array(body); + if ((opts.form || opts.json) && !canBodyBeStringified) { + throw new TypeError('The `body` option must be a plain Object or Array when the `form` or `json` option is used'); + } + + if (isFormData(body)) { + // Special case for https://github.com/form-data/form-data + headers['content-type'] = headers['content-type'] || `multipart/form-data; boundary=${body.getBoundary()}`; + } else if (opts.form && canBodyBeStringified) { + headers['content-type'] = headers['content-type'] || 'application/x-www-form-urlencoded'; + opts.body = querystring.stringify(body); + } else if (opts.json && canBodyBeStringified) { + headers['content-type'] = headers['content-type'] || 'application/json'; + opts.body = JSON.stringify(body); + } + + if (is.undefined(headers['content-length']) && is.undefined(headers['transfer-encoding']) && !is.nodeStream(body)) { + const length = is.string(opts.body) ? Buffer.byteLength(opts.body) : opts.body.length; + headers['content-length'] = length; + } + + // Convert buffer to stream to receive upload progress events + // see https://github.com/sindresorhus/got/pull/322 + if (is.buffer(body)) { + opts.body = intoStream(body); + opts.body._buffer = body; + } + + opts.method = (opts.method || 'POST').toUpperCase(); + } + + if (opts.hostname === 'unix') { + const matches = /(.+?):(.+)/.exec(opts.path); + + if (matches) { + opts.socketPath = matches[1]; + opts.path = matches[2]; + opts.host = null; + } + } + + if (!is.function(opts.retries)) { + const retries = opts.retries; + + opts.retries = (iter, err) => { + if (iter > retries || !isRetryAllowed(err)) { + return 0; + } + + const noise = Math.random() * 100; + + return ((1 << iter) * 1000) + noise; + }; + } + + if (is.undefined(opts.followRedirect)) { + opts.followRedirect = true; + } + + if (opts.timeout) { + if (is.number(opts.timeout)) { + opts.gotTimeout = {request: opts.timeout}; + } else { + opts.gotTimeout = opts.timeout; + } + delete opts.timeout; + } + + return opts; +} + +function got(url, opts) { + try { + const normalizedArgs = normalizeArguments(url, opts); + + if (normalizedArgs.stream) { + return asStream(normalizedArgs); + } + + return asPromise(normalizedArgs); + } catch (err) { + return Promise.reject(err); + } +} + +got.stream = (url, opts) => asStream(normalizeArguments(url, opts)); + +const methods = [ + 'get', + 'post', + 'put', + 'patch', + 'head', + 'delete' +]; + +for (const method of methods) { + got[method] = (url, opts) => got(url, Object.assign({}, opts, {method})); + got.stream[method] = (url, opts) => got.stream(url, Object.assign({}, opts, {method})); +} + +Object.assign(got, errors); + +module.exports = got; diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/got/license b/code/application_liste/app/node_modules/bin-wrapper/node_modules/got/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/got/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/got/node_modules/pify/index.js b/code/application_liste/app/node_modules/bin-wrapper/node_modules/got/node_modules/pify/index.js new file mode 100644 index 0000000..1dee43a --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/got/node_modules/pify/index.js @@ -0,0 +1,84 @@ +'use strict'; + +const processFn = (fn, opts) => function () { + const P = opts.promiseModule; + const args = new Array(arguments.length); + + for (let i = 0; i < arguments.length; i++) { + args[i] = arguments[i]; + } + + return new P((resolve, reject) => { + if (opts.errorFirst) { + args.push(function (err, result) { + if (opts.multiArgs) { + const results = new Array(arguments.length - 1); + + for (let i = 1; i < arguments.length; i++) { + results[i - 1] = arguments[i]; + } + + if (err) { + results.unshift(err); + reject(results); + } else { + resolve(results); + } + } else if (err) { + reject(err); + } else { + resolve(result); + } + }); + } else { + args.push(function (result) { + if (opts.multiArgs) { + const results = new Array(arguments.length - 1); + + for (let i = 0; i < arguments.length; i++) { + results[i] = arguments[i]; + } + + resolve(results); + } else { + resolve(result); + } + }); + } + + fn.apply(this, args); + }); +}; + +module.exports = (obj, opts) => { + opts = Object.assign({ + exclude: [/.+(Sync|Stream)$/], + errorFirst: true, + promiseModule: Promise + }, opts); + + const filter = key => { + const match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key); + return opts.include ? opts.include.some(match) : !opts.exclude.some(match); + }; + + let ret; + if (typeof obj === 'function') { + ret = function () { + if (opts.excludeMain) { + return obj.apply(this, arguments); + } + + return processFn(obj, opts).apply(this, arguments); + }; + } else { + ret = Object.create(Object.getPrototypeOf(obj)); + } + + for (const key in obj) { // eslint-disable-line guard-for-in + const x = obj[key]; + ret[key] = typeof x === 'function' && filter(key) ? processFn(x, opts) : x; + } + + return ret; +}; diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/got/node_modules/pify/license b/code/application_liste/app/node_modules/bin-wrapper/node_modules/got/node_modules/pify/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/got/node_modules/pify/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/got/node_modules/pify/package.json b/code/application_liste/app/node_modules/bin-wrapper/node_modules/got/node_modules/pify/package.json new file mode 100644 index 0000000..c4f4f8c --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/got/node_modules/pify/package.json @@ -0,0 +1,83 @@ +{ + "_from": "pify@^3.0.0", + "_id": "pify@3.0.0", + "_inBundle": false, + "_integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "_location": "/bin-wrapper/got/pify", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "pify@^3.0.0", + "name": "pify", + "escapedName": "pify", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/bin-wrapper/got" + ], + "_resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "_shasum": "e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176", + "_spec": "pify@^3.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\bin-wrapper\\node_modules\\got", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/pify/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Promisify a callback-style function", + "devDependencies": { + "ava": "*", + "pinkie-promise": "^2.0.0", + "v8-natives": "^1.0.0", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/pify#readme", + "keywords": [ + "promise", + "promises", + "promisify", + "all", + "denodify", + "denodeify", + "callback", + "cb", + "node", + "then", + "thenify", + "convert", + "transform", + "wrap", + "wrapper", + "bind", + "to", + "async", + "await", + "es2015", + "bluebird" + ], + "license": "MIT", + "name": "pify", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/pify.git" + }, + "scripts": { + "optimization-test": "node --allow-natives-syntax optimization-test.js", + "test": "xo && ava && npm run optimization-test" + }, + "version": "3.0.0" +} diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/got/node_modules/pify/readme.md b/code/application_liste/app/node_modules/bin-wrapper/node_modules/got/node_modules/pify/readme.md new file mode 100644 index 0000000..376ca4e --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/got/node_modules/pify/readme.md @@ -0,0 +1,131 @@ +# pify [![Build Status](https://travis-ci.org/sindresorhus/pify.svg?branch=master)](https://travis-ci.org/sindresorhus/pify) + +> Promisify a callback-style function + + +## Install + +``` +$ npm install --save pify +``` + + +## Usage + +```js +const fs = require('fs'); +const pify = require('pify'); + +// Promisify a single function +pify(fs.readFile)('package.json', 'utf8').then(data => { + console.log(JSON.parse(data).name); + //=> 'pify' +}); + +// Promisify all methods in a module +pify(fs).readFile('package.json', 'utf8').then(data => { + console.log(JSON.parse(data).name); + //=> 'pify' +}); +``` + + +## API + +### pify(input, [options]) + +Returns a `Promise` wrapped version of the supplied function or module. + +#### input + +Type: `Function` `Object` + +Callback-style function or module whose methods you want to promisify. + +#### options + +##### multiArgs + +Type: `boolean`
+Default: `false` + +By default, the promisified function will only return the second argument from the callback, which works fine for most APIs. This option can be useful for modules like `request` that return multiple arguments. Turning this on will make it return an array of all arguments from the callback, excluding the error argument, instead of just the second argument. This also applies to rejections, where it returns an array of all the callback arguments, including the error. + +```js +const request = require('request'); +const pify = require('pify'); + +pify(request, {multiArgs: true})('https://sindresorhus.com').then(result => { + const [httpResponse, body] = result; +}); +``` + +##### include + +Type: `string[]` `RegExp[]` + +Methods in a module to promisify. Remaining methods will be left untouched. + +##### exclude + +Type: `string[]` `RegExp[]`
+Default: `[/.+(Sync|Stream)$/]` + +Methods in a module **not** to promisify. Methods with names ending with `'Sync'` are excluded by default. + +##### excludeMain + +Type: `boolean`
+Default: `false` + +If given module is a function itself, it will be promisified. Turn this option on if you want to promisify only methods of the module. + +```js +const pify = require('pify'); + +function fn() { + return true; +} + +fn.method = (data, callback) => { + setImmediate(() => { + callback(null, data); + }); +}; + +// Promisify methods but not `fn()` +const promiseFn = pify(fn, {excludeMain: true}); + +if (promiseFn()) { + promiseFn.method('hi').then(data => { + console.log(data); + }); +} +``` + +##### errorFirst + +Type: `boolean`
+Default: `true` + +Whether the callback has an error as the first argument. You'll want to set this to `false` if you're dealing with an API that doesn't have an error as the first argument, like `fs.exists()`, some browser APIs, Chrome Extension APIs, etc. + +##### promiseModule + +Type: `Function` + +Custom promise module to use instead of the native one. + +Check out [`pinkie-promise`](https://github.com/floatdrop/pinkie-promise) if you need a tiny promise polyfill. + + +## Related + +- [p-event](https://github.com/sindresorhus/p-event) - Promisify an event by waiting for it to be emitted +- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently +- [More…](https://github.com/sindresorhus/promise-fun) + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/got/package.json b/code/application_liste/app/node_modules/bin-wrapper/node_modules/got/package.json new file mode 100644 index 0000000..c30a39d --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/got/package.json @@ -0,0 +1,127 @@ +{ + "_from": "got@^8.3.1", + "_id": "got@8.3.2", + "_inBundle": false, + "_integrity": "sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw==", + "_location": "/bin-wrapper/got", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "got@^8.3.1", + "name": "got", + "escapedName": "got", + "rawSpec": "^8.3.1", + "saveSpec": null, + "fetchSpec": "^8.3.1" + }, + "_requiredBy": [ + "/bin-wrapper/download" + ], + "_resolved": "https://registry.npmjs.org/got/-/got-8.3.2.tgz", + "_shasum": "1d23f64390e97f776cac52e5b936e5f514d2e937", + "_spec": "got@^8.3.1", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\bin-wrapper\\node_modules\\download", + "ava": { + "concurrency": 4 + }, + "browser": { + "decompress-response": false, + "electron": false + }, + "bugs": { + "url": "https://github.com/sindresorhus/got/issues" + }, + "bundleDependencies": false, + "dependencies": { + "@sindresorhus/is": "^0.7.0", + "cacheable-request": "^2.1.1", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "into-stream": "^3.1.0", + "is-retry-allowed": "^1.1.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "mimic-response": "^1.0.0", + "p-cancelable": "^0.4.0", + "p-timeout": "^2.0.1", + "pify": "^3.0.0", + "safe-buffer": "^5.1.1", + "timed-out": "^4.0.1", + "url-parse-lax": "^3.0.0", + "url-to-options": "^1.0.1" + }, + "deprecated": false, + "description": "Simplified HTTP requests", + "devDependencies": { + "ava": "^0.25.0", + "coveralls": "^3.0.0", + "form-data": "^2.1.1", + "get-port": "^3.0.0", + "nyc": "^11.0.2", + "p-event": "^1.3.0", + "pem": "^1.4.4", + "proxyquire": "^1.8.0", + "sinon": "^4.0.0", + "slow-stream": "0.0.4", + "tempfile": "^2.0.0", + "tempy": "^0.2.1", + "universal-url": "1.0.0-alpha", + "xo": "^0.20.0" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js", + "errors.js" + ], + "homepage": "https://github.com/sindresorhus/got#readme", + "keywords": [ + "http", + "https", + "get", + "got", + "url", + "uri", + "request", + "util", + "utility", + "simple", + "curl", + "wget", + "fetch", + "net", + "network", + "electron" + ], + "license": "MIT", + "maintainers": [ + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Vsevolod Strukchinsky", + "email": "floatdrop@gmail.com", + "url": "github.com/floatdrop" + }, + { + "name": "Alexander Tesfamichael", + "email": "alex.tesfamichael@gmail.com", + "url": "alextes.me" + } + ], + "name": "got", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/got.git" + }, + "scripts": { + "coveralls": "nyc report --reporter=text-lcov | coveralls", + "test": "xo && nyc ava" + }, + "version": "8.3.2" +} diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/got/readme.md b/code/application_liste/app/node_modules/bin-wrapper/node_modules/got/readme.md new file mode 100644 index 0000000..2347077 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/got/readme.md @@ -0,0 +1,650 @@ +
+
+
+ Got +
+
+
+

Huge thanks to for sponsoring me! +

+
+
+
+ +> Simplified HTTP requests + +[![Build Status](https://travis-ci.org/sindresorhus/got.svg?branch=master)](https://travis-ci.org/sindresorhus/got) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/got/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/got?branch=master) [![Downloads](https://img.shields.io/npm/dm/got.svg)](https://npmjs.com/got) + +A nicer interface to the built-in [`http`](http://nodejs.org/api/http.html) module. + +Created because [`request`](https://github.com/request/request) is bloated *(several megabytes!)*. + + +## Highlights + +- [Promise & stream API](#api) +- [Request cancelation](#aborting-the-request) +- [RFC compliant caching](#cache-adapters) +- [Follows redirects](#followredirect) +- [Retries on network failure](#retries) +- [Progress events](#onuploadprogress-progress) +- [Handles gzip/deflate](#decompress) +- [Timeout handling](#timeout) +- [Errors with metadata](#errors) +- [JSON mode](#json) +- [WHATWG URL support](#url) +- [Electron support](#useelectronnet) + + +## Install + +``` +$ npm install got +``` + + + + + + +## Usage + +```js +const got = require('got'); + +(async () => { + try { + const response = await got('sindresorhus.com'); + console.log(response.body); + //=> ' ...' + } catch (error) { + console.log(error.response.body); + //=> 'Internal server error ...' + } +})(); +``` + +###### Streams + +```js +const fs = require('fs'); +const got = require('got'); + +got.stream('sindresorhus.com').pipe(fs.createWriteStream('index.html')); + +// For POST, PUT, and PATCH methods `got.stream` returns a `stream.Writable` +fs.createReadStream('index.html').pipe(got.stream.post('sindresorhus.com')); +``` + + +### API + +It's a `GET` request by default, but can be changed by using different methods or in the `options`. + +#### got(url, [options]) + +Returns a Promise for a `response` object with a `body` property, a `url` property with the request URL or the final URL after redirects, and a `requestUrl` property with the original request URL. + +The response object will normally be a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage), however if returned from the cache it will be a [responselike object](https://github.com/lukechilds/responselike) which behaves in the same way. + +The response will also have a `fromCache` property set with a boolean value. + +##### url + +Type: `string` `Object` + +The URL to request as simple string, a [`http.request` options](https://nodejs.org/api/http.html#http_http_request_options_callback), or a [WHATWG `URL`](https://nodejs.org/api/url.html#url_class_url). + +Properties from `options` will override properties in the parsed `url`. + +If no protocol is specified, it will default to `https`. + +##### options + +Type: `Object` + +Any of the [`http.request`](http://nodejs.org/api/http.html#http_http_request_options_callback) options. + +###### stream + +Type: `boolean`
+Default: `false` + +Returns a `Stream` instead of a `Promise`. This is equivalent to calling `got.stream(url, [options])`. + +###### body + +Type: `string` `Buffer` `stream.Readable` + +*This is mutually exclusive with stream mode.* + +Body that will be sent with a `POST` request. + +If present in `options` and `options.method` is not set, `options.method` will be set to `POST`. + +If `content-length` or `transfer-encoding` is not set in `options.headers` and `body` is a string or buffer, `content-length` will be set to the body length. + +###### encoding + +Type: `string` `null`
+Default: `'utf8'` + +[Encoding](https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings) to be used on `setEncoding` of the response data. If `null`, the body is returned as a [`Buffer`](https://nodejs.org/api/buffer.html) (binary data). + +###### form + +Type: `boolean`
+Default: `false` + +*This is mutually exclusive with stream mode.* + +If set to `true` and `Content-Type` header is not set, it will be set to `application/x-www-form-urlencoded`. + +`body` must be a plain object or array and will be stringified. + +###### json + +Type: `boolean`
+Default: `false` + +*This is mutually exclusive with stream mode.* + +If set to `true` and `Content-Type` header is not set, it will be set to `application/json`. + +Parse response body with `JSON.parse` and set `accept` header to `application/json`. If used in conjunction with the `form` option, the `body` will the stringified as querystring and the response parsed as JSON. + +`body` must be a plain object or array and will be stringified. + +###### query + +Type: `string` `Object`
+ +Query string object that will be added to the request URL. This will override the query string in `url`. + +###### timeout + +Type: `number` `Object` + +Milliseconds to wait for the server to end the response before aborting request with `ETIMEDOUT` error. + +This also accepts an object with separate `connect`, `socket`, and `request` fields for connection, socket, and entire request timeouts. + +###### retries + +Type: `number` `Function`
+Default: `2` + +Number of request retries when network errors happens. Delays between retries counts with function `1000 * Math.pow(2, retry) + Math.random() * 100`, where `retry` is attempt number (starts from 0). + +Option accepts `function` with `retry` and `error` arguments. Function must return delay in milliseconds (`0` return value cancels retry). + +**Note:** if `retries` is `number`, `ENOTFOUND` and `ENETUNREACH` error will not be retried (see full list in [`is-retry-allowed`](https://github.com/floatdrop/is-retry-allowed/blob/master/index.js#L12) module). + +###### followRedirect + +Type: `boolean`
+Default: `true` + +Defines if redirect responses should be followed automatically. + +Note that if a `303` is sent by the server in response to any request type (`POST`, `DELETE`, etc.), got will automatically +request the resource pointed to in the location header via `GET`. This is in accordance with [the spec](https://tools.ietf.org/html/rfc7231#section-6.4.4). + +###### decompress + +Type: `boolean`
+Default: `true` + +Decompress the response automatically. This will set the `accept-encoding` header to `gzip, deflate` unless you set it yourself. + +If this is disabled, a compressed response is returned as a `Buffer`. This may be useful if you want to handle decompression yourself or stream the raw compressed data. + +###### cache + +Type: `Object`
+Default: `false` + +[Cache adapter instance](#cache-adapters) for storing cached data. + +###### useElectronNet + +Type: `boolean`
+Default: `false` + +When used in Electron, Got will use [`electron.net`](https://electronjs.org/docs/api/net/) instead of the Node.js `http` module. According to the Electron docs, it should be fully compatible, but it's not entirely. See [#315](https://github.com/sindresorhus/got/issues/315). + +###### throwHttpErrors + +Type: `boolean`
+Default: `true` + +Determines if a `got.HTTPError` is thrown for error responses (non-2xx status codes). + +If this is disabled, requests that encounter an error status code will be resolved with the `response` instead of throwing. This may be useful if you are checking for resource availability and are expecting error responses. + +#### Streams + +#### got.stream(url, [options]) + +`stream` method will return Duplex stream with additional events: + +##### .on('request', request) + +`request` event to get the request object of the request. + +**Tip**: You can use `request` event to abort request: + +```js +got.stream('github.com') + .on('request', req => setTimeout(() => req.abort(), 50)); +``` + +##### .on('response', response) + +`response` event to get the response object of the final request. + +##### .on('redirect', response, nextOptions) + +`redirect` event to get the response object of a redirect. The second argument is options for the next request to the redirect location. + +##### .on('uploadProgress', progress) +##### .on('downloadProgress', progress) + +Progress events for uploading (sending request) and downloading (receiving response). The `progress` argument is an object like: + +```js +{ + percent: 0.1, + transferred: 1024, + total: 10240 +} +``` + +If it's not possible to retrieve the body size (can happen when streaming), `total` will be `null`. + +**Note**: Progress events can also be used with promises. + +```js +(async () => { + const response = await got('sindresorhus.com') + .on('downloadProgress', progress => { + // Report download progress + }) + .on('uploadProgress', progress => { + // Report upload progress + }); + + console.log(response); +})(); +``` + +##### .on('error', error, body, response) + +`error` event emitted in case of protocol error (like `ENOTFOUND` etc.) or status error (4xx or 5xx). The second argument is the body of the server response in case of status error. The third argument is response object. + +#### got.get(url, [options]) +#### got.post(url, [options]) +#### got.put(url, [options]) +#### got.patch(url, [options]) +#### got.head(url, [options]) +#### got.delete(url, [options]) + +Sets `options.method` to the method name and makes a request. + + +## Errors + +Each error contains (if available) `statusCode`, `statusMessage`, `host`, `hostname`, `method`, `path`, `protocol` and `url` properties to make debugging easier. + +In Promise mode, the `response` is attached to the error. + +#### got.CacheError + +When a cache method fails, for example if the database goes down, or there's a filesystem error. + +#### got.RequestError + +When a request fails. Contains a `code` property with error class code, like `ECONNREFUSED`. + +#### got.ReadError + +When reading from response stream fails. + +#### got.ParseError + +When `json` option is enabled, server response code is 2xx, and `JSON.parse` fails. + +#### got.HTTPError + +When server response code is not 2xx. Includes `statusCode`, `statusMessage`, and `redirectUrls` properties. + +#### got.MaxRedirectsError + +When server redirects you more than 10 times. Includes a `redirectUrls` property, which is an array of the URLs Got was redirected to before giving up. + +#### got.UnsupportedProtocolError + +When given an unsupported protocol. + +#### got.CancelError + +When the request is aborted with `.cancel()`. + + +## Aborting the request + +The promise returned by Got has a [`.cancel()`](https://github.com/sindresorhus/p-cancelable) method which, when called, aborts the request. + +```js +(async () => { + const request = got(url, options); + + … + + // In another part of the code + if (something) { + request.cancel(); + } + + … + + try { + await request; + } catch (error) { + if (request.isCanceled) { // Or `error instanceof got.CancelError` + // Handle cancelation + } + + // Handle other errors + } +})(); +``` + + +## Cache + +Got implements [RFC 7234](http://httpwg.org/specs/rfc7234.html) compliant HTTP caching which works out of the box in memory or is easily pluggable with a wide range of storage adapters. Fresh cache entries are served directly from cache and stale cache entries are revalidated with `If-None-Match`/`If-Modified-Since` headers. You can read more about the underlying cache behaviour in the `cacheable-request` [documentation](https://github.com/lukechilds/cacheable-request). + +You can use the JavaScript `Map` type as an in memory cache: + +```js +const got = require('got'); +const map = new Map(); + +(async () => { + let response = await got('sindresorhus.com', {cache: map}); + console.log(response.fromCache); + //=> false + + response = await got('sindresorhus.com', {cache: map}); + console.log(response.fromCache); + //=> true +})(); +``` + +Got uses [Keyv](https://github.com/lukechilds/keyv) internally to support a wide range of storage adapters. For something more scalable you could use an [official Keyv storage adapter](https://github.com/lukechilds/keyv#official-storage-adapters): + +``` +$ npm install @keyv/redis +``` + +```js +const got = require('got'); +const KeyvRedis = require('@keyv/redis'); + +const redis = new KeyvRedis('redis://user:pass@localhost:6379'); + +got('sindresorhus.com', {cache: redis}); +``` + +Got supports anything that follows the Map API, so it's easy to write your own storage adapter or use a third-party solution. + +For example, the following are all valid storage adapters: + +```js +const storageAdapter = new Map(); +// or +const storageAdapter = require('./my-storage-adapter'); +// or +const QuickLRU = require('quick-lru'); +const storageAdapter = new QuickLRU({maxSize: 1000}); + +got('sindresorhus.com', {cache: storageAdapter}); +``` + +View the [Keyv docs](https://github.com/lukechilds/keyv) for more information on how to use storage adapters. + + +## Proxies + +You can use the [`tunnel`](https://github.com/koichik/node-tunnel) module with the `agent` option to work with proxies: + +```js +const got = require('got'); +const tunnel = require('tunnel'); + +got('sindresorhus.com', { + agent: tunnel.httpOverHttp({ + proxy: { + host: 'localhost' + } + }) +}); +``` + +If you require different agents for different protocols, you can pass a map of agents to the `agent` option. This is necessary because a request to one protocol might redirect to another. In such a scenario, `got` will switch over to the right protocol agent for you. + +```js +const got = require('got'); +const HttpAgent = require('agentkeepalive'); +const HttpsAgent = HttpAgent.HttpsAgent; + +got('sindresorhus.com', { + agent: { + http: new HttpAgent(), + https: new HttpsAgent() + } +}); +``` + + +## Cookies + +You can use the [`cookie`](https://github.com/jshttp/cookie) module to include cookies in a request: + +```js +const got = require('got'); +const cookie = require('cookie'); + +got('google.com', { + headers: { + cookie: cookie.serialize('foo', 'bar') + } +}); +``` + + +## Form data + +You can use the [`form-data`](https://github.com/form-data/form-data) module to create POST request with form data: + +```js +const fs = require('fs'); +const got = require('got'); +const FormData = require('form-data'); +const form = new FormData(); + +form.append('my_file', fs.createReadStream('/foo/bar.jpg')); + +got.post('google.com', { + body: form +}); +``` + + +## OAuth + +You can use the [`oauth-1.0a`](https://github.com/ddo/oauth-1.0a) module to create a signed OAuth request: + +```js +const got = require('got'); +const crypto = require('crypto'); +const OAuth = require('oauth-1.0a'); + +const oauth = OAuth({ + consumer: { + key: process.env.CONSUMER_KEY, + secret: process.env.CONSUMER_SECRET + }, + signature_method: 'HMAC-SHA1', + hash_function: (baseString, key) => crypto.createHmac('sha1', key).update(baseString).digest('base64') +}); + +const token = { + key: process.env.ACCESS_TOKEN, + secret: process.env.ACCESS_TOKEN_SECRET +}; + +const url = 'https://api.twitter.com/1.1/statuses/home_timeline.json'; + +got(url, { + headers: oauth.toHeader(oauth.authorize({url, method: 'GET'}, token)), + json: true +}); +``` + + +## Unix Domain Sockets + +Requests can also be sent via [unix domain sockets](http://serverfault.com/questions/124517/whats-the-difference-between-unix-socket-and-tcp-ip-socket). Use the following URL scheme: `PROTOCOL://unix:SOCKET:PATH`. + +- `PROTOCOL` - `http` or `https` *(optional)* +- `SOCKET` - absolute path to a unix domain socket, e.g. `/var/run/docker.sock` +- `PATH` - request path, e.g. `/v2/keys` + +```js +got('http://unix:/var/run/docker.sock:/containers/json'); + +// or without protocol (http by default) +got('unix:/var/run/docker.sock:/containers/json'); +``` + +## AWS + +Requests to AWS services need to have their headers signed. This can be accomplished by using the [`aws4`](https://www.npmjs.com/package/aws4) package. This is an example for querying an ["Elasticsearch Service"](https://aws.amazon.com/elasticsearch-service/) host with a signed request. + +```js +const url = require('url'); +const AWS = require('aws-sdk'); +const aws4 = require('aws4'); +const got = require('got'); +const config = require('./config'); + +// Reads keys from the environment or `~/.aws/credentials`. Could be a plain object. +const awsConfig = new AWS.Config({ region: config.region }); + +function request(uri, options) { + const awsOpts = { + region: awsConfig.region, + headers: { + accept: 'application/json', + 'content-type': 'application/json' + }, + method: 'GET', + json: true + }; + + // We need to parse the URL before passing it to `got` so `aws4` can sign the request + const opts = Object.assign(url.parse(uri), awsOpts, options); + aws4.sign(opts, awsConfig.credentials); + + return got(opts); +} + +request(`https://${config.host}/production/users/1`); + +request(`https://${config.host}/production/`, { + // All usual `got` options +}); +``` + + +## Testing + +You can test your requests by using the [`nock`](https://github.com/node-nock/nock) module to mock an endpoint: + +```js +const got = require('got'); +const nock = require('nock'); + +nock('https://sindresorhus.com') + .get('/') + .reply(200, 'Hello world!'); + +(async () => { + const response = await got('sindresorhus.com'); + console.log(response.body); + //=> 'Hello world!' +})(); +``` + +If you need real integration tests you can use [`create-test-server`](https://github.com/lukechilds/create-test-server): + +```js +const got = require('got'); +const createTestServer = require('create-test-server'); + +(async () => { + const server = await createTestServer(); + server.get('/', 'Hello world!'); + + const response = await got(server.url); + console.log(response.body); + //=> 'Hello world!' + + await server.close(); +})(); +``` + + +## Tips + +### User Agent + +It's a good idea to set the `'user-agent'` header so the provider can more easily see how their resource is used. By default, it's the URL to this repo. + +```js +const got = require('got'); +const pkg = require('./package.json'); + +got('sindresorhus.com', { + headers: { + 'user-agent': `my-module/${pkg.version} (https://github.com/username/my-module)` + } +}); +``` + +### 304 Responses + +Bear in mind, if you send an `if-modified-since` header and receive a `304 Not Modified` response, the body will be empty. It's your responsibility to cache and retrieve the body contents. + + +## Related + +- [gh-got](https://github.com/sindresorhus/gh-got) - Got convenience wrapper to interact with the GitHub API +- [gl-got](https://github.com/singapore/gl-got) - Got convenience wrapper to interact with the GitLab API +- [travis-got](https://github.com/samverschueren/travis-got) - Got convenience wrapper to interact with the Travis API +- [graphql-got](https://github.com/kevva/graphql-got) - Got convenience wrapper to interact with GraphQL +- [GotQL](https://github.com/khaosdoctor/gotql) - Got convenience wrapper to interact with GraphQL using JSON-parsed queries instead of strings + + +## Created by + +[![Sindre Sorhus](https://github.com/sindresorhus.png?size=100)](https://sindresorhus.com) | [![Vsevolod Strukchinsky](https://github.com/floatdrop.png?size=100)](https://github.com/floatdrop) | [![Alexander Tesfamichael](https://github.com/AlexTes.png?size=100)](https://github.com/AlexTes) | [![Luke Childs](https://github.com/lukechilds.png?size=100)](https://github.com/lukechilds) +---|---|---|--- +[Sindre Sorhus](https://sindresorhus.com) | [Vsevolod Strukchinsky](https://github.com/floatdrop) | [Alexander Tesfamichael](https://alextes.me) | [Luke Childs](https://github.com/lukechilds) + + +## License + +MIT diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-cancelable/index.js b/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-cancelable/index.js new file mode 100644 index 0000000..cdd0cfa --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-cancelable/index.js @@ -0,0 +1,88 @@ +'use strict'; + +class CancelError extends Error { + constructor() { + super('Promise was canceled'); + this.name = 'CancelError'; + } + + get isCanceled() { + return true; + } +} + +class PCancelable { + static fn(userFn) { + return function () { + const args = [].slice.apply(arguments); + return new PCancelable((resolve, reject, onCancel) => { + args.push(onCancel); + userFn.apply(null, args).then(resolve, reject); + }); + }; + } + + constructor(executor) { + this._cancelHandlers = []; + this._isPending = true; + this._isCanceled = false; + + this._promise = new Promise((resolve, reject) => { + this._reject = reject; + + return executor( + value => { + this._isPending = false; + resolve(value); + }, + error => { + this._isPending = false; + reject(error); + }, + handler => { + this._cancelHandlers.push(handler); + } + ); + }); + } + + then(onFulfilled, onRejected) { + return this._promise.then(onFulfilled, onRejected); + } + + catch(onRejected) { + return this._promise.catch(onRejected); + } + + finally(onFinally) { + return this._promise.finally(onFinally); + } + + cancel() { + if (!this._isPending || this._isCanceled) { + return; + } + + if (this._cancelHandlers.length > 0) { + try { + for (const handler of this._cancelHandlers) { + handler(); + } + } catch (err) { + this._reject(err); + } + } + + this._isCanceled = true; + this._reject(new CancelError()); + } + + get isCanceled() { + return this._isCanceled; + } +} + +Object.setPrototypeOf(PCancelable.prototype, Promise.prototype); + +module.exports = PCancelable; +module.exports.CancelError = CancelError; diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-cancelable/license b/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-cancelable/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-cancelable/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-cancelable/package.json b/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-cancelable/package.json new file mode 100644 index 0000000..fa6bb1d --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-cancelable/package.json @@ -0,0 +1,79 @@ +{ + "_from": "p-cancelable@^0.4.0", + "_id": "p-cancelable@0.4.1", + "_inBundle": false, + "_integrity": "sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==", + "_location": "/bin-wrapper/p-cancelable", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "p-cancelable@^0.4.0", + "name": "p-cancelable", + "escapedName": "p-cancelable", + "rawSpec": "^0.4.0", + "saveSpec": null, + "fetchSpec": "^0.4.0" + }, + "_requiredBy": [ + "/bin-wrapper/got" + ], + "_resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz", + "_shasum": "35f363d67d52081c8d9585e37bcceb7e0bbcb2a0", + "_spec": "p-cancelable@^0.4.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\bin-wrapper\\node_modules\\got", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/p-cancelable/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Create a promise that can be canceled", + "devDependencies": { + "ava": "*", + "delay": "^2.0.0", + "promise.prototype.finally": "^3.1.0", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/p-cancelable#readme", + "keywords": [ + "promise", + "cancelable", + "cancel", + "canceled", + "canceling", + "cancellable", + "cancellation", + "abort", + "abortable", + "aborting", + "cleanup", + "task", + "token", + "async", + "function", + "await", + "promises", + "bluebird" + ], + "license": "MIT", + "name": "p-cancelable", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/p-cancelable.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "0.4.1" +} diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-cancelable/readme.md b/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-cancelable/readme.md new file mode 100644 index 0000000..62ec32e --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-cancelable/readme.md @@ -0,0 +1,135 @@ +# p-cancelable [![Build Status](https://travis-ci.org/sindresorhus/p-cancelable.svg?branch=master)](https://travis-ci.org/sindresorhus/p-cancelable) + +> Create a promise that can be canceled + +Useful for animation, loading resources, long-running async computations, async iteration, etc. + + +## Install + +``` +$ npm install p-cancelable +``` + + +## Usage + +```js +const PCancelable = require('p-cancelable'); + +const cancelablePromise = new PCancelable((resolve, reject, onCancel) => { + const worker = new SomeLongRunningOperation(); + + onCancel(() => { + worker.close(); + }); + + worker.on('finish', resolve); + worker.on('error', reject); +}); + +cancelablePromise + .then(value => { + console.log('Operation finished successfully:', value); + }) + .catch(error => { + if (cancelablePromise.isCanceled) { + // Handle the cancelation here + console.log('Operation was canceled'); + return; + } + + throw error; + }); + +// Cancel the operation after 10 seconds +setTimeout(() => { + cancelablePromise.cancel(); +}, 10000); +``` + + +## API + +### new PCancelable(executor) + +Same as the [`Promise` constructor](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise), but with an appended `onCancel` parameter in `executor`. + +`PCancelable` is a subclass of `Promise`. + +#### onCanceled(fn) + +Type: `Function` + +Accepts a function that is called when the promise is canceled. + +You're not required to call this function. You can call this function multiple times to add multiple cancel handlers. + +### PCancelable#cancel() + +Type: `Function` + +Cancel the promise. + +The cancellation is synchronous. Calling it after the promise has settled or multiple times does nothing. + +### PCancelable#isCanceled + +Type: `boolean` + +Whether the promise is canceled. + +### PCancelable.CancelError + +Type: `Error` + +Rejection reason when `.cancel()` is called. + +It includes a `.isCanceled` property for convenience. + +### PCancelable.fn(fn) + +Convenience method to make your promise-returning or async function cancelable. + +The function you specify will have `onCancel` appended to its parameters. + +```js +const fn = PCancelable.fn((input, onCancel) => { + const job = new Job(); + + onCancel(() => { + job.cleanup(); + }); + + return job.start(); //=> Promise +}); + +const promise = fn('input'); //=> PCancelable + +// … + +promise.cancel(); +``` + + +## FAQ + +### Cancelable vs. Cancellable + +[In American English, the verb cancel is usually inflected canceled and canceling—with one l.](http://grammarist.com/spelling/cancel/)
Both a [browser API](https://developer.mozilla.org/en-US/docs/Web/API/Event/cancelable) and the [Cancelable Promises proposal](https://github.com/tc39/proposal-cancelable-promises) use this spelling. + +### What about the official [Cancelable Promises proposal](https://github.com/tc39/proposal-cancelable-promises)? + +~~It's still an early draft and I don't really like its current direction. It complicates everything and will require deep changes in the ecosystem to adapt to it. And the way you have to use cancel tokens is verbose and convoluted. I much prefer the more pragmatic and less invasive approach in this module.~~ The proposal was withdrawn. + + +## Related + +- [p-progress](https://github.com/sindresorhus/p-progress) - Create a promise that reports progress +- [p-lazy](https://github.com/sindresorhus/p-lazy) - Create a lazy promise that defers execution until `.then()` or `.catch()` is called +- [More…](https://github.com/sindresorhus/promise-fun) + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-event/index.js b/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-event/index.js new file mode 100644 index 0000000..23ee421 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-event/index.js @@ -0,0 +1,272 @@ +'use strict'; +const pTimeout = require('p-timeout'); + +const symbolAsyncIterator = Symbol.asyncIterator || '@@asyncIterator'; + +const normalizeEmitter = emitter => { + const addListener = emitter.on || emitter.addListener || emitter.addEventListener; + const removeListener = emitter.off || emitter.removeListener || emitter.removeEventListener; + + if (!addListener || !removeListener) { + throw new TypeError('Emitter is not compatible'); + } + + return { + addListener: addListener.bind(emitter), + removeListener: removeListener.bind(emitter) + }; +}; + +const normalizeEvents = event => Array.isArray(event) ? event : [event]; + +const multiple = (emitter, event, options) => { + let cancel; + const ret = new Promise((resolve, reject) => { + options = Object.assign({ + rejectionEvents: ['error'], + multiArgs: false, + resolveImmediately: false + }, options); + + if (!(options.count >= 0 && (options.count === Infinity || Number.isInteger(options.count)))) { + throw new TypeError('The `count` option should be at least 0 or more'); + } + + // Allow multiple events + const events = normalizeEvents(event); + + const items = []; + const {addListener, removeListener} = normalizeEmitter(emitter); + + const onItem = (...args) => { + const value = options.multiArgs ? args : args[0]; + + if (options.filter && !options.filter(value)) { + return; + } + + items.push(value); + + if (options.count === items.length) { + cancel(); + resolve(items); + } + }; + + const rejectHandler = error => { + cancel(); + reject(error); + }; + + cancel = () => { + for (const event of events) { + removeListener(event, onItem); + } + + for (const rejectionEvent of options.rejectionEvents) { + removeListener(rejectionEvent, rejectHandler); + } + }; + + for (const event of events) { + addListener(event, onItem); + } + + for (const rejectionEvent of options.rejectionEvents) { + addListener(rejectionEvent, rejectHandler); + } + + if (options.resolveImmediately) { + resolve(items); + } + }); + + ret.cancel = cancel; + + if (typeof options.timeout === 'number') { + const timeout = pTimeout(ret, options.timeout); + timeout.cancel = cancel; + return timeout; + } + + return ret; +}; + +module.exports = (emitter, event, options) => { + if (typeof options === 'function') { + options = {filter: options}; + } + + options = Object.assign({}, options, { + count: 1, + resolveImmediately: false + }); + + const arrayPromise = multiple(emitter, event, options); + + const promise = arrayPromise.then(array => array[0]); + promise.cancel = arrayPromise.cancel; + + return promise; +}; + +module.exports.multiple = multiple; + +module.exports.iterator = (emitter, event, options) => { + if (typeof options === 'function') { + options = {filter: options}; + } + + // Allow multiple events + const events = normalizeEvents(event); + + options = Object.assign({ + rejectionEvents: ['error'], + resolutionEvents: [], + limit: Infinity, + multiArgs: false + }, options); + + const {limit} = options; + const isValidLimit = limit >= 0 && (limit === Infinity || Number.isInteger(limit)); + if (!isValidLimit) { + throw new TypeError('The `limit` option should be a non-negative integer or Infinity'); + } + + if (limit === 0) { + // Return an empty async iterator to avoid any further cost + return { + [Symbol.asyncIterator]() { + return this; + }, + next() { + return Promise.resolve({done: true, value: undefined}); + } + }; + } + + let isLimitReached = false; + + const {addListener, removeListener} = normalizeEmitter(emitter); + + let done = false; + let error; + let hasPendingError = false; + const nextQueue = []; + const valueQueue = []; + let eventCount = 0; + + const valueHandler = (...args) => { + eventCount++; + isLimitReached = eventCount === limit; + + const value = options.multiArgs ? args : args[0]; + + if (nextQueue.length > 0) { + const {resolve} = nextQueue.shift(); + + resolve({done: false, value}); + + if (isLimitReached) { + cancel(); + } + + return; + } + + valueQueue.push(value); + + if (isLimitReached) { + cancel(); + } + }; + + const cancel = () => { + done = true; + for (const event of events) { + removeListener(event, valueHandler); + } + + for (const rejectionEvent of options.rejectionEvents) { + removeListener(rejectionEvent, rejectHandler); + } + + for (const resolutionEvent of options.resolutionEvents) { + removeListener(resolutionEvent, resolveHandler); + } + + while (nextQueue.length > 0) { + const {resolve} = nextQueue.shift(); + resolve({done: true, value: undefined}); + } + }; + + const rejectHandler = (...args) => { + error = options.multiArgs ? args : args[0]; + + if (nextQueue.length > 0) { + const {reject} = nextQueue.shift(); + reject(error); + } else { + hasPendingError = true; + } + + cancel(); + }; + + const resolveHandler = (...args) => { + const value = options.multiArgs ? args : args[0]; + + if (options.filter && !options.filter(value)) { + return; + } + + if (nextQueue.length > 0) { + const {resolve} = nextQueue.shift(); + resolve({done: true, value}); + } else { + valueQueue.push(value); + } + + cancel(); + }; + + for (const event of events) { + addListener(event, valueHandler); + } + + for (const rejectionEvent of options.rejectionEvents) { + addListener(rejectionEvent, rejectHandler); + } + + for (const resolutionEvent of options.resolutionEvents) { + addListener(resolutionEvent, resolveHandler); + } + + return { + [symbolAsyncIterator]() { + return this; + }, + next() { + if (valueQueue.length > 0) { + const value = valueQueue.shift(); + return Promise.resolve({done: done && valueQueue.length === 0 && !isLimitReached, value}); + } + + if (hasPendingError) { + hasPendingError = false; + return Promise.reject(error); + } + + if (done) { + return Promise.resolve({done: true, value: undefined}); + } + + return new Promise((resolve, reject) => nextQueue.push({resolve, reject})); + }, + return(value) { + cancel(); + return Promise.resolve({done, value}); + } + }; +}; diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-event/license b/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-event/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-event/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-event/package.json b/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-event/package.json new file mode 100644 index 0000000..840ff8a --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-event/package.json @@ -0,0 +1,84 @@ +{ + "_from": "p-event@^2.1.0", + "_id": "p-event@2.3.1", + "_inBundle": false, + "_integrity": "sha512-NQCqOFhbpVTMX4qMe8PF8lbGtzZ+LCiN7pcNrb/413Na7+TRoe1xkKUzuWa/YEJdGQ0FvKtj35EEbDoVPO2kbA==", + "_location": "/bin-wrapper/p-event", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "p-event@^2.1.0", + "name": "p-event", + "escapedName": "p-event", + "rawSpec": "^2.1.0", + "saveSpec": null, + "fetchSpec": "^2.1.0" + }, + "_requiredBy": [ + "/bin-wrapper/download" + ], + "_resolved": "https://registry.npmjs.org/p-event/-/p-event-2.3.1.tgz", + "_shasum": "596279ef169ab2c3e0cae88c1cfbb08079993ef6", + "_spec": "p-event@^2.1.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\bin-wrapper\\node_modules\\download", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/p-event/issues" + }, + "bundleDependencies": false, + "dependencies": { + "p-timeout": "^2.0.1" + }, + "deprecated": false, + "description": "Promisify an event by waiting for it to be emitted", + "devDependencies": { + "ava": "^1.2.1", + "delay": "^4.1.0", + "xo": "^0.24.0" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/p-event#readme", + "keywords": [ + "promise", + "events", + "event", + "emitter", + "eventemitter", + "event-emitter", + "emit", + "emits", + "listener", + "promisify", + "addlistener", + "addeventlistener", + "wait", + "waits", + "on", + "browser", + "dom", + "async", + "await", + "promises", + "bluebird" + ], + "license": "MIT", + "name": "p-event", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/p-event.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.3.1" +} diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-event/readme.md b/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-event/readme.md new file mode 100644 index 0000000..840b0e1 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-event/readme.md @@ -0,0 +1,315 @@ +# p-event [![Build Status](https://travis-ci.org/sindresorhus/p-event.svg?branch=master)](https://travis-ci.org/sindresorhus/p-event) + +> Promisify an event by waiting for it to be emitted + +Useful when you need only one event emission and want to use it with promises or await it in an async function. + +It's works with any event API in Node.js and the browser (using a bundler). + +If you want multiple individual events as they are emitted, you can use the `pEvent.iterator()` method. [Observables](https://medium.com/@benlesh/learning-observable-by-building-observable-d5da57405d87) can be useful too. + + +## Install + +``` +$ npm install p-event +``` + + +## Usage + +In Node.js: + +```js +const pEvent = require('p-event'); +const emitter = require('./some-event-emitter'); + +(async () => { + try { + const result = await pEvent(emitter, 'finish'); + + // `emitter` emitted a `finish` event + console.log(result); + } catch (error) { + // `emitter` emitted an `error` event + console.error(error); + } +})(); +``` + +In the browser: + +```js +const pEvent = require('p-event'); + +(async () => { + await pEvent(document, 'DOMContentLoaded'); + console.log('😎'); +})(); +``` + +Async iteration: + +```js +const pEvent = require('p-event'); +const emitter = require('./some-event-emitter'); + +(async () => { + const asyncIterator = pEvent.iterator(emitter, 'data', { + resolutionEvents: ['finish'] + }); + + for await (const event of asyncIterator) { + console.log(event); + } +})(); +``` + + +## API + +### pEvent(emitter, event, [options]) +### pEvent(emitter, event, filter) + +Returns a `Promise` that is fulfilled when `emitter` emits an event matching `event`, or rejects if `emitter` emits any of the events defined in the `rejectionEvents` option. + +**Note**: `event` is a string for a single event type, for example, `'data'`. To listen on multiple +events, pass an array of strings, such as `['started', 'stopped']`. + +The returned promise has a `.cancel()` method, which when called, removes the event listeners and causes the promise to never be settled. + +#### emitter + +Type: `Object` + +Event emitter object. + +Should have either a `.on()`/`.addListener()`/`.addEventListener()` and `.off()`/`.removeListener()`/`.removeEventListener()` method, like the [Node.js `EventEmitter`](https://nodejs.org/api/events.html) and [DOM events](https://developer.mozilla.org/en-US/docs/Web/Events). + +#### event + +Type: `string | string[]` + +Name of the event or events to listen to. + +If the same event is defined both here and in `rejectionEvents`, this one takes priority. + +#### options + +Type: `Object` + +##### rejectionEvents + +Type: `string[]`
+Default: `['error']` + +Events that will reject the promise. + +##### multiArgs + +Type: `boolean`
+Default: `false` + +By default, the promisified function will only return the first argument from the event callback, which works fine for most APIs. This option can be useful for APIs that return multiple arguments in the callback. Turning this on will make it return an array of all arguments from the callback, instead of just the first argument. This also applies to rejections. + +Example: + +```js +const pEvent = require('p-event'); +const emitter = require('./some-event-emitter'); + +(async () => { + const [foo, bar] = await pEvent(emitter, 'finish', {multiArgs: true}); +})(); +``` + +##### timeout + +Type: `number`
+Default: `Infinity` + +Time in milliseconds before timing out. + +##### filter + +Type: `Function` + +Filter function for accepting an event. + +```js +const pEvent = require('p-event'); +const emitter = require('./some-event-emitter'); + +(async () => { + const result = await pEvent(emitter, '🦄', value => value > 3); + // Do something with first 🦄 event with a value greater than 3 +})(); +``` + +### pEvent.multiple(emitter, event, options) + +Wait for multiple event emissions. Returns an array. + +This method has the same arguments and options as `pEvent()` with the addition of the following options: + +#### options + +Type: `Object` + +##### count + +*Required*
+Type: `number` + +The number of times the event needs to be emitted before the promise resolves. + +##### resolveImmediately + +Type: `boolean`
+Default: `false` + +Whether to resolve the promise immediately. Emitting one of the `rejectionEvents` won't throw an error. + +**Note**: The returned array will be mutated when an event is emitted. + +Example: + +```js +const emitter = new EventEmitter(); + +const promise = pEvent.multiple(emitter, 'hello', { + resolveImmediately: true, + count: Infinity +}); + +const result = await promise; +console.log(result); +//=> [] + +emitter.emit('hello', 'Jack'); +console.log(result); +//=> ['Jack'] + +emitter.emit('hello', 'Mark'); +console.log(result); +//=> ['Jack', 'Mark'] + +// Stops listening +emitter.emit('error', new Error('😿')); + +emitter.emit('hello', 'John'); +console.log(result); +//=> ['Jack', 'Mark'] +``` + +### pEvent.iterator(emitter, event, [options]) +### pEvent.iterator(emitter, event, filter) + +Returns an [async iterator](http://2ality.com/2016/10/asynchronous-iteration.html) that lets you asynchronously iterate over events of `event` emitted from `emitter`. The iterator ends when `emitter` emits an event matching any of the events defined in `resolutionEvents`, or rejects if `emitter` emits any of the events defined in the `rejectionEvents` option. + +This method has the same arguments and options as `pEvent()` with the addition of the following options: + +#### options + +Type: `Object` + +##### limit + +Type: `number` *(non-negative integer)*
+Default: `Infinity` + +Maximum number of events for the iterator before it ends. When the limit is reached, the iterator will be marked as `done`. This option is useful to paginate events, for example, fetching 10 events per page. + +##### resolutionEvents + +Type: `string[]`
+Default: `[]` + +Events that will end the iterator. + + +## Before and after + +```js +const fs = require('fs'); + +function getOpenReadStream(file, callback) { + const stream = fs.createReadStream(file); + + stream.on('open', () => { + callback(null, stream); + }); + + stream.on('error', error => { + callback(error); + }); +} + +getOpenReadStream('unicorn.txt', (error, stream) => { + if (error) { + console.error(error); + return; + } + + console.log('File descriptor:', stream.fd); + stream.pipe(process.stdout); +}); +``` + +```js +const fs = require('fs'); +const pEvent = require('p-event'); + +async function getOpenReadStream(file) { + const stream = fs.createReadStream(file); + await pEvent(stream, 'open'); + return stream; +} + +(async () => { + const stream = await getOpenReadStream('unicorn.txt'); + console.log('File descriptor:', stream.fd); + stream.pipe(process.stdout); +})().catch(console.error); +``` + + +## Tip + +### Dealing with calls that resolve with an error code + +Some functions might use a single event for success and for certain errors. Promises make it easy to have combined error handler for both error events and successes containing values which represent errors. + +```js +const pEvent = require('p-event'); +const emitter = require('./some-event-emitter'); + +(async () => { + try { + const result = await pEvent(emitter, 'finish'); + + if (result === 'unwanted result') { + throw new Error('Emitter finished with an error'); + } + + // `emitter` emitted a `finish` event with an acceptable value + console.log(result); + } catch (error) { + // `emitter` emitted an `error` event or + // emitted a `finish` with 'unwanted result' + console.error(error); + } +})(); +``` + + +## Related + +- [pify](https://github.com/sindresorhus/pify) - Promisify a callback-style function +- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently +- [More…](https://github.com/sindresorhus/promise-fun) + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-timeout/index.js b/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-timeout/index.js new file mode 100644 index 0000000..8393646 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-timeout/index.js @@ -0,0 +1,44 @@ +'use strict'; +const pFinally = require('p-finally'); + +class TimeoutError extends Error { + constructor(message) { + super(message); + this.name = 'TimeoutError'; + } +} + +module.exports = (promise, ms, fallback) => new Promise((resolve, reject) => { + if (typeof ms !== 'number' || ms < 0) { + throw new TypeError('Expected `ms` to be a positive number'); + } + + const timer = setTimeout(() => { + if (typeof fallback === 'function') { + try { + resolve(fallback()); + } catch (err) { + reject(err); + } + return; + } + + const message = typeof fallback === 'string' ? fallback : `Promise timed out after ${ms} milliseconds`; + const err = fallback instanceof Error ? fallback : new TimeoutError(message); + + if (typeof promise.cancel === 'function') { + promise.cancel(); + } + + reject(err); + }, ms); + + pFinally( + promise.then(resolve, reject), + () => { + clearTimeout(timer); + } + ); +}); + +module.exports.TimeoutError = TimeoutError; diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-timeout/license b/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-timeout/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-timeout/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-timeout/package.json b/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-timeout/package.json new file mode 100644 index 0000000..0747067 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-timeout/package.json @@ -0,0 +1,76 @@ +{ + "_from": "p-timeout@^2.0.1", + "_id": "p-timeout@2.0.1", + "_inBundle": false, + "_integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", + "_location": "/bin-wrapper/p-timeout", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "p-timeout@^2.0.1", + "name": "p-timeout", + "escapedName": "p-timeout", + "rawSpec": "^2.0.1", + "saveSpec": null, + "fetchSpec": "^2.0.1" + }, + "_requiredBy": [ + "/bin-wrapper/got", + "/bin-wrapper/p-event" + ], + "_resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-2.0.1.tgz", + "_shasum": "d8dd1979595d2dc0139e1fe46b8b646cb3cdf038", + "_spec": "p-timeout@^2.0.1", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\bin-wrapper\\node_modules\\got", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/p-timeout/issues" + }, + "bundleDependencies": false, + "dependencies": { + "p-finally": "^1.0.0" + }, + "deprecated": false, + "description": "Timeout a promise after a specified amount of time", + "devDependencies": { + "ava": "*", + "delay": "^2.0.0", + "p-cancelable": "^0.3.0", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/p-timeout#readme", + "keywords": [ + "promise", + "timeout", + "error", + "invalidate", + "async", + "await", + "promises", + "time", + "out", + "cancel", + "bluebird" + ], + "license": "MIT", + "name": "p-timeout", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/p-timeout.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.0.1" +} diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-timeout/readme.md b/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-timeout/readme.md new file mode 100644 index 0000000..94ff3e3 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/p-timeout/readme.md @@ -0,0 +1,89 @@ +# p-timeout [![Build Status](https://travis-ci.org/sindresorhus/p-timeout.svg?branch=master)](https://travis-ci.org/sindresorhus/p-timeout) + +> Timeout a promise after a specified amount of time + + +## Install + +``` +$ npm install p-timeout +``` + + +## Usage + +```js +const delay = require('delay'); +const pTimeout = require('p-timeout'); + +const delayedPromise = delay(200); + +pTimeout(delayedPromise, 50).then(() => 'foo'); +//=> [TimeoutError: Promise timed out after 50 milliseconds] +``` + + +## API + +### pTimeout(input, ms, [message | fallback]) + +Returns a decorated `input` that times out after `ms` time. + +If you pass in a cancelable promise, specifically a promise with a `.cancel()` method, that method will be called when the `pTimeout` promise times out. + +#### input + +Type: `Promise` + +Promise to decorate. + +#### ms + +Type: `number` + +Milliseconds before timing out. + +#### message + +Type: `string` `Error`
+Default: `'Promise timed out after 50 milliseconds'` + +Specify a custom error message or error. + +If you do a custom error, it's recommended to sub-class `pTimeout.TimeoutError`. + +#### fallback + +Type: `Function` + +Do something other than rejecting with an error on timeout. + +You could for example retry: + +```js +const delay = require('delay'); +const pTimeout = require('p-timeout'); + +const delayedPromise = () => delay(200); + +pTimeout(delayedPromise(), 50, () => { + return pTimeout(delayedPromise(), 300); +}); +``` + +### pTimeout.TimeoutError + +Exposed for instance checking and sub-classing. + + +## Related + +- [delay](https://github.com/sindresorhus/delay) - Delay a promise a specified amount of time +- [p-min-delay](https://github.com/sindresorhus/p-min-delay) - Delay a promise a minimum amount of time +- [p-retry](https://github.com/sindresorhus/p-retry) - Retry a promise-returning function +- [More…](https://github.com/sindresorhus/promise-fun) + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/pify/index.js b/code/application_liste/app/node_modules/bin-wrapper/node_modules/pify/index.js new file mode 100644 index 0000000..df56221 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/pify/index.js @@ -0,0 +1,68 @@ +'use strict'; + +const processFn = (fn, options) => function (...args) { + const P = options.promiseModule; + + return new P((resolve, reject) => { + if (options.multiArgs) { + args.push((...result) => { + if (options.errorFirst) { + if (result[0]) { + reject(result); + } else { + result.shift(); + resolve(result); + } + } else { + resolve(result); + } + }); + } else if (options.errorFirst) { + args.push((error, result) => { + if (error) { + reject(error); + } else { + resolve(result); + } + }); + } else { + args.push(resolve); + } + + fn.apply(this, args); + }); +}; + +module.exports = (input, options) => { + options = Object.assign({ + exclude: [/.+(Sync|Stream)$/], + errorFirst: true, + promiseModule: Promise + }, options); + + const objType = typeof input; + if (!(input !== null && (objType === 'object' || objType === 'function'))) { + throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${input === null ? 'null' : objType}\``); + } + + const filter = key => { + const match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key); + return options.include ? options.include.some(match) : !options.exclude.some(match); + }; + + let ret; + if (objType === 'function') { + ret = function (...args) { + return options.excludeMain ? input(...args) : processFn(input, options).apply(this, args); + }; + } else { + ret = Object.create(Object.getPrototypeOf(input)); + } + + for (const key in input) { // eslint-disable-line guard-for-in + const property = input[key]; + ret[key] = typeof property === 'function' && filter(key) ? processFn(property, options) : property; + } + + return ret; +}; diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/pify/license b/code/application_liste/app/node_modules/bin-wrapper/node_modules/pify/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/pify/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/pify/package.json b/code/application_liste/app/node_modules/bin-wrapper/node_modules/pify/package.json new file mode 100644 index 0000000..f8ce33f --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/pify/package.json @@ -0,0 +1,83 @@ +{ + "_from": "pify@^4.0.1", + "_id": "pify@4.0.1", + "_inBundle": false, + "_integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "_location": "/bin-wrapper/pify", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "pify@^4.0.1", + "name": "pify", + "escapedName": "pify", + "rawSpec": "^4.0.1", + "saveSpec": null, + "fetchSpec": "^4.0.1" + }, + "_requiredBy": [ + "/bin-wrapper" + ], + "_resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "_shasum": "4b2cd25c50d598735c50292224fd8c6df41e3231", + "_spec": "pify@^4.0.1", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\bin-wrapper", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/pify/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Promisify a callback-style function", + "devDependencies": { + "ava": "^0.25.0", + "pinkie-promise": "^2.0.0", + "v8-natives": "^1.1.0", + "xo": "^0.23.0" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/pify#readme", + "keywords": [ + "promise", + "promises", + "promisify", + "all", + "denodify", + "denodeify", + "callback", + "cb", + "node", + "then", + "thenify", + "convert", + "transform", + "wrap", + "wrapper", + "bind", + "to", + "async", + "await", + "es2015", + "bluebird" + ], + "license": "MIT", + "name": "pify", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/pify.git" + }, + "scripts": { + "optimization-test": "node --allow-natives-syntax optimization-test.js", + "test": "xo && ava" + }, + "version": "4.0.1" +} diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/pify/readme.md b/code/application_liste/app/node_modules/bin-wrapper/node_modules/pify/readme.md new file mode 100644 index 0000000..7ae3f1c --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/pify/readme.md @@ -0,0 +1,145 @@ +# pify [![Build Status](https://travis-ci.org/sindresorhus/pify.svg?branch=master)](https://travis-ci.org/sindresorhus/pify) + +> Promisify a callback-style function + +--- + +
+ + Get professional support for 'pify' with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
+ +--- + + +## Install + +``` +$ npm install pify +``` + + +## Usage + +```js +const fs = require('fs'); +const pify = require('pify'); + +// Promisify a single function +pify(fs.readFile)('package.json', 'utf8').then(data => { + console.log(JSON.parse(data).name); + //=> 'pify' +}); + +// Promisify all methods in a module +pify(fs).readFile('package.json', 'utf8').then(data => { + console.log(JSON.parse(data).name); + //=> 'pify' +}); +``` + + +## API + +### pify(input, [options]) + +Returns a `Promise` wrapped version of the supplied function or module. + +#### input + +Type: `Function` `Object` + +Callback-style function or module whose methods you want to promisify. + +#### options + +##### multiArgs + +Type: `boolean`
+Default: `false` + +By default, the promisified function will only return the second argument from the callback, which works fine for most APIs. This option can be useful for modules like `request` that return multiple arguments. Turning this on will make it return an array of all arguments from the callback, excluding the error argument, instead of just the second argument. This also applies to rejections, where it returns an array of all the callback arguments, including the error. + +```js +const request = require('request'); +const pify = require('pify'); + +pify(request, {multiArgs: true})('https://sindresorhus.com').then(result => { + const [httpResponse, body] = result; +}); +``` + +##### include + +Type: `string[]` `RegExp[]` + +Methods in a module to promisify. Remaining methods will be left untouched. + +##### exclude + +Type: `string[]` `RegExp[]`
+Default: `[/.+(Sync|Stream)$/]` + +Methods in a module **not** to promisify. Methods with names ending with `'Sync'` are excluded by default. + +##### excludeMain + +Type: `boolean`
+Default: `false` + +If given module is a function itself, it will be promisified. Turn this option on if you want to promisify only methods of the module. + +```js +const pify = require('pify'); + +function fn() { + return true; +} + +fn.method = (data, callback) => { + setImmediate(() => { + callback(null, data); + }); +}; + +// Promisify methods but not `fn()` +const promiseFn = pify(fn, {excludeMain: true}); + +if (promiseFn()) { + promiseFn.method('hi').then(data => { + console.log(data); + }); +} +``` + +##### errorFirst + +Type: `boolean`
+Default: `true` + +Whether the callback has an error as the first argument. You'll want to set this to `false` if you're dealing with an API that doesn't have an error as the first argument, like `fs.exists()`, some browser APIs, Chrome Extension APIs, etc. + +##### promiseModule + +Type: `Function` + +Custom promise module to use instead of the native one. + +Check out [`pinkie-promise`](https://github.com/floatdrop/pinkie-promise) if you need a tiny promise polyfill. + + +## Related + +- [p-event](https://github.com/sindresorhus/p-event) - Promisify an event by waiting for it to be emitted +- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently +- [More…](https://github.com/sindresorhus/promise-fun) + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/prepend-http/index.js b/code/application_liste/app/node_modules/bin-wrapper/node_modules/prepend-http/index.js new file mode 100644 index 0000000..82b3a6b --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/prepend-http/index.js @@ -0,0 +1,15 @@ +'use strict'; +module.exports = (url, opts) => { + if (typeof url !== 'string') { + throw new TypeError(`Expected \`url\` to be of type \`string\`, got \`${typeof url}\``); + } + + url = url.trim(); + opts = Object.assign({https: false}, opts); + + if (/^\.*\/|^(?!localhost)\w+:/.test(url)) { + return url; + } + + return url.replace(/^(?!(?:\w+:)?\/\/)/, opts.https ? 'https://' : 'http://'); +}; diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/prepend-http/license b/code/application_liste/app/node_modules/bin-wrapper/node_modules/prepend-http/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/prepend-http/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/prepend-http/package.json b/code/application_liste/app/node_modules/bin-wrapper/node_modules/prepend-http/package.json new file mode 100644 index 0000000..f29a114 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/prepend-http/package.json @@ -0,0 +1,67 @@ +{ + "_from": "prepend-http@^2.0.0", + "_id": "prepend-http@2.0.0", + "_inBundle": false, + "_integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "_location": "/bin-wrapper/prepend-http", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "prepend-http@^2.0.0", + "name": "prepend-http", + "escapedName": "prepend-http", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/bin-wrapper/url-parse-lax" + ], + "_resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "_shasum": "e92434bfa5ea8c19f41cdfd401d741a3c819d897", + "_spec": "prepend-http@^2.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\bin-wrapper\\node_modules\\url-parse-lax", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/prepend-http/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Prepend `http://` to humanized URLs like todomvc.com and localhost", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/prepend-http#readme", + "keywords": [ + "prepend", + "protocol", + "scheme", + "url", + "uri", + "http", + "https", + "humanized" + ], + "license": "MIT", + "name": "prepend-http", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/prepend-http.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.0.0" +} diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/prepend-http/readme.md b/code/application_liste/app/node_modules/bin-wrapper/node_modules/prepend-http/readme.md new file mode 100644 index 0000000..55d640d --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/prepend-http/readme.md @@ -0,0 +1,56 @@ +# prepend-http [![Build Status](https://travis-ci.org/sindresorhus/prepend-http.svg?branch=master)](https://travis-ci.org/sindresorhus/prepend-http) + +> Prepend `http://` to humanized URLs like `todomvc.com` and `localhost` + + +## Install + +``` +$ npm install prepend-http +``` + + +## Usage + +```js +const prependHttp = require('prepend-http'); + +prependHttp('todomvc.com'); +//=> 'http://todomvc.com' + +prependHttp('localhost'); +//=> 'http://localhost' + +prependHttp('http://todomvc.com'); +//=> 'http://todomvc.com' + +prependHttp('todomvc.com', {https: true}); +//=> 'https://todomvc.com' +``` + + +## API + +### prependHttp(url, [options]) + +#### url + +Type: `string` + +URL to prepend `http://` on. + +#### options + +Type: `Object` + +##### https + +Type: `boolean`
+Default: `false` + +Prepend `https://` instead of `http://`. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/url-parse-lax/index.js b/code/application_liste/app/node_modules/bin-wrapper/node_modules/url-parse-lax/index.js new file mode 100644 index 0000000..5c62a58 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/url-parse-lax/index.js @@ -0,0 +1,12 @@ +'use strict'; +const url = require('url'); +const prependHttp = require('prepend-http'); + +module.exports = (input, options) => { + if (typeof input !== 'string') { + throw new TypeError(`Expected \`url\` to be of type \`string\`, got \`${typeof input}\` instead.`); + } + + const finalUrl = prependHttp(input, Object.assign({https: true}, options)); + return url.parse(finalUrl); +}; diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/url-parse-lax/license b/code/application_liste/app/node_modules/bin-wrapper/node_modules/url-parse-lax/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/url-parse-lax/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/url-parse-lax/package.json b/code/application_liste/app/node_modules/bin-wrapper/node_modules/url-parse-lax/package.json new file mode 100644 index 0000000..4db8696 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/url-parse-lax/package.json @@ -0,0 +1,74 @@ +{ + "_from": "url-parse-lax@^3.0.0", + "_id": "url-parse-lax@3.0.0", + "_inBundle": false, + "_integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "_location": "/bin-wrapper/url-parse-lax", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "url-parse-lax@^3.0.0", + "name": "url-parse-lax", + "escapedName": "url-parse-lax", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/bin-wrapper/got" + ], + "_resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "_shasum": "16b5cafc07dbe3676c1b1999177823d6503acb0c", + "_spec": "url-parse-lax@^3.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\bin-wrapper\\node_modules\\got", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/url-parse-lax/issues" + }, + "bundleDependencies": false, + "dependencies": { + "prepend-http": "^2.0.0" + }, + "deprecated": false, + "description": "Lax url.parse() with support for protocol-less URLs & IPs", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/url-parse-lax#readme", + "keywords": [ + "url", + "uri", + "parse", + "parser", + "loose", + "lax", + "protocol", + "less", + "protocol-less", + "ip", + "ipv4", + "ipv6" + ], + "license": "MIT", + "name": "url-parse-lax", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/url-parse-lax.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.0.0" +} diff --git a/code/application_liste/app/node_modules/bin-wrapper/node_modules/url-parse-lax/readme.md b/code/application_liste/app/node_modules/bin-wrapper/node_modules/url-parse-lax/readme.md new file mode 100644 index 0000000..be0d437 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/node_modules/url-parse-lax/readme.md @@ -0,0 +1,127 @@ +# url-parse-lax [![Build Status](https://travis-ci.org/sindresorhus/url-parse-lax.svg?branch=master)](https://travis-ci.org/sindresorhus/url-parse-lax) + +> Lax [`url.parse()`](https://nodejs.org/docs/latest/api/url.html#url_url_parse_urlstr_parsequerystring_slashesdenotehost) with support for protocol-less URLs & IPs + + +## Install + +``` +$ npm install url-parse-lax +``` + + +## Usage + +```js +const urlParseLax = require('url-parse-lax'); + +urlParseLax('sindresorhus.com'); +/* +{ + protocol: 'https:', + slashes: true, + auth: null, + host: 'sindresorhus.com', + port: null, + hostname: 'sindresorhus.com', + hash: null, + search: null, + query: null, + pathname: '/', + path: '/', + href: 'https://sindresorhus.com/' +} +*/ + +urlParseLax('[2001:db8::]:8000'); +/* +{ + protocol: null, + slashes: true, + auth: null, + host: '[2001:db8::]:8000', + port: '8000', + hostname: '2001:db8::', + hash: null, + search: null, + query: null, + pathname: '/', + path: '/', + href: 'http://[2001:db8::]:8000/' +} +*/ +``` + +And with the built-in `url.parse()`: + +```js +const url = require('url'); + +url.parse('sindresorhus.com'); +/* +{ + protocol: null, + slashes: null, + auth: null, + host: null, + port: null, + hostname: null, + hash: null, + search: null, + query: null, + pathname: 'sindresorhus', + path: 'sindresorhus', + href: 'sindresorhus' +} +*/ + +url.parse('[2001:db8::]:8000'); +/* +{ + protocol: null, + slashes: null, + auth: null, + host: null, + port: null, + hostname: null, + hash: null, + search: null, + query: null, + pathname: '[2001:db8::]:8000', + path: '[2001:db8::]:8000', + href: '[2001:db8::]:8000' +} +*/ +``` + + +## API + +### urlParseLax(url, [options]) + +#### url + +Type: `string` + +URL to parse. + +#### options + +Type: `Object` + +##### https + +Type: `boolean`
+Default: `true` + +Prepend `https://` instead of `http://` to protocol-less URLs. + + +## Related + +- [url-format-lax](https://github.com/sindresorhus/url-format-lax) - Lax `url.format()` that formats a hostname and port into IPv6-compatible socket form of `hostname:port` + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/code/application_liste/app/node_modules/bin-wrapper/package.json b/code/application_liste/app/node_modules/bin-wrapper/package.json new file mode 100644 index 0000000..ccc73d1 --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/package.json @@ -0,0 +1,104 @@ +{ + "_from": "bin-wrapper@^4.0.0", + "_id": "bin-wrapper@4.1.0", + "_inBundle": false, + "_integrity": "sha512-hfRmo7hWIXPkbpi0ZltboCMVrU+0ClXR/JgbCKKjlDjQf6igXa7OwdqNcFWQZPZTgiY7ZpzE3+LjjkLiTN2T7Q==", + "_location": "/bin-wrapper", + "_phantomChildren": { + "@sindresorhus/is": "0.7.0", + "archive-type": "4.0.0", + "cacheable-request": "2.1.4", + "caw": "2.0.1", + "content-disposition": "0.5.3", + "decompress": "4.2.1", + "decompress-response": "3.3.0", + "duplexer3": "0.1.4", + "ext-name": "5.0.0", + "filenamify": "2.1.0", + "get-stream": "3.0.0", + "into-stream": "3.1.0", + "is-retry-allowed": "1.2.0", + "isurl": "1.0.0", + "lowercase-keys": "1.0.1", + "make-dir": "1.3.0", + "mimic-response": "1.0.1", + "p-finally": "1.0.0", + "safe-buffer": "5.1.2", + "timed-out": "4.0.1", + "url-to-options": "1.0.1" + }, + "_requested": { + "type": "range", + "registry": true, + "raw": "bin-wrapper@^4.0.0", + "name": "bin-wrapper", + "escapedName": "bin-wrapper", + "rawSpec": "^4.0.0", + "saveSpec": null, + "fetchSpec": "^4.0.0" + }, + "_requiredBy": [ + "/gifsicle", + "/guetzli", + "/jpeg-recompress-bin", + "/mozjpeg", + "/optipng-bin", + "/pngquant-bin", + "/zopflipng-bin" + ], + "_resolved": "https://registry.npmjs.org/bin-wrapper/-/bin-wrapper-4.1.0.tgz", + "_shasum": "99348f2cf85031e3ef7efce7e5300aeaae960605", + "_spec": "bin-wrapper@^4.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\gifsicle", + "author": { + "name": "Kevin Mårtensson", + "email": "kevinmartensson@gmail.com", + "url": "https://github.com/kevva" + }, + "bugs": { + "url": "https://github.com/kevva/bin-wrapper/issues" + }, + "bundleDependencies": false, + "dependencies": { + "bin-check": "^4.1.0", + "bin-version-check": "^4.0.0", + "download": "^7.1.0", + "import-lazy": "^3.1.0", + "os-filter-obj": "^2.0.0", + "pify": "^4.0.1" + }, + "deprecated": false, + "description": "Binary wrapper that makes your programs seamlessly available as local dependencies", + "devDependencies": { + "ava": "*", + "executable": "^4.1.1", + "nock": "^10.0.2", + "path-exists": "^3.0.0", + "rimraf": "^2.6.2", + "tempy": "^0.2.1", + "xo": "*" + }, + "engines": { + "node": ">=6" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/kevva/bin-wrapper#readme", + "keywords": [ + "bin", + "check", + "local", + "wrapper" + ], + "license": "MIT", + "name": "bin-wrapper", + "repository": { + "type": "git", + "url": "git+https://github.com/kevva/bin-wrapper.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "4.1.0" +} diff --git a/code/application_liste/app/node_modules/bin-wrapper/readme.md b/code/application_liste/app/node_modules/bin-wrapper/readme.md new file mode 100644 index 0000000..e57de2a --- /dev/null +++ b/code/application_liste/app/node_modules/bin-wrapper/readme.md @@ -0,0 +1,132 @@ +# bin-wrapper [![Build Status](https://travis-ci.org/kevva/bin-wrapper.svg?branch=master)](https://travis-ci.org/kevva/bin-wrapper) + +> Binary wrapper that makes your programs seamlessly available as local dependencies + + +## Install + +``` +$ npm install bin-wrapper +``` + + +## Usage + +```js +const BinWrapper = require('bin-wrapper'); + +const base = 'https://github.com/imagemin/gifsicle-bin/raw/master/vendor'; +const bin = new BinWrapper() + .src(`${base}/macos/gifsicle`, 'darwin') + .src(`${base}/linux/x64/gifsicle`, 'linux', 'x64') + .src(`${base}/win/x64/gifsicle.exe`, 'win32', 'x64') + .dest(path.join('vendor')) + .use(process.platform === 'win32' ? 'gifsicle.exe' : 'gifsicle') + .version('>=1.71'); + +(async () => { + await bin.run(['--version']); + console.log('gifsicle is working'); +})(); +``` + +Get the path to your binary with `bin.path()`: + +```js +console.log(bin.path()); +//=> 'path/to/vendor/gifsicle' +``` + + +## API + +### `new BinWrapper(options)` + +Creates a new `BinWrapper` instance. + +#### options + +Type: `Object` + +##### skipCheck + +Type: `boolean`
+Default: `false` + +Whether to skip the binary check or not. + +##### strip + +Type: `number`
+Default: `1` + +Strip a number of leading paths from file names on extraction. + +### .src(url, [os], [arch]) + +Adds a source to download. + +#### url + +Type: `string` + +Accepts a URL pointing to a file to download. + +#### os + +Type: `string` + +Tie the source to a specific OS. + +#### arch + +Type: `string` + +Tie the source to a specific arch. + +### .dest(destination) + +#### destination + +Type: `string` + +Accepts a path which the files will be downloaded to. + +### .use(binary) + +#### binary + +Type: `string` + +Define which file to use as the binary. + +### .path() + +Returns the full path to your binary. + +### .version(range) + +#### range + +Type: `string` + +Define a [semver range](https://github.com/isaacs/node-semver#ranges) to check +the binary against. + +### .run([arguments]) + +Runs the search for the binary. If no binary is found it will download the file +using the URL provided in `.src()`. + +#### arguments + +Type: `Array`
+Default: `['--version']` + +Command to run the binary with. If it exits with code `0` it means that the +binary is working. + + +## License + +MIT © [Kevin Mårtensson](http://kevinmartensson.com) diff --git a/code/application_liste/app/node_modules/binary-extensions/binary-extensions.json b/code/application_liste/app/node_modules/binary-extensions/binary-extensions.json new file mode 100644 index 0000000..725e532 --- /dev/null +++ b/code/application_liste/app/node_modules/binary-extensions/binary-extensions.json @@ -0,0 +1,252 @@ +[ + "3dm", + "3ds", + "3g2", + "3gp", + "7z", + "a", + "aac", + "adp", + "ai", + "aif", + "aiff", + "alz", + "ape", + "apk", + "ar", + "arj", + "asf", + "au", + "avi", + "bak", + "baml", + "bh", + "bin", + "bk", + "bmp", + "btif", + "bz2", + "bzip2", + "cab", + "caf", + "cgm", + "class", + "cmx", + "cpio", + "cr2", + "cur", + "dat", + "dcm", + "deb", + "dex", + "djvu", + "dll", + "dmg", + "dng", + "doc", + "docm", + "docx", + "dot", + "dotm", + "dra", + "DS_Store", + "dsk", + "dts", + "dtshd", + "dvb", + "dwg", + "dxf", + "ecelp4800", + "ecelp7470", + "ecelp9600", + "egg", + "eol", + "eot", + "epub", + "exe", + "f4v", + "fbs", + "fh", + "fla", + "flac", + "fli", + "flv", + "fpx", + "fst", + "fvt", + "g3", + "gh", + "gif", + "graffle", + "gz", + "gzip", + "h261", + "h263", + "h264", + "icns", + "ico", + "ief", + "img", + "ipa", + "iso", + "jar", + "jpeg", + "jpg", + "jpgv", + "jpm", + "jxr", + "key", + "ktx", + "lha", + "lib", + "lvp", + "lz", + "lzh", + "lzma", + "lzo", + "m3u", + "m4a", + "m4v", + "mar", + "mdi", + "mht", + "mid", + "midi", + "mj2", + "mka", + "mkv", + "mmr", + "mng", + "mobi", + "mov", + "movie", + "mp3", + "mp4", + "mp4a", + "mpeg", + "mpg", + "mpga", + "mxu", + "nef", + "npx", + "numbers", + "nupkg", + "o", + "oga", + "ogg", + "ogv", + "otf", + "pages", + "pbm", + "pcx", + "pdb", + "pdf", + "pea", + "pgm", + "pic", + "png", + "pnm", + "pot", + "potm", + "potx", + "ppa", + "ppam", + "ppm", + "pps", + "ppsm", + "ppsx", + "ppt", + "pptm", + "pptx", + "psd", + "pya", + "pyc", + "pyo", + "pyv", + "qt", + "rar", + "ras", + "raw", + "resources", + "rgb", + "rip", + "rlc", + "rmf", + "rmvb", + "rtf", + "rz", + "s3m", + "s7z", + "scpt", + "sgi", + "shar", + "sil", + "sketch", + "slk", + "smv", + "snk", + "so", + "stl", + "suo", + "sub", + "swf", + "tar", + "tbz", + "tbz2", + "tga", + "tgz", + "thmx", + "tif", + "tiff", + "tlz", + "ttc", + "ttf", + "txz", + "udf", + "uvh", + "uvi", + "uvm", + "uvp", + "uvs", + "uvu", + "viv", + "vob", + "war", + "wav", + "wax", + "wbmp", + "wdp", + "weba", + "webm", + "webp", + "whl", + "wim", + "wm", + "wma", + "wmv", + "wmx", + "woff", + "woff2", + "wrm", + "wvx", + "xbm", + "xif", + "xla", + "xlam", + "xls", + "xlsb", + "xlsm", + "xlsx", + "xlt", + "xltm", + "xltx", + "xm", + "xmind", + "xpi", + "xpm", + "xwd", + "xz", + "z", + "zip", + "zipx" +] diff --git a/code/application_liste/app/node_modules/binary-extensions/license b/code/application_liste/app/node_modules/binary-extensions/license new file mode 100644 index 0000000..e7af2f7 --- /dev/null +++ b/code/application_liste/app/node_modules/binary-extensions/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/binary-extensions/package.json b/code/application_liste/app/node_modules/binary-extensions/package.json new file mode 100644 index 0000000..5834e7e --- /dev/null +++ b/code/application_liste/app/node_modules/binary-extensions/package.json @@ -0,0 +1,68 @@ +{ + "_from": "binary-extensions@^1.0.0", + "_id": "binary-extensions@1.13.1", + "_inBundle": false, + "_integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "_location": "/binary-extensions", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "binary-extensions@^1.0.0", + "name": "binary-extensions", + "escapedName": "binary-extensions", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/is-binary-path" + ], + "_resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "_shasum": "598afe54755b2868a5330d2aff9d4ebb53209b65", + "_spec": "binary-extensions@^1.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\is-binary-path", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/binary-extensions/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "List of binary file extensions", + "devDependencies": { + "ava": "0.16.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "binary-extensions.json" + ], + "homepage": "https://github.com/sindresorhus/binary-extensions#readme", + "keywords": [ + "bin", + "binary", + "ext", + "extensions", + "extension", + "file", + "json", + "list", + "array" + ], + "license": "MIT", + "main": "binary-extensions.json", + "name": "binary-extensions", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/binary-extensions.git" + }, + "scripts": { + "test": "ava" + }, + "version": "1.13.1" +} diff --git a/code/application_liste/app/node_modules/binary-extensions/readme.md b/code/application_liste/app/node_modules/binary-extensions/readme.md new file mode 100644 index 0000000..4c9eca2 --- /dev/null +++ b/code/application_liste/app/node_modules/binary-extensions/readme.md @@ -0,0 +1,33 @@ +# binary-extensions [![Build Status](https://travis-ci.org/sindresorhus/binary-extensions.svg?branch=master)](https://travis-ci.org/sindresorhus/binary-extensions) + +> List of binary file extensions + +The list is just a [JSON file](binary-extensions.json) and can be used anywhere. + + +## Install + +``` +$ npm install binary-extensions +``` + + +## Usage + +```js +const binaryExtensions = require('binary-extensions'); + +console.log(binaryExtensions); +//=> ['3ds', '3g2', …] +``` + + +## Related + +- [is-binary-path](https://github.com/sindresorhus/is-binary-path) - Check if a filepath is a binary file +- [text-extensions](https://github.com/sindresorhus/text-extensions) - List of text file extensions + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com), Paul Miller (https://paulmillr.com) diff --git a/code/application_liste/app/node_modules/bindings/LICENSE.md b/code/application_liste/app/node_modules/bindings/LICENSE.md new file mode 100644 index 0000000..5a92289 --- /dev/null +++ b/code/application_liste/app/node_modules/bindings/LICENSE.md @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/bindings/README.md b/code/application_liste/app/node_modules/bindings/README.md new file mode 100644 index 0000000..5b3e7a8 --- /dev/null +++ b/code/application_liste/app/node_modules/bindings/README.md @@ -0,0 +1,98 @@ +node-bindings +============= +### Helper module for loading your native module's `.node` file + +This is a helper module for authors of Node.js native addon modules. +It is basically the "swiss army knife" of `require()`ing your native module's +`.node` file. + +Throughout the course of Node's native addon history, addons have ended up being +compiled in a variety of different places, depending on which build tool and which +version of node was used. To make matters worse, now the `gyp` build tool can +produce either a __Release__ or __Debug__ build, each being built into different +locations. + +This module checks _all_ the possible locations that a native addon would be built +at, and returns the first one that loads successfully. + + +Installation +------------ + +Install with `npm`: + +``` bash +$ npm install --save bindings +``` + +Or add it to the `"dependencies"` section of your `package.json` file. + + +Example +------- + +`require()`ing the proper bindings file for the current node version, platform +and architecture is as simple as: + +``` js +var bindings = require('bindings')('binding.node') + +// Use your bindings defined in your C files +bindings.your_c_function() +``` + + +Nice Error Output +----------------- + +When the `.node` file could not be loaded, `node-bindings` throws an Error with +a nice error message telling you exactly what was tried. You can also check the +`err.tries` Array property. + +``` +Error: Could not load the bindings file. Tried: + → /Users/nrajlich/ref/build/binding.node + → /Users/nrajlich/ref/build/Debug/binding.node + → /Users/nrajlich/ref/build/Release/binding.node + → /Users/nrajlich/ref/out/Debug/binding.node + → /Users/nrajlich/ref/Debug/binding.node + → /Users/nrajlich/ref/out/Release/binding.node + → /Users/nrajlich/ref/Release/binding.node + → /Users/nrajlich/ref/build/default/binding.node + → /Users/nrajlich/ref/compiled/0.8.2/darwin/x64/binding.node + at bindings (/Users/nrajlich/ref/node_modules/bindings/bindings.js:84:13) + at Object. (/Users/nrajlich/ref/lib/ref.js:5:47) + at Module._compile (module.js:449:26) + at Object.Module._extensions..js (module.js:467:10) + at Module.load (module.js:356:32) + at Function.Module._load (module.js:312:12) + ... +``` + +The searching for the `.node` file will originate from the first directory in which has a `package.json` file is found. + +License +------- + +(The MIT License) + +Copyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/bindings/bindings.js b/code/application_liste/app/node_modules/bindings/bindings.js new file mode 100644 index 0000000..727413a --- /dev/null +++ b/code/application_liste/app/node_modules/bindings/bindings.js @@ -0,0 +1,221 @@ +/** + * Module dependencies. + */ + +var fs = require('fs'), + path = require('path'), + fileURLToPath = require('file-uri-to-path'), + join = path.join, + dirname = path.dirname, + exists = + (fs.accessSync && + function(path) { + try { + fs.accessSync(path); + } catch (e) { + return false; + } + return true; + }) || + fs.existsSync || + path.existsSync, + defaults = { + arrow: process.env.NODE_BINDINGS_ARROW || ' → ', + compiled: process.env.NODE_BINDINGS_COMPILED_DIR || 'compiled', + platform: process.platform, + arch: process.arch, + nodePreGyp: + 'node-v' + + process.versions.modules + + '-' + + process.platform + + '-' + + process.arch, + version: process.versions.node, + bindings: 'bindings.node', + try: [ + // node-gyp's linked version in the "build" dir + ['module_root', 'build', 'bindings'], + // node-waf and gyp_addon (a.k.a node-gyp) + ['module_root', 'build', 'Debug', 'bindings'], + ['module_root', 'build', 'Release', 'bindings'], + // Debug files, for development (legacy behavior, remove for node v0.9) + ['module_root', 'out', 'Debug', 'bindings'], + ['module_root', 'Debug', 'bindings'], + // Release files, but manually compiled (legacy behavior, remove for node v0.9) + ['module_root', 'out', 'Release', 'bindings'], + ['module_root', 'Release', 'bindings'], + // Legacy from node-waf, node <= 0.4.x + ['module_root', 'build', 'default', 'bindings'], + // Production "Release" buildtype binary (meh...) + ['module_root', 'compiled', 'version', 'platform', 'arch', 'bindings'], + // node-qbs builds + ['module_root', 'addon-build', 'release', 'install-root', 'bindings'], + ['module_root', 'addon-build', 'debug', 'install-root', 'bindings'], + ['module_root', 'addon-build', 'default', 'install-root', 'bindings'], + // node-pre-gyp path ./lib/binding/{node_abi}-{platform}-{arch} + ['module_root', 'lib', 'binding', 'nodePreGyp', 'bindings'] + ] + }; + +/** + * The main `bindings()` function loads the compiled bindings for a given module. + * It uses V8's Error API to determine the parent filename that this function is + * being invoked from, which is then used to find the root directory. + */ + +function bindings(opts) { + // Argument surgery + if (typeof opts == 'string') { + opts = { bindings: opts }; + } else if (!opts) { + opts = {}; + } + + // maps `defaults` onto `opts` object + Object.keys(defaults).map(function(i) { + if (!(i in opts)) opts[i] = defaults[i]; + }); + + // Get the module root + if (!opts.module_root) { + opts.module_root = exports.getRoot(exports.getFileName()); + } + + // Ensure the given bindings name ends with .node + if (path.extname(opts.bindings) != '.node') { + opts.bindings += '.node'; + } + + // https://github.com/webpack/webpack/issues/4175#issuecomment-342931035 + var requireFunc = + typeof __webpack_require__ === 'function' + ? __non_webpack_require__ + : require; + + var tries = [], + i = 0, + l = opts.try.length, + n, + b, + err; + + for (; i < l; i++) { + n = join.apply( + null, + opts.try[i].map(function(p) { + return opts[p] || p; + }) + ); + tries.push(n); + try { + b = opts.path ? requireFunc.resolve(n) : requireFunc(n); + if (!opts.path) { + b.path = n; + } + return b; + } catch (e) { + if (e.code !== 'MODULE_NOT_FOUND' && + e.code !== 'QUALIFIED_PATH_RESOLUTION_FAILED' && + !/not find/i.test(e.message)) { + throw e; + } + } + } + + err = new Error( + 'Could not locate the bindings file. Tried:\n' + + tries + .map(function(a) { + return opts.arrow + a; + }) + .join('\n') + ); + err.tries = tries; + throw err; +} +module.exports = exports = bindings; + +/** + * Gets the filename of the JavaScript file that invokes this function. + * Used to help find the root directory of a module. + * Optionally accepts an filename argument to skip when searching for the invoking filename + */ + +exports.getFileName = function getFileName(calling_file) { + var origPST = Error.prepareStackTrace, + origSTL = Error.stackTraceLimit, + dummy = {}, + fileName; + + Error.stackTraceLimit = 10; + + Error.prepareStackTrace = function(e, st) { + for (var i = 0, l = st.length; i < l; i++) { + fileName = st[i].getFileName(); + if (fileName !== __filename) { + if (calling_file) { + if (fileName !== calling_file) { + return; + } + } else { + return; + } + } + } + }; + + // run the 'prepareStackTrace' function above + Error.captureStackTrace(dummy); + dummy.stack; + + // cleanup + Error.prepareStackTrace = origPST; + Error.stackTraceLimit = origSTL; + + // handle filename that starts with "file://" + var fileSchema = 'file://'; + if (fileName.indexOf(fileSchema) === 0) { + fileName = fileURLToPath(fileName); + } + + return fileName; +}; + +/** + * Gets the root directory of a module, given an arbitrary filename + * somewhere in the module tree. The "root directory" is the directory + * containing the `package.json` file. + * + * In: /home/nate/node-native-module/lib/index.js + * Out: /home/nate/node-native-module + */ + +exports.getRoot = function getRoot(file) { + var dir = dirname(file), + prev; + while (true) { + if (dir === '.') { + // Avoids an infinite loop in rare cases, like the REPL + dir = process.cwd(); + } + if ( + exists(join(dir, 'package.json')) || + exists(join(dir, 'node_modules')) + ) { + // Found the 'package.json' file or 'node_modules' dir; we're done + return dir; + } + if (prev === dir) { + // Got to the top + throw new Error( + 'Could not find module root given file: "' + + file + + '". Do you have a `package.json` file? ' + ); + } + // Try the parent dir next + prev = dir; + dir = join(dir, '..'); + } +}; diff --git a/code/application_liste/app/node_modules/bindings/package.json b/code/application_liste/app/node_modules/bindings/package.json new file mode 100644 index 0000000..2cd0f39 --- /dev/null +++ b/code/application_liste/app/node_modules/bindings/package.json @@ -0,0 +1,57 @@ +{ + "_from": "bindings@^1.5.0", + "_id": "bindings@1.5.0", + "_inBundle": false, + "_integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "_location": "/bindings", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "bindings@^1.5.0", + "name": "bindings", + "escapedName": "bindings", + "rawSpec": "^1.5.0", + "saveSpec": null, + "fetchSpec": "^1.5.0" + }, + "_requiredBy": [ + "/fsevents" + ], + "_resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "_shasum": "10353c9e945334bc0511a6d90b38fbc7c9c504df", + "_spec": "bindings@^1.5.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\fsevents", + "author": { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net", + "url": "http://tootallnate.net" + }, + "bugs": { + "url": "https://github.com/TooTallNate/node-bindings/issues" + }, + "bundleDependencies": false, + "dependencies": { + "file-uri-to-path": "1.0.0" + }, + "deprecated": false, + "description": "Helper module for loading your native module's .node file", + "homepage": "https://github.com/TooTallNate/node-bindings", + "keywords": [ + "native", + "addon", + "bindings", + "gyp", + "waf", + "c", + "c++" + ], + "license": "MIT", + "main": "./bindings.js", + "name": "bindings", + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/node-bindings.git" + }, + "version": "1.5.0" +} diff --git a/code/application_liste/app/node_modules/bl/.jshintrc b/code/application_liste/app/node_modules/bl/.jshintrc new file mode 100644 index 0000000..c8ef3ca --- /dev/null +++ b/code/application_liste/app/node_modules/bl/.jshintrc @@ -0,0 +1,59 @@ +{ + "predef": [ ] + , "bitwise": false + , "camelcase": false + , "curly": false + , "eqeqeq": false + , "forin": false + , "immed": false + , "latedef": false + , "noarg": true + , "noempty": true + , "nonew": true + , "plusplus": false + , "quotmark": true + , "regexp": false + , "undef": true + , "unused": true + , "strict": false + , "trailing": true + , "maxlen": 120 + , "asi": true + , "boss": true + , "debug": true + , "eqnull": true + , "esnext": true + , "evil": true + , "expr": true + , "funcscope": false + , "globalstrict": false + , "iterator": false + , "lastsemic": true + , "laxbreak": true + , "laxcomma": true + , "loopfunc": true + , "multistr": false + , "onecase": false + , "proto": false + , "regexdash": false + , "scripturl": true + , "smarttabs": false + , "shadow": false + , "sub": true + , "supernew": false + , "validthis": true + , "browser": true + , "couch": false + , "devel": false + , "dojo": false + , "mootools": false + , "node": true + , "nonstandard": true + , "prototypejs": false + , "rhino": false + , "worker": true + , "wsh": false + , "nomen": false + , "onevar": false + , "passfail": false +} \ No newline at end of file diff --git a/code/application_liste/app/node_modules/bl/.travis.yml b/code/application_liste/app/node_modules/bl/.travis.yml new file mode 100644 index 0000000..373bb4a --- /dev/null +++ b/code/application_liste/app/node_modules/bl/.travis.yml @@ -0,0 +1,16 @@ +sudo: false +language: node_js +node_js: + - '0.10' + - '0.12' + - '4' + - '6' + - '8' + - '9' +branches: + only: + - master +notifications: + email: + - rod@vagg.org + - matteo.collina@gmail.com diff --git a/code/application_liste/app/node_modules/bl/LICENSE.md b/code/application_liste/app/node_modules/bl/LICENSE.md new file mode 100644 index 0000000..ff35a34 --- /dev/null +++ b/code/application_liste/app/node_modules/bl/LICENSE.md @@ -0,0 +1,13 @@ +The MIT License (MIT) +===================== + +Copyright (c) 2013-2016 bl contributors +---------------------------------- + +*bl contributors listed at * + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/bl/README.md b/code/application_liste/app/node_modules/bl/README.md new file mode 100644 index 0000000..9eebd88 --- /dev/null +++ b/code/application_liste/app/node_modules/bl/README.md @@ -0,0 +1,208 @@ +# bl *(BufferList)* + +[![Build Status](https://travis-ci.org/rvagg/bl.svg?branch=master)](https://travis-ci.org/rvagg/bl) + +**A Node.js Buffer list collector, reader and streamer thingy.** + +[![NPM](https://nodei.co/npm/bl.png?downloads=true&downloadRank=true)](https://nodei.co/npm/bl/) +[![NPM](https://nodei.co/npm-dl/bl.png?months=6&height=3)](https://nodei.co/npm/bl/) + +**bl** is a storage object for collections of Node Buffers, exposing them with the main Buffer readable API. Also works as a duplex stream so you can collect buffers from a stream that emits them and emit buffers to a stream that consumes them! + +The original buffers are kept intact and copies are only done as necessary. Any reads that require the use of a single original buffer will return a slice of that buffer only (which references the same memory as the original buffer). Reads that span buffers perform concatenation as required and return the results transparently. + +```js +const BufferList = require('bl') + +var bl = new BufferList() +bl.append(new Buffer('abcd')) +bl.append(new Buffer('efg')) +bl.append('hi') // bl will also accept & convert Strings +bl.append(new Buffer('j')) +bl.append(new Buffer([ 0x3, 0x4 ])) + +console.log(bl.length) // 12 + +console.log(bl.slice(0, 10).toString('ascii')) // 'abcdefghij' +console.log(bl.slice(3, 10).toString('ascii')) // 'defghij' +console.log(bl.slice(3, 6).toString('ascii')) // 'def' +console.log(bl.slice(3, 8).toString('ascii')) // 'defgh' +console.log(bl.slice(5, 10).toString('ascii')) // 'fghij' + +// or just use toString! +console.log(bl.toString()) // 'abcdefghij\u0003\u0004' +console.log(bl.toString('ascii', 3, 8)) // 'defgh' +console.log(bl.toString('ascii', 5, 10)) // 'fghij' + +// other standard Buffer readables +console.log(bl.readUInt16BE(10)) // 0x0304 +console.log(bl.readUInt16LE(10)) // 0x0403 +``` + +Give it a callback in the constructor and use it just like **[concat-stream](https://github.com/maxogden/node-concat-stream)**: + +```js +const bl = require('bl') + , fs = require('fs') + +fs.createReadStream('README.md') + .pipe(bl(function (err, data) { // note 'new' isn't strictly required + // `data` is a complete Buffer object containing the full data + console.log(data.toString()) + })) +``` + +Note that when you use the *callback* method like this, the resulting `data` parameter is a concatenation of all `Buffer` objects in the list. If you want to avoid the overhead of this concatenation (in cases of extreme performance consciousness), then avoid the *callback* method and just listen to `'end'` instead, like a standard Stream. + +Or to fetch a URL using [hyperquest](https://github.com/substack/hyperquest) (should work with [request](http://github.com/mikeal/request) and even plain Node http too!): +```js +const hyperquest = require('hyperquest') + , bl = require('bl') + , url = 'https://raw.github.com/rvagg/bl/master/README.md' + +hyperquest(url).pipe(bl(function (err, data) { + console.log(data.toString()) +})) +``` + +Or, use it as a readable stream to recompose a list of Buffers to an output source: + +```js +const BufferList = require('bl') + , fs = require('fs') + +var bl = new BufferList() +bl.append(new Buffer('abcd')) +bl.append(new Buffer('efg')) +bl.append(new Buffer('hi')) +bl.append(new Buffer('j')) + +bl.pipe(fs.createWriteStream('gibberish.txt')) +``` + +## API + + * new BufferList([ callback ]) + * bl.length + * bl.append(buffer) + * bl.get(index) + * bl.slice([ start[, end ] ]) + * bl.shallowSlice([ start[, end ] ]) + * bl.copy(dest, [ destStart, [ srcStart [, srcEnd ] ] ]) + * bl.duplicate() + * bl.consume(bytes) + * bl.toString([encoding, [ start, [ end ]]]) + * bl.readDoubleBE(), bl.readDoubleLE(), bl.readFloatBE(), bl.readFloatLE(), bl.readInt32BE(), bl.readInt32LE(), bl.readUInt32BE(), bl.readUInt32LE(), bl.readInt16BE(), bl.readInt16LE(), bl.readUInt16BE(), bl.readUInt16LE(), bl.readInt8(), bl.readUInt8() + * Streams + +-------------------------------------------------------- + +### new BufferList([ callback | Buffer | Buffer array | BufferList | BufferList array | String ]) +The constructor takes an optional callback, if supplied, the callback will be called with an error argument followed by a reference to the **bl** instance, when `bl.end()` is called (i.e. from a piped stream). This is a convenient method of collecting the entire contents of a stream, particularly when the stream is *chunky*, such as a network stream. + +Normally, no arguments are required for the constructor, but you can initialise the list by passing in a single `Buffer` object or an array of `Buffer` object. + +`new` is not strictly required, if you don't instantiate a new object, it will be done automatically for you so you can create a new instance simply with: + +```js +var bl = require('bl') +var myinstance = bl() + +// equivalent to: + +var BufferList = require('bl') +var myinstance = new BufferList() +``` + +-------------------------------------------------------- + +### bl.length +Get the length of the list in bytes. This is the sum of the lengths of all of the buffers contained in the list, minus any initial offset for a semi-consumed buffer at the beginning. Should accurately represent the total number of bytes that can be read from the list. + +-------------------------------------------------------- + +### bl.append(Buffer | Buffer array | BufferList | BufferList array | String) +`append(buffer)` adds an additional buffer or BufferList to the internal list. `this` is returned so it can be chained. + +-------------------------------------------------------- + +### bl.get(index) +`get()` will return the byte at the specified index. + +-------------------------------------------------------- + +### bl.slice([ start, [ end ] ]) +`slice()` returns a new `Buffer` object containing the bytes within the range specified. Both `start` and `end` are optional and will default to the beginning and end of the list respectively. + +If the requested range spans a single internal buffer then a slice of that buffer will be returned which shares the original memory range of that Buffer. If the range spans multiple buffers then copy operations will likely occur to give you a uniform Buffer. + +-------------------------------------------------------- + +### bl.shallowSlice([ start, [ end ] ]) +`shallowSlice()` returns a new `BufferList` object containing the bytes within the range specified. Both `start` and `end` are optional and will default to the beginning and end of the list respectively. + +No copies will be performed. All buffers in the result share memory with the original list. + +-------------------------------------------------------- + +### bl.copy(dest, [ destStart, [ srcStart [, srcEnd ] ] ]) +`copy()` copies the content of the list in the `dest` buffer, starting from `destStart` and containing the bytes within the range specified with `srcStart` to `srcEnd`. `destStart`, `start` and `end` are optional and will default to the beginning of the `dest` buffer, and the beginning and end of the list respectively. + +-------------------------------------------------------- + +### bl.duplicate() +`duplicate()` performs a **shallow-copy** of the list. The internal Buffers remains the same, so if you change the underlying Buffers, the change will be reflected in both the original and the duplicate. This method is needed if you want to call `consume()` or `pipe()` and still keep the original list.Example: + +```js +var bl = new BufferList() + +bl.append('hello') +bl.append(' world') +bl.append('\n') + +bl.duplicate().pipe(process.stdout, { end: false }) + +console.log(bl.toString()) +``` + +-------------------------------------------------------- + +### bl.consume(bytes) +`consume()` will shift bytes *off the start of the list*. The number of bytes consumed don't need to line up with the sizes of the internal Buffers—initial offsets will be calculated accordingly in order to give you a consistent view of the data. + +-------------------------------------------------------- + +### bl.toString([encoding, [ start, [ end ]]]) +`toString()` will return a string representation of the buffer. The optional `start` and `end` arguments are passed on to `slice()`, while the `encoding` is passed on to `toString()` of the resulting Buffer. See the [Buffer#toString()](http://nodejs.org/docs/latest/api/buffer.html#buffer_buf_tostring_encoding_start_end) documentation for more information. + +-------------------------------------------------------- + +### bl.readDoubleBE(), bl.readDoubleLE(), bl.readFloatBE(), bl.readFloatLE(), bl.readInt32BE(), bl.readInt32LE(), bl.readUInt32BE(), bl.readUInt32LE(), bl.readInt16BE(), bl.readInt16LE(), bl.readUInt16BE(), bl.readUInt16LE(), bl.readInt8(), bl.readUInt8() + +All of the standard byte-reading methods of the `Buffer` interface are implemented and will operate across internal Buffer boundaries transparently. + +See the [Buffer](http://nodejs.org/docs/latest/api/buffer.html) documentation for how these work. + +-------------------------------------------------------- + +### Streams +**bl** is a Node **[Duplex Stream](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_duplex)**, so it can be read from and written to like a standard Node stream. You can also `pipe()` to and from a **bl** instance. + +-------------------------------------------------------- + +## Contributors + +**bl** is brought to you by the following hackers: + + * [Rod Vagg](https://github.com/rvagg) + * [Matteo Collina](https://github.com/mcollina) + * [Jarett Cruger](https://github.com/jcrugzz) + +======= + + +## License & copyright + +Copyright (c) 2013-2016 bl contributors (listed above). + +bl is licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details. diff --git a/code/application_liste/app/node_modules/bl/bl.js b/code/application_liste/app/node_modules/bl/bl.js new file mode 100644 index 0000000..db536f3 --- /dev/null +++ b/code/application_liste/app/node_modules/bl/bl.js @@ -0,0 +1,281 @@ +var DuplexStream = require('readable-stream/duplex') + , util = require('util') + , Buffer = require('safe-buffer').Buffer + + +function BufferList (callback) { + if (!(this instanceof BufferList)) + return new BufferList(callback) + + this._bufs = [] + this.length = 0 + + if (typeof callback == 'function') { + this._callback = callback + + var piper = function piper (err) { + if (this._callback) { + this._callback(err) + this._callback = null + } + }.bind(this) + + this.on('pipe', function onPipe (src) { + src.on('error', piper) + }) + this.on('unpipe', function onUnpipe (src) { + src.removeListener('error', piper) + }) + } else { + this.append(callback) + } + + DuplexStream.call(this) +} + + +util.inherits(BufferList, DuplexStream) + + +BufferList.prototype._offset = function _offset (offset) { + var tot = 0, i = 0, _t + if (offset === 0) return [ 0, 0 ] + for (; i < this._bufs.length; i++) { + _t = tot + this._bufs[i].length + if (offset < _t || i == this._bufs.length - 1) + return [ i, offset - tot ] + tot = _t + } +} + + +BufferList.prototype.append = function append (buf) { + var i = 0 + + if (Buffer.isBuffer(buf)) { + this._appendBuffer(buf); + } else if (Array.isArray(buf)) { + for (; i < buf.length; i++) + this.append(buf[i]) + } else if (buf instanceof BufferList) { + // unwrap argument into individual BufferLists + for (; i < buf._bufs.length; i++) + this.append(buf._bufs[i]) + } else if (buf != null) { + // coerce number arguments to strings, since Buffer(number) does + // uninitialized memory allocation + if (typeof buf == 'number') + buf = buf.toString() + + this._appendBuffer(Buffer.from(buf)); + } + + return this +} + + +BufferList.prototype._appendBuffer = function appendBuffer (buf) { + this._bufs.push(buf) + this.length += buf.length +} + + +BufferList.prototype._write = function _write (buf, encoding, callback) { + this._appendBuffer(buf) + + if (typeof callback == 'function') + callback() +} + + +BufferList.prototype._read = function _read (size) { + if (!this.length) + return this.push(null) + + size = Math.min(size, this.length) + this.push(this.slice(0, size)) + this.consume(size) +} + + +BufferList.prototype.end = function end (chunk) { + DuplexStream.prototype.end.call(this, chunk) + + if (this._callback) { + this._callback(null, this.slice()) + this._callback = null + } +} + + +BufferList.prototype.get = function get (index) { + return this.slice(index, index + 1)[0] +} + + +BufferList.prototype.slice = function slice (start, end) { + if (typeof start == 'number' && start < 0) + start += this.length + if (typeof end == 'number' && end < 0) + end += this.length + return this.copy(null, 0, start, end) +} + + +BufferList.prototype.copy = function copy (dst, dstStart, srcStart, srcEnd) { + if (typeof srcStart != 'number' || srcStart < 0) + srcStart = 0 + if (typeof srcEnd != 'number' || srcEnd > this.length) + srcEnd = this.length + if (srcStart >= this.length) + return dst || Buffer.alloc(0) + if (srcEnd <= 0) + return dst || Buffer.alloc(0) + + var copy = !!dst + , off = this._offset(srcStart) + , len = srcEnd - srcStart + , bytes = len + , bufoff = (copy && dstStart) || 0 + , start = off[1] + , l + , i + + // copy/slice everything + if (srcStart === 0 && srcEnd == this.length) { + if (!copy) { // slice, but full concat if multiple buffers + return this._bufs.length === 1 + ? this._bufs[0] + : Buffer.concat(this._bufs, this.length) + } + + // copy, need to copy individual buffers + for (i = 0; i < this._bufs.length; i++) { + this._bufs[i].copy(dst, bufoff) + bufoff += this._bufs[i].length + } + + return dst + } + + // easy, cheap case where it's a subset of one of the buffers + if (bytes <= this._bufs[off[0]].length - start) { + return copy + ? this._bufs[off[0]].copy(dst, dstStart, start, start + bytes) + : this._bufs[off[0]].slice(start, start + bytes) + } + + if (!copy) // a slice, we need something to copy in to + dst = Buffer.allocUnsafe(len) + + for (i = off[0]; i < this._bufs.length; i++) { + l = this._bufs[i].length - start + + if (bytes > l) { + this._bufs[i].copy(dst, bufoff, start) + } else { + this._bufs[i].copy(dst, bufoff, start, start + bytes) + break + } + + bufoff += l + bytes -= l + + if (start) + start = 0 + } + + return dst +} + +BufferList.prototype.shallowSlice = function shallowSlice (start, end) { + start = start || 0 + end = end || this.length + + if (start < 0) + start += this.length + if (end < 0) + end += this.length + + var startOffset = this._offset(start) + , endOffset = this._offset(end) + , buffers = this._bufs.slice(startOffset[0], endOffset[0] + 1) + + if (endOffset[1] == 0) + buffers.pop() + else + buffers[buffers.length-1] = buffers[buffers.length-1].slice(0, endOffset[1]) + + if (startOffset[1] != 0) + buffers[0] = buffers[0].slice(startOffset[1]) + + return new BufferList(buffers) +} + +BufferList.prototype.toString = function toString (encoding, start, end) { + return this.slice(start, end).toString(encoding) +} + +BufferList.prototype.consume = function consume (bytes) { + while (this._bufs.length) { + if (bytes >= this._bufs[0].length) { + bytes -= this._bufs[0].length + this.length -= this._bufs[0].length + this._bufs.shift() + } else { + this._bufs[0] = this._bufs[0].slice(bytes) + this.length -= bytes + break + } + } + return this +} + + +BufferList.prototype.duplicate = function duplicate () { + var i = 0 + , copy = new BufferList() + + for (; i < this._bufs.length; i++) + copy.append(this._bufs[i]) + + return copy +} + + +BufferList.prototype.destroy = function destroy () { + this._bufs.length = 0 + this.length = 0 + this.push(null) +} + + +;(function () { + var methods = { + 'readDoubleBE' : 8 + , 'readDoubleLE' : 8 + , 'readFloatBE' : 4 + , 'readFloatLE' : 4 + , 'readInt32BE' : 4 + , 'readInt32LE' : 4 + , 'readUInt32BE' : 4 + , 'readUInt32LE' : 4 + , 'readInt16BE' : 2 + , 'readInt16LE' : 2 + , 'readUInt16BE' : 2 + , 'readUInt16LE' : 2 + , 'readInt8' : 1 + , 'readUInt8' : 1 + } + + for (var m in methods) { + (function (m) { + BufferList.prototype[m] = function (offset) { + return this.slice(offset, offset + methods[m])[m](0) + } + }(m)) + } +}()) + + +module.exports = BufferList diff --git a/code/application_liste/app/node_modules/bl/node_modules/readable-stream/.travis.yml b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/.travis.yml new file mode 100644 index 0000000..f62cdac --- /dev/null +++ b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/.travis.yml @@ -0,0 +1,34 @@ +sudo: false +language: node_js +before_install: + - (test $NPM_LEGACY && npm install -g npm@2 && npm install -g npm@3) || true +notifications: + email: false +matrix: + fast_finish: true + include: + - node_js: '0.8' + env: NPM_LEGACY=true + - node_js: '0.10' + env: NPM_LEGACY=true + - node_js: '0.11' + env: NPM_LEGACY=true + - node_js: '0.12' + env: NPM_LEGACY=true + - node_js: 1 + env: NPM_LEGACY=true + - node_js: 2 + env: NPM_LEGACY=true + - node_js: 3 + env: NPM_LEGACY=true + - node_js: 4 + - node_js: 5 + - node_js: 6 + - node_js: 7 + - node_js: 8 + - node_js: 9 +script: "npm run test" +env: + global: + - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc= + - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI= diff --git a/code/application_liste/app/node_modules/bl/node_modules/readable-stream/CONTRIBUTING.md b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/CONTRIBUTING.md new file mode 100644 index 0000000..f478d58 --- /dev/null +++ b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/CONTRIBUTING.md @@ -0,0 +1,38 @@ +# Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +* (a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +* (b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +* (c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +* (d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. + +## Moderation Policy + +The [Node.js Moderation Policy] applies to this WG. + +## Code of Conduct + +The [Node.js Code of Conduct][] applies to this WG. + +[Node.js Code of Conduct]: +https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md +[Node.js Moderation Policy]: +https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md diff --git a/code/application_liste/app/node_modules/bl/node_modules/readable-stream/GOVERNANCE.md b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/GOVERNANCE.md new file mode 100644 index 0000000..16ffb93 --- /dev/null +++ b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/GOVERNANCE.md @@ -0,0 +1,136 @@ +### Streams Working Group + +The Node.js Streams is jointly governed by a Working Group +(WG) +that is responsible for high-level guidance of the project. + +The WG has final authority over this project including: + +* Technical direction +* Project governance and process (including this policy) +* Contribution policy +* GitHub repository hosting +* Conduct guidelines +* Maintaining the list of additional Collaborators + +For the current list of WG members, see the project +[README.md](./README.md#current-project-team-members). + +### Collaborators + +The readable-stream GitHub repository is +maintained by the WG and additional Collaborators who are added by the +WG on an ongoing basis. + +Individuals making significant and valuable contributions are made +Collaborators and given commit-access to the project. These +individuals are identified by the WG and their addition as +Collaborators is discussed during the WG meeting. + +_Note:_ If you make a significant contribution and are not considered +for commit-access log an issue or contact a WG member directly and it +will be brought up in the next WG meeting. + +Modifications of the contents of the readable-stream repository are +made on +a collaborative basis. Anybody with a GitHub account may propose a +modification via pull request and it will be considered by the project +Collaborators. All pull requests must be reviewed and accepted by a +Collaborator with sufficient expertise who is able to take full +responsibility for the change. In the case of pull requests proposed +by an existing Collaborator, an additional Collaborator is required +for sign-off. Consensus should be sought if additional Collaborators +participate and there is disagreement around a particular +modification. See _Consensus Seeking Process_ below for further detail +on the consensus model used for governance. + +Collaborators may opt to elevate significant or controversial +modifications, or modifications that have not found consensus to the +WG for discussion by assigning the ***WG-agenda*** tag to a pull +request or issue. The WG should serve as the final arbiter where +required. + +For the current list of Collaborators, see the project +[README.md](./README.md#members). + +### WG Membership + +WG seats are not time-limited. There is no fixed size of the WG. +However, the expected target is between 6 and 12, to ensure adequate +coverage of important areas of expertise, balanced with the ability to +make decisions efficiently. + +There is no specific set of requirements or qualifications for WG +membership beyond these rules. + +The WG may add additional members to the WG by unanimous consensus. + +A WG member may be removed from the WG by voluntary resignation, or by +unanimous consensus of all other WG members. + +Changes to WG membership should be posted in the agenda, and may be +suggested as any other agenda item (see "WG Meetings" below). + +If an addition or removal is proposed during a meeting, and the full +WG is not in attendance to participate, then the addition or removal +is added to the agenda for the subsequent meeting. This is to ensure +that all members are given the opportunity to participate in all +membership decisions. If a WG member is unable to attend a meeting +where a planned membership decision is being made, then their consent +is assumed. + +No more than 1/3 of the WG members may be affiliated with the same +employer. If removal or resignation of a WG member, or a change of +employment by a WG member, creates a situation where more than 1/3 of +the WG membership shares an employer, then the situation must be +immediately remedied by the resignation or removal of one or more WG +members affiliated with the over-represented employer(s). + +### WG Meetings + +The WG meets occasionally on a Google Hangout On Air. A designated moderator +approved by the WG runs the meeting. Each meeting should be +published to YouTube. + +Items are added to the WG agenda that are considered contentious or +are modifications of governance, contribution policy, WG membership, +or release process. + +The intention of the agenda is not to approve or review all patches; +that should happen continuously on GitHub and be handled by the larger +group of Collaborators. + +Any community member or contributor can ask that something be added to +the next meeting's agenda by logging a GitHub Issue. Any Collaborator, +WG member or the moderator can add the item to the agenda by adding +the ***WG-agenda*** tag to the issue. + +Prior to each WG meeting the moderator will share the Agenda with +members of the WG. WG members can add any items they like to the +agenda at the beginning of each meeting. The moderator and the WG +cannot veto or remove items. + +The WG may invite persons or representatives from certain projects to +participate in a non-voting capacity. + +The moderator is responsible for summarizing the discussion of each +agenda item and sends it as a pull request after the meeting. + +### Consensus Seeking Process + +The WG follows a +[Consensus +Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) +decision-making model. + +When an agenda item has appeared to reach a consensus the moderator +will ask "Does anyone object?" as a final call for dissent from the +consensus. + +If an agenda item cannot reach a consensus a WG member can call for +either a closing vote or a vote to table the issue to the next +meeting. The call for a vote must be seconded by a majority of the WG +or else the discussion will continue. Simple majority wins. + +Note that changes to WG membership require a majority consensus. See +"WG Membership" above. diff --git a/code/application_liste/app/node_modules/bl/node_modules/readable-stream/LICENSE b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/LICENSE new file mode 100644 index 0000000..2873b3b --- /dev/null +++ b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/LICENSE @@ -0,0 +1,47 @@ +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" diff --git a/code/application_liste/app/node_modules/bl/node_modules/readable-stream/README.md b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/README.md new file mode 100644 index 0000000..23fe3f3 --- /dev/null +++ b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/README.md @@ -0,0 +1,58 @@ +# readable-stream + +***Node-core v8.11.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) + + +[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) +[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) + + +[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream) + +```bash +npm install --save readable-stream +``` + +***Node-core streams for userland*** + +This package is a mirror of the Streams2 and Streams3 implementations in +Node-core. + +Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.11.1/docs/api/stream.html). + +If you want to guarantee a stable streams base, regardless of what version of +Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). + +As of version 2.0.0 **readable-stream** uses semantic versioning. + +# Streams Working Group + +`readable-stream` is maintained by the Streams Working Group, which +oversees the development and maintenance of the Streams API within +Node.js. The responsibilities of the Streams Working Group include: + +* Addressing stream issues on the Node.js issue tracker. +* Authoring and editing stream documentation within the Node.js project. +* Reviewing changes to stream subclasses within the Node.js project. +* Redirecting changes to streams from the Node.js project to this + project. +* Assisting in the implementation of stream providers within Node.js. +* Recommending versions of `readable-stream` to be included in Node.js. +* Messaging about the future of streams to give the community advance + notice of changes. + + +## Team Members + +* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> + - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B +* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> + - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 +* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org> + - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D +* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com> +* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> +* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me> +* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com> + - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E +* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) <shestak.irina@gmail.com> diff --git a/code/application_liste/app/node_modules/bl/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md new file mode 100644 index 0000000..83275f1 --- /dev/null +++ b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md @@ -0,0 +1,60 @@ +# streams WG Meeting 2015-01-30 + +## Links + +* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg +* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 +* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ + +## Agenda + +Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting. + +* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) +* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) +* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) +* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) + +## Minutes + +### adopt a charter + +* group: +1's all around + +### What versioning scheme should be adopted? +* group: +1’s 3.0.0 +* domenic+group: pulling in patches from other sources where appropriate +* mikeal: version independently, suggesting versions for io.js +* mikeal+domenic: work with TC to notify in advance of changes +simpler stream creation + +### streamline creation of streams +* sam: streamline creation of streams +* domenic: nice simple solution posted + but, we lose the opportunity to change the model + may not be backwards incompatible (double check keys) + + **action item:** domenic will check + +### remove implicit flowing of streams on(‘data’) +* add isFlowing / isPaused +* mikeal: worrying that we’re documenting polyfill methods – confuses users +* domenic: more reflective API is probably good, with warning labels for users +* new section for mad scientists (reflective stream access) +* calvin: name the “third state” +* mikeal: maybe borrow the name from whatwg? +* domenic: we’re missing the “third state” +* consensus: kind of difficult to name the third state +* mikeal: figure out differences in states / compat +* mathias: always flow on data – eliminates third state + * explore what it breaks + +**action items:** +* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) +* ask rod/build for infrastructure +* **chris**: explore the “flow on data” approach +* add isPaused/isFlowing +* add new docs section +* move isPaused to that section + + diff --git a/code/application_liste/app/node_modules/bl/node_modules/readable-stream/duplex-browser.js b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/duplex-browser.js new file mode 100644 index 0000000..f8b2db8 --- /dev/null +++ b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/duplex-browser.js @@ -0,0 +1 @@ +module.exports = require('./lib/_stream_duplex.js'); diff --git a/code/application_liste/app/node_modules/bl/node_modules/readable-stream/duplex.js b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/duplex.js new file mode 100644 index 0000000..46924cb --- /dev/null +++ b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/duplex.js @@ -0,0 +1 @@ +module.exports = require('./readable').Duplex diff --git a/code/application_liste/app/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js new file mode 100644 index 0000000..57003c3 --- /dev/null +++ b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js @@ -0,0 +1,131 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. + +'use strict'; + +/**/ + +var pna = require('process-nextick-args'); +/**/ + +/**/ +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) { + keys.push(key); + }return keys; +}; +/**/ + +module.exports = Duplex; + +/**/ +var util = Object.create(require('core-util-is')); +util.inherits = require('inherits'); +/**/ + +var Readable = require('./_stream_readable'); +var Writable = require('./_stream_writable'); + +util.inherits(Duplex, Readable); + +{ + // avoid scope creep, the keys array can then be collected + var keys = objectKeys(Writable.prototype); + for (var v = 0; v < keys.length; v++) { + var method = keys[v]; + if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; + } +} + +function Duplex(options) { + if (!(this instanceof Duplex)) return new Duplex(options); + + Readable.call(this, options); + Writable.call(this, options); + + if (options && options.readable === false) this.readable = false; + + if (options && options.writable === false) this.writable = false; + + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; + + this.once('end', onend); +} + +Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function () { + return this._writableState.highWaterMark; + } +}); + +// the no-half-open enforcer +function onend() { + // if we allow half-open state, or if the writable side ended, + // then we're ok. + if (this.allowHalfOpen || this._writableState.ended) return; + + // no more data can be written. + // But allow more writes to happen in this tick. + pna.nextTick(onEndNT, this); +} + +function onEndNT(self) { + self.end(); +} + +Object.defineProperty(Duplex.prototype, 'destroyed', { + get: function () { + if (this._readableState === undefined || this._writableState === undefined) { + return false; + } + return this._readableState.destroyed && this._writableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (this._readableState === undefined || this._writableState === undefined) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + this._writableState.destroyed = value; + } +}); + +Duplex.prototype._destroy = function (err, cb) { + this.push(null); + this.end(); + + pna.nextTick(cb, err); +}; \ No newline at end of file diff --git a/code/application_liste/app/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js new file mode 100644 index 0000000..612edb4 --- /dev/null +++ b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js @@ -0,0 +1,47 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a passthrough stream. +// basically just the most minimal sort of Transform stream. +// Every written chunk gets output as-is. + +'use strict'; + +module.exports = PassThrough; + +var Transform = require('./_stream_transform'); + +/**/ +var util = Object.create(require('core-util-is')); +util.inherits = require('inherits'); +/**/ + +util.inherits(PassThrough, Transform); + +function PassThrough(options) { + if (!(this instanceof PassThrough)) return new PassThrough(options); + + Transform.call(this, options); +} + +PassThrough.prototype._transform = function (chunk, encoding, cb) { + cb(null, chunk); +}; \ No newline at end of file diff --git a/code/application_liste/app/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js new file mode 100644 index 0000000..0f80764 --- /dev/null +++ b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js @@ -0,0 +1,1019 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +/**/ + +var pna = require('process-nextick-args'); +/**/ + +module.exports = Readable; + +/**/ +var isArray = require('isarray'); +/**/ + +/**/ +var Duplex; +/**/ + +Readable.ReadableState = ReadableState; + +/**/ +var EE = require('events').EventEmitter; + +var EElistenerCount = function (emitter, type) { + return emitter.listeners(type).length; +}; +/**/ + +/**/ +var Stream = require('./internal/streams/stream'); +/**/ + +/**/ + +var Buffer = require('safe-buffer').Buffer; +var OurUint8Array = global.Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} + +/**/ + +/**/ +var util = Object.create(require('core-util-is')); +util.inherits = require('inherits'); +/**/ + +/**/ +var debugUtil = require('util'); +var debug = void 0; +if (debugUtil && debugUtil.debuglog) { + debug = debugUtil.debuglog('stream'); +} else { + debug = function () {}; +} +/**/ + +var BufferList = require('./internal/streams/BufferList'); +var destroyImpl = require('./internal/streams/destroy'); +var StringDecoder; + +util.inherits(Readable, Stream); + +var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; + +function prependListener(emitter, event, fn) { + // Sadly this is not cacheable as some libraries bundle their own + // event emitter implementation with them. + if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); + + // This is a hack to make sure that our error handler is attached before any + // userland ones. NEVER DO THIS. This is here only because this code needs + // to continue to work with older versions of Node.js that do not include + // the prependListener() method. The goal is to eventually remove this hack. + if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; +} + +function ReadableState(options, stream) { + Duplex = Duplex || require('./_stream_duplex'); + + options = options || {}; + + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream. + // These options can be provided separately as readableXXX and writableXXX. + var isDuplex = stream instanceof Duplex; + + // object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away + this.objectMode = !!options.objectMode; + + if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; + + // the point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + var hwm = options.highWaterMark; + var readableHwm = options.readableHighWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + + if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm; + + // cast to ints. + this.highWaterMark = Math.floor(this.highWaterMark); + + // A linked list is used to store data chunks instead of an array because the + // linked list can remove elements from the beginning faster than + // array.shift() + this.buffer = new BufferList(); + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + + // a flag to be able to tell if the event 'readable'/'data' is emitted + // immediately, or on a later tick. We set this to true at first, because + // any actions that shouldn't happen until "later" should generally also + // not happen before the first read call. + this.sync = true; + + // whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + this.resumeScheduled = false; + + // has it been destroyed + this.destroyed = false; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; + + // if true, a maybeReadMore has been scheduled + this.readingMore = false; + + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +} + +function Readable(options) { + Duplex = Duplex || require('./_stream_duplex'); + + if (!(this instanceof Readable)) return new Readable(options); + + this._readableState = new ReadableState(options, this); + + // legacy + this.readable = true; + + if (options) { + if (typeof options.read === 'function') this._read = options.read; + + if (typeof options.destroy === 'function') this._destroy = options.destroy; + } + + Stream.call(this); +} + +Object.defineProperty(Readable.prototype, 'destroyed', { + get: function () { + if (this._readableState === undefined) { + return false; + } + return this._readableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._readableState) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._readableState.destroyed = value; + } +}); + +Readable.prototype.destroy = destroyImpl.destroy; +Readable.prototype._undestroy = destroyImpl.undestroy; +Readable.prototype._destroy = function (err, cb) { + this.push(null); + cb(err); +}; + +// Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. +Readable.prototype.push = function (chunk, encoding) { + var state = this._readableState; + var skipChunkCheck; + + if (!state.objectMode) { + if (typeof chunk === 'string') { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = Buffer.from(chunk, encoding); + encoding = ''; + } + skipChunkCheck = true; + } + } else { + skipChunkCheck = true; + } + + return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); +}; + +// Unshift should *always* be something directly out of read() +Readable.prototype.unshift = function (chunk) { + return readableAddChunk(this, chunk, null, true, false); +}; + +function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { + var state = stream._readableState; + if (chunk === null) { + state.reading = false; + onEofChunk(stream, state); + } else { + var er; + if (!skipChunkCheck) er = chunkInvalid(state, chunk); + if (er) { + stream.emit('error', er); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { + chunk = _uint8ArrayToBuffer(chunk); + } + + if (addToFront) { + if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true); + } else if (state.ended) { + stream.emit('error', new Error('stream.push() after EOF')); + } else { + state.reading = false; + if (state.decoder && !encoding) { + chunk = state.decoder.write(chunk); + if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); + } else { + addChunk(stream, state, chunk, false); + } + } + } else if (!addToFront) { + state.reading = false; + } + } + + return needMoreData(state); +} + +function addChunk(stream, state, chunk, addToFront) { + if (state.flowing && state.length === 0 && !state.sync) { + stream.emit('data', chunk); + stream.read(0); + } else { + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); + + if (state.needReadable) emitReadable(stream); + } + maybeReadMore(stream, state); +} + +function chunkInvalid(state, chunk) { + var er; + if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + return er; +} + +// if it's past the high water mark, we can push in some more. +// Also, if we have no data yet, we can stand some +// more bytes. This is to work around cases where hwm=0, +// such as the repl. Also, if the push() triggered a +// readable event, and the user called read(largeNumber) such that +// needReadable was set, then we ought to push more, so that another +// 'readable' event will be triggered. +function needMoreData(state) { + return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); +} + +Readable.prototype.isPaused = function () { + return this._readableState.flowing === false; +}; + +// backwards compatibility. +Readable.prototype.setEncoding = function (enc) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; + return this; +}; + +// Don't raise the hwm > 8MB +var MAX_HWM = 0x800000; +function computeNewHighWaterMark(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + // Get the next highest power of 2 to prevent increasing hwm excessively in + // tiny amounts + n--; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; + n++; + } + return n; +} + +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function howMuchToRead(n, state) { + if (n <= 0 || state.length === 0 && state.ended) return 0; + if (state.objectMode) return 1; + if (n !== n) { + // Only flow one buffer at a time + if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; + } + // If we're asking for more than the current hwm, then raise the hwm. + if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); + if (n <= state.length) return n; + // Don't have enough + if (!state.ended) { + state.needReadable = true; + return 0; + } + return state.length; +} + +// you can override either this method, or the async _read(n) below. +Readable.prototype.read = function (n) { + debug('read', n); + n = parseInt(n, 10); + var state = this._readableState; + var nOrig = n; + + if (n !== 0) state.emittedReadable = false; + + // if we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { + debug('read: emitReadable', state.length, state.ended); + if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); + return null; + } + + n = howMuchToRead(n, state); + + // if we've ended, and we're now clear, then finish it up. + if (n === 0 && state.ended) { + if (state.length === 0) endReadable(this); + return null; + } + + // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. + + // if we need a readable event, then we need to do some reading. + var doRead = state.needReadable; + debug('need readable', doRead); + + // if we currently have less than the highWaterMark, then also read some + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug('length less than watermark', doRead); + } + + // however, if we've ended, then there's no point, and if we're already + // reading, then it's unnecessary. + if (state.ended || state.reading) { + doRead = false; + debug('reading or ended', doRead); + } else if (doRead) { + debug('do read'); + state.reading = true; + state.sync = true; + // if the length is currently zero, then we *need* a readable event. + if (state.length === 0) state.needReadable = true; + // call internal read method + this._read(state.highWaterMark); + state.sync = false; + // If _read pushed data synchronously, then `reading` will be false, + // and we need to re-evaluate how much data we can return to the user. + if (!state.reading) n = howMuchToRead(nOrig, state); + } + + var ret; + if (n > 0) ret = fromList(n, state);else ret = null; + + if (ret === null) { + state.needReadable = true; + n = 0; + } else { + state.length -= n; + } + + if (state.length === 0) { + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (!state.ended) state.needReadable = true; + + // If we tried to read() past the EOF, then emit end on the next tick. + if (nOrig !== n && state.ended) endReadable(this); + } + + if (ret !== null) this.emit('data', ret); + + return ret; +}; + +function onEofChunk(stream, state) { + if (state.ended) return; + if (state.decoder) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + + // emit 'readable' now to make sure it gets picked up. + emitReadable(stream); +} + +// Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. +function emitReadable(stream) { + var state = stream._readableState; + state.needReadable = false; + if (!state.emittedReadable) { + debug('emitReadable', state.flowing); + state.emittedReadable = true; + if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream); + } +} + +function emitReadable_(stream) { + debug('emit readable'); + stream.emit('readable'); + flow(stream); +} + +// at this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. +function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + pna.nextTick(maybeReadMore_, stream, state); + } +} + +function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { + debug('maybeReadMore read 0'); + stream.read(0); + if (len === state.length) + // didn't get any data, stop spinning. + break;else len = state.length; + } + state.readingMore = false; +} + +// abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. +Readable.prototype._read = function (n) { + this.emit('error', new Error('_read() is not implemented')); +}; + +Readable.prototype.pipe = function (dest, pipeOpts) { + var src = this; + var state = this._readableState; + + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); + + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; + + var endFn = doEnd ? onend : unpipe; + if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn); + + dest.on('unpipe', onunpipe); + function onunpipe(readable, unpipeInfo) { + debug('onunpipe'); + if (readable === src) { + if (unpipeInfo && unpipeInfo.hasUnpiped === false) { + unpipeInfo.hasUnpiped = true; + cleanup(); + } + } + } + + function onend() { + debug('onend'); + dest.end(); + } + + // when the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + var ondrain = pipeOnDrain(src); + dest.on('drain', ondrain); + + var cleanedUp = false; + function cleanup() { + debug('cleanup'); + // cleanup event handlers once the pipe is broken + dest.removeListener('close', onclose); + dest.removeListener('finish', onfinish); + dest.removeListener('drain', ondrain); + dest.removeListener('error', onerror); + dest.removeListener('unpipe', onunpipe); + src.removeListener('end', onend); + src.removeListener('end', unpipe); + src.removeListener('data', ondata); + + cleanedUp = true; + + // if the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); + } + + // If the user pushes more data while we're writing to dest then we'll end up + // in ondata again. However, we only want to increase awaitDrain once because + // dest will only emit one 'drain' event for the multiple writes. + // => Introduce a guard on increasing awaitDrain. + var increasedAwaitDrain = false; + src.on('data', ondata); + function ondata(chunk) { + debug('ondata'); + increasedAwaitDrain = false; + var ret = dest.write(chunk); + if (false === ret && !increasedAwaitDrain) { + // If the user unpiped during `dest.write()`, it is possible + // to get stuck in a permanently paused state if that write + // also returned false. + // => Check whether `dest` is still a piping destination. + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { + debug('false write response, pause', src._readableState.awaitDrain); + src._readableState.awaitDrain++; + increasedAwaitDrain = true; + } + src.pause(); + } + } + + // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + function onerror(er) { + debug('onerror', er); + unpipe(); + dest.removeListener('error', onerror); + if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); + } + + // Make sure our error handler is attached before userland ones. + prependListener(dest, 'error', onerror); + + // Both close and finish should trigger unpipe, but only once. + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); + } + dest.once('close', onclose); + function onfinish() { + debug('onfinish'); + dest.removeListener('close', onclose); + unpipe(); + } + dest.once('finish', onfinish); + + function unpipe() { + debug('unpipe'); + src.unpipe(dest); + } + + // tell the dest that it's being piped to + dest.emit('pipe', src); + + // start the flow if it hasn't been started already. + if (!state.flowing) { + debug('pipe resume'); + src.resume(); + } + + return dest; +}; + +function pipeOnDrain(src) { + return function () { + var state = src._readableState; + debug('pipeOnDrain', state.awaitDrain); + if (state.awaitDrain) state.awaitDrain--; + if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { + state.flowing = true; + flow(src); + } + }; +} + +Readable.prototype.unpipe = function (dest) { + var state = this._readableState; + var unpipeInfo = { hasUnpiped: false }; + + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) return this; + + // just one destination. most common case. + if (state.pipesCount === 1) { + // passed in one, but it's not the right one. + if (dest && dest !== state.pipes) return this; + + if (!dest) dest = state.pipes; + + // got a match. + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) dest.emit('unpipe', this, unpipeInfo); + return this; + } + + // slow case. multiple pipe destinations. + + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + + for (var i = 0; i < len; i++) { + dests[i].emit('unpipe', this, unpipeInfo); + }return this; + } + + // try to find the right one. + var index = indexOf(state.pipes, dest); + if (index === -1) return this; + + state.pipes.splice(index, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) state.pipes = state.pipes[0]; + + dest.emit('unpipe', this, unpipeInfo); + + return this; +}; + +// set up data events if they are asked for +// Ensure readable listeners eventually get something +Readable.prototype.on = function (ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + + if (ev === 'data') { + // Start flowing on next tick if stream isn't explicitly paused + if (this._readableState.flowing !== false) this.resume(); + } else if (ev === 'readable') { + var state = this._readableState; + if (!state.endEmitted && !state.readableListening) { + state.readableListening = state.needReadable = true; + state.emittedReadable = false; + if (!state.reading) { + pna.nextTick(nReadingNextTick, this); + } else if (state.length) { + emitReadable(this); + } + } + } + + return res; +}; +Readable.prototype.addListener = Readable.prototype.on; + +function nReadingNextTick(self) { + debug('readable nexttick read 0'); + self.read(0); +} + +// pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. +Readable.prototype.resume = function () { + var state = this._readableState; + if (!state.flowing) { + debug('resume'); + state.flowing = true; + resume(this, state); + } + return this; +}; + +function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + pna.nextTick(resume_, stream, state); + } +} + +function resume_(stream, state) { + if (!state.reading) { + debug('resume read 0'); + stream.read(0); + } + + state.resumeScheduled = false; + state.awaitDrain = 0; + stream.emit('resume'); + flow(stream); + if (state.flowing && !state.reading) stream.read(0); +} + +Readable.prototype.pause = function () { + debug('call pause flowing=%j', this._readableState.flowing); + if (false !== this._readableState.flowing) { + debug('pause'); + this._readableState.flowing = false; + this.emit('pause'); + } + return this; +}; + +function flow(stream) { + var state = stream._readableState; + debug('flow', state.flowing); + while (state.flowing && stream.read() !== null) {} +} + +// wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. +Readable.prototype.wrap = function (stream) { + var _this = this; + + var state = this._readableState; + var paused = false; + + stream.on('end', function () { + debug('wrapped end'); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) _this.push(chunk); + } + + _this.push(null); + }); + + stream.on('data', function (chunk) { + debug('wrapped data'); + if (state.decoder) chunk = state.decoder.write(chunk); + + // don't skip over falsy values in objectMode + if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; + + var ret = _this.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + + // proxy all the other methods. + // important when wrapping filters and duplexes. + for (var i in stream) { + if (this[i] === undefined && typeof stream[i] === 'function') { + this[i] = function (method) { + return function () { + return stream[method].apply(stream, arguments); + }; + }(i); + } + } + + // proxy certain important events. + for (var n = 0; n < kProxyEvents.length; n++) { + stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); + } + + // when we try to consume some more bytes, simply unpause the + // underlying stream. + this._read = function (n) { + debug('wrapped _read', n); + if (paused) { + paused = false; + stream.resume(); + } + }; + + return this; +}; + +Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function () { + return this._readableState.highWaterMark; + } +}); + +// exposed for testing purposes only. +Readable._fromList = fromList; + +// Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function fromList(n, state) { + // nothing buffered + if (state.length === 0) return null; + + var ret; + if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { + // read it all, truncate the list + if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length); + state.buffer.clear(); + } else { + // read part of list + ret = fromListPartial(n, state.buffer, state.decoder); + } + + return ret; +} + +// Extracts only enough buffered data to satisfy the amount requested. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function fromListPartial(n, list, hasStrings) { + var ret; + if (n < list.head.data.length) { + // slice is the same for buffers and strings + ret = list.head.data.slice(0, n); + list.head.data = list.head.data.slice(n); + } else if (n === list.head.data.length) { + // first chunk is a perfect match + ret = list.shift(); + } else { + // result spans more than one buffer + ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); + } + return ret; +} + +// Copies a specified amount of characters from the list of buffered data +// chunks. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function copyFromBufferString(n, list) { + var p = list.head; + var c = 1; + var ret = p.data; + n -= ret.length; + while (p = p.next) { + var str = p.data; + var nb = n > str.length ? str.length : n; + if (nb === str.length) ret += str;else ret += str.slice(0, n); + n -= nb; + if (n === 0) { + if (nb === str.length) { + ++c; + if (p.next) list.head = p.next;else list.head = list.tail = null; + } else { + list.head = p; + p.data = str.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; +} + +// Copies a specified amount of bytes from the list of buffered data chunks. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function copyFromBuffer(n, list) { + var ret = Buffer.allocUnsafe(n); + var p = list.head; + var c = 1; + p.data.copy(ret); + n -= p.data.length; + while (p = p.next) { + var buf = p.data; + var nb = n > buf.length ? buf.length : n; + buf.copy(ret, ret.length - n, 0, nb); + n -= nb; + if (n === 0) { + if (nb === buf.length) { + ++c; + if (p.next) list.head = p.next;else list.head = list.tail = null; + } else { + list.head = p; + p.data = buf.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; +} + +function endReadable(stream) { + var state = stream._readableState; + + // If we get here before consuming all the bytes, then that is a + // bug in node. Should never happen. + if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); + + if (!state.endEmitted) { + state.ended = true; + pna.nextTick(endReadableNT, state, stream); + } +} + +function endReadableNT(state, stream) { + // Check that we didn't get one last unshift. + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit('end'); + } +} + +function indexOf(xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) return i; + } + return -1; +} \ No newline at end of file diff --git a/code/application_liste/app/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js new file mode 100644 index 0000000..fcfc105 --- /dev/null +++ b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js @@ -0,0 +1,214 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a transform stream is a readable/writable stream where you do +// something with the data. Sometimes it's called a "filter", +// but that's not a great name for it, since that implies a thing where +// some bits pass through, and others are simply ignored. (That would +// be a valid example of a transform, of course.) +// +// While the output is causally related to the input, it's not a +// necessarily symmetric or synchronous transformation. For example, +// a zlib stream might take multiple plain-text writes(), and then +// emit a single compressed chunk some time in the future. +// +// Here's how this works: +// +// The Transform stream has all the aspects of the readable and writable +// stream classes. When you write(chunk), that calls _write(chunk,cb) +// internally, and returns false if there's a lot of pending writes +// buffered up. When you call read(), that calls _read(n) until +// there's enough pending readable data buffered up. +// +// In a transform stream, the written data is placed in a buffer. When +// _read(n) is called, it transforms the queued up data, calling the +// buffered _write cb's as it consumes chunks. If consuming a single +// written chunk would result in multiple output chunks, then the first +// outputted bit calls the readcb, and subsequent chunks just go into +// the read buffer, and will cause it to emit 'readable' if necessary. +// +// This way, back-pressure is actually determined by the reading side, +// since _read has to be called to start processing a new chunk. However, +// a pathological inflate type of transform can cause excessive buffering +// here. For example, imagine a stream where every byte of input is +// interpreted as an integer from 0-255, and then results in that many +// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in +// 1kb of data being output. In this case, you could write a very small +// amount of input, and end up with a very large amount of output. In +// such a pathological inflating mechanism, there'd be no way to tell +// the system to stop doing the transform. A single 4MB write could +// cause the system to run out of memory. +// +// However, even in such a pathological case, only a single written chunk +// would be consumed, and then the rest would wait (un-transformed) until +// the results of the previous transformed chunk were consumed. + +'use strict'; + +module.exports = Transform; + +var Duplex = require('./_stream_duplex'); + +/**/ +var util = Object.create(require('core-util-is')); +util.inherits = require('inherits'); +/**/ + +util.inherits(Transform, Duplex); + +function afterTransform(er, data) { + var ts = this._transformState; + ts.transforming = false; + + var cb = ts.writecb; + + if (!cb) { + return this.emit('error', new Error('write callback called multiple times')); + } + + ts.writechunk = null; + ts.writecb = null; + + if (data != null) // single equals check for both `null` and `undefined` + this.push(data); + + cb(er); + + var rs = this._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + this._read(rs.highWaterMark); + } +} + +function Transform(options) { + if (!(this instanceof Transform)) return new Transform(options); + + Duplex.call(this, options); + + this._transformState = { + afterTransform: afterTransform.bind(this), + needTransform: false, + transforming: false, + writecb: null, + writechunk: null, + writeencoding: null + }; + + // start out asking for a readable event once data is transformed. + this._readableState.needReadable = true; + + // we have implemented the _read method, and done the other things + // that Readable wants before the first _read call, so unset the + // sync guard flag. + this._readableState.sync = false; + + if (options) { + if (typeof options.transform === 'function') this._transform = options.transform; + + if (typeof options.flush === 'function') this._flush = options.flush; + } + + // When the writable side finishes, then flush out anything remaining. + this.on('prefinish', prefinish); +} + +function prefinish() { + var _this = this; + + if (typeof this._flush === 'function') { + this._flush(function (er, data) { + done(_this, er, data); + }); + } else { + done(this, null, null); + } +} + +Transform.prototype.push = function (chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); +}; + +// This is the part where you do stuff! +// override this function in implementation classes. +// 'chunk' is an input chunk. +// +// Call `push(newChunk)` to pass along transformed output +// to the readable side. You may call 'push' zero or more times. +// +// Call `cb(err)` when you are done with this chunk. If you pass +// an error, then that'll put the hurt on the whole operation. If you +// never call cb(), then you'll never get another chunk. +Transform.prototype._transform = function (chunk, encoding, cb) { + throw new Error('_transform() is not implemented'); +}; + +Transform.prototype._write = function (chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); + } +}; + +// Doesn't matter what the args are here. +// _transform does all the work. +// That we got here means that the readable side wants more data. +Transform.prototype._read = function (n) { + var ts = this._transformState; + + if (ts.writechunk !== null && ts.writecb && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + // mark that we need a transform, so that any data that comes in + // will get processed, now that we've asked for it. + ts.needTransform = true; + } +}; + +Transform.prototype._destroy = function (err, cb) { + var _this2 = this; + + Duplex.prototype._destroy.call(this, err, function (err2) { + cb(err2); + _this2.emit('close'); + }); +}; + +function done(stream, er, data) { + if (er) return stream.emit('error', er); + + if (data != null) // single equals check for both `null` and `undefined` + stream.push(data); + + // if there's nothing in the write buffer, then that means + // that nothing more will ever be provided + if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0'); + + if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming'); + + return stream.push(null); +} \ No newline at end of file diff --git a/code/application_liste/app/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js new file mode 100644 index 0000000..b0b0220 --- /dev/null +++ b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js @@ -0,0 +1,687 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// A bit simpler than readable streams. +// Implement an async ._write(chunk, encoding, cb), and it'll handle all +// the drain event emission and buffering. + +'use strict'; + +/**/ + +var pna = require('process-nextick-args'); +/**/ + +module.exports = Writable; + +/* */ +function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; + this.next = null; +} + +// It seems a linked list but it is not +// there will be only 2 of these for each stream +function CorkedRequest(state) { + var _this = this; + + this.next = null; + this.entry = null; + this.finish = function () { + onCorkedFinish(_this, state); + }; +} +/* */ + +/**/ +var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; +/**/ + +/**/ +var Duplex; +/**/ + +Writable.WritableState = WritableState; + +/**/ +var util = Object.create(require('core-util-is')); +util.inherits = require('inherits'); +/**/ + +/**/ +var internalUtil = { + deprecate: require('util-deprecate') +}; +/**/ + +/**/ +var Stream = require('./internal/streams/stream'); +/**/ + +/**/ + +var Buffer = require('safe-buffer').Buffer; +var OurUint8Array = global.Uint8Array || function () {}; +function _uint8ArrayToBuffer(chunk) { + return Buffer.from(chunk); +} +function _isUint8Array(obj) { + return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; +} + +/**/ + +var destroyImpl = require('./internal/streams/destroy'); + +util.inherits(Writable, Stream); + +function nop() {} + +function WritableState(options, stream) { + Duplex = Duplex || require('./_stream_duplex'); + + options = options || {}; + + // Duplex streams are both readable and writable, but share + // the same options object. + // However, some cases require setting options to different + // values for the readable and the writable sides of the duplex stream. + // These options can be provided separately as readableXXX and writableXXX. + var isDuplex = stream instanceof Duplex; + + // object stream flag to indicate whether or not this stream + // contains buffers or objects. + this.objectMode = !!options.objectMode; + + if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; + + // the point at which write() starts returning false + // Note: 0 is a valid value, means that we always return false if + // the entire buffer is not flushed immediately on write() + var hwm = options.highWaterMark; + var writableHwm = options.writableHighWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + + if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm; + + // cast to ints. + this.highWaterMark = Math.floor(this.highWaterMark); + + // if _final has been called + this.finalCalled = false; + + // drain event flag. + this.needDrain = false; + // at the start of calling end() + this.ending = false; + // when end() has been called, and returned + this.ended = false; + // when 'finish' is emitted + this.finished = false; + + // has it been destroyed + this.destroyed = false; + + // should we decode strings into buffers before passing to _write? + // this is here so that some node-core streams can optimize string + // handling at a lower level. + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // not an actual buffer we keep track of, but a measurement + // of how much we're waiting to get pushed to some underlying + // socket or file. + this.length = 0; + + // a flag to see when we're in the middle of a write. + this.writing = false; + + // when true all writes will be buffered until .uncork() call + this.corked = 0; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // a flag to know if we're processing previously buffered items, which + // may call the _write() callback in the same tick, so that we don't + // end up in an overlapped onwrite situation. + this.bufferProcessing = false; + + // the callback that's passed to _write(chunk,cb) + this.onwrite = function (er) { + onwrite(stream, er); + }; + + // the callback that the user supplies to write(chunk,encoding,cb) + this.writecb = null; + + // the amount that is being written when _write is called. + this.writelen = 0; + + this.bufferedRequest = null; + this.lastBufferedRequest = null; + + // number of pending user-supplied write callbacks + // this must be 0 before 'finish' can be emitted + this.pendingcb = 0; + + // emit prefinish if the only thing we're waiting for is _write cbs + // This is relevant for synchronous Transform streams + this.prefinished = false; + + // True if the error was already emitted and should not be thrown again + this.errorEmitted = false; + + // count buffered requests + this.bufferedRequestCount = 0; + + // allocate the first CorkedRequest, there is always + // one allocated and free to use, and we maintain at most two + this.corkedRequestsFree = new CorkedRequest(this); +} + +WritableState.prototype.getBuffer = function getBuffer() { + var current = this.bufferedRequest; + var out = []; + while (current) { + out.push(current); + current = current.next; + } + return out; +}; + +(function () { + try { + Object.defineProperty(WritableState.prototype, 'buffer', { + get: internalUtil.deprecate(function () { + return this.getBuffer(); + }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') + }); + } catch (_) {} +})(); + +// Test _writableState for inheritance to account for Duplex streams, +// whose prototype chain only points to Readable. +var realHasInstance; +if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { + realHasInstance = Function.prototype[Symbol.hasInstance]; + Object.defineProperty(Writable, Symbol.hasInstance, { + value: function (object) { + if (realHasInstance.call(this, object)) return true; + if (this !== Writable) return false; + + return object && object._writableState instanceof WritableState; + } + }); +} else { + realHasInstance = function (object) { + return object instanceof this; + }; +} + +function Writable(options) { + Duplex = Duplex || require('./_stream_duplex'); + + // Writable ctor is applied to Duplexes, too. + // `realHasInstance` is necessary because using plain `instanceof` + // would return false, as no `_writableState` property is attached. + + // Trying to use the custom `instanceof` for Writable here will also break the + // Node.js LazyTransform implementation, which has a non-trivial getter for + // `_writableState` that would lead to infinite recursion. + if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { + return new Writable(options); + } + + this._writableState = new WritableState(options, this); + + // legacy. + this.writable = true; + + if (options) { + if (typeof options.write === 'function') this._write = options.write; + + if (typeof options.writev === 'function') this._writev = options.writev; + + if (typeof options.destroy === 'function') this._destroy = options.destroy; + + if (typeof options.final === 'function') this._final = options.final; + } + + Stream.call(this); +} + +// Otherwise people can pipe Writable streams, which is just wrong. +Writable.prototype.pipe = function () { + this.emit('error', new Error('Cannot pipe, not readable')); +}; + +function writeAfterEnd(stream, cb) { + var er = new Error('write after end'); + // TODO: defer error events consistently everywhere, not just the cb + stream.emit('error', er); + pna.nextTick(cb, er); +} + +// Checks that a user-supplied chunk is valid, especially for the particular +// mode the stream is in. Currently this means that `null` is never accepted +// and undefined/non-string values are only allowed in object mode. +function validChunk(stream, state, chunk, cb) { + var valid = true; + var er = false; + + if (chunk === null) { + er = new TypeError('May not write null values to stream'); + } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + if (er) { + stream.emit('error', er); + pna.nextTick(cb, er); + valid = false; + } + return valid; +} + +Writable.prototype.write = function (chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + var isBuf = !state.objectMode && _isUint8Array(chunk); + + if (isBuf && !Buffer.isBuffer(chunk)) { + chunk = _uint8ArrayToBuffer(chunk); + } + + if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; + + if (typeof cb !== 'function') cb = nop; + + if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); + } + + return ret; +}; + +Writable.prototype.cork = function () { + var state = this._writableState; + + state.corked++; +}; + +Writable.prototype.uncork = function () { + var state = this._writableState; + + if (state.corked) { + state.corked--; + + if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); + } +}; + +Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + // node::ParseEncoding() requires lower case. + if (typeof encoding === 'string') encoding = encoding.toLowerCase(); + if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); + this._writableState.defaultEncoding = encoding; + return this; +}; + +function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { + chunk = Buffer.from(chunk, encoding); + } + return chunk; +} + +Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function () { + return this._writableState.highWaterMark; + } +}); + +// if we're already writing something, then just put this +// in the queue, and wait our turn. Otherwise, call _write +// If we return false, then we need a drain event, so set that flag. +function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { + if (!isBuf) { + var newChunk = decodeChunk(state, chunk, encoding); + if (chunk !== newChunk) { + isBuf = true; + encoding = 'buffer'; + chunk = newChunk; + } + } + var len = state.objectMode ? 1 : chunk.length; + + state.length += len; + + var ret = state.length < state.highWaterMark; + // we must ensure that previous needDrain will not be reset to false. + if (!ret) state.needDrain = true; + + if (state.writing || state.corked) { + var last = state.lastBufferedRequest; + state.lastBufferedRequest = { + chunk: chunk, + encoding: encoding, + isBuf: isBuf, + callback: cb, + next: null + }; + if (last) { + last.next = state.lastBufferedRequest; + } else { + state.bufferedRequest = state.lastBufferedRequest; + } + state.bufferedRequestCount += 1; + } else { + doWrite(stream, state, false, len, chunk, encoding, cb); + } + + return ret; +} + +function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); + state.sync = false; +} + +function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; + + if (sync) { + // defer the callback if we are being called synchronously + // to avoid piling up things on the stack + pna.nextTick(cb, er); + // this can emit finish, and it will always happen + // after error + pna.nextTick(finishMaybe, stream, state); + stream._writableState.errorEmitted = true; + stream.emit('error', er); + } else { + // the caller expect this to happen before if + // it is async + cb(er); + stream._writableState.errorEmitted = true; + stream.emit('error', er); + // this can emit finish, but finish must + // always follow error + finishMaybe(stream, state); + } +} + +function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; +} + +function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + + onwriteStateUpdate(state); + + if (er) onwriteError(stream, state, sync, er, cb);else { + // Check if we're actually ready to finish, but don't emit yet + var finished = needFinish(state); + + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); + } + + if (sync) { + /**/ + asyncWrite(afterWrite, stream, state, finished, cb); + /**/ + } else { + afterWrite(stream, state, finished, cb); + } + } +} + +function afterWrite(stream, state, finished, cb) { + if (!finished) onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); +} + +// Must force callback to be called on nextTick, so that we don't +// emit 'drain' before the write() consumer gets the 'false' return +// value, and has a chance to attach a 'drain' listener. +function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit('drain'); + } +} + +// if there's something in the buffer waiting, then process it +function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; + + if (stream._writev && entry && entry.next) { + // Fast case, write everything using _writev() + var l = state.bufferedRequestCount; + var buffer = new Array(l); + var holder = state.corkedRequestsFree; + holder.entry = entry; + + var count = 0; + var allBuffers = true; + while (entry) { + buffer[count] = entry; + if (!entry.isBuf) allBuffers = false; + entry = entry.next; + count += 1; + } + buffer.allBuffers = allBuffers; + + doWrite(stream, state, true, state.length, buffer, '', holder.finish); + + // doWrite is almost always async, defer these to save a bit of time + // as the hot path ends with doWrite + state.pendingcb++; + state.lastBufferedRequest = null; + if (holder.next) { + state.corkedRequestsFree = holder.next; + holder.next = null; + } else { + state.corkedRequestsFree = new CorkedRequest(state); + } + state.bufferedRequestCount = 0; + } else { + // Slow case, write chunks one-by-one + while (entry) { + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + + doWrite(stream, state, false, len, chunk, encoding, cb); + entry = entry.next; + state.bufferedRequestCount--; + // if we didn't call the onwrite immediately, then + // it means that we need to wait until it does. + // also, that means that the chunk and cb are currently + // being processed, so move the buffer counter past them. + if (state.writing) { + break; + } + } + + if (entry === null) state.lastBufferedRequest = null; + } + + state.bufferedRequest = entry; + state.bufferProcessing = false; +} + +Writable.prototype._write = function (chunk, encoding, cb) { + cb(new Error('_write() is not implemented')); +}; + +Writable.prototype._writev = null; + +Writable.prototype.end = function (chunk, encoding, cb) { + var state = this._writableState; + + if (typeof chunk === 'function') { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); + + // .end() fully uncorks + if (state.corked) { + state.corked = 1; + this.uncork(); + } + + // ignore unnecessary end() calls. + if (!state.ending && !state.finished) endWritable(this, state, cb); +}; + +function needFinish(state) { + return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; +} +function callFinal(stream, state) { + stream._final(function (err) { + state.pendingcb--; + if (err) { + stream.emit('error', err); + } + state.prefinished = true; + stream.emit('prefinish'); + finishMaybe(stream, state); + }); +} +function prefinish(stream, state) { + if (!state.prefinished && !state.finalCalled) { + if (typeof stream._final === 'function') { + state.pendingcb++; + state.finalCalled = true; + pna.nextTick(callFinal, stream, state); + } else { + state.prefinished = true; + stream.emit('prefinish'); + } + } +} + +function finishMaybe(stream, state) { + var need = needFinish(state); + if (need) { + prefinish(stream, state); + if (state.pendingcb === 0) { + state.finished = true; + stream.emit('finish'); + } + } + return need; +} + +function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) pna.nextTick(cb);else stream.once('finish', cb); + } + state.ended = true; + stream.writable = false; +} + +function onCorkedFinish(corkReq, state, err) { + var entry = corkReq.entry; + corkReq.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } + if (state.corkedRequestsFree) { + state.corkedRequestsFree.next = corkReq; + } else { + state.corkedRequestsFree = corkReq; + } +} + +Object.defineProperty(Writable.prototype, 'destroyed', { + get: function () { + if (this._writableState === undefined) { + return false; + } + return this._writableState.destroyed; + }, + set: function (value) { + // we ignore the value if the stream + // has not been initialized yet + if (!this._writableState) { + return; + } + + // backward compatibility, the user is explicitly + // managing destroyed + this._writableState.destroyed = value; + } +}); + +Writable.prototype.destroy = destroyImpl.destroy; +Writable.prototype._undestroy = destroyImpl.undestroy; +Writable.prototype._destroy = function (err, cb) { + this.end(); + cb(err); +}; \ No newline at end of file diff --git a/code/application_liste/app/node_modules/bl/node_modules/readable-stream/lib/internal/streams/BufferList.js b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/lib/internal/streams/BufferList.js new file mode 100644 index 0000000..aefc68b --- /dev/null +++ b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/lib/internal/streams/BufferList.js @@ -0,0 +1,79 @@ +'use strict'; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var Buffer = require('safe-buffer').Buffer; +var util = require('util'); + +function copyBuffer(src, target, offset) { + src.copy(target, offset); +} + +module.exports = function () { + function BufferList() { + _classCallCheck(this, BufferList); + + this.head = null; + this.tail = null; + this.length = 0; + } + + BufferList.prototype.push = function push(v) { + var entry = { data: v, next: null }; + if (this.length > 0) this.tail.next = entry;else this.head = entry; + this.tail = entry; + ++this.length; + }; + + BufferList.prototype.unshift = function unshift(v) { + var entry = { data: v, next: this.head }; + if (this.length === 0) this.tail = entry; + this.head = entry; + ++this.length; + }; + + BufferList.prototype.shift = function shift() { + if (this.length === 0) return; + var ret = this.head.data; + if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; + --this.length; + return ret; + }; + + BufferList.prototype.clear = function clear() { + this.head = this.tail = null; + this.length = 0; + }; + + BufferList.prototype.join = function join(s) { + if (this.length === 0) return ''; + var p = this.head; + var ret = '' + p.data; + while (p = p.next) { + ret += s + p.data; + }return ret; + }; + + BufferList.prototype.concat = function concat(n) { + if (this.length === 0) return Buffer.alloc(0); + if (this.length === 1) return this.head.data; + var ret = Buffer.allocUnsafe(n >>> 0); + var p = this.head; + var i = 0; + while (p) { + copyBuffer(p.data, ret, i); + i += p.data.length; + p = p.next; + } + return ret; + }; + + return BufferList; +}(); + +if (util && util.inspect && util.inspect.custom) { + module.exports.prototype[util.inspect.custom] = function () { + var obj = util.inspect({ length: this.length }); + return this.constructor.name + ' ' + obj; + }; +} \ No newline at end of file diff --git a/code/application_liste/app/node_modules/bl/node_modules/readable-stream/lib/internal/streams/destroy.js b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/lib/internal/streams/destroy.js new file mode 100644 index 0000000..5a0a0d8 --- /dev/null +++ b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/lib/internal/streams/destroy.js @@ -0,0 +1,74 @@ +'use strict'; + +/**/ + +var pna = require('process-nextick-args'); +/**/ + +// undocumented cb() API, needed for core, not for public API +function destroy(err, cb) { + var _this = this; + + var readableDestroyed = this._readableState && this._readableState.destroyed; + var writableDestroyed = this._writableState && this._writableState.destroyed; + + if (readableDestroyed || writableDestroyed) { + if (cb) { + cb(err); + } else if (err && (!this._writableState || !this._writableState.errorEmitted)) { + pna.nextTick(emitErrorNT, this, err); + } + return this; + } + + // we set destroyed to true before firing error callbacks in order + // to make it re-entrance safe in case destroy() is called within callbacks + + if (this._readableState) { + this._readableState.destroyed = true; + } + + // if this is a duplex stream mark the writable part as destroyed as well + if (this._writableState) { + this._writableState.destroyed = true; + } + + this._destroy(err || null, function (err) { + if (!cb && err) { + pna.nextTick(emitErrorNT, _this, err); + if (_this._writableState) { + _this._writableState.errorEmitted = true; + } + } else if (cb) { + cb(err); + } + }); + + return this; +} + +function undestroy() { + if (this._readableState) { + this._readableState.destroyed = false; + this._readableState.reading = false; + this._readableState.ended = false; + this._readableState.endEmitted = false; + } + + if (this._writableState) { + this._writableState.destroyed = false; + this._writableState.ended = false; + this._writableState.ending = false; + this._writableState.finished = false; + this._writableState.errorEmitted = false; + } +} + +function emitErrorNT(self, err) { + self.emit('error', err); +} + +module.exports = { + destroy: destroy, + undestroy: undestroy +}; \ No newline at end of file diff --git a/code/application_liste/app/node_modules/bl/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/lib/internal/streams/stream-browser.js new file mode 100644 index 0000000..9332a3f --- /dev/null +++ b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/lib/internal/streams/stream-browser.js @@ -0,0 +1 @@ +module.exports = require('events').EventEmitter; diff --git a/code/application_liste/app/node_modules/bl/node_modules/readable-stream/lib/internal/streams/stream.js b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/lib/internal/streams/stream.js new file mode 100644 index 0000000..ce2ad5b --- /dev/null +++ b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/lib/internal/streams/stream.js @@ -0,0 +1 @@ +module.exports = require('stream'); diff --git a/code/application_liste/app/node_modules/bl/node_modules/readable-stream/package.json b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/package.json new file mode 100644 index 0000000..f124305 --- /dev/null +++ b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/package.json @@ -0,0 +1,81 @@ +{ + "_from": "readable-stream@^2.3.5", + "_id": "readable-stream@2.3.7", + "_inBundle": false, + "_integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "_location": "/bl/readable-stream", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "readable-stream@^2.3.5", + "name": "readable-stream", + "escapedName": "readable-stream", + "rawSpec": "^2.3.5", + "saveSpec": null, + "fetchSpec": "^2.3.5" + }, + "_requiredBy": [ + "/bl" + ], + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "_shasum": "1eca1cf711aef814c04f62252a36a62f6cb23b57", + "_spec": "readable-stream@^2.3.5", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\bl", + "browser": { + "util": false, + "./readable.js": "./readable-browser.js", + "./writable.js": "./writable-browser.js", + "./duplex.js": "./duplex-browser.js", + "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js" + }, + "bugs": { + "url": "https://github.com/nodejs/readable-stream/issues" + }, + "bundleDependencies": false, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "deprecated": false, + "description": "Streams3, a user-land copy of the stream library from Node.js", + "devDependencies": { + "assert": "^1.4.0", + "babel-polyfill": "^6.9.1", + "buffer": "^4.9.0", + "lolex": "^2.3.2", + "nyc": "^6.4.0", + "tap": "^0.7.0", + "tape": "^4.8.0" + }, + "homepage": "https://github.com/nodejs/readable-stream#readme", + "keywords": [ + "readable", + "stream", + "pipe" + ], + "license": "MIT", + "main": "readable.js", + "name": "readable-stream", + "nyc": { + "include": [ + "lib/**.js" + ] + }, + "repository": { + "type": "git", + "url": "git://github.com/nodejs/readable-stream.git" + }, + "scripts": { + "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", + "cover": "nyc npm test", + "report": "nyc report --reporter=lcov", + "test": "tap test/parallel/*.js test/ours/*.js && node test/verify-dependencies.js" + }, + "version": "2.3.7" +} diff --git a/code/application_liste/app/node_modules/bl/node_modules/readable-stream/passthrough.js b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/passthrough.js new file mode 100644 index 0000000..ffd791d --- /dev/null +++ b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/passthrough.js @@ -0,0 +1 @@ +module.exports = require('./readable').PassThrough diff --git a/code/application_liste/app/node_modules/bl/node_modules/readable-stream/readable-browser.js b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/readable-browser.js new file mode 100644 index 0000000..e503725 --- /dev/null +++ b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/readable-browser.js @@ -0,0 +1,7 @@ +exports = module.exports = require('./lib/_stream_readable.js'); +exports.Stream = exports; +exports.Readable = exports; +exports.Writable = require('./lib/_stream_writable.js'); +exports.Duplex = require('./lib/_stream_duplex.js'); +exports.Transform = require('./lib/_stream_transform.js'); +exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/code/application_liste/app/node_modules/bl/node_modules/readable-stream/readable.js b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/readable.js new file mode 100644 index 0000000..ec89ec5 --- /dev/null +++ b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/readable.js @@ -0,0 +1,19 @@ +var Stream = require('stream'); +if (process.env.READABLE_STREAM === 'disable' && Stream) { + module.exports = Stream; + exports = module.exports = Stream.Readable; + exports.Readable = Stream.Readable; + exports.Writable = Stream.Writable; + exports.Duplex = Stream.Duplex; + exports.Transform = Stream.Transform; + exports.PassThrough = Stream.PassThrough; + exports.Stream = Stream; +} else { + exports = module.exports = require('./lib/_stream_readable.js'); + exports.Stream = Stream || exports; + exports.Readable = exports; + exports.Writable = require('./lib/_stream_writable.js'); + exports.Duplex = require('./lib/_stream_duplex.js'); + exports.Transform = require('./lib/_stream_transform.js'); + exports.PassThrough = require('./lib/_stream_passthrough.js'); +} diff --git a/code/application_liste/app/node_modules/bl/node_modules/readable-stream/transform.js b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/transform.js new file mode 100644 index 0000000..b1baba2 --- /dev/null +++ b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/transform.js @@ -0,0 +1 @@ +module.exports = require('./readable').Transform diff --git a/code/application_liste/app/node_modules/bl/node_modules/readable-stream/writable-browser.js b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/writable-browser.js new file mode 100644 index 0000000..ebdde6a --- /dev/null +++ b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/writable-browser.js @@ -0,0 +1 @@ +module.exports = require('./lib/_stream_writable.js'); diff --git a/code/application_liste/app/node_modules/bl/node_modules/readable-stream/writable.js b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/writable.js new file mode 100644 index 0000000..3211a6f --- /dev/null +++ b/code/application_liste/app/node_modules/bl/node_modules/readable-stream/writable.js @@ -0,0 +1,8 @@ +var Stream = require("stream") +var Writable = require("./lib/_stream_writable.js") + +if (process.env.READABLE_STREAM === 'disable') { + module.exports = Stream && Stream.Writable || Writable +} else { + module.exports = Writable +} diff --git a/code/application_liste/app/node_modules/bl/node_modules/string_decoder/.travis.yml b/code/application_liste/app/node_modules/bl/node_modules/string_decoder/.travis.yml new file mode 100644 index 0000000..3347a72 --- /dev/null +++ b/code/application_liste/app/node_modules/bl/node_modules/string_decoder/.travis.yml @@ -0,0 +1,50 @@ +sudo: false +language: node_js +before_install: + - npm install -g npm@2 + - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g +notifications: + email: false +matrix: + fast_finish: true + include: + - node_js: '0.8' + env: + - TASK=test + - NPM_LEGACY=true + - node_js: '0.10' + env: + - TASK=test + - NPM_LEGACY=true + - node_js: '0.11' + env: + - TASK=test + - NPM_LEGACY=true + - node_js: '0.12' + env: + - TASK=test + - NPM_LEGACY=true + - node_js: 1 + env: + - TASK=test + - NPM_LEGACY=true + - node_js: 2 + env: + - TASK=test + - NPM_LEGACY=true + - node_js: 3 + env: + - TASK=test + - NPM_LEGACY=true + - node_js: 4 + env: TASK=test + - node_js: 5 + env: TASK=test + - node_js: 6 + env: TASK=test + - node_js: 7 + env: TASK=test + - node_js: 8 + env: TASK=test + - node_js: 9 + env: TASK=test diff --git a/code/application_liste/app/node_modules/bl/node_modules/string_decoder/LICENSE b/code/application_liste/app/node_modules/bl/node_modules/string_decoder/LICENSE new file mode 100644 index 0000000..778edb2 --- /dev/null +++ b/code/application_liste/app/node_modules/bl/node_modules/string_decoder/LICENSE @@ -0,0 +1,48 @@ +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + diff --git a/code/application_liste/app/node_modules/bl/node_modules/string_decoder/README.md b/code/application_liste/app/node_modules/bl/node_modules/string_decoder/README.md new file mode 100644 index 0000000..5fd5831 --- /dev/null +++ b/code/application_liste/app/node_modules/bl/node_modules/string_decoder/README.md @@ -0,0 +1,47 @@ +# string_decoder + +***Node-core v8.9.4 string_decoder for userland*** + + +[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/) +[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/) + + +```bash +npm install --save string_decoder +``` + +***Node-core string_decoder for userland*** + +This package is a mirror of the string_decoder implementation in Node-core. + +Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v8.9.4/docs/api/). + +As of version 1.0.0 **string_decoder** uses semantic versioning. + +## Previous versions + +Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. + +## Update + +The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version. + +## Streams Working Group + +`string_decoder` is maintained by the Streams Working Group, which +oversees the development and maintenance of the Streams API within +Node.js. The responsibilities of the Streams Working Group include: + +* Addressing stream issues on the Node.js issue tracker. +* Authoring and editing stream documentation within the Node.js project. +* Reviewing changes to stream subclasses within the Node.js project. +* Redirecting changes to streams from the Node.js project to this + project. +* Assisting in the implementation of stream providers within Node.js. +* Recommending versions of `readable-stream` to be included in Node.js. +* Messaging about the future of streams to give the community advance + notice of changes. + +See [readable-stream](https://github.com/nodejs/readable-stream) for +more details. diff --git a/code/application_liste/app/node_modules/bl/node_modules/string_decoder/lib/string_decoder.js b/code/application_liste/app/node_modules/bl/node_modules/string_decoder/lib/string_decoder.js new file mode 100644 index 0000000..2e89e63 --- /dev/null +++ b/code/application_liste/app/node_modules/bl/node_modules/string_decoder/lib/string_decoder.js @@ -0,0 +1,296 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +/**/ + +var Buffer = require('safe-buffer').Buffer; +/**/ + +var isEncoding = Buffer.isEncoding || function (encoding) { + encoding = '' + encoding; + switch (encoding && encoding.toLowerCase()) { + case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': + return true; + default: + return false; + } +}; + +function _normalizeEncoding(enc) { + if (!enc) return 'utf8'; + var retried; + while (true) { + switch (enc) { + case 'utf8': + case 'utf-8': + return 'utf8'; + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return 'utf16le'; + case 'latin1': + case 'binary': + return 'latin1'; + case 'base64': + case 'ascii': + case 'hex': + return enc; + default: + if (retried) return; // undefined + enc = ('' + enc).toLowerCase(); + retried = true; + } + } +}; + +// Do not cache `Buffer.isEncoding` when checking encoding names as some +// modules monkey-patch it to support additional encodings +function normalizeEncoding(enc) { + var nenc = _normalizeEncoding(enc); + if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); + return nenc || enc; +} + +// StringDecoder provides an interface for efficiently splitting a series of +// buffers into a series of JS strings without breaking apart multi-byte +// characters. +exports.StringDecoder = StringDecoder; +function StringDecoder(encoding) { + this.encoding = normalizeEncoding(encoding); + var nb; + switch (this.encoding) { + case 'utf16le': + this.text = utf16Text; + this.end = utf16End; + nb = 4; + break; + case 'utf8': + this.fillLast = utf8FillLast; + nb = 4; + break; + case 'base64': + this.text = base64Text; + this.end = base64End; + nb = 3; + break; + default: + this.write = simpleWrite; + this.end = simpleEnd; + return; + } + this.lastNeed = 0; + this.lastTotal = 0; + this.lastChar = Buffer.allocUnsafe(nb); +} + +StringDecoder.prototype.write = function (buf) { + if (buf.length === 0) return ''; + var r; + var i; + if (this.lastNeed) { + r = this.fillLast(buf); + if (r === undefined) return ''; + i = this.lastNeed; + this.lastNeed = 0; + } else { + i = 0; + } + if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); + return r || ''; +}; + +StringDecoder.prototype.end = utf8End; + +// Returns only complete characters in a Buffer +StringDecoder.prototype.text = utf8Text; + +// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer +StringDecoder.prototype.fillLast = function (buf) { + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); + this.lastNeed -= buf.length; +}; + +// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a +// continuation byte. If an invalid byte is detected, -2 is returned. +function utf8CheckByte(byte) { + if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; + return byte >> 6 === 0x02 ? -1 : -2; +} + +// Checks at most 3 bytes at the end of a Buffer in order to detect an +// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) +// needed to complete the UTF-8 character (if applicable) are returned. +function utf8CheckIncomplete(self, buf, i) { + var j = buf.length - 1; + if (j < i) return 0; + var nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self.lastNeed = nb - 1; + return nb; + } + if (--j < i || nb === -2) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self.lastNeed = nb - 2; + return nb; + } + if (--j < i || nb === -2) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) { + if (nb === 2) nb = 0;else self.lastNeed = nb - 3; + } + return nb; + } + return 0; +} + +// Validates as many continuation bytes for a multi-byte UTF-8 character as +// needed or are available. If we see a non-continuation byte where we expect +// one, we "replace" the validated continuation bytes we've seen so far with +// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding +// behavior. The continuation byte check is included three times in the case +// where all of the continuation bytes for a character exist in the same buffer. +// It is also done this way as a slight performance increase instead of using a +// loop. +function utf8CheckExtraBytes(self, buf, p) { + if ((buf[0] & 0xC0) !== 0x80) { + self.lastNeed = 0; + return '\ufffd'; + } + if (self.lastNeed > 1 && buf.length > 1) { + if ((buf[1] & 0xC0) !== 0x80) { + self.lastNeed = 1; + return '\ufffd'; + } + if (self.lastNeed > 2 && buf.length > 2) { + if ((buf[2] & 0xC0) !== 0x80) { + self.lastNeed = 2; + return '\ufffd'; + } + } + } +} + +// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. +function utf8FillLast(buf) { + var p = this.lastTotal - this.lastNeed; + var r = utf8CheckExtraBytes(this, buf, p); + if (r !== undefined) return r; + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, p, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, p, 0, buf.length); + this.lastNeed -= buf.length; +} + +// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a +// partial character, the character's bytes are buffered until the required +// number of bytes are available. +function utf8Text(buf, i) { + var total = utf8CheckIncomplete(this, buf, i); + if (!this.lastNeed) return buf.toString('utf8', i); + this.lastTotal = total; + var end = buf.length - (total - this.lastNeed); + buf.copy(this.lastChar, 0, end); + return buf.toString('utf8', i, end); +} + +// For UTF-8, a replacement character is added when ending on a partial +// character. +function utf8End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) return r + '\ufffd'; + return r; +} + +// UTF-16LE typically needs two bytes per character, but even if we have an even +// number of bytes available, we need to check if we end on a leading/high +// surrogate. In that case, we need to wait for the next two bytes in order to +// decode the last character properly. +function utf16Text(buf, i) { + if ((buf.length - i) % 2 === 0) { + var r = buf.toString('utf16le', i); + if (r) { + var c = r.charCodeAt(r.length - 1); + if (c >= 0xD800 && c <= 0xDBFF) { + this.lastNeed = 2; + this.lastTotal = 4; + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + return r.slice(0, -1); + } + } + return r; + } + this.lastNeed = 1; + this.lastTotal = 2; + this.lastChar[0] = buf[buf.length - 1]; + return buf.toString('utf16le', i, buf.length - 1); +} + +// For UTF-16LE we do not explicitly append special replacement characters if we +// end on a partial character, we simply let v8 handle that. +function utf16End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) { + var end = this.lastTotal - this.lastNeed; + return r + this.lastChar.toString('utf16le', 0, end); + } + return r; +} + +function base64Text(buf, i) { + var n = (buf.length - i) % 3; + if (n === 0) return buf.toString('base64', i); + this.lastNeed = 3 - n; + this.lastTotal = 3; + if (n === 1) { + this.lastChar[0] = buf[buf.length - 1]; + } else { + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + } + return buf.toString('base64', i, buf.length - n); +} + +function base64End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); + return r; +} + +// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) +function simpleWrite(buf) { + return buf.toString(this.encoding); +} + +function simpleEnd(buf) { + return buf && buf.length ? this.write(buf) : ''; +} \ No newline at end of file diff --git a/code/application_liste/app/node_modules/bl/node_modules/string_decoder/package.json b/code/application_liste/app/node_modules/bl/node_modules/string_decoder/package.json new file mode 100644 index 0000000..1392c3f --- /dev/null +++ b/code/application_liste/app/node_modules/bl/node_modules/string_decoder/package.json @@ -0,0 +1,59 @@ +{ + "_from": "string_decoder@~1.1.1", + "_id": "string_decoder@1.1.1", + "_inBundle": false, + "_integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "_location": "/bl/string_decoder", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "string_decoder@~1.1.1", + "name": "string_decoder", + "escapedName": "string_decoder", + "rawSpec": "~1.1.1", + "saveSpec": null, + "fetchSpec": "~1.1.1" + }, + "_requiredBy": [ + "/bl/readable-stream" + ], + "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "_shasum": "9cf1611ba62685d7030ae9e4ba34149c3af03fc8", + "_spec": "string_decoder@~1.1.1", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\bl\\node_modules\\readable-stream", + "bugs": { + "url": "https://github.com/nodejs/string_decoder/issues" + }, + "bundleDependencies": false, + "dependencies": { + "safe-buffer": "~5.1.0" + }, + "deprecated": false, + "description": "The string_decoder module from Node core", + "devDependencies": { + "babel-polyfill": "^6.23.0", + "core-util-is": "^1.0.2", + "inherits": "^2.0.3", + "tap": "~0.4.8" + }, + "homepage": "https://github.com/nodejs/string_decoder", + "keywords": [ + "string", + "decoder", + "browser", + "browserify" + ], + "license": "MIT", + "main": "lib/string_decoder.js", + "name": "string_decoder", + "repository": { + "type": "git", + "url": "git://github.com/nodejs/string_decoder.git" + }, + "scripts": { + "ci": "tap test/parallel/*.js test/ours/*.js --tap | tee test.tap && node test/verify-dependencies.js", + "test": "tap test/parallel/*.js && node test/verify-dependencies" + }, + "version": "1.1.1" +} diff --git a/code/application_liste/app/node_modules/bl/package.json b/code/application_liste/app/node_modules/bl/package.json new file mode 100644 index 0000000..a69b496 --- /dev/null +++ b/code/application_liste/app/node_modules/bl/package.json @@ -0,0 +1,63 @@ +{ + "_from": "bl@^1.0.0", + "_id": "bl@1.2.2", + "_inBundle": false, + "_integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", + "_location": "/bl", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "bl@^1.0.0", + "name": "bl", + "escapedName": "bl", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/tar-stream" + ], + "_resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", + "_shasum": "a160911717103c07410cef63ef51b397c025af9c", + "_spec": "bl@^1.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\tar-stream", + "authors": [ + "Rod Vagg (https://github.com/rvagg)", + "Matteo Collina (https://github.com/mcollina)", + "Jarett Cruger (https://github.com/jcrugzz)" + ], + "bugs": { + "url": "https://github.com/rvagg/bl/issues" + }, + "bundleDependencies": false, + "dependencies": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + }, + "deprecated": false, + "description": "Buffer List: collect buffers and access with a standard readable Buffer interface, streamable too!", + "devDependencies": { + "faucet": "0.0.1", + "hash_file": "~0.1.1", + "tape": "~4.9.0" + }, + "homepage": "https://github.com/rvagg/bl", + "keywords": [ + "buffer", + "buffers", + "stream", + "awesomesauce" + ], + "license": "MIT", + "main": "bl.js", + "name": "bl", + "repository": { + "type": "git", + "url": "git+https://github.com/rvagg/bl.git" + }, + "scripts": { + "test": "node test/test.js | faucet" + }, + "version": "1.2.2" +} diff --git a/code/application_liste/app/node_modules/bl/test/test.js b/code/application_liste/app/node_modules/bl/test/test.js new file mode 100644 index 0000000..e121487 --- /dev/null +++ b/code/application_liste/app/node_modules/bl/test/test.js @@ -0,0 +1,702 @@ +var tape = require('tape') + , crypto = require('crypto') + , fs = require('fs') + , hash = require('hash_file') + , BufferList = require('../') + , Buffer = require('safe-buffer').Buffer + + , encodings = + ('hex utf8 utf-8 ascii binary base64' + + (process.browser ? '' : ' ucs2 ucs-2 utf16le utf-16le')).split(' ') + +tape('single bytes from single buffer', function (t) { + var bl = new BufferList() + bl.append(Buffer.from('abcd')) + + t.equal(bl.length, 4) + + t.equal(bl.get(0), 97) + t.equal(bl.get(1), 98) + t.equal(bl.get(2), 99) + t.equal(bl.get(3), 100) + + t.end() +}) + +tape('single bytes from multiple buffers', function (t) { + var bl = new BufferList() + bl.append(Buffer.from('abcd')) + bl.append(Buffer.from('efg')) + bl.append(Buffer.from('hi')) + bl.append(Buffer.from('j')) + + t.equal(bl.length, 10) + + t.equal(bl.get(0), 97) + t.equal(bl.get(1), 98) + t.equal(bl.get(2), 99) + t.equal(bl.get(3), 100) + t.equal(bl.get(4), 101) + t.equal(bl.get(5), 102) + t.equal(bl.get(6), 103) + t.equal(bl.get(7), 104) + t.equal(bl.get(8), 105) + t.equal(bl.get(9), 106) + t.end() +}) + +tape('multi bytes from single buffer', function (t) { + var bl = new BufferList() + bl.append(Buffer.from('abcd')) + + t.equal(bl.length, 4) + + t.equal(bl.slice(0, 4).toString('ascii'), 'abcd') + t.equal(bl.slice(0, 3).toString('ascii'), 'abc') + t.equal(bl.slice(1, 4).toString('ascii'), 'bcd') + t.equal(bl.slice(-4, -1).toString('ascii'), 'abc') + + t.end() +}) + +tape('multi bytes from single buffer (negative indexes)', function (t) { + var bl = new BufferList() + bl.append(Buffer.from('buffer')) + + t.equal(bl.length, 6) + + t.equal(bl.slice(-6, -1).toString('ascii'), 'buffe') + t.equal(bl.slice(-6, -2).toString('ascii'), 'buff') + t.equal(bl.slice(-5, -2).toString('ascii'), 'uff') + + t.end() +}) + +tape('multiple bytes from multiple buffers', function (t) { + var bl = new BufferList() + + bl.append(Buffer.from('abcd')) + bl.append(Buffer.from('efg')) + bl.append(Buffer.from('hi')) + bl.append(Buffer.from('j')) + + t.equal(bl.length, 10) + + t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij') + t.equal(bl.slice(3, 10).toString('ascii'), 'defghij') + t.equal(bl.slice(3, 6).toString('ascii'), 'def') + t.equal(bl.slice(3, 8).toString('ascii'), 'defgh') + t.equal(bl.slice(5, 10).toString('ascii'), 'fghij') + t.equal(bl.slice(-7, -4).toString('ascii'), 'def') + + t.end() +}) + +tape('multiple bytes from multiple buffer lists', function (t) { + var bl = new BufferList() + + bl.append(new BufferList([ Buffer.from('abcd'), Buffer.from('efg') ])) + bl.append(new BufferList([ Buffer.from('hi'), Buffer.from('j') ])) + + t.equal(bl.length, 10) + + t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij') + + t.equal(bl.slice(3, 10).toString('ascii'), 'defghij') + t.equal(bl.slice(3, 6).toString('ascii'), 'def') + t.equal(bl.slice(3, 8).toString('ascii'), 'defgh') + t.equal(bl.slice(5, 10).toString('ascii'), 'fghij') + + t.end() +}) + +// same data as previous test, just using nested constructors +tape('multiple bytes from crazy nested buffer lists', function (t) { + var bl = new BufferList() + + bl.append(new BufferList([ + new BufferList([ + new BufferList(Buffer.from('abc')) + , Buffer.from('d') + , new BufferList(Buffer.from('efg')) + ]) + , new BufferList([ Buffer.from('hi') ]) + , new BufferList(Buffer.from('j')) + ])) + + t.equal(bl.length, 10) + + t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij') + + t.equal(bl.slice(3, 10).toString('ascii'), 'defghij') + t.equal(bl.slice(3, 6).toString('ascii'), 'def') + t.equal(bl.slice(3, 8).toString('ascii'), 'defgh') + t.equal(bl.slice(5, 10).toString('ascii'), 'fghij') + + t.end() +}) + +tape('append accepts arrays of Buffers', function (t) { + var bl = new BufferList() + bl.append(Buffer.from('abc')) + bl.append([ Buffer.from('def') ]) + bl.append([ Buffer.from('ghi'), Buffer.from('jkl') ]) + bl.append([ Buffer.from('mnop'), Buffer.from('qrstu'), Buffer.from('vwxyz') ]) + t.equal(bl.length, 26) + t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz') + t.end() +}) + +tape('append accepts arrays of BufferLists', function (t) { + var bl = new BufferList() + bl.append(Buffer.from('abc')) + bl.append([ new BufferList('def') ]) + bl.append(new BufferList([ Buffer.from('ghi'), new BufferList('jkl') ])) + bl.append([ Buffer.from('mnop'), new BufferList([ Buffer.from('qrstu'), Buffer.from('vwxyz') ]) ]) + t.equal(bl.length, 26) + t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz') + t.end() +}) + +tape('append chainable', function (t) { + var bl = new BufferList() + t.ok(bl.append(Buffer.from('abcd')) === bl) + t.ok(bl.append([ Buffer.from('abcd') ]) === bl) + t.ok(bl.append(new BufferList(Buffer.from('abcd'))) === bl) + t.ok(bl.append([ new BufferList(Buffer.from('abcd')) ]) === bl) + t.end() +}) + +tape('append chainable (test results)', function (t) { + var bl = new BufferList('abc') + .append([ new BufferList('def') ]) + .append(new BufferList([ Buffer.from('ghi'), new BufferList('jkl') ])) + .append([ Buffer.from('mnop'), new BufferList([ Buffer.from('qrstu'), Buffer.from('vwxyz') ]) ]) + + t.equal(bl.length, 26) + t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz') + t.end() +}) + +tape('consuming from multiple buffers', function (t) { + var bl = new BufferList() + + bl.append(Buffer.from('abcd')) + bl.append(Buffer.from('efg')) + bl.append(Buffer.from('hi')) + bl.append(Buffer.from('j')) + + t.equal(bl.length, 10) + + t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij') + + bl.consume(3) + t.equal(bl.length, 7) + t.equal(bl.slice(0, 7).toString('ascii'), 'defghij') + + bl.consume(2) + t.equal(bl.length, 5) + t.equal(bl.slice(0, 5).toString('ascii'), 'fghij') + + bl.consume(1) + t.equal(bl.length, 4) + t.equal(bl.slice(0, 4).toString('ascii'), 'ghij') + + bl.consume(1) + t.equal(bl.length, 3) + t.equal(bl.slice(0, 3).toString('ascii'), 'hij') + + bl.consume(2) + t.equal(bl.length, 1) + t.equal(bl.slice(0, 1).toString('ascii'), 'j') + + t.end() +}) + +tape('complete consumption', function (t) { + var bl = new BufferList() + + bl.append(Buffer.from('a')) + bl.append(Buffer.from('b')) + + bl.consume(2) + + t.equal(bl.length, 0) + t.equal(bl._bufs.length, 0) + + t.end() +}) + +tape('test readUInt8 / readInt8', function (t) { + var buf1 = Buffer.alloc(1) + , buf2 = Buffer.alloc(3) + , buf3 = Buffer.alloc(3) + , bl = new BufferList() + + buf2[1] = 0x3 + buf2[2] = 0x4 + buf3[0] = 0x23 + buf3[1] = 0x42 + + bl.append(buf1) + bl.append(buf2) + bl.append(buf3) + + t.equal(bl.readUInt8(2), 0x3) + t.equal(bl.readInt8(2), 0x3) + t.equal(bl.readUInt8(3), 0x4) + t.equal(bl.readInt8(3), 0x4) + t.equal(bl.readUInt8(4), 0x23) + t.equal(bl.readInt8(4), 0x23) + t.equal(bl.readUInt8(5), 0x42) + t.equal(bl.readInt8(5), 0x42) + t.end() +}) + +tape('test readUInt16LE / readUInt16BE / readInt16LE / readInt16BE', function (t) { + var buf1 = Buffer.alloc(1) + , buf2 = Buffer.alloc(3) + , buf3 = Buffer.alloc(3) + , bl = new BufferList() + + buf2[1] = 0x3 + buf2[2] = 0x4 + buf3[0] = 0x23 + buf3[1] = 0x42 + + bl.append(buf1) + bl.append(buf2) + bl.append(buf3) + + t.equal(bl.readUInt16BE(2), 0x0304) + t.equal(bl.readUInt16LE(2), 0x0403) + t.equal(bl.readInt16BE(2), 0x0304) + t.equal(bl.readInt16LE(2), 0x0403) + t.equal(bl.readUInt16BE(3), 0x0423) + t.equal(bl.readUInt16LE(3), 0x2304) + t.equal(bl.readInt16BE(3), 0x0423) + t.equal(bl.readInt16LE(3), 0x2304) + t.equal(bl.readUInt16BE(4), 0x2342) + t.equal(bl.readUInt16LE(4), 0x4223) + t.equal(bl.readInt16BE(4), 0x2342) + t.equal(bl.readInt16LE(4), 0x4223) + t.end() +}) + +tape('test readUInt32LE / readUInt32BE / readInt32LE / readInt32BE', function (t) { + var buf1 = Buffer.alloc(1) + , buf2 = Buffer.alloc(3) + , buf3 = Buffer.alloc(3) + , bl = new BufferList() + + buf2[1] = 0x3 + buf2[2] = 0x4 + buf3[0] = 0x23 + buf3[1] = 0x42 + + bl.append(buf1) + bl.append(buf2) + bl.append(buf3) + + t.equal(bl.readUInt32BE(2), 0x03042342) + t.equal(bl.readUInt32LE(2), 0x42230403) + t.equal(bl.readInt32BE(2), 0x03042342) + t.equal(bl.readInt32LE(2), 0x42230403) + t.end() +}) + +tape('test readFloatLE / readFloatBE', function (t) { + var buf1 = Buffer.alloc(1) + , buf2 = Buffer.alloc(3) + , buf3 = Buffer.alloc(3) + , bl = new BufferList() + + buf2[1] = 0x00 + buf2[2] = 0x00 + buf3[0] = 0x80 + buf3[1] = 0x3f + + bl.append(buf1) + bl.append(buf2) + bl.append(buf3) + + t.equal(bl.readFloatLE(2), 0x01) + t.end() +}) + +tape('test readDoubleLE / readDoubleBE', function (t) { + var buf1 = Buffer.alloc(1) + , buf2 = Buffer.alloc(3) + , buf3 = Buffer.alloc(10) + , bl = new BufferList() + + buf2[1] = 0x55 + buf2[2] = 0x55 + buf3[0] = 0x55 + buf3[1] = 0x55 + buf3[2] = 0x55 + buf3[3] = 0x55 + buf3[4] = 0xd5 + buf3[5] = 0x3f + + bl.append(buf1) + bl.append(buf2) + bl.append(buf3) + + t.equal(bl.readDoubleLE(2), 0.3333333333333333) + t.end() +}) + +tape('test toString', function (t) { + var bl = new BufferList() + + bl.append(Buffer.from('abcd')) + bl.append(Buffer.from('efg')) + bl.append(Buffer.from('hi')) + bl.append(Buffer.from('j')) + + t.equal(bl.toString('ascii', 0, 10), 'abcdefghij') + t.equal(bl.toString('ascii', 3, 10), 'defghij') + t.equal(bl.toString('ascii', 3, 6), 'def') + t.equal(bl.toString('ascii', 3, 8), 'defgh') + t.equal(bl.toString('ascii', 5, 10), 'fghij') + + t.end() +}) + +tape('test toString encoding', function (t) { + var bl = new BufferList() + , b = Buffer.from('abcdefghij\xff\x00') + + bl.append(Buffer.from('abcd')) + bl.append(Buffer.from('efg')) + bl.append(Buffer.from('hi')) + bl.append(Buffer.from('j')) + bl.append(Buffer.from('\xff\x00')) + + encodings.forEach(function (enc) { + t.equal(bl.toString(enc), b.toString(enc), enc) + }) + + t.end() +}) + +!process.browser && tape('test stream', function (t) { + var random = crypto.randomBytes(65534) + , rndhash = hash(random, 'md5') + , md5sum = crypto.createHash('md5') + , bl = new BufferList(function (err, buf) { + t.ok(Buffer.isBuffer(buf)) + t.ok(err === null) + t.equal(rndhash, hash(bl.slice(), 'md5')) + t.equal(rndhash, hash(buf, 'md5')) + + bl.pipe(fs.createWriteStream('/tmp/bl_test_rnd_out.dat')) + .on('close', function () { + var s = fs.createReadStream('/tmp/bl_test_rnd_out.dat') + s.on('data', md5sum.update.bind(md5sum)) + s.on('end', function() { + t.equal(rndhash, md5sum.digest('hex'), 'woohoo! correct hash!') + t.end() + }) + }) + + }) + + fs.writeFileSync('/tmp/bl_test_rnd.dat', random) + fs.createReadStream('/tmp/bl_test_rnd.dat').pipe(bl) +}) + +tape('instantiation with Buffer', function (t) { + var buf = crypto.randomBytes(1024) + , buf2 = crypto.randomBytes(1024) + , b = BufferList(buf) + + t.equal(buf.toString('hex'), b.slice().toString('hex'), 'same buffer') + b = BufferList([ buf, buf2 ]) + t.equal(b.slice().toString('hex'), Buffer.concat([ buf, buf2 ]).toString('hex'), 'same buffer') + t.end() +}) + +tape('test String appendage', function (t) { + var bl = new BufferList() + , b = Buffer.from('abcdefghij\xff\x00') + + bl.append('abcd') + bl.append('efg') + bl.append('hi') + bl.append('j') + bl.append('\xff\x00') + + encodings.forEach(function (enc) { + t.equal(bl.toString(enc), b.toString(enc)) + }) + + t.end() +}) + +tape('test Number appendage', function (t) { + var bl = new BufferList() + , b = Buffer.from('1234567890') + + bl.append(1234) + bl.append(567) + bl.append(89) + bl.append(0) + + encodings.forEach(function (enc) { + t.equal(bl.toString(enc), b.toString(enc)) + }) + + t.end() +}) + +tape('write nothing, should get empty buffer', function (t) { + t.plan(3) + BufferList(function (err, data) { + t.notOk(err, 'no error') + t.ok(Buffer.isBuffer(data), 'got a buffer') + t.equal(0, data.length, 'got a zero-length buffer') + t.end() + }).end() +}) + +tape('unicode string', function (t) { + t.plan(2) + var inp1 = '\u2600' + , inp2 = '\u2603' + , exp = inp1 + ' and ' + inp2 + , bl = BufferList() + bl.write(inp1) + bl.write(' and ') + bl.write(inp2) + t.equal(exp, bl.toString()) + t.equal(Buffer.from(exp).toString('hex'), bl.toString('hex')) +}) + +tape('should emit finish', function (t) { + var source = BufferList() + , dest = BufferList() + + source.write('hello') + source.pipe(dest) + + dest.on('finish', function () { + t.equal(dest.toString('utf8'), 'hello') + t.end() + }) +}) + +tape('basic copy', function (t) { + var buf = crypto.randomBytes(1024) + , buf2 = Buffer.alloc(1024) + , b = BufferList(buf) + + b.copy(buf2) + t.equal(b.slice().toString('hex'), buf2.toString('hex'), 'same buffer') + t.end() +}) + +tape('copy after many appends', function (t) { + var buf = crypto.randomBytes(512) + , buf2 = Buffer.alloc(1024) + , b = BufferList(buf) + + b.append(buf) + b.copy(buf2) + t.equal(b.slice().toString('hex'), buf2.toString('hex'), 'same buffer') + t.end() +}) + +tape('copy at a precise position', function (t) { + var buf = crypto.randomBytes(1004) + , buf2 = Buffer.alloc(1024) + , b = BufferList(buf) + + b.copy(buf2, 20) + t.equal(b.slice().toString('hex'), buf2.slice(20).toString('hex'), 'same buffer') + t.end() +}) + +tape('copy starting from a precise location', function (t) { + var buf = crypto.randomBytes(10) + , buf2 = Buffer.alloc(5) + , b = BufferList(buf) + + b.copy(buf2, 0, 5) + t.equal(b.slice(5).toString('hex'), buf2.toString('hex'), 'same buffer') + t.end() +}) + +tape('copy in an interval', function (t) { + var rnd = crypto.randomBytes(10) + , b = BufferList(rnd) // put the random bytes there + , actual = Buffer.alloc(3) + , expected = Buffer.alloc(3) + + rnd.copy(expected, 0, 5, 8) + b.copy(actual, 0, 5, 8) + + t.equal(actual.toString('hex'), expected.toString('hex'), 'same buffer') + t.end() +}) + +tape('copy an interval between two buffers', function (t) { + var buf = crypto.randomBytes(10) + , buf2 = Buffer.alloc(10) + , b = BufferList(buf) + + b.append(buf) + b.copy(buf2, 0, 5, 15) + + t.equal(b.slice(5, 15).toString('hex'), buf2.toString('hex'), 'same buffer') + t.end() +}) + +tape('shallow slice across buffer boundaries', function (t) { + var bl = new BufferList(['First', 'Second', 'Third']) + + t.equal(bl.shallowSlice(3, 13).toString(), 'stSecondTh') + t.end() +}) + +tape('shallow slice within single buffer', function (t) { + t.plan(2) + var bl = new BufferList(['First', 'Second', 'Third']) + + t.equal(bl.shallowSlice(5, 10).toString(), 'Secon') + t.equal(bl.shallowSlice(7, 10).toString(), 'con') + t.end() +}) + +tape('shallow slice single buffer', function (t) { + t.plan(3) + var bl = new BufferList(['First', 'Second', 'Third']) + + t.equal(bl.shallowSlice(0, 5).toString(), 'First') + t.equal(bl.shallowSlice(5, 11).toString(), 'Second') + t.equal(bl.shallowSlice(11, 16).toString(), 'Third') +}) + +tape('shallow slice with negative or omitted indices', function (t) { + t.plan(4) + var bl = new BufferList(['First', 'Second', 'Third']) + + t.equal(bl.shallowSlice().toString(), 'FirstSecondThird') + t.equal(bl.shallowSlice(5).toString(), 'SecondThird') + t.equal(bl.shallowSlice(5, -3).toString(), 'SecondTh') + t.equal(bl.shallowSlice(-8).toString(), 'ondThird') +}) + +tape('shallow slice does not make a copy', function (t) { + t.plan(1) + var buffers = [Buffer.from('First'), Buffer.from('Second'), Buffer.from('Third')] + var bl = (new BufferList(buffers)).shallowSlice(5, -3) + + buffers[1].fill('h') + buffers[2].fill('h') + + t.equal(bl.toString(), 'hhhhhhhh') +}) + +tape('duplicate', function (t) { + t.plan(2) + + var bl = new BufferList('abcdefghij\xff\x00') + , dup = bl.duplicate() + + t.equal(bl.prototype, dup.prototype) + t.equal(bl.toString('hex'), dup.toString('hex')) +}) + +tape('destroy no pipe', function (t) { + t.plan(2) + + var bl = new BufferList('alsdkfja;lsdkfja;lsdk') + bl.destroy() + + t.equal(bl._bufs.length, 0) + t.equal(bl.length, 0) +}) + +!process.browser && tape('destroy with pipe before read end', function (t) { + t.plan(2) + + var bl = new BufferList() + fs.createReadStream(__dirname + '/test.js') + .pipe(bl) + + bl.destroy() + + t.equal(bl._bufs.length, 0) + t.equal(bl.length, 0) + +}) + +!process.browser && tape('destroy with pipe before read end with race', function (t) { + t.plan(2) + + var bl = new BufferList() + fs.createReadStream(__dirname + '/test.js') + .pipe(bl) + + setTimeout(function () { + bl.destroy() + setTimeout(function () { + t.equal(bl._bufs.length, 0) + t.equal(bl.length, 0) + }, 500) + }, 500) +}) + +!process.browser && tape('destroy with pipe after read end', function (t) { + t.plan(2) + + var bl = new BufferList() + fs.createReadStream(__dirname + '/test.js') + .on('end', onEnd) + .pipe(bl) + + function onEnd () { + bl.destroy() + + t.equal(bl._bufs.length, 0) + t.equal(bl.length, 0) + } +}) + +!process.browser && tape('destroy with pipe while writing to a destination', function (t) { + t.plan(4) + + var bl = new BufferList() + , ds = new BufferList() + + fs.createReadStream(__dirname + '/test.js') + .on('end', onEnd) + .pipe(bl) + + function onEnd () { + bl.pipe(ds) + + setTimeout(function () { + bl.destroy() + + t.equals(bl._bufs.length, 0) + t.equals(bl.length, 0) + + ds.destroy() + + t.equals(bl._bufs.length, 0) + t.equals(bl.length, 0) + + }, 100) + } +}) + +!process.browser && tape('handle error', function (t) { + t.plan(2) + fs.createReadStream('/does/not/exist').pipe(BufferList(function (err, data) { + t.ok(err instanceof Error, 'has error') + t.notOk(data, 'no data') + })) +}) diff --git a/code/application_liste/app/node_modules/boolbase/README.md b/code/application_liste/app/node_modules/boolbase/README.md new file mode 100644 index 0000000..85eefa5 --- /dev/null +++ b/code/application_liste/app/node_modules/boolbase/README.md @@ -0,0 +1,10 @@ +#boolbase +This very simple module provides two basic functions, one that always returns true (`trueFunc`) and one that always returns false (`falseFunc`). + +###WTF? + +By having only a single instance of these functions around, it's possible to do some nice optimizations. Eg. [`CSSselect`](https://github.com/fb55/CSSselect) uses these functions to determine whether a selector won't match any elements. If that's the case, the DOM doesn't even have to be touched. + +###And why is this a separate module? + +I'm trying to modularize `CSSselect` and most modules depend on these functions. IMHO, having a separate module is the easiest solution to this problem. \ No newline at end of file diff --git a/code/application_liste/app/node_modules/boolbase/index.js b/code/application_liste/app/node_modules/boolbase/index.js new file mode 100644 index 0000000..8799fd9 --- /dev/null +++ b/code/application_liste/app/node_modules/boolbase/index.js @@ -0,0 +1,8 @@ +module.exports = { + trueFunc: function trueFunc(){ + return true; + }, + falseFunc: function falseFunc(){ + return false; + } +}; \ No newline at end of file diff --git a/code/application_liste/app/node_modules/boolbase/package.json b/code/application_liste/app/node_modules/boolbase/package.json new file mode 100644 index 0000000..a804ded --- /dev/null +++ b/code/application_liste/app/node_modules/boolbase/package.json @@ -0,0 +1,52 @@ +{ + "_from": "boolbase@^1.0.0", + "_id": "boolbase@1.0.0", + "_inBundle": false, + "_integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "_location": "/boolbase", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "boolbase@^1.0.0", + "name": "boolbase", + "escapedName": "boolbase", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/css-select", + "/nth-check" + ], + "_resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "_shasum": "68dff5fbe60c51eb37725ea9e3ed310dcc1e776e", + "_spec": "boolbase@^1.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\css-select", + "author": { + "name": "Felix Boehm", + "email": "me@feedic.com" + }, + "bugs": { + "url": "https://github.com/fb55/boolbase/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "two functions: One that returns true, one that returns false", + "homepage": "https://github.com/fb55/boolbase", + "keywords": [ + "boolean", + "function" + ], + "license": "ISC", + "main": "index.js", + "name": "boolbase", + "repository": { + "type": "git", + "url": "git+https://github.com/fb55/boolbase.git" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "version": "1.0.0" +} diff --git a/code/application_liste/app/node_modules/brace-expansion/LICENSE b/code/application_liste/app/node_modules/brace-expansion/LICENSE new file mode 100644 index 0000000..de32266 --- /dev/null +++ b/code/application_liste/app/node_modules/brace-expansion/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/code/application_liste/app/node_modules/brace-expansion/README.md b/code/application_liste/app/node_modules/brace-expansion/README.md new file mode 100644 index 0000000..6b4e0e1 --- /dev/null +++ b/code/application_liste/app/node_modules/brace-expansion/README.md @@ -0,0 +1,129 @@ +# brace-expansion + +[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), +as known from sh/bash, in JavaScript. + +[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion) +[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion) +[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/) + +[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion) + +## Example + +```js +var expand = require('brace-expansion'); + +expand('file-{a,b,c}.jpg') +// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] + +expand('-v{,,}') +// => ['-v', '-v', '-v'] + +expand('file{0..2}.jpg') +// => ['file0.jpg', 'file1.jpg', 'file2.jpg'] + +expand('file-{a..c}.jpg') +// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] + +expand('file{2..0}.jpg') +// => ['file2.jpg', 'file1.jpg', 'file0.jpg'] + +expand('file{0..4..2}.jpg') +// => ['file0.jpg', 'file2.jpg', 'file4.jpg'] + +expand('file-{a..e..2}.jpg') +// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg'] + +expand('file{00..10..5}.jpg') +// => ['file00.jpg', 'file05.jpg', 'file10.jpg'] + +expand('{{A..C},{a..c}}') +// => ['A', 'B', 'C', 'a', 'b', 'c'] + +expand('ppp{,config,oe{,conf}}') +// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf'] +``` + +## API + +```js +var expand = require('brace-expansion'); +``` + +### var expanded = expand(str) + +Return an array of all possible and valid expansions of `str`. If none are +found, `[str]` is returned. + +Valid expansions are: + +```js +/^(.*,)+(.+)?$/ +// {a,b,...} +``` + +A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. + +```js +/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +// {x..y[..incr]} +``` + +A numeric sequence from `x` to `y` inclusive, with optional increment. +If `x` or `y` start with a leading `0`, all the numbers will be padded +to have equal length. Negative numbers and backwards iteration work too. + +```js +/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +// {x..y[..incr]} +``` + +An alphabetic sequence from `x` to `y` inclusive, with optional increment. +`x` and `y` must be exactly one character, and if given, `incr` must be a +number. + +For compatibility reasons, the string `${` is not eligible for brace expansion. + +## Installation + +With [npm](https://npmjs.org) do: + +```bash +npm install brace-expansion +``` + +## Contributors + +- [Julian Gruber](https://github.com/juliangruber) +- [Isaac Z. Schlueter](https://github.com/isaacs) + +## Sponsors + +This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)! + +Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)! + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/code/application_liste/app/node_modules/brace-expansion/index.js b/code/application_liste/app/node_modules/brace-expansion/index.js new file mode 100644 index 0000000..0478be8 --- /dev/null +++ b/code/application_liste/app/node_modules/brace-expansion/index.js @@ -0,0 +1,201 @@ +var concatMap = require('concat-map'); +var balanced = require('balanced-match'); + +module.exports = expandTop; + +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; + +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); +} + +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} + +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} + + +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; + + var parts = []; + var m = balanced('{', '}', str); + + if (!m) + return str.split(','); + + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); + } + + parts.push.apply(parts, p); + + return parts; +} + +function expandTop(str) { + if (!str) + return []; + + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } + + return expand(escapeBraces(str), true).map(unescapeBraces); +} + +function identity(e) { + return e; +} + +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} + +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} + +function expand(str, isTop) { + var expansions = []; + + var m = balanced('{', '}', str); + if (!m || /\$$/.test(m.pre)) return [str]; + + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length + ? expand(m.post, false) + : ['']; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; + + var N; + + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length) + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + + N = []; + + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { return expand(el, false) }); + } + + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + + return expansions; +} + diff --git a/code/application_liste/app/node_modules/brace-expansion/package.json b/code/application_liste/app/node_modules/brace-expansion/package.json new file mode 100644 index 0000000..ee0d1c2 --- /dev/null +++ b/code/application_liste/app/node_modules/brace-expansion/package.json @@ -0,0 +1,75 @@ +{ + "_from": "brace-expansion@^1.1.7", + "_id": "brace-expansion@1.1.11", + "_inBundle": false, + "_integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "_location": "/brace-expansion", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "brace-expansion@^1.1.7", + "name": "brace-expansion", + "escapedName": "brace-expansion", + "rawSpec": "^1.1.7", + "saveSpec": null, + "fetchSpec": "^1.1.7" + }, + "_requiredBy": [ + "/minimatch" + ], + "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "_shasum": "3c7fcbf529d87226f3d2f52b966ff5271eb441dd", + "_spec": "brace-expansion@^1.1.7", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\minimatch", + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "bugs": { + "url": "https://github.com/juliangruber/brace-expansion/issues" + }, + "bundleDependencies": false, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + }, + "deprecated": false, + "description": "Brace expansion as known from sh/bash", + "devDependencies": { + "matcha": "^0.7.0", + "tape": "^4.6.0" + }, + "homepage": "https://github.com/juliangruber/brace-expansion", + "keywords": [], + "license": "MIT", + "main": "index.js", + "name": "brace-expansion", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/brace-expansion.git" + }, + "scripts": { + "bench": "matcha test/perf/bench.js", + "gentest": "bash test/generate.sh", + "test": "tape test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "firefox/20..latest", + "firefox/nightly", + "chrome/25..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "version": "1.1.11" +} diff --git a/code/application_liste/app/node_modules/braces/LICENSE b/code/application_liste/app/node_modules/braces/LICENSE new file mode 100644 index 0000000..d32ab44 --- /dev/null +++ b/code/application_liste/app/node_modules/braces/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2018, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/braces/README.md b/code/application_liste/app/node_modules/braces/README.md new file mode 100644 index 0000000..f909bfb --- /dev/null +++ b/code/application_liste/app/node_modules/braces/README.md @@ -0,0 +1,640 @@ +# braces [![NPM version](https://img.shields.io/npm/v/braces.svg?style=flat)](https://www.npmjs.com/package/braces) [![NPM monthly downloads](https://img.shields.io/npm/dm/braces.svg?style=flat)](https://npmjs.org/package/braces) [![NPM total downloads](https://img.shields.io/npm/dt/braces.svg?style=flat)](https://npmjs.org/package/braces) [![Linux Build Status](https://img.shields.io/travis/micromatch/braces.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/braces) [![Windows Build Status](https://img.shields.io/appveyor/ci/micromatch/braces.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/micromatch/braces) + +> Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed. + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save braces +``` + +## Why use braces? + +Brace patterns are great for matching ranges. Users (and implementors) shouldn't have to think about whether or not they will break their application (or yours) from accidentally defining an aggressive brace pattern. _Braces is the only library that offers a [solution to this problem](#performance)_. + +* **Safe(r)**: Braces isn't vulnerable to DoS attacks like [brace-expansion](https://github.com/juliangruber/brace-expansion), [minimatch](https://github.com/isaacs/minimatch) and [multimatch](https://github.com/sindresorhus/multimatch) (a different bug than the [other regex DoS bug](https://medium.com/node-security/minimatch-redos-vulnerability-590da24e6d3c#.jew0b6mpc)). +* **Accurate**: complete support for the [Bash 4.3 Brace Expansion](www.gnu.org/software/bash/) specification (passes all of the Bash braces tests) +* **[fast and performant](#benchmarks)**: Starts fast, runs fast and [scales well](#performance) as patterns increase in complexity. +* **Organized code base**: with parser and compiler that are eas(y|ier) to maintain and update when edge cases crop up. +* **Well-tested**: thousands of test assertions. Passes 100% of the [minimatch](https://github.com/isaacs/minimatch) and [brace-expansion](https://github.com/juliangruber/brace-expansion) unit tests as well (as of the writing of this). + +## Usage + +The main export is a function that takes one or more brace `patterns` and `options`. + +```js +var braces = require('braces'); +braces(pattern[, options]); +``` + +By default, braces returns an optimized regex-source string. To get an array of brace patterns, use `brace.expand()`. + +The following section explains the difference in more detail. _(If you're curious about "why" braces does this by default, see [brace matching pitfalls](#brace-matching-pitfalls)_. + +### Optimized vs. expanded braces + +**Optimized** + +By default, patterns are optimized for regex and matching: + +```js +console.log(braces('a/{x,y,z}/b')); +//=> ['a/(x|y|z)/b'] +``` + +**Expanded** + +To expand patterns the same way as Bash or [minimatch](https://github.com/isaacs/minimatch), use the [.expand](#expand) method: + +```js +console.log(braces.expand('a/{x,y,z}/b')); +//=> ['a/x/b', 'a/y/b', 'a/z/b'] +``` + +Or use [options.expand](#optionsexpand): + +```js +console.log(braces('a/{x,y,z}/b', {expand: true})); +//=> ['a/x/b', 'a/y/b', 'a/z/b'] +``` + +## Features + +* [lists](#lists): Supports "lists": `a/{b,c}/d` => `['a/b/d', 'a/c/d']` +* [sequences](#sequences): Supports alphabetical or numerical "sequences" (ranges): `{1..3}` => `['1', '2', '3']` +* [steps](#steps): Supports "steps" or increments: `{2..10..2}` => `['2', '4', '6', '8', '10']` +* [escaping](#escaping) +* [options](#options) + +### Lists + +Uses [fill-range](https://github.com/jonschlinkert/fill-range) for expanding alphabetical or numeric lists: + +```js +console.log(braces('a/{foo,bar,baz}/*.js')); +//=> ['a/(foo|bar|baz)/*.js'] + +console.log(braces.expand('a/{foo,bar,baz}/*.js')); +//=> ['a/foo/*.js', 'a/bar/*.js', 'a/baz/*.js'] +``` + +### Sequences + +Uses [fill-range](https://github.com/jonschlinkert/fill-range) for expanding alphabetical or numeric ranges (bash "sequences"): + +```js +console.log(braces.expand('{1..3}')); // ['1', '2', '3'] +console.log(braces.expand('a{01..03}b')); // ['a01b', 'a02b', 'a03b'] +console.log(braces.expand('a{1..3}b')); // ['a1b', 'a2b', 'a3b'] +console.log(braces.expand('{a..c}')); // ['a', 'b', 'c'] +console.log(braces.expand('foo/{a..c}')); // ['foo/a', 'foo/b', 'foo/c'] + +// supports padded ranges +console.log(braces('a{01..03}b')); //=> [ 'a(0[1-3])b' ] +console.log(braces('a{001..300}b')); //=> [ 'a(0{2}[1-9]|0[1-9][0-9]|[12][0-9]{2}|300)b' ] +``` + +### Steps + +Steps, or increments, may be used with ranges: + +```js +console.log(braces.expand('{2..10..2}')); +//=> ['2', '4', '6', '8', '10'] + +console.log(braces('{2..10..2}')); +//=> ['(2|4|6|8|10)'] +``` + +When the [.optimize](#optimize) method is used, or [options.optimize](#optionsoptimize) is set to true, sequences are passed to [to-regex-range](https://github.com/jonschlinkert/to-regex-range) for expansion. + +### Nesting + +Brace patterns may be nested. The results of each expanded string are not sorted, and left to right order is preserved. + +**"Expanded" braces** + +```js +console.log(braces.expand('a{b,c,/{x,y}}/e')); +//=> ['ab/e', 'ac/e', 'a/x/e', 'a/y/e'] + +console.log(braces.expand('a/{x,{1..5},y}/c')); +//=> ['a/x/c', 'a/1/c', 'a/2/c', 'a/3/c', 'a/4/c', 'a/5/c', 'a/y/c'] +``` + +**"Optimized" braces** + +```js +console.log(braces('a{b,c,/{x,y}}/e')); +//=> ['a(b|c|/(x|y))/e'] + +console.log(braces('a/{x,{1..5},y}/c')); +//=> ['a/(x|([1-5])|y)/c'] +``` + +### Escaping + +**Escaping braces** + +A brace pattern will not be expanded or evaluted if _either the opening or closing brace is escaped_: + +```js +console.log(braces.expand('a\\{d,c,b}e')); +//=> ['a{d,c,b}e'] + +console.log(braces.expand('a{d,c,b\\}e')); +//=> ['a{d,c,b}e'] +``` + +**Escaping commas** + +Commas inside braces may also be escaped: + +```js +console.log(braces.expand('a{b\\,c}d')); +//=> ['a{b,c}d'] + +console.log(braces.expand('a{d\\,c,b}e')); +//=> ['ad,ce', 'abe'] +``` + +**Single items** + +Following bash conventions, a brace pattern is also not expanded when it contains a single character: + +```js +console.log(braces.expand('a{b}c')); +//=> ['a{b}c'] +``` + +## Options + +### options.maxLength + +**Type**: `Number` + +**Default**: `65,536` + +**Description**: Limit the length of the input string. Useful when the input string is generated or your application allows users to pass a string, et cetera. + +```js +console.log(braces('a/{b,c}/d', { maxLength: 3 })); //=> throws an error +``` + +### options.expand + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: Generate an "expanded" brace pattern (this option is unncessary with the `.expand` method, which does the same thing). + +```js +console.log(braces('a/{b,c}/d', {expand: true})); +//=> [ 'a/b/d', 'a/c/d' ] +``` + +### options.optimize + +**Type**: `Boolean` + +**Default**: `true` + +**Description**: Enabled by default. + +```js +console.log(braces('a/{b,c}/d')); +//=> [ 'a/(b|c)/d' ] +``` + +### options.nodupes + +**Type**: `Boolean` + +**Default**: `true` + +**Description**: Duplicates are removed by default. To keep duplicates, pass `{nodupes: false}` on the options + +### options.rangeLimit + +**Type**: `Number` + +**Default**: `250` + +**Description**: When `braces.expand()` is used, or `options.expand` is true, brace patterns will automatically be [optimized](#optionsoptimize) when the difference between the range minimum and range maximum exceeds the `rangeLimit`. This is to prevent huge ranges from freezing your application. + +You can set this to any number, or change `options.rangeLimit` to `Inifinity` to disable this altogether. + +**Examples** + +```js +// pattern exceeds the "rangeLimit", so it's optimized automatically +console.log(braces.expand('{1..1000}')); +//=> ['([1-9]|[1-9][0-9]{1,2}|1000)'] + +// pattern does not exceed "rangeLimit", so it's NOT optimized +console.log(braces.expand('{1..100}')); +//=> ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', '100'] +``` + +### options.transform + +**Type**: `Function` + +**Default**: `undefined` + +**Description**: Customize range expansion. + +```js +var range = braces.expand('x{a..e}y', { + transform: function(str) { + return 'foo' + str; + } +}); + +console.log(range); +//=> [ 'xfooay', 'xfooby', 'xfoocy', 'xfoody', 'xfooey' ] +``` + +### options.quantifiers + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: In regular expressions, quanitifiers can be used to specify how many times a token can be repeated. For example, `a{1,3}` will match the letter `a` one to three times. + +Unfortunately, regex quantifiers happen to share the same syntax as [Bash lists](#lists) + +The `quantifiers` option tells braces to detect when [regex quantifiers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#quantifiers) are defined in the given pattern, and not to try to expand them as lists. + +**Examples** + +```js +var braces = require('braces'); +console.log(braces('a/b{1,3}/{x,y,z}')); +//=> [ 'a/b(1|3)/(x|y|z)' ] +console.log(braces('a/b{1,3}/{x,y,z}', {quantifiers: true})); +//=> [ 'a/b{1,3}/(x|y|z)' ] +console.log(braces('a/b{1,3}/{x,y,z}', {quantifiers: true, expand: true})); +//=> [ 'a/b{1,3}/x', 'a/b{1,3}/y', 'a/b{1,3}/z' ] +``` + +### options.unescape + +**Type**: `Boolean` + +**Default**: `undefined` + +**Description**: Strip backslashes that were used for escaping from the result. + +## What is "brace expansion"? + +Brace expansion is a type of parameter expansion that was made popular by unix shells for generating lists of strings, as well as regex-like matching when used alongside wildcards (globs). + +In addition to "expansion", braces are also used for matching. In other words: + +* [brace expansion](#brace-expansion) is for generating new lists +* [brace matching](#brace-matching) is for filtering existing lists + +
+More about brace expansion (click to expand) + +There are two main types of brace expansion: + +1. **lists**: which are defined using comma-separated values inside curly braces: `{a,b,c}` +2. **sequences**: which are defined using a starting value and an ending value, separated by two dots: `a{1..3}b`. Optionally, a third argument may be passed to define a "step" or increment to use: `a{1..100..10}b`. These are also sometimes referred to as "ranges". + +Here are some example brace patterns to illustrate how they work: + +**Sets** + +``` +{a,b,c} => a b c +{a,b,c}{1,2} => a1 a2 b1 b2 c1 c2 +``` + +**Sequences** + +``` +{1..9} => 1 2 3 4 5 6 7 8 9 +{4..-4} => 4 3 2 1 0 -1 -2 -3 -4 +{1..20..3} => 1 4 7 10 13 16 19 +{a..j} => a b c d e f g h i j +{j..a} => j i h g f e d c b a +{a..z..3} => a d g j m p s v y +``` + +**Combination** + +Sets and sequences can be mixed together or used along with any other strings. + +``` +{a,b,c}{1..3} => a1 a2 a3 b1 b2 b3 c1 c2 c3 +foo/{a,b,c}/bar => foo/a/bar foo/b/bar foo/c/bar +``` + +The fact that braces can be "expanded" from relatively simple patterns makes them ideal for quickly generating test fixtures, file paths, and similar use cases. + +## Brace matching + +In addition to _expansion_, brace patterns are also useful for performing regular-expression-like matching. + +For example, the pattern `foo/{1..3}/bar` would match any of following strings: + +``` +foo/1/bar +foo/2/bar +foo/3/bar +``` + +But not: + +``` +baz/1/qux +baz/2/qux +baz/3/qux +``` + +Braces can also be combined with [glob patterns](https://github.com/jonschlinkert/micromatch) to perform more advanced wildcard matching. For example, the pattern `*/{1..3}/*` would match any of following strings: + +``` +foo/1/bar +foo/2/bar +foo/3/bar +baz/1/qux +baz/2/qux +baz/3/qux +``` + +## Brace matching pitfalls + +Although brace patterns offer a user-friendly way of matching ranges or sets of strings, there are also some major disadvantages and potential risks you should be aware of. + +### tldr + +**"brace bombs"** + +* brace expansion can eat up a huge amount of processing resources +* as brace patterns increase _linearly in size_, the system resources required to expand the pattern increase exponentially +* users can accidentally (or intentially) exhaust your system's resources resulting in the equivalent of a DoS attack (bonus: no programming knowledge is required!) + +For a more detailed explanation with examples, see the [geometric complexity](#geometric-complexity) section. + +### The solution + +Jump to the [performance section](#performance) to see how Braces solves this problem in comparison to other libraries. + +### Geometric complexity + +At minimum, brace patterns with sets limited to two elements have quadradic or `O(n^2)` complexity. But the complexity of the algorithm increases exponentially as the number of sets, _and elements per set_, increases, which is `O(n^c)`. + +For example, the following sets demonstrate quadratic (`O(n^2)`) complexity: + +``` +{1,2}{3,4} => (2X2) => 13 14 23 24 +{1,2}{3,4}{5,6} => (2X2X2) => 135 136 145 146 235 236 245 246 +``` + +But add an element to a set, and we get a n-fold Cartesian product with `O(n^c)` complexity: + +``` +{1,2,3}{4,5,6}{7,8,9} => (3X3X3) => 147 148 149 157 158 159 167 168 169 247 248 + 249 257 258 259 267 268 269 347 348 349 357 + 358 359 367 368 369 +``` + +Now, imagine how this complexity grows given that each element is a n-tuple: + +``` +{1..100}{1..100} => (100X100) => 10,000 elements (38.4 kB) +{1..100}{1..100}{1..100} => (100X100X100) => 1,000,000 elements (5.76 MB) +``` + +Although these examples are clearly contrived, they demonstrate how brace patterns can quickly grow out of control. + +**More information** + +Interested in learning more about brace expansion? + +* [linuxjournal/bash-brace-expansion](http://www.linuxjournal.com/content/bash-brace-expansion) +* [rosettacode/Brace_expansion](https://rosettacode.org/wiki/Brace_expansion) +* [cartesian product](https://en.wikipedia.org/wiki/Cartesian_product) + +
+ +## Performance + +Braces is not only screaming fast, it's also more accurate the other brace expansion libraries. + +### Better algorithms + +Fortunately there is a solution to the ["brace bomb" problem](#brace-matching-pitfalls): _don't expand brace patterns into an array when they're used for matching_. + +Instead, convert the pattern into an optimized regular expression. This is easier said than done, and braces is the only library that does this currently. + +**The proof is in the numbers** + +Minimatch gets exponentially slower as patterns increase in complexity, braces does not. The following results were generated using `braces()` and `minimatch.braceExpand()`, respectively. + +| **Pattern** | **braces** | **[minimatch](https://github.com/isaacs/minimatch)** | +| --- | --- | --- | +| `{1..9007199254740991}`[1] | `298 B` (5ms 459μs) | N/A (freezes) | +| `{1..1000000000000000}` | `41 B` (1ms 15μs) | N/A (freezes) | +| `{1..100000000000000}` | `40 B` (890μs) | N/A (freezes) | +| `{1..10000000000000}` | `39 B` (2ms 49μs) | N/A (freezes) | +| `{1..1000000000000}` | `38 B` (608μs) | N/A (freezes) | +| `{1..100000000000}` | `37 B` (397μs) | N/A (freezes) | +| `{1..10000000000}` | `35 B` (983μs) | N/A (freezes) | +| `{1..1000000000}` | `34 B` (798μs) | N/A (freezes) | +| `{1..100000000}` | `33 B` (733μs) | N/A (freezes) | +| `{1..10000000}` | `32 B` (5ms 632μs) | `78.89 MB` (16s 388ms 569μs) | +| `{1..1000000}` | `31 B` (1ms 381μs) | `6.89 MB` (1s 496ms 887μs) | +| `{1..100000}` | `30 B` (950μs) | `588.89 kB` (146ms 921μs) | +| `{1..10000}` | `29 B` (1ms 114μs) | `48.89 kB` (14ms 187μs) | +| `{1..1000}` | `28 B` (760μs) | `3.89 kB` (1ms 453μs) | +| `{1..100}` | `22 B` (345μs) | `291 B` (196μs) | +| `{1..10}` | `10 B` (533μs) | `20 B` (37μs) | +| `{1..3}` | `7 B` (190μs) | `5 B` (27μs) | + +### Faster algorithms + +When you need expansion, braces is still much faster. + +_(the following results were generated using `braces.expand()` and `minimatch.braceExpand()`, respectively)_ + +| **Pattern** | **braces** | **[minimatch](https://github.com/isaacs/minimatch)** | +| --- | --- | --- | +| `{1..10000000}` | `78.89 MB` (2s 698ms 642μs) | `78.89 MB` (18s 601ms 974μs) | +| `{1..1000000}` | `6.89 MB` (458ms 576μs) | `6.89 MB` (1s 491ms 621μs) | +| `{1..100000}` | `588.89 kB` (20ms 728μs) | `588.89 kB` (156ms 919μs) | +| `{1..10000}` | `48.89 kB` (2ms 202μs) | `48.89 kB` (13ms 641μs) | +| `{1..1000}` | `3.89 kB` (1ms 796μs) | `3.89 kB` (1ms 958μs) | +| `{1..100}` | `291 B` (424μs) | `291 B` (211μs) | +| `{1..10}` | `20 B` (487μs) | `20 B` (72μs) | +| `{1..3}` | `5 B` (166μs) | `5 B` (27μs) | + +If you'd like to run these comparisons yourself, see [test/support/generate.js](test/support/generate.js). + +## Benchmarks + +### Running benchmarks + +Install dev dependencies: + +```bash +npm i -d && npm benchmark +``` + +### Latest results + +```bash +Benchmarking: (8 of 8) + · combination-nested + · combination + · escaped + · list-basic + · list-multiple + · no-braces + · sequence-basic + · sequence-multiple + +# benchmark/fixtures/combination-nested.js (52 bytes) + brace-expansion x 4,756 ops/sec ±1.09% (86 runs sampled) + braces x 11,202,303 ops/sec ±1.06% (88 runs sampled) + minimatch x 4,816 ops/sec ±0.99% (87 runs sampled) + + fastest is braces + +# benchmark/fixtures/combination.js (51 bytes) + brace-expansion x 625 ops/sec ±0.87% (87 runs sampled) + braces x 11,031,884 ops/sec ±0.72% (90 runs sampled) + minimatch x 637 ops/sec ±0.84% (88 runs sampled) + + fastest is braces + +# benchmark/fixtures/escaped.js (44 bytes) + brace-expansion x 163,325 ops/sec ±1.05% (87 runs sampled) + braces x 10,655,071 ops/sec ±1.22% (88 runs sampled) + minimatch x 147,495 ops/sec ±0.96% (88 runs sampled) + + fastest is braces + +# benchmark/fixtures/list-basic.js (40 bytes) + brace-expansion x 99,726 ops/sec ±1.07% (83 runs sampled) + braces x 10,596,584 ops/sec ±0.98% (88 runs sampled) + minimatch x 100,069 ops/sec ±1.17% (86 runs sampled) + + fastest is braces + +# benchmark/fixtures/list-multiple.js (52 bytes) + brace-expansion x 34,348 ops/sec ±1.08% (88 runs sampled) + braces x 9,264,131 ops/sec ±1.12% (88 runs sampled) + minimatch x 34,893 ops/sec ±0.87% (87 runs sampled) + + fastest is braces + +# benchmark/fixtures/no-braces.js (48 bytes) + brace-expansion x 275,368 ops/sec ±1.18% (89 runs sampled) + braces x 9,134,677 ops/sec ±0.95% (88 runs sampled) + minimatch x 3,755,954 ops/sec ±1.13% (89 runs sampled) + + fastest is braces + +# benchmark/fixtures/sequence-basic.js (41 bytes) + brace-expansion x 5,492 ops/sec ±1.35% (87 runs sampled) + braces x 8,485,034 ops/sec ±1.28% (89 runs sampled) + minimatch x 5,341 ops/sec ±1.17% (87 runs sampled) + + fastest is braces + +# benchmark/fixtures/sequence-multiple.js (51 bytes) + brace-expansion x 116 ops/sec ±0.77% (77 runs sampled) + braces x 9,445,118 ops/sec ±1.32% (84 runs sampled) + minimatch x 109 ops/sec ±1.16% (76 runs sampled) + + fastest is braces +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [expand-brackets](https://www.npmjs.com/package/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. | [homepage](https://github.com/jonschlinkert/expand-brackets "Expand POSIX bracket expressions (character classes) in glob patterns.") +* [extglob](https://www.npmjs.com/package/extglob): Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob… [more](https://github.com/micromatch/extglob) | [homepage](https://github.com/micromatch/extglob "Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob patterns.") +* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or `step` to… [more](https://github.com/jonschlinkert/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`") +* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/micromatch/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") +* [nanomatch](https://www.npmjs.com/package/nanomatch): Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash… [more](https://github.com/micromatch/nanomatch) | [homepage](https://github.com/micromatch/nanomatch "Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash 4.3 wildcard support only (no support for exglobs, posix brackets or braces)") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 188 | [jonschlinkert](https://github.com/jonschlinkert) | +| 4 | [doowb](https://github.com/doowb) | +| 1 | [es128](https://github.com/es128) | +| 1 | [eush77](https://github.com/eush77) | +| 1 | [hemanth](https://github.com/hemanth) | + +### Author + +**Jon Schlinkert** + +* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on February 17, 2018._ + +
+
+
    +
  1. this is the largest safe integer allowed in JavaScript. + +
  2. +
+
\ No newline at end of file diff --git a/code/application_liste/app/node_modules/braces/index.js b/code/application_liste/app/node_modules/braces/index.js new file mode 100644 index 0000000..048e1c2 --- /dev/null +++ b/code/application_liste/app/node_modules/braces/index.js @@ -0,0 +1,318 @@ +'use strict'; + +/** + * Module dependencies + */ + +var toRegex = require('to-regex'); +var unique = require('array-unique'); +var extend = require('extend-shallow'); + +/** + * Local dependencies + */ + +var compilers = require('./lib/compilers'); +var parsers = require('./lib/parsers'); +var Braces = require('./lib/braces'); +var utils = require('./lib/utils'); +var MAX_LENGTH = 1024 * 64; +var cache = {}; + +/** + * Convert the given `braces` pattern into a regex-compatible string. By default, only one string is generated for every input string. Set `options.expand` to true to return an array of patterns (similar to Bash or minimatch. Before using `options.expand`, it's recommended that you read the [performance notes](#performance)). + * + * ```js + * var braces = require('braces'); + * console.log(braces('{a,b,c}')); + * //=> ['(a|b|c)'] + * + * console.log(braces('{a,b,c}', {expand: true})); + * //=> ['a', 'b', 'c'] + * ``` + * @param {String} `str` + * @param {Object} `options` + * @return {String} + * @api public + */ + +function braces(pattern, options) { + var key = utils.createKey(String(pattern), options); + var arr = []; + + var disabled = options && options.cache === false; + if (!disabled && cache.hasOwnProperty(key)) { + return cache[key]; + } + + if (Array.isArray(pattern)) { + for (var i = 0; i < pattern.length; i++) { + arr.push.apply(arr, braces.create(pattern[i], options)); + } + } else { + arr = braces.create(pattern, options); + } + + if (options && options.nodupes === true) { + arr = unique(arr); + } + + if (!disabled) { + cache[key] = arr; + } + return arr; +} + +/** + * Expands a brace pattern into an array. This method is called by the main [braces](#braces) function when `options.expand` is true. Before using this method it's recommended that you read the [performance notes](#performance)) and advantages of using [.optimize](#optimize) instead. + * + * ```js + * var braces = require('braces'); + * console.log(braces.expand('a/{b,c}/d')); + * //=> ['a/b/d', 'a/c/d']; + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.expand = function(pattern, options) { + return braces.create(pattern, extend({}, options, {expand: true})); +}; + +/** + * Expands a brace pattern into a regex-compatible, optimized string. This method is called by the main [braces](#braces) function by default. + * + * ```js + * var braces = require('braces'); + * console.log(braces.expand('a/{b,c}/d')); + * //=> ['a/(b|c)/d'] + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.optimize = function(pattern, options) { + return braces.create(pattern, options); +}; + +/** + * Processes a brace pattern and returns either an expanded array (if `options.expand` is true), a highly optimized regex-compatible string. This method is called by the main [braces](#braces) function. + * + * ```js + * var braces = require('braces'); + * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}')) + * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)' + * ``` + * @param {String} `pattern` Brace pattern + * @param {Object} `options` + * @return {Array} Returns an array of expanded values. + * @api public + */ + +braces.create = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + + var maxLength = (options && options.maxLength) || MAX_LENGTH; + if (pattern.length >= maxLength) { + throw new Error('expected pattern to be less than ' + maxLength + ' characters'); + } + + function create() { + if (pattern === '' || pattern.length < 3) { + return [pattern]; + } + + if (utils.isEmptySets(pattern)) { + return []; + } + + if (utils.isQuotedString(pattern)) { + return [pattern.slice(1, -1)]; + } + + var proto = new Braces(options); + var result = !options || options.expand !== true + ? proto.optimize(pattern, options) + : proto.expand(pattern, options); + + // get the generated pattern(s) + var arr = result.output; + + // filter out empty strings if specified + if (options && options.noempty === true) { + arr = arr.filter(Boolean); + } + + // filter out duplicates if specified + if (options && options.nodupes === true) { + arr = unique(arr); + } + + Object.defineProperty(arr, 'result', { + enumerable: false, + value: result + }); + + return arr; + } + + return memoize('create', pattern, options, create); +}; + +/** + * Create a regular expression from the given string `pattern`. + * + * ```js + * var braces = require('braces'); + * + * console.log(braces.makeRe('id-{200..300}')); + * //=> /^(?:id-(20[0-9]|2[1-9][0-9]|300))$/ + * ``` + * @param {String} `pattern` The pattern to convert to regex. + * @param {Object} `options` + * @return {RegExp} + * @api public + */ + +braces.makeRe = function(pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('expected a string'); + } + + var maxLength = (options && options.maxLength) || MAX_LENGTH; + if (pattern.length >= maxLength) { + throw new Error('expected pattern to be less than ' + maxLength + ' characters'); + } + + function makeRe() { + var arr = braces(pattern, options); + var opts = extend({strictErrors: false}, options); + return toRegex(arr, opts); + } + + return memoize('makeRe', pattern, options, makeRe); +}; + +/** + * Parse the given `str` with the given `options`. + * + * ```js + * var braces = require('braces'); + * var ast = braces.parse('a/{b,c}/d'); + * console.log(ast); + * // { type: 'root', + * // errors: [], + * // input: 'a/{b,c}/d', + * // nodes: + * // [ { type: 'bos', val: '' }, + * // { type: 'text', val: 'a/' }, + * // { type: 'brace', + * // nodes: + * // [ { type: 'brace.open', val: '{' }, + * // { type: 'text', val: 'b,c' }, + * // { type: 'brace.close', val: '}' } ] }, + * // { type: 'text', val: '/d' }, + * // { type: 'eos', val: '' } ] } + * ``` + * @param {String} `pattern` Brace pattern to parse + * @param {Object} `options` + * @return {Object} Returns an AST + * @api public + */ + +braces.parse = function(pattern, options) { + var proto = new Braces(options); + return proto.parse(pattern, options); +}; + +/** + * Compile the given `ast` or string with the given `options`. + * + * ```js + * var braces = require('braces'); + * var ast = braces.parse('a/{b,c}/d'); + * console.log(braces.compile(ast)); + * // { options: { source: 'string' }, + * // state: {}, + * // compilers: + * // { eos: [Function], + * // noop: [Function], + * // bos: [Function], + * // brace: [Function], + * // 'brace.open': [Function], + * // text: [Function], + * // 'brace.close': [Function] }, + * // output: [ 'a/(b|c)/d' ], + * // ast: + * // { ... }, + * // parsingErrors: [] } + * ``` + * @param {Object|String} `ast` AST from [.parse](#parse). If a string is passed it will be parsed first. + * @param {Object} `options` + * @return {Object} Returns an object that has an `output` property with the compiled string. + * @api public + */ + +braces.compile = function(ast, options) { + var proto = new Braces(options); + return proto.compile(ast, options); +}; + +/** + * Clear the regex cache. + * + * ```js + * braces.clearCache(); + * ``` + * @api public + */ + +braces.clearCache = function() { + cache = braces.cache = {}; +}; + +/** + * Memoize a generated regex or function. A unique key is generated + * from the method name, pattern, and user-defined options. Set + * options.memoize to false to disable. + */ + +function memoize(type, pattern, options, fn) { + var key = utils.createKey(type + ':' + pattern, options); + var disabled = options && options.cache === false; + if (disabled) { + braces.clearCache(); + return fn(pattern, options); + } + + if (cache.hasOwnProperty(key)) { + return cache[key]; + } + + var res = fn(pattern, options); + cache[key] = res; + return res; +} + +/** + * Expose `Braces` constructor and methods + * @type {Function} + */ + +braces.Braces = Braces; +braces.compilers = compilers; +braces.parsers = parsers; +braces.cache = cache; + +/** + * Expose `braces` + * @type {Function} + */ + +module.exports = braces; diff --git a/code/application_liste/app/node_modules/braces/lib/braces.js b/code/application_liste/app/node_modules/braces/lib/braces.js new file mode 100644 index 0000000..baf6bf1 --- /dev/null +++ b/code/application_liste/app/node_modules/braces/lib/braces.js @@ -0,0 +1,104 @@ +'use strict'; + +var extend = require('extend-shallow'); +var Snapdragon = require('snapdragon'); +var compilers = require('./compilers'); +var parsers = require('./parsers'); +var utils = require('./utils'); + +/** + * Customize Snapdragon parser and renderer + */ + +function Braces(options) { + this.options = extend({}, options); +} + +/** + * Initialize braces + */ + +Braces.prototype.init = function(options) { + if (this.isInitialized) return; + this.isInitialized = true; + var opts = utils.createOptions({}, this.options, options); + this.snapdragon = this.options.snapdragon || new Snapdragon(opts); + this.compiler = this.snapdragon.compiler; + this.parser = this.snapdragon.parser; + + compilers(this.snapdragon, opts); + parsers(this.snapdragon, opts); + + /** + * Call Snapdragon `.parse` method. When AST is returned, we check to + * see if any unclosed braces are left on the stack and, if so, we iterate + * over the stack and correct the AST so that compilers are called in the correct + * order and unbalance braces are properly escaped. + */ + + utils.define(this.snapdragon, 'parse', function(pattern, options) { + var parsed = Snapdragon.prototype.parse.apply(this, arguments); + this.parser.ast.input = pattern; + + var stack = this.parser.stack; + while (stack.length) { + addParent({type: 'brace.close', val: ''}, stack.pop()); + } + + function addParent(node, parent) { + utils.define(node, 'parent', parent); + parent.nodes.push(node); + } + + // add non-enumerable parser reference + utils.define(parsed, 'parser', this.parser); + return parsed; + }); +}; + +/** + * Decorate `.parse` method + */ + +Braces.prototype.parse = function(ast, options) { + if (ast && typeof ast === 'object' && ast.nodes) return ast; + this.init(options); + return this.snapdragon.parse(ast, options); +}; + +/** + * Decorate `.compile` method + */ + +Braces.prototype.compile = function(ast, options) { + if (typeof ast === 'string') { + ast = this.parse(ast, options); + } else { + this.init(options); + } + return this.snapdragon.compile(ast, options); +}; + +/** + * Expand + */ + +Braces.prototype.expand = function(pattern) { + var ast = this.parse(pattern, {expand: true}); + return this.compile(ast, {expand: true}); +}; + +/** + * Optimize + */ + +Braces.prototype.optimize = function(pattern) { + var ast = this.parse(pattern, {optimize: true}); + return this.compile(ast, {optimize: true}); +}; + +/** + * Expose `Braces` + */ + +module.exports = Braces; diff --git a/code/application_liste/app/node_modules/braces/lib/compilers.js b/code/application_liste/app/node_modules/braces/lib/compilers.js new file mode 100644 index 0000000..a3b820e --- /dev/null +++ b/code/application_liste/app/node_modules/braces/lib/compilers.js @@ -0,0 +1,282 @@ +'use strict'; + +var utils = require('./utils'); + +module.exports = function(braces, options) { + braces.compiler + + /** + * bos + */ + + .set('bos', function() { + if (this.output) return; + this.ast.queue = isEscaped(this.ast) ? [this.ast.val] : []; + this.ast.count = 1; + }) + + /** + * Square brackets + */ + + .set('bracket', function(node) { + var close = node.close; + var open = !node.escaped ? '[' : '\\['; + var negated = node.negated; + var inner = node.inner; + + inner = inner.replace(/\\(?=[\\\w]|$)/g, '\\\\'); + if (inner === ']-') { + inner = '\\]\\-'; + } + + if (negated && inner.indexOf('.') === -1) { + inner += '.'; + } + if (negated && inner.indexOf('/') === -1) { + inner += '/'; + } + + var val = open + negated + inner + close; + var queue = node.parent.queue; + var last = utils.arrayify(queue.pop()); + + queue.push(utils.join(last, val)); + queue.push.apply(queue, []); + }) + + /** + * Brace + */ + + .set('brace', function(node) { + node.queue = isEscaped(node) ? [node.val] : []; + node.count = 1; + return this.mapVisit(node.nodes); + }) + + /** + * Open + */ + + .set('brace.open', function(node) { + node.parent.open = node.val; + }) + + /** + * Inner + */ + + .set('text', function(node) { + var queue = node.parent.queue; + var escaped = node.escaped; + var segs = [node.val]; + + if (node.optimize === false) { + options = utils.extend({}, options, {optimize: false}); + } + + if (node.multiplier > 1) { + node.parent.count *= node.multiplier; + } + + if (options.quantifiers === true && utils.isQuantifier(node.val)) { + escaped = true; + + } else if (node.val.length > 1) { + if (isType(node.parent, 'brace') && !isEscaped(node)) { + var expanded = utils.expand(node.val, options); + segs = expanded.segs; + + if (expanded.isOptimized) { + node.parent.isOptimized = true; + } + + // if nothing was expanded, we probably have a literal brace + if (!segs.length) { + var val = (expanded.val || node.val); + if (options.unescape !== false) { + // unescape unexpanded brace sequence/set separators + val = val.replace(/\\([,.])/g, '$1'); + // strip quotes + val = val.replace(/["'`]/g, ''); + } + + segs = [val]; + escaped = true; + } + } + + } else if (node.val === ',') { + if (options.expand) { + node.parent.queue.push(['']); + segs = ['']; + } else { + segs = ['|']; + } + } else { + escaped = true; + } + + if (escaped && isType(node.parent, 'brace')) { + if (node.parent.nodes.length <= 4 && node.parent.count === 1) { + node.parent.escaped = true; + } else if (node.parent.length <= 3) { + node.parent.escaped = true; + } + } + + if (!hasQueue(node.parent)) { + node.parent.queue = segs; + return; + } + + var last = utils.arrayify(queue.pop()); + if (node.parent.count > 1 && options.expand) { + last = multiply(last, node.parent.count); + node.parent.count = 1; + } + + queue.push(utils.join(utils.flatten(last), segs.shift())); + queue.push.apply(queue, segs); + }) + + /** + * Close + */ + + .set('brace.close', function(node) { + var queue = node.parent.queue; + var prev = node.parent.parent; + var last = prev.queue.pop(); + var open = node.parent.open; + var close = node.val; + + if (open && close && isOptimized(node, options)) { + open = '('; + close = ')'; + } + + // if a close brace exists, and the previous segment is one character + // don't wrap the result in braces or parens + var ele = utils.last(queue); + if (node.parent.count > 1 && options.expand) { + ele = multiply(queue.pop(), node.parent.count); + node.parent.count = 1; + queue.push(ele); + } + + if (close && typeof ele === 'string' && ele.length === 1) { + open = ''; + close = ''; + } + + if ((isLiteralBrace(node, options) || noInner(node)) && !node.parent.hasEmpty) { + queue.push(utils.join(open, queue.pop() || '')); + queue = utils.flatten(utils.join(queue, close)); + } + + if (typeof last === 'undefined') { + prev.queue = [queue]; + } else { + prev.queue.push(utils.flatten(utils.join(last, queue))); + } + }) + + /** + * eos + */ + + .set('eos', function(node) { + if (this.input) return; + + if (options.optimize !== false) { + this.output = utils.last(utils.flatten(this.ast.queue)); + } else if (Array.isArray(utils.last(this.ast.queue))) { + this.output = utils.flatten(this.ast.queue.pop()); + } else { + this.output = utils.flatten(this.ast.queue); + } + + if (node.parent.count > 1 && options.expand) { + this.output = multiply(this.output, node.parent.count); + } + + this.output = utils.arrayify(this.output); + this.ast.queue = []; + }); + +}; + +/** + * Multiply the segments in the current brace level + */ + +function multiply(queue, n, options) { + return utils.flatten(utils.repeat(utils.arrayify(queue), n)); +} + +/** + * Return true if `node` is escaped + */ + +function isEscaped(node) { + return node.escaped === true; +} + +/** + * Returns true if regex parens should be used for sets. If the parent `type` + * is not `brace`, then we're on a root node, which means we should never + * expand segments and open/close braces should be `{}` (since this indicates + * a brace is missing from the set) + */ + +function isOptimized(node, options) { + if (node.parent.isOptimized) return true; + return isType(node.parent, 'brace') + && !isEscaped(node.parent) + && options.expand !== true; +} + +/** + * Returns true if the value in `node` should be wrapped in a literal brace. + * @return {Boolean} + */ + +function isLiteralBrace(node, options) { + return isEscaped(node.parent) || options.optimize !== false; +} + +/** + * Returns true if the given `node` does not have an inner value. + * @return {Boolean} + */ + +function noInner(node, type) { + if (node.parent.queue.length === 1) { + return true; + } + var nodes = node.parent.nodes; + return nodes.length === 3 + && isType(nodes[0], 'brace.open') + && !isType(nodes[1], 'text') + && isType(nodes[2], 'brace.close'); +} + +/** + * Returns true if the given `node` is the given `type` + * @return {Boolean} + */ + +function isType(node, type) { + return typeof node !== 'undefined' && node.type === type; +} + +/** + * Returns true if the given `node` has a non-empty queue. + * @return {Boolean} + */ + +function hasQueue(node) { + return Array.isArray(node.queue) && node.queue.length; +} diff --git a/code/application_liste/app/node_modules/braces/lib/parsers.js b/code/application_liste/app/node_modules/braces/lib/parsers.js new file mode 100644 index 0000000..8bf3e92 --- /dev/null +++ b/code/application_liste/app/node_modules/braces/lib/parsers.js @@ -0,0 +1,360 @@ +'use strict'; + +var Node = require('snapdragon-node'); +var utils = require('./utils'); + +/** + * Braces parsers + */ + +module.exports = function(braces, options) { + braces.parser + .set('bos', function() { + if (!this.parsed) { + this.ast = this.nodes[0] = new Node(this.ast); + } + }) + + /** + * Character parsers + */ + + .set('escape', function() { + var pos = this.position(); + var m = this.match(/^(?:\\(.)|\$\{)/); + if (!m) return; + + var prev = this.prev(); + var last = utils.last(prev.nodes); + + var node = pos(new Node({ + type: 'text', + multiplier: 1, + val: m[0] + })); + + if (node.val === '\\\\') { + return node; + } + + if (node.val === '${') { + var str = this.input; + var idx = -1; + var ch; + + while ((ch = str[++idx])) { + this.consume(1); + node.val += ch; + if (ch === '\\') { + node.val += str[++idx]; + continue; + } + if (ch === '}') { + break; + } + } + } + + if (this.options.unescape !== false) { + node.val = node.val.replace(/\\([{}])/g, '$1'); + } + + if (last.val === '"' && this.input.charAt(0) === '"') { + last.val = node.val; + this.consume(1); + return; + } + + return concatNodes.call(this, pos, node, prev, options); + }) + + /** + * Brackets: "[...]" (basic, this is overridden by + * other parsers in more advanced implementations) + */ + + .set('bracket', function() { + var isInside = this.isInside('brace'); + var pos = this.position(); + var m = this.match(/^(?:\[([!^]?)([^\]]{2,}|\]-)(\]|[^*+?]+)|\[)/); + if (!m) return; + + var prev = this.prev(); + var val = m[0]; + var negated = m[1] ? '^' : ''; + var inner = m[2] || ''; + var close = m[3] || ''; + + if (isInside && prev.type === 'brace') { + prev.text = prev.text || ''; + prev.text += val; + } + + var esc = this.input.slice(0, 2); + if (inner === '' && esc === '\\]') { + inner += esc; + this.consume(2); + + var str = this.input; + var idx = -1; + var ch; + + while ((ch = str[++idx])) { + this.consume(1); + if (ch === ']') { + close = ch; + break; + } + inner += ch; + } + } + + return pos(new Node({ + type: 'bracket', + val: val, + escaped: close !== ']', + negated: negated, + inner: inner, + close: close + })); + }) + + /** + * Empty braces (we capture these early to + * speed up processing in the compiler) + */ + + .set('multiplier', function() { + var isInside = this.isInside('brace'); + var pos = this.position(); + var m = this.match(/^\{((?:,|\{,+\})+)\}/); + if (!m) return; + + this.multiplier = true; + var prev = this.prev(); + var val = m[0]; + + if (isInside && prev.type === 'brace') { + prev.text = prev.text || ''; + prev.text += val; + } + + var node = pos(new Node({ + type: 'text', + multiplier: 1, + match: m, + val: val + })); + + return concatNodes.call(this, pos, node, prev, options); + }) + + /** + * Open + */ + + .set('brace.open', function() { + var pos = this.position(); + var m = this.match(/^\{(?!(?:[^\\}]?|,+)\})/); + if (!m) return; + + var prev = this.prev(); + var last = utils.last(prev.nodes); + + // if the last parsed character was an extglob character + // we need to _not optimize_ the brace pattern because + // it might be mistaken for an extglob by a downstream parser + if (last && last.val && isExtglobChar(last.val.slice(-1))) { + last.optimize = false; + } + + var open = pos(new Node({ + type: 'brace.open', + val: m[0] + })); + + var node = pos(new Node({ + type: 'brace', + nodes: [] + })); + + node.push(open); + prev.push(node); + this.push('brace', node); + }) + + /** + * Close + */ + + .set('brace.close', function() { + var pos = this.position(); + var m = this.match(/^\}/); + if (!m || !m[0]) return; + + var brace = this.pop('brace'); + var node = pos(new Node({ + type: 'brace.close', + val: m[0] + })); + + if (!this.isType(brace, 'brace')) { + if (this.options.strict) { + throw new Error('missing opening "{"'); + } + node.type = 'text'; + node.multiplier = 0; + node.escaped = true; + return node; + } + + var prev = this.prev(); + var last = utils.last(prev.nodes); + if (last.text) { + var lastNode = utils.last(last.nodes); + if (lastNode.val === ')' && /[!@*?+]\(/.test(last.text)) { + var open = last.nodes[0]; + var text = last.nodes[1]; + if (open.type === 'brace.open' && text && text.type === 'text') { + text.optimize = false; + } + } + } + + if (brace.nodes.length > 2) { + var first = brace.nodes[1]; + if (first.type === 'text' && first.val === ',') { + brace.nodes.splice(1, 1); + brace.nodes.push(first); + } + } + + brace.push(node); + }) + + /** + * Capture boundary characters + */ + + .set('boundary', function() { + var pos = this.position(); + var m = this.match(/^[$^](?!\{)/); + if (!m) return; + return pos(new Node({ + type: 'text', + val: m[0] + })); + }) + + /** + * One or zero, non-comma characters wrapped in braces + */ + + .set('nobrace', function() { + var isInside = this.isInside('brace'); + var pos = this.position(); + var m = this.match(/^\{[^,]?\}/); + if (!m) return; + + var prev = this.prev(); + var val = m[0]; + + if (isInside && prev.type === 'brace') { + prev.text = prev.text || ''; + prev.text += val; + } + + return pos(new Node({ + type: 'text', + multiplier: 0, + val: val + })); + }) + + /** + * Text + */ + + .set('text', function() { + var isInside = this.isInside('brace'); + var pos = this.position(); + var m = this.match(/^((?!\\)[^${}[\]])+/); + if (!m) return; + + var prev = this.prev(); + var val = m[0]; + + if (isInside && prev.type === 'brace') { + prev.text = prev.text || ''; + prev.text += val; + } + + var node = pos(new Node({ + type: 'text', + multiplier: 1, + val: val + })); + + return concatNodes.call(this, pos, node, prev, options); + }); +}; + +/** + * Returns true if the character is an extglob character. + */ + +function isExtglobChar(ch) { + return ch === '!' || ch === '@' || ch === '*' || ch === '?' || ch === '+'; +} + +/** + * Combine text nodes, and calculate empty sets (`{,,}`) + * @param {Function} `pos` Function to calculate node position + * @param {Object} `node` AST node + * @return {Object} + */ + +function concatNodes(pos, node, parent, options) { + node.orig = node.val; + var prev = this.prev(); + var last = utils.last(prev.nodes); + var isEscaped = false; + + if (node.val.length > 1) { + var a = node.val.charAt(0); + var b = node.val.slice(-1); + + isEscaped = (a === '"' && b === '"') + || (a === "'" && b === "'") + || (a === '`' && b === '`'); + } + + if (isEscaped && options.unescape !== false) { + node.val = node.val.slice(1, node.val.length - 1); + node.escaped = true; + } + + if (node.match) { + var match = node.match[1]; + if (!match || match.indexOf('}') === -1) { + match = node.match[0]; + } + + // replace each set with a single "," + var val = match.replace(/\{/g, ',').replace(/\}/g, ''); + node.multiplier *= val.length; + node.val = ''; + } + + var simpleText = last.type === 'text' + && last.multiplier === 1 + && node.multiplier === 1 + && node.val; + + if (simpleText) { + last.val += node.val; + return; + } + + prev.push(node); +} diff --git a/code/application_liste/app/node_modules/braces/lib/utils.js b/code/application_liste/app/node_modules/braces/lib/utils.js new file mode 100644 index 0000000..4716671 --- /dev/null +++ b/code/application_liste/app/node_modules/braces/lib/utils.js @@ -0,0 +1,343 @@ +'use strict'; + +var splitString = require('split-string'); +var utils = module.exports; + +/** + * Module dependencies + */ + +utils.extend = require('extend-shallow'); +utils.flatten = require('arr-flatten'); +utils.isObject = require('isobject'); +utils.fillRange = require('fill-range'); +utils.repeat = require('repeat-element'); +utils.unique = require('array-unique'); + +utils.define = function(obj, key, val) { + Object.defineProperty(obj, key, { + writable: true, + configurable: true, + enumerable: false, + value: val + }); +}; + +/** + * Returns true if the given string contains only empty brace sets. + */ + +utils.isEmptySets = function(str) { + return /^(?:\{,\})+$/.test(str); +}; + +/** + * Returns true if the given string contains only empty brace sets. + */ + +utils.isQuotedString = function(str) { + var open = str.charAt(0); + if (open === '\'' || open === '"' || open === '`') { + return str.slice(-1) === open; + } + return false; +}; + +/** + * Create the key to use for memoization. The unique key is generated + * by iterating over the options and concatenating key-value pairs + * to the pattern string. + */ + +utils.createKey = function(pattern, options) { + var id = pattern; + if (typeof options === 'undefined') { + return id; + } + var keys = Object.keys(options); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + id += ';' + key + '=' + String(options[key]); + } + return id; +}; + +/** + * Normalize options + */ + +utils.createOptions = function(options) { + var opts = utils.extend.apply(null, arguments); + if (typeof opts.expand === 'boolean') { + opts.optimize = !opts.expand; + } + if (typeof opts.optimize === 'boolean') { + opts.expand = !opts.optimize; + } + if (opts.optimize === true) { + opts.makeRe = true; + } + return opts; +}; + +/** + * Join patterns in `a` to patterns in `b` + */ + +utils.join = function(a, b, options) { + options = options || {}; + a = utils.arrayify(a); + b = utils.arrayify(b); + + if (!a.length) return b; + if (!b.length) return a; + + var len = a.length; + var idx = -1; + var arr = []; + + while (++idx < len) { + var val = a[idx]; + if (Array.isArray(val)) { + for (var i = 0; i < val.length; i++) { + val[i] = utils.join(val[i], b, options); + } + arr.push(val); + continue; + } + + for (var j = 0; j < b.length; j++) { + var bval = b[j]; + + if (Array.isArray(bval)) { + arr.push(utils.join(val, bval, options)); + } else { + arr.push(val + bval); + } + } + } + return arr; +}; + +/** + * Split the given string on `,` if not escaped. + */ + +utils.split = function(str, options) { + var opts = utils.extend({sep: ','}, options); + if (typeof opts.keepQuotes !== 'boolean') { + opts.keepQuotes = true; + } + if (opts.unescape === false) { + opts.keepEscaping = true; + } + return splitString(str, opts, utils.escapeBrackets(opts)); +}; + +/** + * Expand ranges or sets in the given `pattern`. + * + * @param {String} `str` + * @param {Object} `options` + * @return {Object} + */ + +utils.expand = function(str, options) { + var opts = utils.extend({rangeLimit: 10000}, options); + var segs = utils.split(str, opts); + var tok = { segs: segs }; + + if (utils.isQuotedString(str)) { + return tok; + } + + if (opts.rangeLimit === true) { + opts.rangeLimit = 10000; + } + + if (segs.length > 1) { + if (opts.optimize === false) { + tok.val = segs[0]; + return tok; + } + + tok.segs = utils.stringifyArray(tok.segs); + } else if (segs.length === 1) { + var arr = str.split('..'); + + if (arr.length === 1) { + tok.val = tok.segs[tok.segs.length - 1] || tok.val || str; + tok.segs = []; + return tok; + } + + if (arr.length === 2 && arr[0] === arr[1]) { + tok.escaped = true; + tok.val = arr[0]; + tok.segs = []; + return tok; + } + + if (arr.length > 1) { + if (opts.optimize !== false) { + opts.optimize = true; + delete opts.expand; + } + + if (opts.optimize !== true) { + var min = Math.min(arr[0], arr[1]); + var max = Math.max(arr[0], arr[1]); + var step = arr[2] || 1; + + if (opts.rangeLimit !== false && ((max - min) / step >= opts.rangeLimit)) { + throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.'); + } + } + + arr.push(opts); + tok.segs = utils.fillRange.apply(null, arr); + + if (!tok.segs.length) { + tok.escaped = true; + tok.val = str; + return tok; + } + + if (opts.optimize === true) { + tok.segs = utils.stringifyArray(tok.segs); + } + + if (tok.segs === '') { + tok.val = str; + } else { + tok.val = tok.segs[0]; + } + return tok; + } + } else { + tok.val = str; + } + return tok; +}; + +/** + * Ensure commas inside brackets and parens are not split. + * @param {Object} `tok` Token from the `split-string` module + * @return {undefined} + */ + +utils.escapeBrackets = function(options) { + return function(tok) { + if (tok.escaped && tok.val === 'b') { + tok.val = '\\b'; + return; + } + + if (tok.val !== '(' && tok.val !== '[') return; + var opts = utils.extend({}, options); + var brackets = []; + var parens = []; + var stack = []; + var val = tok.val; + var str = tok.str; + var i = tok.idx - 1; + + while (++i < str.length) { + var ch = str[i]; + + if (ch === '\\') { + val += (opts.keepEscaping === false ? '' : ch) + str[++i]; + continue; + } + + if (ch === '(') { + parens.push(ch); + stack.push(ch); + } + + if (ch === '[') { + brackets.push(ch); + stack.push(ch); + } + + if (ch === ')') { + parens.pop(); + stack.pop(); + if (!stack.length) { + val += ch; + break; + } + } + + if (ch === ']') { + brackets.pop(); + stack.pop(); + if (!stack.length) { + val += ch; + break; + } + } + val += ch; + } + + tok.split = false; + tok.val = val.slice(1); + tok.idx = i; + }; +}; + +/** + * Returns true if the given string looks like a regex quantifier + * @return {Boolean} + */ + +utils.isQuantifier = function(str) { + return /^(?:[0-9]?,[0-9]|[0-9],)$/.test(str); +}; + +/** + * Cast `val` to an array. + * @param {*} `val` + */ + +utils.stringifyArray = function(arr) { + return [utils.arrayify(arr).join('|')]; +}; + +/** + * Cast `val` to an array. + * @param {*} `val` + */ + +utils.arrayify = function(arr) { + if (typeof arr === 'undefined') { + return []; + } + if (typeof arr === 'string') { + return [arr]; + } + return arr; +}; + +/** + * Returns true if the given `str` is a non-empty string + * @return {Boolean} + */ + +utils.isString = function(str) { + return str != null && typeof str === 'string'; +}; + +/** + * Get the last element from `array` + * @param {Array} `array` + * @return {*} + */ + +utils.last = function(arr, n) { + return arr[arr.length - (n || 1)]; +}; + +utils.escapeRegex = function(str) { + return str.replace(/\\?([!^*?()[\]{}+?/])/g, '\\$1'); +}; diff --git a/code/application_liste/app/node_modules/braces/node_modules/extend-shallow/LICENSE b/code/application_liste/app/node_modules/braces/node_modules/extend-shallow/LICENSE new file mode 100644 index 0000000..fa30c4c --- /dev/null +++ b/code/application_liste/app/node_modules/braces/node_modules/extend-shallow/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2015, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/braces/node_modules/extend-shallow/README.md b/code/application_liste/app/node_modules/braces/node_modules/extend-shallow/README.md new file mode 100644 index 0000000..cdc45d4 --- /dev/null +++ b/code/application_liste/app/node_modules/braces/node_modules/extend-shallow/README.md @@ -0,0 +1,61 @@ +# extend-shallow [![NPM version](https://badge.fury.io/js/extend-shallow.svg)](http://badge.fury.io/js/extend-shallow) [![Build Status](https://travis-ci.org/jonschlinkert/extend-shallow.svg)](https://travis-ci.org/jonschlinkert/extend-shallow) + +> Extend an object with the properties of additional objects. node.js/javascript util. + +## Install + +Install with [npm](https://www.npmjs.com/) + +```sh +$ npm i extend-shallow --save +``` + +## Usage + +```js +var extend = require('extend-shallow'); + +extend({a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +Pass an empty object to shallow clone: + +```js +var obj = {}; +extend(obj, {a: 'b'}, {c: 'd'}) +//=> {a: 'b', c: 'd'} +``` + +## Related + +* [extend-shallow](https://github.com/jonschlinkert/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. +* [for-own](https://github.com/jonschlinkert/for-own): Iterate over the own enumerable properties of an object, and return an object with properties… [more](https://github.com/jonschlinkert/for-own) +* [for-in](https://github.com/jonschlinkert/for-in): Iterate over the own and inherited enumerable properties of an objecte, and return an object… [more](https://github.com/jonschlinkert/for-in) +* [is-plain-object](https://github.com/jonschlinkert/is-plain-object): Returns true if an object was created by the `Object` constructor. +* [isobject](https://github.com/jonschlinkert/isobject): Returns true if the value is an object and not an array or null. +* [kind-of](https://github.com/jonschlinkert/kind-of): Get the native type of a value. + +## Running tests + +Install dev dependencies: + +```sh +$ npm i -d && npm test +``` + +## Author + +**Jon Schlinkert** + ++ [github/jonschlinkert](https://github.com/jonschlinkert) ++ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) + +## License + +Copyright © 2015 Jon Schlinkert +Released under the MIT license. + +*** + +_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 29, 2015._ \ No newline at end of file diff --git a/code/application_liste/app/node_modules/braces/node_modules/extend-shallow/index.js b/code/application_liste/app/node_modules/braces/node_modules/extend-shallow/index.js new file mode 100644 index 0000000..92a067f --- /dev/null +++ b/code/application_liste/app/node_modules/braces/node_modules/extend-shallow/index.js @@ -0,0 +1,33 @@ +'use strict'; + +var isObject = require('is-extendable'); + +module.exports = function extend(o/*, objects*/) { + if (!isObject(o)) { o = {}; } + + var len = arguments.length; + for (var i = 1; i < len; i++) { + var obj = arguments[i]; + + if (isObject(obj)) { + assign(o, obj); + } + } + return o; +}; + +function assign(a, b) { + for (var key in b) { + if (hasOwn(b, key)) { + a[key] = b[key]; + } + } +} + +/** + * Returns true if the given `key` is an own property of `obj`. + */ + +function hasOwn(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} diff --git a/code/application_liste/app/node_modules/braces/node_modules/extend-shallow/package.json b/code/application_liste/app/node_modules/braces/node_modules/extend-shallow/package.json new file mode 100644 index 0000000..3441512 --- /dev/null +++ b/code/application_liste/app/node_modules/braces/node_modules/extend-shallow/package.json @@ -0,0 +1,87 @@ +{ + "_from": "extend-shallow@^2.0.1", + "_id": "extend-shallow@2.0.1", + "_inBundle": false, + "_integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "_location": "/braces/extend-shallow", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "extend-shallow@^2.0.1", + "name": "extend-shallow", + "escapedName": "extend-shallow", + "rawSpec": "^2.0.1", + "saveSpec": null, + "fetchSpec": "^2.0.1" + }, + "_requiredBy": [ + "/braces" + ], + "_resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "_shasum": "51af7d614ad9a9f610ea1bafbb989d6b1c56890f", + "_spec": "extend-shallow@^2.0.1", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\braces", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/extend-shallow/issues" + }, + "bundleDependencies": false, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "deprecated": false, + "description": "Extend an object with the properties of additional objects. node.js/javascript util.", + "devDependencies": { + "array-slice": "^0.2.3", + "benchmarked": "^0.1.4", + "chalk": "^1.0.0", + "for-own": "^0.1.3", + "glob": "^5.0.12", + "is-plain-object": "^2.0.1", + "kind-of": "^2.0.0", + "minimist": "^1.1.1", + "mocha": "^2.2.5", + "should": "^7.0.1" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/extend-shallow", + "keywords": [ + "assign", + "extend", + "javascript", + "js", + "keys", + "merge", + "obj", + "object", + "prop", + "properties", + "property", + "props", + "shallow", + "util", + "utility", + "utils", + "value" + ], + "license": "MIT", + "main": "index.js", + "name": "extend-shallow", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/extend-shallow.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "2.0.1" +} diff --git a/code/application_liste/app/node_modules/braces/package.json b/code/application_liste/app/node_modules/braces/package.json new file mode 100644 index 0000000..9c5566b --- /dev/null +++ b/code/application_liste/app/node_modules/braces/package.json @@ -0,0 +1,157 @@ +{ + "_from": "braces@^2.3.1", + "_id": "braces@2.3.2", + "_inBundle": false, + "_integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "_location": "/braces", + "_phantomChildren": { + "is-extendable": "0.1.1" + }, + "_requested": { + "type": "range", + "registry": true, + "raw": "braces@^2.3.1", + "name": "braces", + "escapedName": "braces", + "rawSpec": "^2.3.1", + "saveSpec": null, + "fetchSpec": "^2.3.1" + }, + "_requiredBy": [ + "/chokidar", + "/micromatch" + ], + "_resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "_shasum": "5979fd3f14cd531565e5fa2df1abfff1dfaee729", + "_spec": "braces@^2.3.1", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\micromatch", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/micromatch/braces/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Brian Woodward", + "url": "https://twitter.com/doowb" + }, + { + "name": "Elan Shanker", + "url": "https://github.com/es128" + }, + { + "name": "Eugene Sharygin", + "url": "https://github.com/eush77" + }, + { + "name": "hemanth.hm", + "url": "http://h3manth.com" + }, + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + } + ], + "dependencies": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "deprecated": false, + "description": "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.", + "devDependencies": { + "ansi-cyan": "^0.1.1", + "benchmarked": "^2.0.0", + "brace-expansion": "^1.1.8", + "cross-spawn": "^5.1.0", + "gulp": "^3.9.1", + "gulp-eslint": "^4.0.0", + "gulp-format-md": "^1.0.0", + "gulp-istanbul": "^1.1.2", + "gulp-mocha": "^3.0.1", + "gulp-unused": "^0.2.1", + "is-windows": "^1.0.1", + "minimatch": "^3.0.4", + "mocha": "^3.2.0", + "noncharacters": "^1.1.0", + "text-table": "^0.2.0", + "time-diff": "^0.3.1", + "yargs-parser": "^8.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js", + "lib" + ], + "homepage": "https://github.com/micromatch/braces", + "keywords": [ + "alpha", + "alphabetical", + "bash", + "brace", + "braces", + "expand", + "expansion", + "filepath", + "fill", + "fs", + "glob", + "globbing", + "letter", + "match", + "matches", + "matching", + "number", + "numerical", + "path", + "range", + "ranges", + "sh" + ], + "license": "MIT", + "main": "index.js", + "name": "braces", + "repository": { + "type": "git", + "url": "git+https://github.com/micromatch/braces.git" + }, + "scripts": { + "benchmark": "node benchmark", + "test": "mocha" + }, + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "lint": { + "reflinks": true + }, + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "expand-brackets", + "extglob", + "fill-range", + "micromatch", + "nanomatch" + ] + } + }, + "version": "2.3.2" +} diff --git a/code/application_liste/app/node_modules/buffer-alloc-unsafe/index.js b/code/application_liste/app/node_modules/buffer-alloc-unsafe/index.js new file mode 100644 index 0000000..0bd335f --- /dev/null +++ b/code/application_liste/app/node_modules/buffer-alloc-unsafe/index.js @@ -0,0 +1,17 @@ +function allocUnsafe (size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be a number') + } + + if (size < 0) { + throw new RangeError('"size" argument must not be negative') + } + + if (Buffer.allocUnsafe) { + return Buffer.allocUnsafe(size) + } else { + return new Buffer(size) + } +} + +module.exports = allocUnsafe diff --git a/code/application_liste/app/node_modules/buffer-alloc-unsafe/package.json b/code/application_liste/app/node_modules/buffer-alloc-unsafe/package.json new file mode 100644 index 0000000..b4ad195 --- /dev/null +++ b/code/application_liste/app/node_modules/buffer-alloc-unsafe/package.json @@ -0,0 +1,57 @@ +{ + "_from": "buffer-alloc-unsafe@^1.1.0", + "_id": "buffer-alloc-unsafe@1.1.0", + "_inBundle": false, + "_integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", + "_location": "/buffer-alloc-unsafe", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "buffer-alloc-unsafe@^1.1.0", + "name": "buffer-alloc-unsafe", + "escapedName": "buffer-alloc-unsafe", + "rawSpec": "^1.1.0", + "saveSpec": null, + "fetchSpec": "^1.1.0" + }, + "_requiredBy": [ + "/buffer-alloc" + ], + "_resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "_shasum": "bd7dc26ae2972d0eda253be061dba992349c19f0", + "_spec": "buffer-alloc-unsafe@^1.1.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\buffer-alloc", + "bugs": { + "url": "https://github.com/LinusU/buffer-alloc-unsafe/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "A [ponyfill](https://ponyfill.com) for `Buffer.allocUnsafe`.", + "devDependencies": { + "standard": "^7.1.2" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/LinusU/buffer-alloc-unsafe#readme", + "keywords": [ + "allocUnsafe", + "allocate", + "buffer allocUnsafe", + "buffer unsafe allocate", + "buffer", + "ponyfill", + "unsafe allocate" + ], + "license": "MIT", + "name": "buffer-alloc-unsafe", + "repository": { + "type": "git", + "url": "git+https://github.com/LinusU/buffer-alloc-unsafe.git" + }, + "scripts": { + "test": "standard && node test" + }, + "version": "1.1.0" +} diff --git a/code/application_liste/app/node_modules/buffer-alloc-unsafe/readme.md b/code/application_liste/app/node_modules/buffer-alloc-unsafe/readme.md new file mode 100644 index 0000000..8725ecf --- /dev/null +++ b/code/application_liste/app/node_modules/buffer-alloc-unsafe/readme.md @@ -0,0 +1,46 @@ +# Buffer Alloc Unsafe + +A [ponyfill](https://ponyfill.com) for `Buffer.allocUnsafe`. + +Works as Node.js: `v7.0.0`
+Works on Node.js: `v0.10.0` + +## Installation + +```sh +npm install --save buffer-alloc-unsafe +``` + +## Usage + +```js +const allocUnsafe = require('buffer-alloc-unsafe') + +console.log(allocUnsafe(10)) +//=> + +console.log(allocUnsafe(10)) +//=> + +console.log(allocUnsafe(10)) +//=> + +allocUnsafe(-10) +//=> RangeError: "size" argument must not be negative +``` + +## API + +### allocUnsafe(size) + +- `size` <Integer> The desired length of the new `Buffer` + +Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must be +less than or equal to the value of `buffer.kMaxLength` and greater than or equal +to zero. Otherwise, a `RangeError` is thrown. + +## See also + +- [buffer-alloc](https://github.com/LinusU/buffer-alloc) A ponyfill for `Buffer.alloc` +- [buffer-fill](https://github.com/LinusU/buffer-fill) A ponyfill for `Buffer.fill` +- [buffer-from](https://github.com/LinusU/buffer-from) A ponyfill for `Buffer.from` diff --git a/code/application_liste/app/node_modules/buffer-alloc/index.js b/code/application_liste/app/node_modules/buffer-alloc/index.js new file mode 100644 index 0000000..fe65860 --- /dev/null +++ b/code/application_liste/app/node_modules/buffer-alloc/index.js @@ -0,0 +1,32 @@ +var bufferFill = require('buffer-fill') +var allocUnsafe = require('buffer-alloc-unsafe') + +module.exports = function alloc (size, fill, encoding) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be a number') + } + + if (size < 0) { + throw new RangeError('"size" argument must not be negative') + } + + if (Buffer.alloc) { + return Buffer.alloc(size, fill, encoding) + } + + var buffer = allocUnsafe(size) + + if (size === 0) { + return buffer + } + + if (fill === undefined) { + return bufferFill(buffer, 0) + } + + if (typeof encoding !== 'string') { + encoding = undefined + } + + return bufferFill(buffer, fill, encoding) +} diff --git a/code/application_liste/app/node_modules/buffer-alloc/package.json b/code/application_liste/app/node_modules/buffer-alloc/package.json new file mode 100644 index 0000000..41498fe --- /dev/null +++ b/code/application_liste/app/node_modules/buffer-alloc/package.json @@ -0,0 +1,59 @@ +{ + "_from": "buffer-alloc@^1.2.0", + "_id": "buffer-alloc@1.2.0", + "_inBundle": false, + "_integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "_location": "/buffer-alloc", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "buffer-alloc@^1.2.0", + "name": "buffer-alloc", + "escapedName": "buffer-alloc", + "rawSpec": "^1.2.0", + "saveSpec": null, + "fetchSpec": "^1.2.0" + }, + "_requiredBy": [ + "/tar-stream" + ], + "_resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "_shasum": "890dd90d923a873e08e10e5fd51a57e5b7cce0ec", + "_spec": "buffer-alloc@^1.2.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\tar-stream", + "bugs": { + "url": "https://github.com/LinusU/buffer-alloc/issues" + }, + "bundleDependencies": false, + "dependencies": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + }, + "deprecated": false, + "description": "A [ponyfill](https://ponyfill.com) for `Buffer.alloc`.", + "devDependencies": { + "standard": "^7.1.2" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/LinusU/buffer-alloc#readme", + "keywords": [ + "alloc", + "allocate", + "buffer alloc", + "buffer allocate", + "buffer" + ], + "license": "MIT", + "name": "buffer-alloc", + "repository": { + "type": "git", + "url": "git+https://github.com/LinusU/buffer-alloc.git" + }, + "scripts": { + "test": "standard && node test" + }, + "version": "1.2.0" +} diff --git a/code/application_liste/app/node_modules/buffer-alloc/readme.md b/code/application_liste/app/node_modules/buffer-alloc/readme.md new file mode 100644 index 0000000..80c7d7b --- /dev/null +++ b/code/application_liste/app/node_modules/buffer-alloc/readme.md @@ -0,0 +1,43 @@ +# Buffer Alloc + +A [ponyfill](https://ponyfill.com) for `Buffer.alloc`. + +Works as Node.js: `v7.0.0`
+Works on Node.js: `v0.10.0` + +## Installation + +```sh +npm install --save buffer-alloc +``` + +## Usage + +```js +const alloc = require('buffer-alloc') + +console.log(alloc(4)) +//=> + +console.log(alloc(6, 0x41)) +//=> + +console.log(alloc(10, 'linus', 'utf8')) +//=> +``` + +## API + +### alloc(size[, fill[, encoding]]) + +- `size` <Integer> The desired length of the new `Buffer` +- `fill` <String> | <Buffer> | <Integer> A value to pre-fill the new `Buffer` with. **Default:** `0` +- `encoding` <String> If `fill` is a string, this is its encoding. **Default:** `'utf8'` + +Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the `Buffer` will be zero-filled. + +## See also + +- [buffer-alloc-unsafe](https://github.com/LinusU/buffer-alloc-unsafe) A ponyfill for `Buffer.allocUnsafe` +- [buffer-fill](https://github.com/LinusU/buffer-fill) A ponyfill for `Buffer.fill` +- [buffer-from](https://github.com/LinusU/buffer-from) A ponyfill for `Buffer.from` diff --git a/code/application_liste/app/node_modules/buffer-crc32/LICENSE b/code/application_liste/app/node_modules/buffer-crc32/LICENSE new file mode 100644 index 0000000..4cef10e --- /dev/null +++ b/code/application_liste/app/node_modules/buffer-crc32/LICENSE @@ -0,0 +1,19 @@ +The MIT License + +Copyright (c) 2013 Brian J. Brennan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the +Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/buffer-crc32/README.md b/code/application_liste/app/node_modules/buffer-crc32/README.md new file mode 100644 index 0000000..0d9d8b8 --- /dev/null +++ b/code/application_liste/app/node_modules/buffer-crc32/README.md @@ -0,0 +1,47 @@ +# buffer-crc32 + +[![Build Status](https://secure.travis-ci.org/brianloveswords/buffer-crc32.png?branch=master)](http://travis-ci.org/brianloveswords/buffer-crc32) + +crc32 that works with binary data and fancy character sets, outputs +buffer, signed or unsigned data and has tests. + +Derived from the sample CRC implementation in the PNG specification: http://www.w3.org/TR/PNG/#D-CRCAppendix + +# install +``` +npm install buffer-crc32 +``` + +# example +```js +var crc32 = require('buffer-crc32'); +// works with buffers +var buf = Buffer([0x00, 0x73, 0x75, 0x70, 0x20, 0x62, 0x72, 0x6f, 0x00]) +crc32(buf) // -> + +// has convenience methods for getting signed or unsigned ints +crc32.signed(buf) // -> -1805997238 +crc32.unsigned(buf) // -> 2488970058 + +// will cast to buffer if given a string, so you can +// directly use foreign characters safely +crc32('自動販売機') // -> + +// and works in append mode too +var partialCrc = crc32('hey'); +var partialCrc = crc32(' ', partialCrc); +var partialCrc = crc32('sup', partialCrc); +var partialCrc = crc32(' ', partialCrc); +var finalCrc = crc32('bros', partialCrc); // -> +``` + +# tests +This was tested against the output of zlib's crc32 method. You can run +the tests with`npm test` (requires tap) + +# see also +https://github.com/alexgorbatchev/node-crc, `crc.buffer.crc32` also +supports buffer inputs and return unsigned ints (thanks @tjholowaychuk). + +# license +MIT/X11 diff --git a/code/application_liste/app/node_modules/buffer-crc32/index.js b/code/application_liste/app/node_modules/buffer-crc32/index.js new file mode 100644 index 0000000..6727dd3 --- /dev/null +++ b/code/application_liste/app/node_modules/buffer-crc32/index.js @@ -0,0 +1,111 @@ +var Buffer = require('buffer').Buffer; + +var CRC_TABLE = [ + 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, + 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, + 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, + 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, + 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, + 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, + 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, + 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, + 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, + 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, + 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, + 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, + 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, + 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, + 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, + 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, + 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, + 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, + 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, + 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, + 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, + 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, + 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, + 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, + 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, + 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, + 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, + 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, + 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, + 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, + 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, + 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, + 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, + 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, + 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, + 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, + 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, + 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, + 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, + 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, + 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, + 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, + 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, + 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, + 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, + 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, + 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, + 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, + 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, + 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, + 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, + 0x2d02ef8d +]; + +if (typeof Int32Array !== 'undefined') { + CRC_TABLE = new Int32Array(CRC_TABLE); +} + +function ensureBuffer(input) { + if (Buffer.isBuffer(input)) { + return input; + } + + var hasNewBufferAPI = + typeof Buffer.alloc === "function" && + typeof Buffer.from === "function"; + + if (typeof input === "number") { + return hasNewBufferAPI ? Buffer.alloc(input) : new Buffer(input); + } + else if (typeof input === "string") { + return hasNewBufferAPI ? Buffer.from(input) : new Buffer(input); + } + else { + throw new Error("input must be buffer, number, or string, received " + + typeof input); + } +} + +function bufferizeInt(num) { + var tmp = ensureBuffer(4); + tmp.writeInt32BE(num, 0); + return tmp; +} + +function _crc32(buf, previous) { + buf = ensureBuffer(buf); + if (Buffer.isBuffer(previous)) { + previous = previous.readUInt32BE(0); + } + var crc = ~~previous ^ -1; + for (var n = 0; n < buf.length; n++) { + crc = CRC_TABLE[(crc ^ buf[n]) & 0xff] ^ (crc >>> 8); + } + return (crc ^ -1); +} + +function crc32() { + return bufferizeInt(_crc32.apply(null, arguments)); +} +crc32.signed = function () { + return _crc32.apply(null, arguments); +}; +crc32.unsigned = function () { + return _crc32.apply(null, arguments) >>> 0; +}; + +module.exports = crc32; diff --git a/code/application_liste/app/node_modules/buffer-crc32/package.json b/code/application_liste/app/node_modules/buffer-crc32/package.json new file mode 100644 index 0000000..0b0b608 --- /dev/null +++ b/code/application_liste/app/node_modules/buffer-crc32/package.json @@ -0,0 +1,69 @@ +{ + "_from": "buffer-crc32@~0.2.3", + "_id": "buffer-crc32@0.2.13", + "_inBundle": false, + "_integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "_location": "/buffer-crc32", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "buffer-crc32@~0.2.3", + "name": "buffer-crc32", + "escapedName": "buffer-crc32", + "rawSpec": "~0.2.3", + "saveSpec": null, + "fetchSpec": "~0.2.3" + }, + "_requiredBy": [ + "/yauzl" + ], + "_resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "_shasum": "0d333e3f00eac50aa1454abd30ef8c2a5d9a7242", + "_spec": "buffer-crc32@~0.2.3", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\yauzl", + "author": { + "name": "Brian J. Brennan", + "email": "brianloveswords@gmail.com" + }, + "bugs": { + "url": "https://github.com/brianloveswords/buffer-crc32/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Vladimir Kuznetsov" + } + ], + "dependencies": {}, + "deprecated": false, + "description": "A pure javascript CRC32 algorithm that plays nice with binary data", + "devDependencies": { + "tap": "~0.2.5" + }, + "engines": { + "node": "*" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/brianloveswords/buffer-crc32", + "license": "MIT", + "licenses": [ + { + "type": "MIT", + "url": "https://github.com/brianloveswords/buffer-crc32/raw/master/LICENSE" + } + ], + "main": "index.js", + "name": "buffer-crc32", + "optionalDependencies": {}, + "repository": { + "type": "git", + "url": "git://github.com/brianloveswords/buffer-crc32.git" + }, + "scripts": { + "test": "tap tests/*.test.js" + }, + "version": "0.2.13" +} diff --git a/code/application_liste/app/node_modules/buffer-equal/.travis.yml b/code/application_liste/app/node_modules/buffer-equal/.travis.yml new file mode 100644 index 0000000..dad2273 --- /dev/null +++ b/code/application_liste/app/node_modules/buffer-equal/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.8 + - "0.10" diff --git a/code/application_liste/app/node_modules/buffer-equal/LICENSE b/code/application_liste/app/node_modules/buffer-equal/LICENSE new file mode 100644 index 0000000..ee27ba4 --- /dev/null +++ b/code/application_liste/app/node_modules/buffer-equal/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/buffer-equal/README.markdown b/code/application_liste/app/node_modules/buffer-equal/README.markdown new file mode 100644 index 0000000..8c062fd --- /dev/null +++ b/code/application_liste/app/node_modules/buffer-equal/README.markdown @@ -0,0 +1,62 @@ +buffer-equal +============ + +Return whether two buffers are equal. + +[![build status](https://secure.travis-ci.org/substack/node-buffer-equal.png)](http://travis-ci.org/substack/node-buffer-equal) + +example +======= + +``` js +var bufferEqual = require('buffer-equal'); + +console.dir(bufferEqual( + new Buffer([253,254,255]), + new Buffer([253,254,255]) +)); +console.dir(bufferEqual( + new Buffer('abc'), + new Buffer('abcd') +)); +console.dir(bufferEqual( + new Buffer('abc'), + 'abc' +)); +``` + +output: + +``` +true +false +undefined +``` + +methods +======= + +``` js +var bufferEqual = require('buffer-equal') +``` + +bufferEqual(a, b) +----------------- + +Return whether the two buffers `a` and `b` are equal. + +If `a` or `b` is not a buffer, return `undefined`. + +install +======= + +With [npm](http://npmjs.org) do: + +``` +npm install buffer-equal +``` + +license +======= + +MIT diff --git a/code/application_liste/app/node_modules/buffer-equal/example/eq.js b/code/application_liste/app/node_modules/buffer-equal/example/eq.js new file mode 100644 index 0000000..1eb0509 --- /dev/null +++ b/code/application_liste/app/node_modules/buffer-equal/example/eq.js @@ -0,0 +1,14 @@ +var bufferEqual = require('../'); + +console.dir(bufferEqual( + new Buffer([253,254,255]), + new Buffer([253,254,255]) +)); +console.dir(bufferEqual( + new Buffer('abc'), + new Buffer('abcd') +)); +console.dir(bufferEqual( + new Buffer('abc'), + 'abc' +)); diff --git a/code/application_liste/app/node_modules/buffer-equal/index.js b/code/application_liste/app/node_modules/buffer-equal/index.js new file mode 100644 index 0000000..e640d4e --- /dev/null +++ b/code/application_liste/app/node_modules/buffer-equal/index.js @@ -0,0 +1,14 @@ +var Buffer = require('buffer').Buffer; // for use with browserify + +module.exports = function (a, b) { + if (!Buffer.isBuffer(a)) return undefined; + if (!Buffer.isBuffer(b)) return undefined; + if (typeof a.equals === 'function') return a.equals(b); + if (a.length !== b.length) return false; + + for (var i = 0; i < a.length; i++) { + if (a[i] !== b[i]) return false; + } + + return true; +}; diff --git a/code/application_liste/app/node_modules/buffer-equal/package.json b/code/application_liste/app/node_modules/buffer-equal/package.json new file mode 100644 index 0000000..ea9d17c --- /dev/null +++ b/code/application_liste/app/node_modules/buffer-equal/package.json @@ -0,0 +1,62 @@ +{ + "_from": "buffer-equal@^1.0.0", + "_id": "buffer-equal@1.0.0", + "_inBundle": false, + "_integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74=", + "_location": "/buffer-equal", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "buffer-equal@^1.0.0", + "name": "buffer-equal", + "escapedName": "buffer-equal", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/append-buffer" + ], + "_resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", + "_shasum": "59616b498304d556abd466966b22eeda3eca5fbe", + "_spec": "buffer-equal@^1.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\append-buffer", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/node-buffer-equal/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "return whether two buffers are equal", + "devDependencies": { + "tap": "0.2.4" + }, + "directories": { + "example": "example", + "test": "test" + }, + "engines": { + "node": ">=0.4.0" + }, + "homepage": "https://github.com/substack/node-buffer-equal#readme", + "keywords": [ + "buffer", + "equal" + ], + "license": "MIT", + "main": "index.js", + "name": "buffer-equal", + "repository": { + "type": "git", + "url": "git://github.com/substack/node-buffer-equal.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "1.0.0" +} diff --git a/code/application_liste/app/node_modules/buffer-equal/test/eq.js b/code/application_liste/app/node_modules/buffer-equal/test/eq.js new file mode 100644 index 0000000..3d34006 --- /dev/null +++ b/code/application_liste/app/node_modules/buffer-equal/test/eq.js @@ -0,0 +1,35 @@ +var bufferEqual = require('../'); +var test = require('tap').test; + +test('equal', function (t) { + var eq = bufferEqual( + new Buffer([253,254,255]), + new Buffer([253,254,255]) + ); + t.strictEqual(eq, true); + t.end(); +}); + +test('not equal', function (t) { + var eq = bufferEqual( + new Buffer('abc'), + new Buffer('abcd') + ); + t.strictEqual(eq, false); + t.end(); +}); + +test('not equal not buffer', function (t) { + var eq = bufferEqual( + new Buffer('abc'), + 'abc' + ); + t.strictEqual(eq, undefined); + t.end(); +}); + +test('equal not buffer', function (t) { + var eq = bufferEqual('abc', 'abc'); + t.strictEqual(eq, undefined); + t.end(); +}); diff --git a/code/application_liste/app/node_modules/buffer-fill/index.js b/code/application_liste/app/node_modules/buffer-fill/index.js new file mode 100644 index 0000000..428a9e1 --- /dev/null +++ b/code/application_liste/app/node_modules/buffer-fill/index.js @@ -0,0 +1,113 @@ +/* Node.js 6.4.0 and up has full support */ +var hasFullSupport = (function () { + try { + if (!Buffer.isEncoding('latin1')) { + return false + } + + var buf = Buffer.alloc ? Buffer.alloc(4) : new Buffer(4) + + buf.fill('ab', 'ucs2') + + return (buf.toString('hex') === '61006200') + } catch (_) { + return false + } +}()) + +function isSingleByte (val) { + return (val.length === 1 && val.charCodeAt(0) < 256) +} + +function fillWithNumber (buffer, val, start, end) { + if (start < 0 || end > buffer.length) { + throw new RangeError('Out of range index') + } + + start = start >>> 0 + end = end === undefined ? buffer.length : end >>> 0 + + if (end > start) { + buffer.fill(val, start, end) + } + + return buffer +} + +function fillWithBuffer (buffer, val, start, end) { + if (start < 0 || end > buffer.length) { + throw new RangeError('Out of range index') + } + + if (end <= start) { + return buffer + } + + start = start >>> 0 + end = end === undefined ? buffer.length : end >>> 0 + + var pos = start + var len = val.length + while (pos <= (end - len)) { + val.copy(buffer, pos) + pos += len + } + + if (pos !== end) { + val.copy(buffer, pos, 0, end - pos) + } + + return buffer +} + +function fill (buffer, val, start, end, encoding) { + if (hasFullSupport) { + return buffer.fill(val, start, end, encoding) + } + + if (typeof val === 'number') { + return fillWithNumber(buffer, val, start, end) + } + + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start + start = 0 + end = buffer.length + } else if (typeof end === 'string') { + encoding = end + end = buffer.length + } + + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string') + } + + if (encoding === 'latin1') { + encoding = 'binary' + } + + if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + + if (val === '') { + return fillWithNumber(buffer, 0, start, end) + } + + if (isSingleByte(val)) { + return fillWithNumber(buffer, val.charCodeAt(0), start, end) + } + + val = new Buffer(val, encoding) + } + + if (Buffer.isBuffer(val)) { + return fillWithBuffer(buffer, val, start, end) + } + + // Other values (e.g. undefined, boolean, object) results in zero-fill + return fillWithNumber(buffer, 0, start, end) +} + +module.exports = fill diff --git a/code/application_liste/app/node_modules/buffer-fill/package.json b/code/application_liste/app/node_modules/buffer-fill/package.json new file mode 100644 index 0000000..e3d1567 --- /dev/null +++ b/code/application_liste/app/node_modules/buffer-fill/package.json @@ -0,0 +1,49 @@ +{ + "_from": "buffer-fill@^1.0.0", + "_id": "buffer-fill@1.0.0", + "_inBundle": false, + "_integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", + "_location": "/buffer-fill", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "buffer-fill@^1.0.0", + "name": "buffer-fill", + "escapedName": "buffer-fill", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/buffer-alloc" + ], + "_resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "_shasum": "f8f78b76789888ef39f205cd637f68e702122b2c", + "_spec": "buffer-fill@^1.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\buffer-alloc", + "bugs": { + "url": "https://github.com/LinusU/buffer-fill/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "A [ponyfill](https://ponyfill.com) for `Buffer.fill`.", + "devDependencies": { + "buffer-alloc-unsafe": "^1.1.0", + "standard": "^7.1.2" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/LinusU/buffer-fill#readme", + "license": "MIT", + "name": "buffer-fill", + "repository": { + "type": "git", + "url": "git+https://github.com/LinusU/buffer-fill.git" + }, + "scripts": { + "test": "standard && node test" + }, + "version": "1.0.0" +} diff --git a/code/application_liste/app/node_modules/buffer-fill/readme.md b/code/application_liste/app/node_modules/buffer-fill/readme.md new file mode 100644 index 0000000..ac30738 --- /dev/null +++ b/code/application_liste/app/node_modules/buffer-fill/readme.md @@ -0,0 +1,54 @@ +# Buffer Fill + +A [ponyfill](https://ponyfill.com) for `Buffer.fill`. + +Works as Node.js: `v6.4.0`
+Works on Node.js: `v0.10.0` + +## Installation + +```sh +npm install --save buffer-fill +``` + +## Usage + +```js +const fill = require('buffer-fill') +const buf = Buffer.allocUnsafe(5) + +console.log(buf.fill(8)) +//=> + +console.log(buf.fill(9, 2, 4)) +//=> + +console.log(buf.fill('linus', 'latin1')) +//=> + +console.log(buf.fill('\u0222')) +//=> +``` + +## API + +### fill(buf, value[, offset[, end]][, encoding]) + +- `value` <String> | <Buffer> | <Integer> The value to fill `buf` with +- `offset` <Integer> Where to start filling `buf`. **Default:** `0` +- `end` <Integer> Where to stop filling `buf` (not inclusive). **Default:** `buf.length` +- `encoding` <String> If `value` is a string, this is its encoding. **Default:** `'utf8'` +- Return: <Buffer> A reference to `buf` + +Fills `buf` with the specified `value`. If the `offset` and `end` are not given, +the entire `buf` will be filled. This is meant to be a small simplification to +allow the creation and filling of a `Buffer` to be done on a single line. + +If the final write of a `fill()` operation falls on a multi-byte character, then +only the first bytes of that character that fit into `buf` are written. + +## See also + +- [buffer-alloc-unsafe](https://github.com/LinusU/buffer-alloc-unsafe) A ponyfill for `Buffer.allocUnsafe` +- [buffer-alloc](https://github.com/LinusU/buffer-alloc) A ponyfill for `Buffer.alloc` +- [buffer-from](https://github.com/LinusU/buffer-from) A ponyfill for `Buffer.from` diff --git a/code/application_liste/app/node_modules/buffer-from/LICENSE b/code/application_liste/app/node_modules/buffer-from/LICENSE new file mode 100644 index 0000000..e4bf1d6 --- /dev/null +++ b/code/application_liste/app/node_modules/buffer-from/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016, 2018 Linus Unnebäck + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/code/application_liste/app/node_modules/buffer-from/index.js b/code/application_liste/app/node_modules/buffer-from/index.js new file mode 100644 index 0000000..d92a83d --- /dev/null +++ b/code/application_liste/app/node_modules/buffer-from/index.js @@ -0,0 +1,69 @@ +var toString = Object.prototype.toString + +var isModern = ( + typeof Buffer.alloc === 'function' && + typeof Buffer.allocUnsafe === 'function' && + typeof Buffer.from === 'function' +) + +function isArrayBuffer (input) { + return toString.call(input).slice(8, -1) === 'ArrayBuffer' +} + +function fromArrayBuffer (obj, byteOffset, length) { + byteOffset >>>= 0 + + var maxLength = obj.byteLength - byteOffset + + if (maxLength < 0) { + throw new RangeError("'offset' is out of bounds") + } + + if (length === undefined) { + length = maxLength + } else { + length >>>= 0 + + if (length > maxLength) { + throw new RangeError("'length' is out of bounds") + } + } + + return isModern + ? Buffer.from(obj.slice(byteOffset, byteOffset + length)) + : new Buffer(new Uint8Array(obj.slice(byteOffset, byteOffset + length))) +} + +function fromString (string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('"encoding" must be a valid string encoding') + } + + return isModern + ? Buffer.from(string, encoding) + : new Buffer(string, encoding) +} + +function bufferFrom (value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('"value" argument must not be a number') + } + + if (isArrayBuffer(value)) { + return fromArrayBuffer(value, encodingOrOffset, length) + } + + if (typeof value === 'string') { + return fromString(value, encodingOrOffset) + } + + return isModern + ? Buffer.from(value) + : new Buffer(value) +} + +module.exports = bufferFrom diff --git a/code/application_liste/app/node_modules/buffer-from/package.json b/code/application_liste/app/node_modules/buffer-from/package.json new file mode 100644 index 0000000..eb640d7 --- /dev/null +++ b/code/application_liste/app/node_modules/buffer-from/package.json @@ -0,0 +1,52 @@ +{ + "_from": "buffer-from@^1.0.0", + "_id": "buffer-from@1.1.1", + "_inBundle": false, + "_integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "_location": "/buffer-from", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "buffer-from@^1.0.0", + "name": "buffer-from", + "escapedName": "buffer-from", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/concat-stream" + ], + "_resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "_shasum": "32713bc028f75c02fdb710d7c7bcec1f2c6070ef", + "_spec": "buffer-from@^1.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\concat-stream", + "bugs": { + "url": "https://github.com/LinusU/buffer-from/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "A [ponyfill](https://ponyfill.com) for `Buffer.from`, uses native implementation if available.", + "devDependencies": { + "standard": "^7.1.2" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/LinusU/buffer-from#readme", + "keywords": [ + "buffer", + "buffer from" + ], + "license": "MIT", + "name": "buffer-from", + "repository": { + "type": "git", + "url": "git+https://github.com/LinusU/buffer-from.git" + }, + "scripts": { + "test": "standard && node test" + }, + "version": "1.1.1" +} diff --git a/code/application_liste/app/node_modules/buffer-from/readme.md b/code/application_liste/app/node_modules/buffer-from/readme.md new file mode 100644 index 0000000..9880a55 --- /dev/null +++ b/code/application_liste/app/node_modules/buffer-from/readme.md @@ -0,0 +1,69 @@ +# Buffer From + +A [ponyfill](https://ponyfill.com) for `Buffer.from`, uses native implementation if available. + +## Installation + +```sh +npm install --save buffer-from +``` + +## Usage + +```js +const bufferFrom = require('buffer-from') + +console.log(bufferFrom([1, 2, 3, 4])) +//=> + +const arr = new Uint8Array([1, 2, 3, 4]) +console.log(bufferFrom(arr.buffer, 1, 2)) +//=> + +console.log(bufferFrom('test', 'utf8')) +//=> + +const buf = bufferFrom('test') +console.log(bufferFrom(buf)) +//=> +``` + +## API + +### bufferFrom(array) + +- `array` <Array> + +Allocates a new `Buffer` using an `array` of octets. + +### bufferFrom(arrayBuffer[, byteOffset[, length]]) + +- `arrayBuffer` <ArrayBuffer> The `.buffer` property of a TypedArray or ArrayBuffer +- `byteOffset` <Integer> Where to start copying from `arrayBuffer`. **Default:** `0` +- `length` <Integer> How many bytes to copy from `arrayBuffer`. **Default:** `arrayBuffer.length - byteOffset` + +When passed a reference to the `.buffer` property of a TypedArray instance, the +newly created `Buffer` will share the same allocated memory as the TypedArray. + +The optional `byteOffset` and `length` arguments specify a memory range within +the `arrayBuffer` that will be shared by the `Buffer`. + +### bufferFrom(buffer) + +- `buffer` <Buffer> An existing `Buffer` to copy data from + +Copies the passed `buffer` data onto a new `Buffer` instance. + +### bufferFrom(string[, encoding]) + +- `string` <String> A string to encode. +- `encoding` <String> The encoding of `string`. **Default:** `'utf8'` + +Creates a new `Buffer` containing the given JavaScript string `string`. If +provided, the `encoding` parameter identifies the character encoding of +`string`. + +## See also + +- [buffer-alloc](https://github.com/LinusU/buffer-alloc) A ponyfill for `Buffer.alloc` +- [buffer-alloc-unsafe](https://github.com/LinusU/buffer-alloc-unsafe) A ponyfill for `Buffer.allocUnsafe` diff --git a/code/application_liste/app/node_modules/buffer/AUTHORS.md b/code/application_liste/app/node_modules/buffer/AUTHORS.md new file mode 100644 index 0000000..396b45f --- /dev/null +++ b/code/application_liste/app/node_modules/buffer/AUTHORS.md @@ -0,0 +1,62 @@ +# Authors + +#### Ordered by first contribution. + +- Romain Beauxis (toots@rastageeks.org) +- Tobias Koppers (tobias.koppers@googlemail.com) +- Janus (ysangkok@gmail.com) +- Rainer Dreyer (rdrey1@gmail.com) +- Tõnis Tiigi (tonistiigi@gmail.com) +- James Halliday (mail@substack.net) +- Michael Williamson (mike@zwobble.org) +- elliottcable (github@elliottcable.name) +- rafael (rvalle@livelens.net) +- Andrew Kelley (superjoe30@gmail.com) +- Andreas Madsen (amwebdk@gmail.com) +- Mike Brevoort (mike.brevoort@pearson.com) +- Brian White (mscdex@mscdex.net) +- Feross Aboukhadijeh (feross@feross.org) +- Ruben Verborgh (ruben@verborgh.org) +- eliang (eliang.cs@gmail.com) +- Jesse Tane (jesse.tane@gmail.com) +- Alfonso Boza (alfonso@cloud.com) +- Mathias Buus (mathiasbuus@gmail.com) +- Devon Govett (devongovett@gmail.com) +- Daniel Cousens (github@dcousens.com) +- Joseph Dykstra (josephdykstra@gmail.com) +- Parsha Pourkhomami (parshap+git@gmail.com) +- Damjan Košir (damjan.kosir@gmail.com) +- daverayment (dave.rayment@gmail.com) +- kawanet (u-suke@kawa.net) +- Linus Unnebäck (linus@folkdatorn.se) +- Nolan Lawson (nolan.lawson@gmail.com) +- Calvin Metcalf (calvin.metcalf@gmail.com) +- Koki Takahashi (hakatasiloving@gmail.com) +- Guy Bedford (guybedford@gmail.com) +- Jan Schär (jscissr@gmail.com) +- RaulTsc (tomescu.raul@gmail.com) +- Matthieu Monsch (monsch@alum.mit.edu) +- Dan Ehrenberg (littledan@chromium.org) +- Kirill Fomichev (fanatid@ya.ru) +- Yusuke Kawasaki (u-suke@kawa.net) +- DC (dcposch@dcpos.ch) +- John-David Dalton (john.david.dalton@gmail.com) +- adventure-yunfei (adventure030@gmail.com) +- Emil Bay (github@tixz.dk) +- Sam Sudar (sudar.sam@gmail.com) +- Volker Mische (volker.mische@gmail.com) +- David Walton (support@geekstocks.com) +- Сковорода Никита Андреевич (chalkerx@gmail.com) +- greenkeeper[bot] (greenkeeper[bot]@users.noreply.github.com) +- ukstv (sergey.ukustov@machinomy.com) +- Renée Kooi (renee@kooi.me) +- ranbochen (ranbochen@qq.com) +- Vladimir Borovik (bobahbdb@gmail.com) +- greenkeeper[bot] (23040076+greenkeeper[bot]@users.noreply.github.com) +- kumavis (aaron@kumavis.me) +- Sergey Ukustov (sergey.ukustov@machinomy.com) +- Fei Liu (liu.feiwood@gmail.com) +- Blaine Bublitz (blaine.bublitz@gmail.com) +- Niklas Mischkulnig (mischnic@users.noreply.github.com) + +#### Generated by bin/update-authors.sh. diff --git a/code/application_liste/app/node_modules/buffer/LICENSE b/code/application_liste/app/node_modules/buffer/LICENSE new file mode 100644 index 0000000..d6bf75d --- /dev/null +++ b/code/application_liste/app/node_modules/buffer/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh, and other contributors. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/buffer/README.md b/code/application_liste/app/node_modules/buffer/README.md new file mode 100644 index 0000000..2aab37d --- /dev/null +++ b/code/application_liste/app/node_modules/buffer/README.md @@ -0,0 +1,416 @@ +# buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] + +[travis-image]: https://img.shields.io/travis/feross/buffer/master.svg +[travis-url]: https://travis-ci.org/feross/buffer +[npm-image]: https://img.shields.io/npm/v/buffer.svg +[npm-url]: https://npmjs.org/package/buffer +[downloads-image]: https://img.shields.io/npm/dm/buffer.svg +[downloads-url]: https://npmjs.org/package/buffer +[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg +[standard-url]: https://standardjs.com + +#### The buffer module from [node.js](https://nodejs.org/), for the browser. + +[![saucelabs][saucelabs-image]][saucelabs-url] + +[saucelabs-image]: https://saucelabs.com/browser-matrix/buffer.svg +[saucelabs-url]: https://saucelabs.com/u/buffer + +With [browserify](http://browserify.org), simply `require('buffer')` or use the `Buffer` global and you will get this module. + +The goal is to provide an API that is 100% identical to +[node's Buffer API](https://nodejs.org/api/buffer.html). Read the +[official docs](https://nodejs.org/api/buffer.html) for the full list of properties, +instance methods, and class methods that are supported. + +## features + +- Manipulate binary data like a boss, in all browsers! +- Super fast. Backed by Typed Arrays (`Uint8Array`/`ArrayBuffer`, not `Object`) +- Extremely small bundle size (**6.75KB minified + gzipped**, 51.9KB with comments) +- Excellent browser support (Chrome, Firefox, Edge, Safari 9+, IE 11, iOS 9+, Android, etc.) +- Preserves Node API exactly, with one minor difference (see below) +- Square-bracket `buf[4]` notation works! +- Does not modify any browser prototypes or put anything on `window` +- Comprehensive test suite (including all buffer tests from node.js core) + +## `buffer` for enterprise + +Available as part of the Tidelift Subscription. + +The maintainers of `buffer` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-buffer?utm_source=npm-buffer&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) + +## install + +To use this module directly (without browserify), install it: + +```bash +npm install buffer +``` + +This module was previously called **native-buffer-browserify**, but please use **buffer** +from now on. + +If you do not use a bundler, you can use the [standalone script](https://bundle.run/buffer). + +## usage + +The module's API is identical to node's `Buffer` API. Read the +[official docs](https://nodejs.org/api/buffer.html) for the full list of properties, +instance methods, and class methods that are supported. + +As mentioned above, `require('buffer')` or use the `Buffer` global with +[browserify](http://browserify.org) and this module will automatically be included +in your bundle. Almost any npm module will work in the browser, even if it assumes that +the node `Buffer` API will be available. + +To depend on this module explicitly (without browserify), require it like this: + +```js +var Buffer = require('buffer/').Buffer // note: the trailing slash is important! +``` + +To require this module explicitly, use `require('buffer/')` which tells the node.js module +lookup algorithm (also used by browserify) to use the **npm module** named `buffer` +instead of the **node.js core** module named `buffer`! + + +## how does it work? + +The Buffer constructor returns instances of `Uint8Array` that have their prototype +changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of `Uint8Array`, +so the returned instances will have all the node `Buffer` methods and the +`Uint8Array` methods. Square bracket notation works as expected -- it returns a +single octet. + +The `Uint8Array` prototype remains unmodified. + + +## tracking the latest node api + +This module tracks the Buffer API in the latest (unstable) version of node.js. The Buffer +API is considered **stable** in the +[node stability index](https://nodejs.org/docs/latest/api/documentation.html#documentation_stability_index), +so it is unlikely that there will ever be breaking changes. +Nonetheless, when/if the Buffer API changes in node, this module's API will change +accordingly. + +## related packages + +- [`buffer-reverse`](https://www.npmjs.com/package/buffer-reverse) - Reverse a buffer +- [`buffer-xor`](https://www.npmjs.com/package/buffer-xor) - Bitwise xor a buffer +- [`is-buffer`](https://www.npmjs.com/package/is-buffer) - Determine if an object is a Buffer without including the whole `Buffer` package + +## conversion packages + +### convert typed array to buffer + +Use [`typedarray-to-buffer`](https://www.npmjs.com/package/typedarray-to-buffer) to convert any kind of typed array to a `Buffer`. Does not perform a copy, so it's super fast. + +### convert buffer to typed array + +`Buffer` is a subclass of `Uint8Array` (which is a typed array). So there is no need to explicitly convert to typed array. Just use the buffer as a `Uint8Array`. + +### convert blob to buffer + +Use [`blob-to-buffer`](https://www.npmjs.com/package/blob-to-buffer) to convert a `Blob` to a `Buffer`. + +### convert buffer to blob + +To convert a `Buffer` to a `Blob`, use the `Blob` constructor: + +```js +var blob = new Blob([ buffer ]) +``` + +Optionally, specify a mimetype: + +```js +var blob = new Blob([ buffer ], { type: 'text/html' }) +``` + +### convert arraybuffer to buffer + +To convert an `ArrayBuffer` to a `Buffer`, use the `Buffer.from` function. Does not perform a copy, so it's super fast. + +```js +var buffer = Buffer.from(arrayBuffer) +``` + +### convert buffer to arraybuffer + +To convert a `Buffer` to an `ArrayBuffer`, use the `.buffer` property (which is present on all `Uint8Array` objects): + +```js +var arrayBuffer = buffer.buffer.slice( + buffer.byteOffset, buffer.byteOffset + buffer.byteLength +) +``` + +Alternatively, use the [`to-arraybuffer`](https://www.npmjs.com/package/to-arraybuffer) module. + +## performance + +See perf tests in `/perf`. + +`BrowserBuffer` is the browser `buffer` module (this repo). `Uint8Array` is included as a +sanity check (since `BrowserBuffer` uses `Uint8Array` under the hood, `Uint8Array` will +always be at least a bit faster). Finally, `NodeBuffer` is the node.js buffer module, +which is included to compare against. + +NOTE: Performance has improved since these benchmarks were taken. PR welcome to update the README. + +### Chrome 38 + +| Method | Operations | Accuracy | Sampled | Fastest | +|:-------|:-----------|:---------|:--------|:-------:| +| BrowserBuffer#bracket-notation | 11,457,464 ops/sec | ±0.86% | 66 | ✓ | +| Uint8Array#bracket-notation | 10,824,332 ops/sec | ±0.74% | 65 | | +| | | | | +| BrowserBuffer#concat | 450,532 ops/sec | ±0.76% | 68 | | +| Uint8Array#concat | 1,368,911 ops/sec | ±1.50% | 62 | ✓ | +| | | | | +| BrowserBuffer#copy(16000) | 903,001 ops/sec | ±0.96% | 67 | | +| Uint8Array#copy(16000) | 1,422,441 ops/sec | ±1.04% | 66 | ✓ | +| | | | | +| BrowserBuffer#copy(16) | 11,431,358 ops/sec | ±0.46% | 69 | | +| Uint8Array#copy(16) | 13,944,163 ops/sec | ±1.12% | 68 | ✓ | +| | | | | +| BrowserBuffer#new(16000) | 106,329 ops/sec | ±6.70% | 44 | | +| Uint8Array#new(16000) | 131,001 ops/sec | ±2.85% | 31 | ✓ | +| | | | | +| BrowserBuffer#new(16) | 1,554,491 ops/sec | ±1.60% | 65 | | +| Uint8Array#new(16) | 6,623,930 ops/sec | ±1.66% | 65 | ✓ | +| | | | | +| BrowserBuffer#readDoubleBE | 112,830 ops/sec | ±0.51% | 69 | ✓ | +| DataView#getFloat64 | 93,500 ops/sec | ±0.57% | 68 | | +| | | | | +| BrowserBuffer#readFloatBE | 146,678 ops/sec | ±0.95% | 68 | ✓ | +| DataView#getFloat32 | 99,311 ops/sec | ±0.41% | 67 | | +| | | | | +| BrowserBuffer#readUInt32LE | 843,214 ops/sec | ±0.70% | 69 | ✓ | +| DataView#getUint32 | 103,024 ops/sec | ±0.64% | 67 | | +| | | | | +| BrowserBuffer#slice | 1,013,941 ops/sec | ±0.75% | 67 | | +| Uint8Array#subarray | 1,903,928 ops/sec | ±0.53% | 67 | ✓ | +| | | | | +| BrowserBuffer#writeFloatBE | 61,387 ops/sec | ±0.90% | 67 | | +| DataView#setFloat32 | 141,249 ops/sec | ±0.40% | 66 | ✓ | + + +### Firefox 33 + +| Method | Operations | Accuracy | Sampled | Fastest | +|:-------|:-----------|:---------|:--------|:-------:| +| BrowserBuffer#bracket-notation | 20,800,421 ops/sec | ±1.84% | 60 | | +| Uint8Array#bracket-notation | 20,826,235 ops/sec | ±2.02% | 61 | ✓ | +| | | | | +| BrowserBuffer#concat | 153,076 ops/sec | ±2.32% | 61 | | +| Uint8Array#concat | 1,255,674 ops/sec | ±8.65% | 52 | ✓ | +| | | | | +| BrowserBuffer#copy(16000) | 1,105,312 ops/sec | ±1.16% | 63 | | +| Uint8Array#copy(16000) | 1,615,911 ops/sec | ±0.55% | 66 | ✓ | +| | | | | +| BrowserBuffer#copy(16) | 16,357,599 ops/sec | ±0.73% | 68 | | +| Uint8Array#copy(16) | 31,436,281 ops/sec | ±1.05% | 68 | ✓ | +| | | | | +| BrowserBuffer#new(16000) | 52,995 ops/sec | ±6.01% | 35 | | +| Uint8Array#new(16000) | 87,686 ops/sec | ±5.68% | 45 | ✓ | +| | | | | +| BrowserBuffer#new(16) | 252,031 ops/sec | ±1.61% | 66 | | +| Uint8Array#new(16) | 8,477,026 ops/sec | ±0.49% | 68 | ✓ | +| | | | | +| BrowserBuffer#readDoubleBE | 99,871 ops/sec | ±0.41% | 69 | | +| DataView#getFloat64 | 285,663 ops/sec | ±0.70% | 68 | ✓ | +| | | | | +| BrowserBuffer#readFloatBE | 115,540 ops/sec | ±0.42% | 69 | | +| DataView#getFloat32 | 288,722 ops/sec | ±0.82% | 68 | ✓ | +| | | | | +| BrowserBuffer#readUInt32LE | 633,926 ops/sec | ±1.08% | 67 | ✓ | +| DataView#getUint32 | 294,808 ops/sec | ±0.79% | 64 | | +| | | | | +| BrowserBuffer#slice | 349,425 ops/sec | ±0.46% | 69 | | +| Uint8Array#subarray | 5,965,819 ops/sec | ±0.60% | 65 | ✓ | +| | | | | +| BrowserBuffer#writeFloatBE | 59,980 ops/sec | ±0.41% | 67 | | +| DataView#setFloat32 | 317,634 ops/sec | ±0.63% | 68 | ✓ | + +### Safari 8 + +| Method | Operations | Accuracy | Sampled | Fastest | +|:-------|:-----------|:---------|:--------|:-------:| +| BrowserBuffer#bracket-notation | 10,279,729 ops/sec | ±2.25% | 56 | ✓ | +| Uint8Array#bracket-notation | 10,030,767 ops/sec | ±2.23% | 59 | | +| | | | | +| BrowserBuffer#concat | 144,138 ops/sec | ±1.38% | 65 | | +| Uint8Array#concat | 4,950,764 ops/sec | ±1.70% | 63 | ✓ | +| | | | | +| BrowserBuffer#copy(16000) | 1,058,548 ops/sec | ±1.51% | 64 | | +| Uint8Array#copy(16000) | 1,409,666 ops/sec | ±1.17% | 65 | ✓ | +| | | | | +| BrowserBuffer#copy(16) | 6,282,529 ops/sec | ±1.88% | 58 | | +| Uint8Array#copy(16) | 11,907,128 ops/sec | ±2.87% | 58 | ✓ | +| | | | | +| BrowserBuffer#new(16000) | 101,663 ops/sec | ±3.89% | 57 | | +| Uint8Array#new(16000) | 22,050,818 ops/sec | ±6.51% | 46 | ✓ | +| | | | | +| BrowserBuffer#new(16) | 176,072 ops/sec | ±2.13% | 64 | | +| Uint8Array#new(16) | 24,385,731 ops/sec | ±5.01% | 51 | ✓ | +| | | | | +| BrowserBuffer#readDoubleBE | 41,341 ops/sec | ±1.06% | 67 | | +| DataView#getFloat64 | 322,280 ops/sec | ±0.84% | 68 | ✓ | +| | | | | +| BrowserBuffer#readFloatBE | 46,141 ops/sec | ±1.06% | 65 | | +| DataView#getFloat32 | 337,025 ops/sec | ±0.43% | 69 | ✓ | +| | | | | +| BrowserBuffer#readUInt32LE | 151,551 ops/sec | ±1.02% | 66 | | +| DataView#getUint32 | 308,278 ops/sec | ±0.94% | 67 | ✓ | +| | | | | +| BrowserBuffer#slice | 197,365 ops/sec | ±0.95% | 66 | | +| Uint8Array#subarray | 9,558,024 ops/sec | ±3.08% | 58 | ✓ | +| | | | | +| BrowserBuffer#writeFloatBE | 17,518 ops/sec | ±1.03% | 63 | | +| DataView#setFloat32 | 319,751 ops/sec | ±0.48% | 68 | ✓ | + + +### Node 0.11.14 + +| Method | Operations | Accuracy | Sampled | Fastest | +|:-------|:-----------|:---------|:--------|:-------:| +| BrowserBuffer#bracket-notation | 10,489,828 ops/sec | ±3.25% | 90 | | +| Uint8Array#bracket-notation | 10,534,884 ops/sec | ±0.81% | 92 | ✓ | +| NodeBuffer#bracket-notation | 10,389,910 ops/sec | ±0.97% | 87 | | +| | | | | +| BrowserBuffer#concat | 487,830 ops/sec | ±2.58% | 88 | | +| Uint8Array#concat | 1,814,327 ops/sec | ±1.28% | 88 | ✓ | +| NodeBuffer#concat | 1,636,523 ops/sec | ±1.88% | 73 | | +| | | | | +| BrowserBuffer#copy(16000) | 1,073,665 ops/sec | ±0.77% | 90 | | +| Uint8Array#copy(16000) | 1,348,517 ops/sec | ±0.84% | 89 | ✓ | +| NodeBuffer#copy(16000) | 1,289,533 ops/sec | ±0.82% | 93 | | +| | | | | +| BrowserBuffer#copy(16) | 12,782,706 ops/sec | ±0.74% | 85 | | +| Uint8Array#copy(16) | 14,180,427 ops/sec | ±0.93% | 92 | ✓ | +| NodeBuffer#copy(16) | 11,083,134 ops/sec | ±1.06% | 89 | | +| | | | | +| BrowserBuffer#new(16000) | 141,678 ops/sec | ±3.30% | 67 | | +| Uint8Array#new(16000) | 161,491 ops/sec | ±2.96% | 60 | | +| NodeBuffer#new(16000) | 292,699 ops/sec | ±3.20% | 55 | ✓ | +| | | | | +| BrowserBuffer#new(16) | 1,655,466 ops/sec | ±2.41% | 82 | | +| Uint8Array#new(16) | 14,399,926 ops/sec | ±0.91% | 94 | ✓ | +| NodeBuffer#new(16) | 3,894,696 ops/sec | ±0.88% | 92 | | +| | | | | +| BrowserBuffer#readDoubleBE | 109,582 ops/sec | ±0.75% | 93 | ✓ | +| DataView#getFloat64 | 91,235 ops/sec | ±0.81% | 90 | | +| NodeBuffer#readDoubleBE | 88,593 ops/sec | ±0.96% | 81 | | +| | | | | +| BrowserBuffer#readFloatBE | 139,854 ops/sec | ±1.03% | 85 | ✓ | +| DataView#getFloat32 | 98,744 ops/sec | ±0.80% | 89 | | +| NodeBuffer#readFloatBE | 92,769 ops/sec | ±0.94% | 93 | | +| | | | | +| BrowserBuffer#readUInt32LE | 710,861 ops/sec | ±0.82% | 92 | | +| DataView#getUint32 | 117,893 ops/sec | ±0.84% | 91 | | +| NodeBuffer#readUInt32LE | 851,412 ops/sec | ±0.72% | 93 | ✓ | +| | | | | +| BrowserBuffer#slice | 1,673,877 ops/sec | ±0.73% | 94 | | +| Uint8Array#subarray | 6,919,243 ops/sec | ±0.67% | 90 | ✓ | +| NodeBuffer#slice | 4,617,604 ops/sec | ±0.79% | 93 | | +| | | | | +| BrowserBuffer#writeFloatBE | 66,011 ops/sec | ±0.75% | 93 | | +| DataView#setFloat32 | 127,760 ops/sec | ±0.72% | 93 | ✓ | +| NodeBuffer#writeFloatBE | 103,352 ops/sec | ±0.83% | 93 | | + +### iojs 1.8.1 + +| Method | Operations | Accuracy | Sampled | Fastest | +|:-------|:-----------|:---------|:--------|:-------:| +| BrowserBuffer#bracket-notation | 10,990,488 ops/sec | ±1.11% | 91 | | +| Uint8Array#bracket-notation | 11,268,757 ops/sec | ±0.65% | 97 | | +| NodeBuffer#bracket-notation | 11,353,260 ops/sec | ±0.83% | 94 | ✓ | +| | | | | +| BrowserBuffer#concat | 378,954 ops/sec | ±0.74% | 94 | | +| Uint8Array#concat | 1,358,288 ops/sec | ±0.97% | 87 | | +| NodeBuffer#concat | 1,934,050 ops/sec | ±1.11% | 78 | ✓ | +| | | | | +| BrowserBuffer#copy(16000) | 894,538 ops/sec | ±0.56% | 84 | | +| Uint8Array#copy(16000) | 1,442,656 ops/sec | ±0.71% | 96 | | +| NodeBuffer#copy(16000) | 1,457,898 ops/sec | ±0.53% | 92 | ✓ | +| | | | | +| BrowserBuffer#copy(16) | 12,870,457 ops/sec | ±0.67% | 95 | | +| Uint8Array#copy(16) | 16,643,989 ops/sec | ±0.61% | 93 | ✓ | +| NodeBuffer#copy(16) | 14,885,848 ops/sec | ±0.74% | 94 | | +| | | | | +| BrowserBuffer#new(16000) | 109,264 ops/sec | ±4.21% | 63 | | +| Uint8Array#new(16000) | 138,916 ops/sec | ±1.87% | 61 | | +| NodeBuffer#new(16000) | 281,449 ops/sec | ±3.58% | 51 | ✓ | +| | | | | +| BrowserBuffer#new(16) | 1,362,935 ops/sec | ±0.56% | 99 | | +| Uint8Array#new(16) | 6,193,090 ops/sec | ±0.64% | 95 | ✓ | +| NodeBuffer#new(16) | 4,745,425 ops/sec | ±1.56% | 90 | | +| | | | | +| BrowserBuffer#readDoubleBE | 118,127 ops/sec | ±0.59% | 93 | ✓ | +| DataView#getFloat64 | 107,332 ops/sec | ±0.65% | 91 | | +| NodeBuffer#readDoubleBE | 116,274 ops/sec | ±0.94% | 95 | | +| | | | | +| BrowserBuffer#readFloatBE | 150,326 ops/sec | ±0.58% | 95 | ✓ | +| DataView#getFloat32 | 110,541 ops/sec | ±0.57% | 98 | | +| NodeBuffer#readFloatBE | 121,599 ops/sec | ±0.60% | 87 | | +| | | | | +| BrowserBuffer#readUInt32LE | 814,147 ops/sec | ±0.62% | 93 | | +| DataView#getUint32 | 137,592 ops/sec | ±0.64% | 90 | | +| NodeBuffer#readUInt32LE | 931,650 ops/sec | ±0.71% | 96 | ✓ | +| | | | | +| BrowserBuffer#slice | 878,590 ops/sec | ±0.68% | 93 | | +| Uint8Array#subarray | 2,843,308 ops/sec | ±1.02% | 90 | | +| NodeBuffer#slice | 4,998,316 ops/sec | ±0.68% | 90 | ✓ | +| | | | | +| BrowserBuffer#writeFloatBE | 65,927 ops/sec | ±0.74% | 93 | | +| DataView#setFloat32 | 139,823 ops/sec | ±0.97% | 89 | ✓ | +| NodeBuffer#writeFloatBE | 135,763 ops/sec | ±0.65% | 96 | | +| | | | | + +## Testing the project + +First, install the project: + + npm install + +Then, to run tests in Node.js, run: + + npm run test-node + +To test locally in a browser, you can run: + + npm run test-browser-es5-local # For ES5 browsers that don't support ES6 + npm run test-browser-es6-local # For ES6 compliant browsers + +This will print out a URL that you can then open in a browser to run the tests, using [airtap](https://www.npmjs.com/package/airtap). + +To run automated browser tests using Saucelabs, ensure that your `SAUCE_USERNAME` and `SAUCE_ACCESS_KEY` environment variables are set, then run: + + npm test + +This is what's run in Travis, to check against various browsers. The list of browsers is kept in the `bin/airtap-es5.yml` and `bin/airtap-es6.yml` files. + +## JavaScript Standard Style + +This module uses [JavaScript Standard Style](https://github.com/feross/standard). + +[![JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) + +To test that the code conforms to the style, `npm install` and run: + + ./node_modules/.bin/standard + +## credit + +This was originally forked from [buffer-browserify](https://github.com/toots/buffer-browserify). + +## Security Policies and Procedures + +The `buffer` team and community take all security bugs in `buffer` seriously. Please see our [security policies and procedures](https://github.com/feross/security) document to learn how to report issues. + +## license + +MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org), and other contributors. Originally forked from an MIT-licensed module by Romain Beauxis. diff --git a/code/application_liste/app/node_modules/buffer/index.d.ts b/code/application_liste/app/node_modules/buffer/index.d.ts new file mode 100644 index 0000000..0227c9c --- /dev/null +++ b/code/application_liste/app/node_modules/buffer/index.d.ts @@ -0,0 +1,186 @@ +export class Buffer extends Uint8Array { + length: number + write(string: string, offset?: number, length?: number, encoding?: string): number; + toString(encoding?: string, start?: number, end?: number): string; + toJSON(): { type: 'Buffer', data: any[] }; + equals(otherBuffer: Buffer): boolean; + compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number; + copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; + slice(start?: number, end?: number): Buffer; + writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number; + readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number; + readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number; + readIntLE(offset: number, byteLength: number, noAssert?: boolean): number; + readIntBE(offset: number, byteLength: number, noAssert?: boolean): number; + readUInt8(offset: number, noAssert?: boolean): number; + readUInt16LE(offset: number, noAssert?: boolean): number; + readUInt16BE(offset: number, noAssert?: boolean): number; + readUInt32LE(offset: number, noAssert?: boolean): number; + readUInt32BE(offset: number, noAssert?: boolean): number; + readInt8(offset: number, noAssert?: boolean): number; + readInt16LE(offset: number, noAssert?: boolean): number; + readInt16BE(offset: number, noAssert?: boolean): number; + readInt32LE(offset: number, noAssert?: boolean): number; + readInt32BE(offset: number, noAssert?: boolean): number; + readFloatLE(offset: number, noAssert?: boolean): number; + readFloatBE(offset: number, noAssert?: boolean): number; + readDoubleLE(offset: number, noAssert?: boolean): number; + readDoubleBE(offset: number, noAssert?: boolean): number; + reverse(): this; + swap16(): Buffer; + swap32(): Buffer; + swap64(): Buffer; + writeUInt8(value: number, offset: number, noAssert?: boolean): number; + writeUInt16LE(value: number, offset: number, noAssert?: boolean): number; + writeUInt16BE(value: number, offset: number, noAssert?: boolean): number; + writeUInt32LE(value: number, offset: number, noAssert?: boolean): number; + writeUInt32BE(value: number, offset: number, noAssert?: boolean): number; + writeInt8(value: number, offset: number, noAssert?: boolean): number; + writeInt16LE(value: number, offset: number, noAssert?: boolean): number; + writeInt16BE(value: number, offset: number, noAssert?: boolean): number; + writeInt32LE(value: number, offset: number, noAssert?: boolean): number; + writeInt32BE(value: number, offset: number, noAssert?: boolean): number; + writeFloatLE(value: number, offset: number, noAssert?: boolean): number; + writeFloatBE(value: number, offset: number, noAssert?: boolean): number; + writeDoubleLE(value: number, offset: number, noAssert?: boolean): number; + writeDoubleBE(value: number, offset: number, noAssert?: boolean): number; + fill(value: any, offset?: number, end?: number): this; + indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; + lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number; + includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean; + + /** + * Allocates a new buffer containing the given {str}. + * + * @param str String to store in buffer. + * @param encoding encoding to use, optional. Default is 'utf8' + */ + constructor (str: string, encoding?: string); + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + */ + constructor (size: number); + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + */ + constructor (array: Uint8Array); + /** + * Produces a Buffer backed by the same allocated memory as + * the given {ArrayBuffer}. + * + * + * @param arrayBuffer The ArrayBuffer with which to share memory. + */ + constructor (arrayBuffer: ArrayBuffer); + /** + * Allocates a new buffer containing the given {array} of octets. + * + * @param array The octets to store. + */ + constructor (array: any[]); + /** + * Copies the passed {buffer} data onto a new {Buffer} instance. + * + * @param buffer The buffer to copy. + */ + constructor (buffer: Buffer); + prototype: Buffer; + /** + * Allocates a new Buffer using an {array} of octets. + * + * @param array + */ + static from(array: any[]): Buffer; + /** + * When passed a reference to the .buffer property of a TypedArray instance, + * the newly created Buffer will share the same allocated memory as the TypedArray. + * The optional {byteOffset} and {length} arguments specify a memory range + * within the {arrayBuffer} that will be shared by the Buffer. + * + * @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer() + * @param byteOffset + * @param length + */ + static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; + /** + * Copies the passed {buffer} data onto a new Buffer instance. + * + * @param buffer + */ + static from(buffer: Buffer | Uint8Array): Buffer; + /** + * Creates a new Buffer containing the given JavaScript string {str}. + * If provided, the {encoding} parameter identifies the character encoding. + * If not provided, {encoding} defaults to 'utf8'. + * + * @param str + */ + static from(str: string, encoding?: string): Buffer; + /** + * Returns true if {obj} is a Buffer + * + * @param obj object to test. + */ + static isBuffer(obj: any): obj is Buffer; + /** + * Returns true if {encoding} is a valid encoding argument. + * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex' + * + * @param encoding string to test. + */ + static isEncoding(encoding: string): boolean; + /** + * Gives the actual byte length of a string. encoding defaults to 'utf8'. + * This is not the same as String.prototype.length since that returns the number of characters in a string. + * + * @param string string to test. + * @param encoding encoding used to evaluate (defaults to 'utf8') + */ + static byteLength(string: string, encoding?: string): number; + /** + * Returns a buffer which is the result of concatenating all the buffers in the list together. + * + * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer. + * If the list has exactly one item, then the first item of the list is returned. + * If the list has more than one item, then a new Buffer is created. + * + * @param list An array of Buffer objects to concatenate + * @param totalLength Total length of the buffers when concatenated. + * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly. + */ + static concat(list: Buffer[], totalLength?: number): Buffer; + /** + * The same as buf1.compare(buf2). + */ + static compare(buf1: Buffer, buf2: Buffer): number; + /** + * Allocates a new buffer of {size} octets. + * + * @param size count of octets to allocate. + * @param fill if specified, buffer will be initialized by calling buf.fill(fill). + * If parameter is omitted, buffer will be filled with zeros. + * @param encoding encoding used for call to buf.fill while initalizing + */ + static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer; + /** + * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + static allocUnsafe(size: number): Buffer; + /** + * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents + * of the newly created Buffer are unknown and may contain sensitive data. + * + * @param size count of octets to allocate + */ + static allocUnsafeSlow(size: number): Buffer; +} diff --git a/code/application_liste/app/node_modules/buffer/index.js b/code/application_liste/app/node_modules/buffer/index.js new file mode 100644 index 0000000..e87bfaa --- /dev/null +++ b/code/application_liste/app/node_modules/buffer/index.js @@ -0,0 +1,1794 @@ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +/* eslint-disable no-proto */ + +'use strict' + +var base64 = require('base64-js') +var ieee754 = require('ieee754') +var customInspectSymbol = + (typeof Symbol === 'function' && typeof Symbol.for === 'function') + ? Symbol.for('nodejs.util.inspect.custom') + : null + +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 + +var K_MAX_LENGTH = 0x7fffffff +exports.kMaxLength = K_MAX_LENGTH + +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Print warning and recommend using `buffer` v4.x which has an Object + * implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * We report that the browser does not support typed arrays if the are not subclassable + * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array` + * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support + * for __proto__ and has a buggy typed array implementation. + */ +Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport() + +if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && + typeof console.error === 'function') { + console.error( + 'This browser lacks typed array (Uint8Array) support which is required by ' + + '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.' + ) +} + +function typedArraySupport () { + // Can typed array instances can be augmented? + try { + var arr = new Uint8Array(1) + var proto = { foo: function () { return 42 } } + Object.setPrototypeOf(proto, Uint8Array.prototype) + Object.setPrototypeOf(arr, proto) + return arr.foo() === 42 + } catch (e) { + return false + } +} + +Object.defineProperty(Buffer.prototype, 'parent', { + enumerable: true, + get: function () { + if (!Buffer.isBuffer(this)) return undefined + return this.buffer + } +}) + +Object.defineProperty(Buffer.prototype, 'offset', { + enumerable: true, + get: function () { + if (!Buffer.isBuffer(this)) return undefined + return this.byteOffset + } +}) + +function createBuffer (length) { + if (length > K_MAX_LENGTH) { + throw new RangeError('The value "' + length + '" is invalid for option "size"') + } + // Return an augmented `Uint8Array` instance + var buf = new Uint8Array(length) + Object.setPrototypeOf(buf, Buffer.prototype) + return buf +} + +/** + * The Buffer constructor returns instances of `Uint8Array` that have their + * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of + * `Uint8Array`, so the returned instances will have all the node `Buffer` methods + * and the `Uint8Array` methods. Square bracket notation works as expected -- it + * returns a single octet. + * + * The `Uint8Array` prototype remains unmodified. + */ + +function Buffer (arg, encodingOrOffset, length) { + // Common case. + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new TypeError( + 'The "string" argument must be of type string. Received type number' + ) + } + return allocUnsafe(arg) + } + return from(arg, encodingOrOffset, length) +} + +Buffer.poolSize = 8192 // not used by this implementation + +function from (value, encodingOrOffset, length) { + if (typeof value === 'string') { + return fromString(value, encodingOrOffset) + } + + if (ArrayBuffer.isView(value)) { + return fromArrayLike(value) + } + + if (value == null) { + throw new TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + + 'or Array-like Object. Received type ' + (typeof value) + ) + } + + if (isInstance(value, ArrayBuffer) || + (value && isInstance(value.buffer, ArrayBuffer))) { + return fromArrayBuffer(value, encodingOrOffset, length) + } + + if (typeof SharedArrayBuffer !== 'undefined' && + (isInstance(value, SharedArrayBuffer) || + (value && isInstance(value.buffer, SharedArrayBuffer)))) { + return fromArrayBuffer(value, encodingOrOffset, length) + } + + if (typeof value === 'number') { + throw new TypeError( + 'The "value" argument must not be of type number. Received type number' + ) + } + + var valueOf = value.valueOf && value.valueOf() + if (valueOf != null && valueOf !== value) { + return Buffer.from(valueOf, encodingOrOffset, length) + } + + var b = fromObject(value) + if (b) return b + + if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && + typeof value[Symbol.toPrimitive] === 'function') { + return Buffer.from( + value[Symbol.toPrimitive]('string'), encodingOrOffset, length + ) + } + + throw new TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + + 'or Array-like Object. Received type ' + (typeof value) + ) +} + +/** + * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError + * if value is a number. + * Buffer.from(str[, encoding]) + * Buffer.from(array) + * Buffer.from(buffer) + * Buffer.from(arrayBuffer[, byteOffset[, length]]) + **/ +Buffer.from = function (value, encodingOrOffset, length) { + return from(value, encodingOrOffset, length) +} + +// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: +// https://github.com/feross/buffer/pull/148 +Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype) +Object.setPrototypeOf(Buffer, Uint8Array) + +function assertSize (size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be of type number') + } else if (size < 0) { + throw new RangeError('The value "' + size + '" is invalid for option "size"') + } +} + +function alloc (size, fill, encoding) { + assertSize(size) + if (size <= 0) { + return createBuffer(size) + } + if (fill !== undefined) { + // Only pay attention to encoding if it's a string. This + // prevents accidentally sending in a number that would + // be interpretted as a start offset. + return typeof encoding === 'string' + ? createBuffer(size).fill(fill, encoding) + : createBuffer(size).fill(fill) + } + return createBuffer(size) +} + +/** + * Creates a new filled Buffer instance. + * alloc(size[, fill[, encoding]]) + **/ +Buffer.alloc = function (size, fill, encoding) { + return alloc(size, fill, encoding) +} + +function allocUnsafe (size) { + assertSize(size) + return createBuffer(size < 0 ? 0 : checked(size) | 0) +} + +/** + * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. + * */ +Buffer.allocUnsafe = function (size) { + return allocUnsafe(size) +} +/** + * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + */ +Buffer.allocUnsafeSlow = function (size) { + return allocUnsafe(size) +} + +function fromString (string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + + var length = byteLength(string, encoding) | 0 + var buf = createBuffer(length) + + var actual = buf.write(string, encoding) + + if (actual !== length) { + // Writing a hex string, for example, that contains invalid characters will + // cause everything after the first invalid character to be ignored. (e.g. + // 'abxxcd' will be treated as 'ab') + buf = buf.slice(0, actual) + } + + return buf +} + +function fromArrayLike (array) { + var length = array.length < 0 ? 0 : checked(array.length) | 0 + var buf = createBuffer(length) + for (var i = 0; i < length; i += 1) { + buf[i] = array[i] & 255 + } + return buf +} + +function fromArrayBuffer (array, byteOffset, length) { + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('"offset" is outside of buffer bounds') + } + + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('"length" is outside of buffer bounds') + } + + var buf + if (byteOffset === undefined && length === undefined) { + buf = new Uint8Array(array) + } else if (length === undefined) { + buf = new Uint8Array(array, byteOffset) + } else { + buf = new Uint8Array(array, byteOffset, length) + } + + // Return an augmented `Uint8Array` instance + Object.setPrototypeOf(buf, Buffer.prototype) + + return buf +} + +function fromObject (obj) { + if (Buffer.isBuffer(obj)) { + var len = checked(obj.length) | 0 + var buf = createBuffer(len) + + if (buf.length === 0) { + return buf + } + + obj.copy(buf, 0, 0, len) + return buf + } + + if (obj.length !== undefined) { + if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { + return createBuffer(0) + } + return fromArrayLike(obj) + } + + if (obj.type === 'Buffer' && Array.isArray(obj.data)) { + return fromArrayLike(obj.data) + } +} + +function checked (length) { + // Note: cannot use `length < K_MAX_LENGTH` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= K_MAX_LENGTH) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes') + } + return length | 0 +} + +function SlowBuffer (length) { + if (+length != length) { // eslint-disable-line eqeqeq + length = 0 + } + return Buffer.alloc(+length) +} + +Buffer.isBuffer = function isBuffer (b) { + return b != null && b._isBuffer === true && + b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false +} + +Buffer.compare = function compare (a, b) { + if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength) + if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength) + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError( + 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array' + ) + } + + if (a === b) return 0 + + var x = a.length + var y = b.length + + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i] + y = b[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +} + +Buffer.concat = function concat (list, length) { + if (!Array.isArray(list)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + + if (list.length === 0) { + return Buffer.alloc(0) + } + + var i + if (length === undefined) { + length = 0 + for (i = 0; i < list.length; ++i) { + length += list[i].length + } + } + + var buffer = Buffer.allocUnsafe(length) + var pos = 0 + for (i = 0; i < list.length; ++i) { + var buf = list[i] + if (isInstance(buf, Uint8Array)) { + buf = Buffer.from(buf) + } + if (!Buffer.isBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + buf.copy(buffer, pos) + pos += buf.length + } + return buffer +} + +function byteLength (string, encoding) { + if (Buffer.isBuffer(string)) { + return string.length + } + if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { + return string.byteLength + } + if (typeof string !== 'string') { + throw new TypeError( + 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + + 'Received type ' + typeof string + ) + } + + var len = string.length + var mustMatch = (arguments.length > 2 && arguments[2] === true) + if (!mustMatch && len === 0) return 0 + + // Use a for loop to avoid recursion + var loweredCase = false + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len + case 'utf8': + case 'utf-8': + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) { + return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8 + } + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} +Buffer.byteLength = byteLength + +function slowToString (encoding, start, end) { + var loweredCase = false + + // No need to verify that "this.length <= MAX_UINT32" since it's a read-only + // property of a typed array. + + // This behaves neither like String nor Uint8Array in that we set start/end + // to their upper/lower bounds if the value passed is out of range. + // undefined is handled specially as per ECMA-262 6th Edition, + // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. + if (start === undefined || start < 0) { + start = 0 + } + // Return early if start > this.length. Done here to prevent potential uint32 + // coercion fail below. + if (start > this.length) { + return '' + } + + if (end === undefined || end > this.length) { + end = this.length + } + + if (end <= 0) { + return '' + } + + // Force coersion to uint32. This will also coerce falsey/NaN values to 0. + end >>>= 0 + start >>>= 0 + + if (end <= start) { + return '' + } + + if (!encoding) encoding = 'utf8' + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + + case 'ascii': + return asciiSlice(this, start, end) + + case 'latin1': + case 'binary': + return latin1Slice(this, start, end) + + case 'base64': + return base64Slice(this, start, end) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true + } + } +} + +// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package) +// to detect a Buffer instance. It's not possible to use `instanceof Buffer` +// reliably in a browserify context because there could be multiple different +// copies of the 'buffer' package in use. This method works even for Buffer +// instances that were created from another copy of the `buffer` package. +// See: https://github.com/feross/buffer/issues/154 +Buffer.prototype._isBuffer = true + +function swap (b, n, m) { + var i = b[n] + b[n] = b[m] + b[m] = i +} + +Buffer.prototype.swap16 = function swap16 () { + var len = this.length + if (len % 2 !== 0) { + throw new RangeError('Buffer size must be a multiple of 16-bits') + } + for (var i = 0; i < len; i += 2) { + swap(this, i, i + 1) + } + return this +} + +Buffer.prototype.swap32 = function swap32 () { + var len = this.length + if (len % 4 !== 0) { + throw new RangeError('Buffer size must be a multiple of 32-bits') + } + for (var i = 0; i < len; i += 4) { + swap(this, i, i + 3) + swap(this, i + 1, i + 2) + } + return this +} + +Buffer.prototype.swap64 = function swap64 () { + var len = this.length + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits') + } + for (var i = 0; i < len; i += 8) { + swap(this, i, i + 7) + swap(this, i + 1, i + 6) + swap(this, i + 2, i + 5) + swap(this, i + 3, i + 4) + } + return this +} + +Buffer.prototype.toString = function toString () { + var length = this.length + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +} + +Buffer.prototype.toLocaleString = Buffer.prototype.toString + +Buffer.prototype.equals = function equals (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 +} + +Buffer.prototype.inspect = function inspect () { + var str = '' + var max = exports.INSPECT_MAX_BYTES + str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim() + if (this.length > max) str += ' ... ' + return '' +} +if (customInspectSymbol) { + Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect +} + +Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { + if (isInstance(target, Uint8Array)) { + target = Buffer.from(target, target.offset, target.byteLength) + } + if (!Buffer.isBuffer(target)) { + throw new TypeError( + 'The "target" argument must be one of type Buffer or Uint8Array. ' + + 'Received type ' + (typeof target) + ) + } + + if (start === undefined) { + start = 0 + } + if (end === undefined) { + end = target ? target.length : 0 + } + if (thisStart === undefined) { + thisStart = 0 + } + if (thisEnd === undefined) { + thisEnd = this.length + } + + if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError('out of range index') + } + + if (thisStart >= thisEnd && start >= end) { + return 0 + } + if (thisStart >= thisEnd) { + return -1 + } + if (start >= end) { + return 1 + } + + start >>>= 0 + end >>>= 0 + thisStart >>>= 0 + thisEnd >>>= 0 + + if (this === target) return 0 + + var x = thisEnd - thisStart + var y = end - start + var len = Math.min(x, y) + + var thisCopy = this.slice(thisStart, thisEnd) + var targetCopy = target.slice(start, end) + + for (var i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i] + y = targetCopy[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, +// OR the last index of `val` in `buffer` at offset <= `byteOffset`. +// +// Arguments: +// - buffer - a Buffer to search +// - val - a string, Buffer, or number +// - byteOffset - an index into `buffer`; will be clamped to an int32 +// - encoding - an optional encoding, relevant is val is a string +// - dir - true for indexOf, false for lastIndexOf +function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { + // Empty buffer means no match + if (buffer.length === 0) return -1 + + // Normalize byteOffset + if (typeof byteOffset === 'string') { + encoding = byteOffset + byteOffset = 0 + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000 + } + byteOffset = +byteOffset // Coerce to Number. + if (numberIsNaN(byteOffset)) { + // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer + byteOffset = dir ? 0 : (buffer.length - 1) + } + + // Normalize byteOffset: negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = buffer.length + byteOffset + if (byteOffset >= buffer.length) { + if (dir) return -1 + else byteOffset = buffer.length - 1 + } else if (byteOffset < 0) { + if (dir) byteOffset = 0 + else return -1 + } + + // Normalize val + if (typeof val === 'string') { + val = Buffer.from(val, encoding) + } + + // Finally, search either indexOf (if dir is true) or lastIndexOf + if (Buffer.isBuffer(val)) { + // Special case: looking for empty string/buffer always fails + if (val.length === 0) { + return -1 + } + return arrayIndexOf(buffer, val, byteOffset, encoding, dir) + } else if (typeof val === 'number') { + val = val & 0xFF // Search for a byte value [0-255] + if (typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) + } + } + return arrayIndexOf(buffer, [val], byteOffset, encoding, dir) + } + + throw new TypeError('val must be string, number or Buffer') +} + +function arrayIndexOf (arr, val, byteOffset, encoding, dir) { + var indexSize = 1 + var arrLength = arr.length + var valLength = val.length + + if (encoding !== undefined) { + encoding = String(encoding).toLowerCase() + if (encoding === 'ucs2' || encoding === 'ucs-2' || + encoding === 'utf16le' || encoding === 'utf-16le') { + if (arr.length < 2 || val.length < 2) { + return -1 + } + indexSize = 2 + arrLength /= 2 + valLength /= 2 + byteOffset /= 2 + } + } + + function read (buf, i) { + if (indexSize === 1) { + return buf[i] + } else { + return buf.readUInt16BE(i * indexSize) + } + } + + var i + if (dir) { + var foundIndex = -1 + for (i = byteOffset; i < arrLength; i++) { + if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize + } else { + if (foundIndex !== -1) i -= i - foundIndex + foundIndex = -1 + } + } + } else { + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength + for (i = byteOffset; i >= 0; i--) { + var found = true + for (var j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false + break + } + } + if (found) return i + } + } + + return -1 +} + +Buffer.prototype.includes = function includes (val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1 +} + +Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true) +} + +Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false) +} + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + var remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + + var strLen = string.length + + if (length > strLen / 2) { + length = strLen / 2 + } + for (var i = 0; i < length; ++i) { + var parsed = parseInt(string.substr(i * 2, 2), 16) + if (numberIsNaN(parsed)) return i + buf[offset + i] = parsed + } + return i +} + +function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) +} + +function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) +} + +function latin1Write (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} + +function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) +} + +function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) +} + +Buffer.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8' + length = this.length + offset = 0 + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset + length = this.length + offset = 0 + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset >>> 0 + if (isFinite(length)) { + length = length >>> 0 + if (encoding === undefined) encoding = 'utf8' + } else { + encoding = length + length = undefined + } + } else { + throw new Error( + 'Buffer.write(string, encoding, offset[, length]) is no longer supported' + ) + } + + var remaining = this.length - offset + if (length === undefined || length > remaining) length = remaining + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('Attempt to write outside buffer bounds') + } + + if (!encoding) encoding = 'utf8' + + var loweredCase = false + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) + + case 'ascii': + return asciiWrite(this, string, offset, length) + + case 'latin1': + case 'binary': + return latin1Write(this, string, offset, length) + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} + +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} + +function utf8Slice (buf, start, end) { + end = Math.min(buf.length, end) + var res = [] + + var i = start + while (i < end) { + var firstByte = buf[i] + var codePoint = null + var bytesPerSequence = (firstByte > 0xEF) ? 4 + : (firstByte > 0xDF) ? 3 + : (firstByte > 0xBF) ? 2 + : 1 + + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte + } + break + case 2: + secondByte = buf[i + 1] + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint + } + } + break + case 3: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint + } + } + break + case 4: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + fourthByte = buf[i + 3] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint + } + } + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD + bytesPerSequence = 1 + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000 + res.push(codePoint >>> 10 & 0x3FF | 0xD800) + codePoint = 0xDC00 | codePoint & 0x3FF + } + + res.push(codePoint) + i += bytesPerSequence + } + + return decodeCodePointsArray(res) +} + +// Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety +var MAX_ARGUMENTS_LENGTH = 0x1000 + +function decodeCodePointsArray (codePoints) { + var len = codePoints.length + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() + } + + // Decode in chunks to avoid "call stack size exceeded". + var res = '' + var i = 0 + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ) + } + return res +} + +function asciiSlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 0x7F) + } + return ret +} + +function latin1Slice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]) + } + return ret +} + +function hexSlice (buf, start, end) { + var len = buf.length + + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len + + var out = '' + for (var i = start; i < end; ++i) { + out += hexSliceLookupTable[buf[i]] + } + return out +} + +function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end) + var res = '' + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256)) + } + return res +} + +Buffer.prototype.slice = function slice (start, end) { + var len = this.length + start = ~~start + end = end === undefined ? len : ~~end + + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len + } + + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } + + if (end < start) end = start + + var newBuf = this.subarray(start, end) + // Return an augmented `Uint8Array` instance + Object.setPrototypeOf(newBuf, Buffer.prototype) + + return newBuf +} + +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} + +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + + return val +} + +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + checkOffset(offset, byteLength, this.length) + } + + var val = this[offset + --byteLength] + var mul = 1 + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul + } + + return val +} + +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} + +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} + +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} + +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +} + +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +} + +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var i = byteLength + var mul = 1 + var val = this[offset + --i] + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +} + +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset] | (this[offset + 1] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset + 1] | (this[offset] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +} + +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +} + +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} + +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} + +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} + +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) +} + +function checkInt (buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') + if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') + if (offset + ext > buf.length) throw new RangeError('Index out of range') +} + +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var mul = 1 + var i = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var i = byteLength - 1 + var mul = 1 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + return offset + 2 +} + +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + return offset + 2 +} + +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = (value & 0xff) + return offset + 4 +} + +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + return offset + 4 +} + +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + var limit = Math.pow(2, (8 * byteLength) - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = 0 + var mul = 1 + var sub = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + var limit = Math.pow(2, (8 * byteLength) - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = byteLength - 1 + var mul = 1 + var sub = 0 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) + if (value < 0) value = 0xff + value + 1 + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + return offset + 2 +} + +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + return offset + 2 +} + +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + return offset + 4 +} + +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (value < 0) value = 0xffffffff + value + 1 + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + return offset + 4 +} + +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError('Index out of range') + if (offset < 0) throw new RangeError('Index out of range') +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} + +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} + +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function copy (target, targetStart, start, end) { + if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer') + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (targetStart >= target.length) targetStart = target.length + if (!targetStart) targetStart = 0 + if (end > 0 && end < start) end = start + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('Index out of range') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start + } + + var len = end - start + + if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') { + // Use built-in when available, missing from IE11 + this.copyWithin(targetStart, start, end) + } else if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (var i = len - 1; i >= 0; --i) { + target[i + targetStart] = this[i + start] + } + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, end), + targetStart + ) + } + + return len +} + +// Usage: +// buffer.fill(number[, offset[, end]]) +// buffer.fill(buffer[, offset[, end]]) +// buffer.fill(string[, offset[, end]][, encoding]) +Buffer.prototype.fill = function fill (val, start, end, encoding) { + // Handle string cases: + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start + start = 0 + end = this.length + } else if (typeof end === 'string') { + encoding = end + end = this.length + } + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string') + } + if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + if (val.length === 1) { + var code = val.charCodeAt(0) + if ((encoding === 'utf8' && code < 128) || + encoding === 'latin1') { + // Fast path: If `val` fits into a single byte, use that numeric value. + val = code + } + } + } else if (typeof val === 'number') { + val = val & 255 + } else if (typeof val === 'boolean') { + val = Number(val) + } + + // Invalid ranges are not set to a default, so can range check early. + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError('Out of range index') + } + + if (end <= start) { + return this + } + + start = start >>> 0 + end = end === undefined ? this.length : end >>> 0 + + if (!val) val = 0 + + var i + if (typeof val === 'number') { + for (i = start; i < end; ++i) { + this[i] = val + } + } else { + var bytes = Buffer.isBuffer(val) + ? val + : Buffer.from(val, encoding) + var len = bytes.length + if (len === 0) { + throw new TypeError('The value "' + val + + '" is invalid for argument "value"') + } + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len] + } + } + + return this +} + +// HELPER FUNCTIONS +// ================ + +var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g + +function base64clean (str) { + // Node takes equal signs as end of the Base64 encoding + str = str.split('=')[0] + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = str.trim().replace(INVALID_BASE64_RE, '') + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} + +function utf8ToBytes (string, units) { + units = units || Infinity + var codePoint + var length = string.length + var leadSurrogate = null + var bytes = [] + + for (var i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i) + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } + + // valid lead + leadSurrogate = codePoint + + continue + } + + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = codePoint + continue + } + + // valid surrogate pair + codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + } + + leadSurrogate = null + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else { + throw new Error('Invalid code point') + } + } + + return bytes +} + +function asciiToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + return byteArray +} + +function utf16leToBytes (str, units) { + var c, hi, lo + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } + + return byteArray +} + +function base64ToBytes (str) { + return base64.toByteArray(base64clean(str)) +} + +function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; ++i) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i] + } + return i +} + +// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass +// the `instanceof` check but they should be treated as of that type. +// See: https://github.com/feross/buffer/issues/166 +function isInstance (obj, type) { + return obj instanceof type || + (obj != null && obj.constructor != null && obj.constructor.name != null && + obj.constructor.name === type.name) +} +function numberIsNaN (obj) { + // For IE11 support + return obj !== obj // eslint-disable-line no-self-compare +} + +// Create lookup table for `toString('hex')` +// See: https://github.com/feross/buffer/issues/219 +var hexSliceLookupTable = (function () { + var alphabet = '0123456789abcdef' + var table = new Array(256) + for (var i = 0; i < 16; ++i) { + var i16 = i * 16 + for (var j = 0; j < 16; ++j) { + table[i16 + j] = alphabet[i] + alphabet[j] + } + } + return table +})() diff --git a/code/application_liste/app/node_modules/buffer/package.json b/code/application_liste/app/node_modules/buffer/package.json new file mode 100644 index 0000000..e33de9b --- /dev/null +++ b/code/application_liste/app/node_modules/buffer/package.json @@ -0,0 +1,113 @@ +{ + "_from": "buffer@^5.2.1", + "_id": "buffer@5.6.0", + "_inBundle": false, + "_integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", + "_location": "/buffer", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "buffer@^5.2.1", + "name": "buffer", + "escapedName": "buffer", + "rawSpec": "^5.2.1", + "saveSpec": null, + "fetchSpec": "^5.2.1" + }, + "_requiredBy": [ + "/unbzip2-stream" + ], + "_resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", + "_shasum": "a31749dc7d81d84db08abf937b6b8c4033f62786", + "_spec": "buffer@^5.2.1", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\unbzip2-stream", + "author": { + "name": "Feross Aboukhadijeh", + "email": "feross@feross.org", + "url": "http://feross.org" + }, + "bugs": { + "url": "https://github.com/feross/buffer/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Romain Beauxis", + "email": "toots@rastageeks.org" + }, + { + "name": "James Halliday", + "email": "mail@substack.net" + } + ], + "dependencies": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + }, + "deprecated": false, + "description": "Node.js Buffer API, for the browser", + "devDependencies": { + "airtap": "^3.0.0", + "benchmark": "^2.0.0", + "browserify": "^16.1.0", + "concat-stream": "^2.0.0", + "hyperquest": "^2.0.0", + "is-buffer": "^2.0.0", + "is-nan": "^1.0.1", + "split": "^1.0.0", + "standard": "*", + "tape": "^4.0.0", + "through2": "^3.0.1", + "uglify-js": "^3.4.5" + }, + "homepage": "https://github.com/feross/buffer", + "jspm": { + "map": { + "./index.js": { + "node": "@node/buffer" + } + } + }, + "keywords": [ + "arraybuffer", + "browser", + "browserify", + "buffer", + "compatible", + "dataview", + "uint8array" + ], + "license": "MIT", + "main": "index.js", + "name": "buffer", + "repository": { + "type": "git", + "url": "git://github.com/feross/buffer.git" + }, + "scripts": { + "perf": "browserify --debug perf/bracket-notation.js > perf/bundle.js && open perf/index.html", + "perf-node": "node perf/bracket-notation.js && node perf/concat.js && node perf/copy-big.js && node perf/copy.js && node perf/new-big.js && node perf/new.js && node perf/readDoubleBE.js && node perf/readFloatBE.js && node perf/readUInt32LE.js && node perf/slice.js && node perf/writeFloatBE.js", + "size": "browserify -r ./ | uglifyjs -c -m | gzip | wc -c", + "test": "standard && node ./bin/test.js", + "test-browser-es5": "airtap -- test/*.js", + "test-browser-es5-local": "airtap --local -- test/*.js", + "test-browser-es6": "airtap -- test/*.js test/node/*.js", + "test-browser-es6-local": "airtap --local -- test/*.js test/node/*.js", + "test-node": "tape test/*.js test/node/*.js", + "update-authors": "./bin/update-authors.sh" + }, + "standard": { + "ignore": [ + "test/node/**/*.js", + "test/common.js", + "test/_polyfill.js", + "perf/**/*.js" + ], + "globals": [ + "SharedArrayBuffer" + ] + }, + "types": "index.d.ts", + "version": "5.6.0" +} diff --git a/code/application_liste/app/node_modules/bytes/History.md b/code/application_liste/app/node_modules/bytes/History.md new file mode 100644 index 0000000..cf6a5bb --- /dev/null +++ b/code/application_liste/app/node_modules/bytes/History.md @@ -0,0 +1,87 @@ +3.1.0 / 2019-01-22 +================== + + * Add petabyte (`pb`) support + +3.0.0 / 2017-08-31 +================== + + * Change "kB" to "KB" in format output + * Remove support for Node.js 0.6 + * Remove support for ComponentJS + +2.5.0 / 2017-03-24 +================== + + * Add option "unit" + +2.4.0 / 2016-06-01 +================== + + * Add option "unitSeparator" + +2.3.0 / 2016-02-15 +================== + + * Drop partial bytes on all parsed units + * Fix non-finite numbers to `.format` to return `null` + * Fix parsing byte string that looks like hex + * perf: hoist regular expressions + +2.2.0 / 2015-11-13 +================== + + * add option "decimalPlaces" + * add option "fixedDecimals" + +2.1.0 / 2015-05-21 +================== + + * add `.format` export + * add `.parse` export + +2.0.2 / 2015-05-20 +================== + + * remove map recreation + * remove unnecessary object construction + +2.0.1 / 2015-05-07 +================== + + * fix browserify require + * remove node.extend dependency + +2.0.0 / 2015-04-12 +================== + + * add option "case" + * add option "thousandsSeparator" + * return "null" on invalid parse input + * support proper round-trip: bytes(bytes(num)) === num + * units no longer case sensitive when parsing + +1.0.0 / 2014-05-05 +================== + + * add negative support. fixes #6 + +0.3.0 / 2014-03-19 +================== + + * added terabyte support + +0.2.1 / 2013-04-01 +================== + + * add .component + +0.2.0 / 2012-10-28 +================== + + * bytes(200).should.eql('200b') + +0.1.0 / 2012-07-04 +================== + + * add bytes to string conversion [yields] diff --git a/code/application_liste/app/node_modules/bytes/LICENSE b/code/application_liste/app/node_modules/bytes/LICENSE new file mode 100644 index 0000000..63e95a9 --- /dev/null +++ b/code/application_liste/app/node_modules/bytes/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2012-2014 TJ Holowaychuk +Copyright (c) 2015 Jed Watson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/bytes/Readme.md b/code/application_liste/app/node_modules/bytes/Readme.md new file mode 100644 index 0000000..6ad1ec6 --- /dev/null +++ b/code/application_liste/app/node_modules/bytes/Readme.md @@ -0,0 +1,126 @@ +# Bytes utility + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +Utility to parse a string bytes (ex: `1TB`) to bytes (`1099511627776`) and vice-versa. + +## Installation + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```bash +$ npm install bytes +``` + +## Usage + +```js +var bytes = require('bytes'); +``` + +#### bytes.format(number value, [options]): string|null + +Format the given value in bytes into a string. If the value is negative, it is kept as such. If it is a float, it is + rounded. + +**Arguments** + +| Name | Type | Description | +|---------|----------|--------------------| +| value | `number` | Value in bytes | +| options | `Object` | Conversion options | + +**Options** + +| Property | Type | Description | +|-------------------|--------|-----------------------------------------------------------------------------------------| +| decimalPlaces | `number`|`null` | Maximum number of decimal places to include in output. Default value to `2`. | +| fixedDecimals | `boolean`|`null` | Whether to always display the maximum number of decimal places. Default value to `false` | +| thousandsSeparator | `string`|`null` | Example of values: `' '`, `','` and `.`... Default value to `''`. | +| unit | `string`|`null` | The unit in which the result will be returned (B/KB/MB/GB/TB). Default value to `''` (which means auto detect). | +| unitSeparator | `string`|`null` | Separator to use between number and unit. Default value to `''`. | + +**Returns** + +| Name | Type | Description | +|---------|------------------|-------------------------------------------------| +| results | `string`|`null` | Return null upon error. String value otherwise. | + +**Example** + +```js +bytes(1024); +// output: '1KB' + +bytes(1000); +// output: '1000B' + +bytes(1000, {thousandsSeparator: ' '}); +// output: '1 000B' + +bytes(1024 * 1.7, {decimalPlaces: 0}); +// output: '2KB' + +bytes(1024, {unitSeparator: ' '}); +// output: '1 KB' + +``` + +#### bytes.parse(string|number value): number|null + +Parse the string value into an integer in bytes. If no unit is given, or `value` +is a number, it is assumed the value is in bytes. + +Supported units and abbreviations are as follows and are case-insensitive: + + * `b` for bytes + * `kb` for kilobytes + * `mb` for megabytes + * `gb` for gigabytes + * `tb` for terabytes + * `pb` for petabytes + +The units are in powers of two, not ten. This means 1kb = 1024b according to this parser. + +**Arguments** + +| Name | Type | Description | +|---------------|--------|--------------------| +| value | `string`|`number` | String to parse, or number in bytes. | + +**Returns** + +| Name | Type | Description | +|---------|-------------|-------------------------| +| results | `number`|`null` | Return null upon error. Value in bytes otherwise. | + +**Example** + +```js +bytes('1KB'); +// output: 1024 + +bytes('1024'); +// output: 1024 + +bytes(1024); +// output: 1KB +``` + +## License + +[MIT](LICENSE) + +[coveralls-image]: https://badgen.net/coveralls/c/github/visionmedia/bytes.js/master +[coveralls-url]: https://coveralls.io/r/visionmedia/bytes.js?branch=master +[downloads-image]: https://badgen.net/npm/dm/bytes +[downloads-url]: https://npmjs.org/package/bytes +[npm-image]: https://badgen.net/npm/node/bytes +[npm-url]: https://npmjs.org/package/bytes +[travis-image]: https://badgen.net/travis/visionmedia/bytes.js/master +[travis-url]: https://travis-ci.org/visionmedia/bytes.js diff --git a/code/application_liste/app/node_modules/bytes/index.js b/code/application_liste/app/node_modules/bytes/index.js new file mode 100644 index 0000000..4975bfb --- /dev/null +++ b/code/application_liste/app/node_modules/bytes/index.js @@ -0,0 +1,162 @@ +/*! + * bytes + * Copyright(c) 2012-2014 TJ Holowaychuk + * Copyright(c) 2015 Jed Watson + * MIT Licensed + */ + +'use strict'; + +/** + * Module exports. + * @public + */ + +module.exports = bytes; +module.exports.format = format; +module.exports.parse = parse; + +/** + * Module variables. + * @private + */ + +var formatThousandsRegExp = /\B(?=(\d{3})+(?!\d))/g; + +var formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/; + +var map = { + b: 1, + kb: 1 << 10, + mb: 1 << 20, + gb: 1 << 30, + tb: Math.pow(1024, 4), + pb: Math.pow(1024, 5), +}; + +var parseRegExp = /^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i; + +/** + * Convert the given value in bytes into a string or parse to string to an integer in bytes. + * + * @param {string|number} value + * @param {{ + * case: [string], + * decimalPlaces: [number] + * fixedDecimals: [boolean] + * thousandsSeparator: [string] + * unitSeparator: [string] + * }} [options] bytes options. + * + * @returns {string|number|null} + */ + +function bytes(value, options) { + if (typeof value === 'string') { + return parse(value); + } + + if (typeof value === 'number') { + return format(value, options); + } + + return null; +} + +/** + * Format the given value in bytes into a string. + * + * If the value is negative, it is kept as such. If it is a float, + * it is rounded. + * + * @param {number} value + * @param {object} [options] + * @param {number} [options.decimalPlaces=2] + * @param {number} [options.fixedDecimals=false] + * @param {string} [options.thousandsSeparator=] + * @param {string} [options.unit=] + * @param {string} [options.unitSeparator=] + * + * @returns {string|null} + * @public + */ + +function format(value, options) { + if (!Number.isFinite(value)) { + return null; + } + + var mag = Math.abs(value); + var thousandsSeparator = (options && options.thousandsSeparator) || ''; + var unitSeparator = (options && options.unitSeparator) || ''; + var decimalPlaces = (options && options.decimalPlaces !== undefined) ? options.decimalPlaces : 2; + var fixedDecimals = Boolean(options && options.fixedDecimals); + var unit = (options && options.unit) || ''; + + if (!unit || !map[unit.toLowerCase()]) { + if (mag >= map.pb) { + unit = 'PB'; + } else if (mag >= map.tb) { + unit = 'TB'; + } else if (mag >= map.gb) { + unit = 'GB'; + } else if (mag >= map.mb) { + unit = 'MB'; + } else if (mag >= map.kb) { + unit = 'KB'; + } else { + unit = 'B'; + } + } + + var val = value / map[unit.toLowerCase()]; + var str = val.toFixed(decimalPlaces); + + if (!fixedDecimals) { + str = str.replace(formatDecimalsRegExp, '$1'); + } + + if (thousandsSeparator) { + str = str.replace(formatThousandsRegExp, thousandsSeparator); + } + + return str + unitSeparator + unit; +} + +/** + * Parse the string value into an integer in bytes. + * + * If no unit is given, it is assumed the value is in bytes. + * + * @param {number|string} val + * + * @returns {number|null} + * @public + */ + +function parse(val) { + if (typeof val === 'number' && !isNaN(val)) { + return val; + } + + if (typeof val !== 'string') { + return null; + } + + // Test if the string passed is valid + var results = parseRegExp.exec(val); + var floatValue; + var unit = 'b'; + + if (!results) { + // Nothing could be extracted from the given string + floatValue = parseInt(val, 10); + unit = 'b' + } else { + // Retrieve the value and the unit + floatValue = parseFloat(results[1]); + unit = results[4].toLowerCase(); + } + + return Math.floor(map[unit] * floatValue); +} diff --git a/code/application_liste/app/node_modules/bytes/package.json b/code/application_liste/app/node_modules/bytes/package.json new file mode 100644 index 0000000..84e5d2c --- /dev/null +++ b/code/application_liste/app/node_modules/bytes/package.json @@ -0,0 +1,83 @@ +{ + "_from": "bytes@3.1.0", + "_id": "bytes@3.1.0", + "_inBundle": false, + "_integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", + "_location": "/bytes", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "bytes@3.1.0", + "name": "bytes", + "escapedName": "bytes", + "rawSpec": "3.1.0", + "saveSpec": null, + "fetchSpec": "3.1.0" + }, + "_requiredBy": [ + "/raw-body" + ], + "_resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "_shasum": "f6cf7933a360e0588fa9fde85651cdc7f805d1f6", + "_spec": "bytes@3.1.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\raw-body", + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca", + "url": "http://tjholowaychuk.com" + }, + "bugs": { + "url": "https://github.com/visionmedia/bytes.js/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Jed Watson", + "email": "jed.watson@me.com" + }, + { + "name": "Théo FIDRY", + "email": "theo.fidry@gmail.com" + } + ], + "deprecated": false, + "description": "Utility to parse a string bytes to bytes and vice-versa", + "devDependencies": { + "eslint": "5.12.1", + "mocha": "5.2.0", + "nyc": "13.1.0" + }, + "engines": { + "node": ">= 0.8" + }, + "files": [ + "History.md", + "LICENSE", + "Readme.md", + "index.js" + ], + "homepage": "https://github.com/visionmedia/bytes.js#readme", + "keywords": [ + "byte", + "bytes", + "utility", + "parse", + "parser", + "convert", + "converter" + ], + "license": "MIT", + "name": "bytes", + "repository": { + "type": "git", + "url": "git+https://github.com/visionmedia/bytes.js.git" + }, + "scripts": { + "lint": "eslint .", + "test": "mocha --check-leaks --reporter spec", + "test-ci": "nyc --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test" + }, + "version": "3.1.0" +} diff --git a/code/application_liste/app/node_modules/cache-base/LICENSE b/code/application_liste/app/node_modules/cache-base/LICENSE new file mode 100644 index 0000000..943e71d --- /dev/null +++ b/code/application_liste/app/node_modules/cache-base/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/code/application_liste/app/node_modules/cache-base/README.md b/code/application_liste/app/node_modules/cache-base/README.md new file mode 100644 index 0000000..62c6ffe --- /dev/null +++ b/code/application_liste/app/node_modules/cache-base/README.md @@ -0,0 +1,291 @@ +# cache-base [![NPM version](https://img.shields.io/npm/v/cache-base.svg?style=flat)](https://www.npmjs.com/package/cache-base) [![NPM monthly downloads](https://img.shields.io/npm/dm/cache-base.svg?style=flat)](https://npmjs.org/package/cache-base) [![NPM total downloads](https://img.shields.io/npm/dt/cache-base.svg?style=flat)](https://npmjs.org/package/cache-base) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/cache-base.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/cache-base) + +> Basic object cache with `get`, `set`, `del`, and `has` methods for node.js/javascript projects. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save cache-base +``` + +## Usage + +```js +var Cache = require('cache-base'); + +// instantiate +var app = new Cache(); + +// set values +app.set('a', 'b'); +app.set('c.d', 'e'); + +// get values +app.get('a'); +//=> 'b' +app.get('c'); +//=> {d: 'e'} + +console.log(app.cache); +//=> {a: 'b'} +``` + +**Inherit** + +```js +var util = require('util'); +var Cache = require('cache-base'); + +function MyApp() { + Cache.call(this); +} +util.inherits(MyApp, Cache); + +var app = new MyApp(); +app.set('a', 'b'); +app.get('a'); +//=> 'b' +``` + +**Namespace** + +Define a custom property for storing values. + +```js +var Cache = require('cache-base').namespace('data'); +var app = new Cache(); +app.set('a', 'b'); +console.log(app.data); +//=> {a: 'b'} +``` + +## API + +### [namespace](index.js#L29) + +Create a `Cache` constructor that when instantiated will store values on the given `prop`. + +**Params** + +* `prop` **{String}**: The property name to use for storing values. +* `returns` **{Function}**: Returns a custom `Cache` constructor + +**Example** + +```js +var Cache = require('cache-base').namespace('data'); +var cache = new Cache(); + +cache.set('foo', 'bar'); +//=> {data: {foo: 'bar'}} +``` + +### [Cache](index.js#L43) + +Create a new `Cache`. Internally the `Cache` constructor is created using the `namespace` function, with `cache` defined as the storage object. + +**Params** + +* `cache` **{Object}**: Optionally pass an object to initialize with. + +**Example** + +```js +var app = new Cache(); +``` + +### [.set](index.js#L84) + +Assign `value` to `key`. Also emits `set` with the key and value. + +**Params** + +* `key` **{String}** +* `value` **{any}** +* `returns` **{Object}**: Returns the instance for chaining. + +**Events** + +* `emits`: `set` with `key` and `value` as arguments. + +**Example** + +```js +app.on('set', function(key, val) { + // do something when `set` is emitted +}); + +app.set(key, value); + +// also takes an object or array +app.set({name: 'Halle'}); +app.set([{foo: 'bar'}, {baz: 'quux'}]); +console.log(app); +//=> {name: 'Halle', foo: 'bar', baz: 'quux'} +``` + +### [.union](index.js#L114) + +Union `array` to `key`. Also emits `set` with the key and value. + +**Params** + +* `key` **{String}** +* `value` **{any}** +* `returns` **{Object}**: Returns the instance for chaining. + +**Example** + +```js +app.union('a.b', ['foo']); +app.union('a.b', ['bar']); +console.log(app.get('a')); +//=> {b: ['foo', 'bar']} +``` + +### [.get](index.js#L144) + +Return the value of `key`. Dot notation may be used to get [nested property values](https://github.com/jonschlinkert/get-value). + +**Params** + +* `key` **{String}**: The name of the property to get. Dot-notation may be used. +* `returns` **{any}**: Returns the value of `key` + +**Events** + +* `emits`: `get` with `key` and `value` as arguments. + +**Example** + +```js +app.set('a.b.c', 'd'); +app.get('a.b'); +//=> {c: 'd'} + +app.get(['a', 'b']); +//=> {c: 'd'} +``` + +### [.has](index.js#L171) + +Return true if app has a stored value for `key`, false only if value is `undefined`. + +**Params** + +* `key` **{String}** +* `returns` **{Boolean}** + +**Events** + +* `emits`: `has` with `key` and true or false as arguments. + +**Example** + +```js +app.set('foo', 'bar'); +app.has('foo'); +//=> true +``` + +### [.del](index.js#L199) + +Delete one or more properties from the instance. + +**Params** + +* `key` **{String|Array}**: Property name or array of property names. +* `returns` **{Object}**: Returns the instance for chaining. + +**Events** + +* `emits`: `del` with the `key` as the only argument. + +**Example** + +```js +app.del(); // delete all +// or +app.del('foo'); +// or +app.del(['foo', 'bar']); +``` + +### [.clear](index.js#L218) + +Reset the entire cache to an empty object. + +**Example** + +```js +app.clear(); +``` + +### [.visit](index.js#L235) + +Visit `method` over the properties in the given object, or map +visit over the object-elements in an array. + +**Params** + +* `method` **{String}**: The name of the `base` method to call. +* `val` **{Object|Array}**: The object or array to iterate over. +* `returns` **{Object}**: Returns the instance for chaining. + +## About + +### Related projects + +* [base-methods](https://www.npmjs.com/package/base-methods): base-methods is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… [more](https://github.com/jonschlinkert/base-methods) | [homepage](https://github.com/jonschlinkert/base-methods "base-methods is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting with a handful of common methods, like `set`, `get`, `del` and `use`.") +* [get-value](https://www.npmjs.com/package/get-value): Use property paths (`a.b.c`) to get a nested value from an object. | [homepage](https://github.com/jonschlinkert/get-value "Use property paths (`a.b.c`) to get a nested value from an object.") +* [has-value](https://www.npmjs.com/package/has-value): Returns true if a value exists, false if empty. Works with deeply nested values using… [more](https://github.com/jonschlinkert/has-value) | [homepage](https://github.com/jonschlinkert/has-value "Returns true if a value exists, false if empty. Works with deeply nested values using object paths.") +* [option-cache](https://www.npmjs.com/package/option-cache): Simple API for managing options in JavaScript applications. | [homepage](https://github.com/jonschlinkert/option-cache "Simple API for managing options in JavaScript applications.") +* [set-value](https://www.npmjs.com/package/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/jonschlinkert/set-value "Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths.") +* [unset-value](https://www.npmjs.com/package/unset-value): Delete nested properties from an object using dot notation. | [homepage](https://github.com/jonschlinkert/unset-value "Delete nested properties from an object using dot notation.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 54 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 22, 2017._ \ No newline at end of file diff --git a/code/application_liste/app/node_modules/cache-base/index.js b/code/application_liste/app/node_modules/cache-base/index.js new file mode 100644 index 0000000..4128024 --- /dev/null +++ b/code/application_liste/app/node_modules/cache-base/index.js @@ -0,0 +1,261 @@ +'use strict'; + +var isObject = require('isobject'); +var Emitter = require('component-emitter'); +var visit = require('collection-visit'); +var toPath = require('to-object-path'); +var union = require('union-value'); +var del = require('unset-value'); +var get = require('get-value'); +var has = require('has-value'); +var set = require('set-value'); + +/** + * Create a `Cache` constructor that when instantiated will + * store values on the given `prop`. + * + * ```js + * var Cache = require('cache-base').namespace('data'); + * var cache = new Cache(); + * + * cache.set('foo', 'bar'); + * //=> {data: {foo: 'bar'}} + * ``` + * @param {String} `prop` The property name to use for storing values. + * @return {Function} Returns a custom `Cache` constructor + * @api public + */ + +function namespace(prop) { + + /** + * Create a new `Cache`. Internally the `Cache` constructor is created using + * the `namespace` function, with `cache` defined as the storage object. + * + * ```js + * var app = new Cache(); + * ``` + * @param {Object} `cache` Optionally pass an object to initialize with. + * @constructor + * @api public + */ + + function Cache(cache) { + if (prop) { + this[prop] = {}; + } + if (cache) { + this.set(cache); + } + } + + /** + * Inherit Emitter + */ + + Emitter(Cache.prototype); + + /** + * Assign `value` to `key`. Also emits `set` with + * the key and value. + * + * ```js + * app.on('set', function(key, val) { + * // do something when `set` is emitted + * }); + * + * app.set(key, value); + * + * // also takes an object or array + * app.set({name: 'Halle'}); + * app.set([{foo: 'bar'}, {baz: 'quux'}]); + * console.log(app); + * //=> {name: 'Halle', foo: 'bar', baz: 'quux'} + * ``` + * + * @name .set + * @emits `set` with `key` and `value` as arguments. + * @param {String} `key` + * @param {any} `value` + * @return {Object} Returns the instance for chaining. + * @api public + */ + + Cache.prototype.set = function(key, val) { + if (Array.isArray(key) && arguments.length === 2) { + key = toPath(key); + } + if (isObject(key) || Array.isArray(key)) { + this.visit('set', key); + } else { + set(prop ? this[prop] : this, key, val); + this.emit('set', key, val); + } + return this; + }; + + /** + * Union `array` to `key`. Also emits `set` with + * the key and value. + * + * ```js + * app.union('a.b', ['foo']); + * app.union('a.b', ['bar']); + * console.log(app.get('a')); + * //=> {b: ['foo', 'bar']} + * ``` + * @name .union + * @param {String} `key` + * @param {any} `value` + * @return {Object} Returns the instance for chaining. + * @api public + */ + + Cache.prototype.union = function(key, val) { + if (Array.isArray(key) && arguments.length === 2) { + key = toPath(key); + } + var ctx = prop ? this[prop] : this; + union(ctx, key, arrayify(val)); + this.emit('union', val); + return this; + }; + + /** + * Return the value of `key`. Dot notation may be used + * to get [nested property values][get-value]. + * + * ```js + * app.set('a.b.c', 'd'); + * app.get('a.b'); + * //=> {c: 'd'} + * + * app.get(['a', 'b']); + * //=> {c: 'd'} + * ``` + * + * @name .get + * @emits `get` with `key` and `value` as arguments. + * @param {String} `key` The name of the property to get. Dot-notation may be used. + * @return {any} Returns the value of `key` + * @api public + */ + + Cache.prototype.get = function(key) { + key = toPath(arguments); + + var ctx = prop ? this[prop] : this; + var val = get(ctx, key); + + this.emit('get', key, val); + return val; + }; + + /** + * Return true if app has a stored value for `key`, + * false only if value is `undefined`. + * + * ```js + * app.set('foo', 'bar'); + * app.has('foo'); + * //=> true + * ``` + * + * @name .has + * @emits `has` with `key` and true or false as arguments. + * @param {String} `key` + * @return {Boolean} + * @api public + */ + + Cache.prototype.has = function(key) { + key = toPath(arguments); + + var ctx = prop ? this[prop] : this; + var val = get(ctx, key); + + var has = typeof val !== 'undefined'; + this.emit('has', key, has); + return has; + }; + + /** + * Delete one or more properties from the instance. + * + * ```js + * app.del(); // delete all + * // or + * app.del('foo'); + * // or + * app.del(['foo', 'bar']); + * ``` + * @name .del + * @emits `del` with the `key` as the only argument. + * @param {String|Array} `key` Property name or array of property names. + * @return {Object} Returns the instance for chaining. + * @api public + */ + + Cache.prototype.del = function(key) { + if (Array.isArray(key)) { + this.visit('del', key); + } else { + del(prop ? this[prop] : this, key); + this.emit('del', key); + } + return this; + }; + + /** + * Reset the entire cache to an empty object. + * + * ```js + * app.clear(); + * ``` + * @api public + */ + + Cache.prototype.clear = function() { + if (prop) { + this[prop] = {}; + } + }; + + /** + * Visit `method` over the properties in the given object, or map + * visit over the object-elements in an array. + * + * @name .visit + * @param {String} `method` The name of the `base` method to call. + * @param {Object|Array} `val` The object or array to iterate over. + * @return {Object} Returns the instance for chaining. + * @api public + */ + + Cache.prototype.visit = function(method, val) { + visit(this, method, val); + return this; + }; + + return Cache; +} + +/** + * Cast val to an array + */ + +function arrayify(val) { + return val ? (Array.isArray(val) ? val : [val]) : []; +} + +/** + * Expose `Cache` + */ + +module.exports = namespace(); + +/** + * Expose `Cache.namespace` + */ + +module.exports.namespace = namespace; diff --git a/code/application_liste/app/node_modules/cache-base/package.json b/code/application_liste/app/node_modules/cache-base/package.json new file mode 100644 index 0000000..177860a --- /dev/null +++ b/code/application_liste/app/node_modules/cache-base/package.json @@ -0,0 +1,118 @@ +{ + "_from": "cache-base@^1.0.1", + "_id": "cache-base@1.0.1", + "_inBundle": false, + "_integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "_location": "/cache-base", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "cache-base@^1.0.1", + "name": "cache-base", + "escapedName": "cache-base", + "rawSpec": "^1.0.1", + "saveSpec": null, + "fetchSpec": "^1.0.1" + }, + "_requiredBy": [ + "/base" + ], + "_resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "_shasum": "0a7f46416831c8b662ee36fe4e7c59d76f666ab2", + "_spec": "cache-base@^1.0.1", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\base", + "author": { + "name": "Jon Schlinkert", + "url": "https://github.com/jonschlinkert" + }, + "bugs": { + "url": "https://github.com/jonschlinkert/cache-base/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Jon Schlinkert", + "url": "http://twitter.com/jonschlinkert" + }, + { + "url": "https://github.com/wtgtybhertgeghgtwtg" + } + ], + "dependencies": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + }, + "deprecated": false, + "description": "Basic object cache with `get`, `set`, `del`, and `has` methods for node.js/javascript projects.", + "devDependencies": { + "gulp-format-md": "^1.0.0", + "mocha": "^3.4.2" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/jonschlinkert/cache-base", + "keywords": [ + "base", + "cache", + "config", + "data", + "get", + "has", + "hash", + "hasown", + "object", + "set", + "store" + ], + "license": "MIT", + "main": "index.js", + "name": "cache-base", + "repository": { + "type": "git", + "url": "git+https://github.com/jonschlinkert/cache-base.git" + }, + "scripts": { + "test": "mocha" + }, + "verb": { + "run": true, + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "highligh": "base", + "list": [ + "base-methods", + "get-value", + "has-value", + "option-cache", + "set-value", + "unset-value" + ] + }, + "reflinks": [ + "verb" + ], + "lint": { + "reflinks": true + } + }, + "version": "1.0.1" +} diff --git a/code/application_liste/app/node_modules/cacheable-request/LICENSE b/code/application_liste/app/node_modules/cacheable-request/LICENSE new file mode 100644 index 0000000..f27ee9b --- /dev/null +++ b/code/application_liste/app/node_modules/cacheable-request/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Luke Childs + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/code/application_liste/app/node_modules/cacheable-request/README.md b/code/application_liste/app/node_modules/cacheable-request/README.md new file mode 100644 index 0000000..84a5568 --- /dev/null +++ b/code/application_liste/app/node_modules/cacheable-request/README.md @@ -0,0 +1,190 @@ +# cacheable-request + +> Wrap native HTTP requests with RFC compliant cache support + +[![Build Status](https://travis-ci.org/lukechilds/cacheable-request.svg?branch=master)](https://travis-ci.org/lukechilds/cacheable-request) +[![Coverage Status](https://coveralls.io/repos/github/lukechilds/cacheable-request/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/cacheable-request?branch=master) +[![npm](https://img.shields.io/npm/dm/cacheable-request.svg)](https://www.npmjs.com/package/cacheable-request) +[![npm](https://img.shields.io/npm/v/cacheable-request.svg)](https://www.npmjs.com/package/cacheable-request) + +[RFC 7234](http://httpwg.org/specs/rfc7234.html) compliant HTTP caching for native Node.js HTTP/HTTPS requests. Caching works out of the box in memory or is easily pluggable with a wide range of storage adapters. + +**Note:** This is a low level wrapper around the core HTTP modules, it's not a high level request library. + +## Features + +- Only stores cacheable responses as defined by RFC 7234 +- Fresh cache entries are served directly from cache +- Stale cache entries are revalidated with `If-None-Match`/`If-Modified-Since` headers +- 304 responses from revalidation requests use cached body +- Updates `Age` header on cached responses +- Can completely bypass cache on a per request basis +- In memory cache by default +- Official support for Redis, MongoDB, SQLite, PostgreSQL and MySQL storage adapters +- Easily plug in your own or third-party storage adapters +- If DB connection fails, cache is automatically bypassed ([disabled by default](#optsautomaticfailover)) +- Adds cache support to any existing HTTP code with minimal changes +- Uses [http-cache-semantics](https://github.com/pornel/http-cache-semantics) internally for HTTP RFC 7234 compliance + +## Install + +```shell +npm install --save cacheable-request +``` + +## Usage + +```js +const http = require('http'); +const CacheableRequest = require('cacheable-request'); + +// Then instead of +const req = http.request('http://example.com', cb); +req.end(); + +// You can do +const cacheableRequest = new CacheableRequest(http.request); +const cacheReq = cacheableRequest('http://example.com', cb); +cacheReq.on('request', req => req.end()); +// Future requests to 'example.com' will be returned from cache if still valid + +// You pass in any other http.request API compatible method to be wrapped with cache support: +const cacheableRequest = new CacheableRequest(https.request); +const cacheableRequest = new CacheableRequest(electron.net); +``` + +## Storage Adapters + +`cacheable-request` uses [Keyv](https://github.com/lukechilds/keyv) to support a wide range of storage adapters. + +For example, to use Redis as a cache backend, you just need to install the official Redis Keyv storage adapter: + +``` +npm install --save @keyv/redis +``` + +And then you can pass `CacheableRequest` your connection string: + +```js +const cacheableRequest = new CacheableRequest(http.request, 'redis://user:pass@localhost:6379'); +``` + +[View all official Keyv storage adapters.](https://github.com/lukechilds/keyv#official-storage-adapters) + +Keyv also supports anything that follows the Map API so it's easy to write your own storage adapter or use a third-party solution. + +e.g The following are all valid storage adapters + +```js +const storageAdapter = new Map(); +// or +const storageAdapter = require('./my-storage-adapter'); +// or +const QuickLRU = require('quick-lru'); +const storageAdapter = new QuickLRU({ maxSize: 1000 }); + +const cacheableRequest = new CacheableRequest(http.request, storageAdapter); +``` + +View the [Keyv docs](https://github.com/lukechilds/keyv) for more information on how to use storage adapters. + +## API + +### new cacheableRequest(request, [storageAdapter]) + +Returns the provided request function wrapped with cache support. + +#### request + +Type: `function` + +Request function to wrap with cache support. Should be [`http.request`](https://nodejs.org/api/http.html#http_http_request_options_callback) or a similar API compatible request function. + +#### storageAdapter + +Type: `Keyv storage adapter`
+Default: `new Map()` + +A [Keyv](https://github.com/lukechilds/keyv) storage adapter instance, or connection string if using with an official Keyv storage adapter. + +### Instance + +#### cacheableRequest(opts, [cb]) + +Returns an event emitter. + +##### opts + +Type: `object`, `string` + +Any of the default request functions options plus: + +###### opts.cache + +Type: `boolean`
+Default: `true` + +If the cache should be used. Setting this to false will completely bypass the cache for the current request. + +###### opts.strictTtl + +Type: `boolean`
+Default: `false` + +If set to `false`, after a cached resource's TTL expires it is kept in the cache and will be revalidated on the next request with `If-None-Match`/`If-Modified-Since` headers. + +If set to `true` once a cached resource has expired it is deleted and will have to be re-requested. + +###### opts.automaticFailover + +Type: `boolean`
+Default: `false` + +When set to `true`, if the DB connection fails we will automatically fallback to a network request. DB errors will still be emitted to notify you of the problem even though the request callback may succeed. + +##### cb + +Type: `function` + +The callback function which will receive the response as an argument. + +The response can be either a [Node.js HTTP response stream](https://nodejs.org/api/http.html#http_class_http_incomingmessage) or a [responselike object](https://github.com/lukechilds/responselike). The response will also have a `fromCache` property set with a boolean value. + +##### .on('request', request) + +`request` event to get the request object of the request. + +**Note:** This event will only fire if an HTTP request is actually made, not when a response is retrieved from cache. However, you should always handle the `request` event to end the request and handle any potential request errors. + +##### .on('response', response) + +`response` event to get the response object from the HTTP request or cache. + +##### .on('error', error) + +`error` event emitted in case of an error with the cache. + +Errors emitted here will be an instance of `CacheableRequest.RequestError` or `CacheableRequest.CacheError`. You will only ever receive a `RequestError` if the request function throws (normally caused by invalid user input). Normal request errors should be handled inside the `request` event. + +To properly handle all error scenarios you should use the following pattern: + +```js +cacheableRequest('example.com', cb) + .on('error', err => { + if (err instanceof CacheableRequest.CacheError) { + handleCacheError(err); // Cache error + } else if (err instanceof CacheableRequest.RequestError) { + handleRequestError(err); // Request function thrown + } + }) + .on('request', req => { + req.on('error', handleRequestError); // Request error emitted + req.end(); + }); +``` + +**Note:** Database connection errors are emitted here, however `cacheable-request` will attempt to re-request the resource and bypass the cache on a connection error. Therefore a database connection error doesn't necessarily mean the request won't be fulfilled. + +## License + +MIT © Luke Childs diff --git a/code/application_liste/app/node_modules/cacheable-request/node_modules/lowercase-keys/index.js b/code/application_liste/app/node_modules/cacheable-request/node_modules/lowercase-keys/index.js new file mode 100644 index 0000000..b8d8898 --- /dev/null +++ b/code/application_liste/app/node_modules/cacheable-request/node_modules/lowercase-keys/index.js @@ -0,0 +1,11 @@ +'use strict'; +module.exports = function (obj) { + var ret = {}; + var keys = Object.keys(Object(obj)); + + for (var i = 0; i < keys.length; i++) { + ret[keys[i].toLowerCase()] = obj[keys[i]]; + } + + return ret; +}; diff --git a/code/application_liste/app/node_modules/cacheable-request/node_modules/lowercase-keys/package.json b/code/application_liste/app/node_modules/cacheable-request/node_modules/lowercase-keys/package.json new file mode 100644 index 0000000..1048127 --- /dev/null +++ b/code/application_liste/app/node_modules/cacheable-request/node_modules/lowercase-keys/package.json @@ -0,0 +1,67 @@ +{ + "_from": "lowercase-keys@1.0.0", + "_id": "lowercase-keys@1.0.0", + "_inBundle": false, + "_integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", + "_location": "/cacheable-request/lowercase-keys", + "_phantomChildren": {}, + "_requested": { + "type": "version", + "registry": true, + "raw": "lowercase-keys@1.0.0", + "name": "lowercase-keys", + "escapedName": "lowercase-keys", + "rawSpec": "1.0.0", + "saveSpec": null, + "fetchSpec": "1.0.0" + }, + "_requiredBy": [ + "/cacheable-request" + ], + "_resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", + "_shasum": "4e3366b39e7f5457e35f1324bdf6f88d0bfc7306", + "_spec": "lowercase-keys@1.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\cacheable-request", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/lowercase-keys/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Lowercase the keys of an object", + "devDependencies": { + "ava": "0.0.4" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/lowercase-keys#readme", + "keywords": [ + "object", + "assign", + "extend", + "properties", + "lowercase", + "lower-case", + "case", + "keys", + "key" + ], + "license": "MIT", + "name": "lowercase-keys", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/lowercase-keys.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.0" +} diff --git a/code/application_liste/app/node_modules/cacheable-request/node_modules/lowercase-keys/readme.md b/code/application_liste/app/node_modules/cacheable-request/node_modules/lowercase-keys/readme.md new file mode 100644 index 0000000..dc65770 --- /dev/null +++ b/code/application_liste/app/node_modules/cacheable-request/node_modules/lowercase-keys/readme.md @@ -0,0 +1,33 @@ +# lowercase-keys [![Build Status](https://travis-ci.org/sindresorhus/lowercase-keys.svg?branch=master)](https://travis-ci.org/sindresorhus/lowercase-keys) + +> Lowercase the keys of an object + + +## Install + +``` +$ npm install --save lowercase-keys +``` + + +## Usage + +```js +var lowercaseKeys = require('lowercase-keys'); + +lowercaseKeys({FOO: true, bAr: false}); +//=> {foo: true, bar: false} +``` + + +## API + +### lowercaseKeys(object) + +Lowercases the keys and returns a new object. + + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/code/application_liste/app/node_modules/cacheable-request/package.json b/code/application_liste/app/node_modules/cacheable-request/package.json new file mode 100644 index 0000000..afb914c --- /dev/null +++ b/code/application_liste/app/node_modules/cacheable-request/package.json @@ -0,0 +1,86 @@ +{ + "_from": "cacheable-request@^2.1.1", + "_id": "cacheable-request@2.1.4", + "_inBundle": false, + "_integrity": "sha1-DYCIAbY0KtM8kd+dC0TcCbkeXD0=", + "_location": "/cacheable-request", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "cacheable-request@^2.1.1", + "name": "cacheable-request", + "escapedName": "cacheable-request", + "rawSpec": "^2.1.1", + "saveSpec": null, + "fetchSpec": "^2.1.1" + }, + "_requiredBy": [ + "/bin-wrapper/got" + ], + "_resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-2.1.4.tgz", + "_shasum": "0d808801b6342ad33c91df9d0b44dc09b91e5c3d", + "_spec": "cacheable-request@^2.1.1", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\bin-wrapper\\node_modules\\got", + "author": { + "name": "Luke Childs", + "email": "lukechilds123@gmail.com", + "url": "http://lukechilds.co.uk" + }, + "bugs": { + "url": "https://github.com/lukechilds/cacheable-request/issues" + }, + "bundleDependencies": false, + "dependencies": { + "clone-response": "1.0.2", + "get-stream": "3.0.0", + "http-cache-semantics": "3.8.1", + "keyv": "3.0.0", + "lowercase-keys": "1.0.0", + "normalize-url": "2.0.1", + "responselike": "1.0.2" + }, + "deprecated": false, + "description": "Wrap native HTTP requests with RFC compliant cache support", + "devDependencies": { + "@keyv/sqlite": "^1.2.6", + "ava": "^0.24.0", + "coveralls": "^3.0.0", + "create-test-server": "^2.0.0", + "delay": "^2.0.0", + "eslint-config-xo-lukechilds": "^1.0.0", + "nyc": "^11.0.2", + "pify": "^3.0.0", + "sqlite3": "^3.1.9", + "this": "^1.0.2", + "xo": "^0.19.0" + }, + "homepage": "https://github.com/lukechilds/cacheable-request", + "keywords": [ + "HTTP", + "HTTPS", + "cache", + "caching", + "layer", + "cacheable", + "RFC 7234", + "RFC", + "7234", + "compliant" + ], + "license": "MIT", + "main": "src/index.js", + "name": "cacheable-request", + "repository": { + "type": "git", + "url": "git+https://github.com/lukechilds/cacheable-request.git" + }, + "scripts": { + "coverage": "nyc report --reporter=text-lcov | coveralls", + "test": "xo && nyc ava" + }, + "version": "2.1.4", + "xo": { + "extends": "xo-lukechilds" + } +} diff --git a/code/application_liste/app/node_modules/cacheable-request/src/index.js b/code/application_liste/app/node_modules/cacheable-request/src/index.js new file mode 100644 index 0000000..1935b2d --- /dev/null +++ b/code/application_liste/app/node_modules/cacheable-request/src/index.js @@ -0,0 +1,155 @@ +'use strict'; + +const EventEmitter = require('events'); +const urlLib = require('url'); +const normalizeUrl = require('normalize-url'); +const getStream = require('get-stream'); +const CachePolicy = require('http-cache-semantics'); +const Response = require('responselike'); +const lowercaseKeys = require('lowercase-keys'); +const cloneResponse = require('clone-response'); +const Keyv = require('keyv'); + +class CacheableRequest { + constructor(request, cacheAdapter) { + if (typeof request !== 'function') { + throw new TypeError('Parameter `request` must be a function'); + } + + this.cache = new Keyv({ + uri: typeof cacheAdapter === 'string' && cacheAdapter, + store: typeof cacheAdapter !== 'string' && cacheAdapter, + namespace: 'cacheable-request' + }); + + return this.createCacheableRequest(request); + } + + createCacheableRequest(request) { + return (opts, cb) => { + if (typeof opts === 'string') { + opts = urlLib.parse(opts); + } + opts = Object.assign({ + headers: {}, + method: 'GET', + cache: true, + strictTtl: false, + automaticFailover: false + }, opts); + opts.headers = lowercaseKeys(opts.headers); + + const ee = new EventEmitter(); + const url = normalizeUrl(urlLib.format(opts)); + const key = `${opts.method}:${url}`; + let revalidate = false; + let madeRequest = false; + + const makeRequest = opts => { + madeRequest = true; + const handler = response => { + if (revalidate) { + const revalidatedPolicy = CachePolicy.fromObject(revalidate.cachePolicy).revalidatedPolicy(opts, response); + if (!revalidatedPolicy.modified) { + const headers = revalidatedPolicy.policy.responseHeaders(); + response = new Response(response.statusCode, headers, revalidate.body, revalidate.url); + response.cachePolicy = revalidatedPolicy.policy; + response.fromCache = true; + } + } + + if (!response.fromCache) { + response.cachePolicy = new CachePolicy(opts, response); + response.fromCache = false; + } + + let clonedResponse; + if (opts.cache && response.cachePolicy.storable()) { + clonedResponse = cloneResponse(response); + getStream.buffer(response) + .then(body => { + const value = { + cachePolicy: response.cachePolicy.toObject(), + url: response.url, + statusCode: response.fromCache ? revalidate.statusCode : response.statusCode, + body + }; + const ttl = opts.strictTtl ? response.cachePolicy.timeToLive() : undefined; + return this.cache.set(key, value, ttl); + }) + .catch(err => ee.emit('error', new CacheableRequest.CacheError(err))); + } else if (opts.cache && revalidate) { + this.cache.delete(key) + .catch(err => ee.emit('error', new CacheableRequest.CacheError(err))); + } + + ee.emit('response', clonedResponse || response); + if (typeof cb === 'function') { + cb(clonedResponse || response); + } + }; + + try { + const req = request(opts, handler); + ee.emit('request', req); + } catch (err) { + ee.emit('error', new CacheableRequest.RequestError(err)); + } + }; + + const get = opts => Promise.resolve() + .then(() => opts.cache ? this.cache.get(key) : undefined) + .then(cacheEntry => { + if (typeof cacheEntry === 'undefined') { + return makeRequest(opts); + } + + const policy = CachePolicy.fromObject(cacheEntry.cachePolicy); + if (policy.satisfiesWithoutRevalidation(opts)) { + const headers = policy.responseHeaders(); + const response = new Response(cacheEntry.statusCode, headers, cacheEntry.body, cacheEntry.url); + response.cachePolicy = policy; + response.fromCache = true; + + ee.emit('response', response); + if (typeof cb === 'function') { + cb(response); + } + } else { + revalidate = cacheEntry; + opts.headers = policy.revalidationHeaders(opts); + makeRequest(opts); + } + }); + + this.cache.on('error', err => ee.emit('error', new CacheableRequest.CacheError(err))); + + get(opts).catch(err => { + if (opts.automaticFailover && !madeRequest) { + makeRequest(opts); + } + ee.emit('error', new CacheableRequest.CacheError(err)); + }); + + return ee; + }; + } +} + +CacheableRequest.RequestError = class extends Error { + constructor(err) { + super(err.message); + this.name = 'RequestError'; + Object.assign(this, err); + } +}; + +CacheableRequest.CacheError = class extends Error { + constructor(err) { + super(err.message); + this.name = 'CacheError'; + Object.assign(this, err); + } +}; + +module.exports = CacheableRequest; diff --git a/code/application_liste/app/node_modules/camel-case/LICENSE b/code/application_liste/app/node_modules/camel-case/LICENSE new file mode 100644 index 0000000..983fbe8 --- /dev/null +++ b/code/application_liste/app/node_modules/camel-case/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/camel-case/camel-case.d.ts b/code/application_liste/app/node_modules/camel-case/camel-case.d.ts new file mode 100644 index 0000000..782ef3b --- /dev/null +++ b/code/application_liste/app/node_modules/camel-case/camel-case.d.ts @@ -0,0 +1,3 @@ +declare function camelCase (value: string, locale?: string, mergeNumbers?: boolean): string; + +export = camelCase; diff --git a/code/application_liste/app/node_modules/camel-case/camel-case.js b/code/application_liste/app/node_modules/camel-case/camel-case.js new file mode 100644 index 0000000..1be652e --- /dev/null +++ b/code/application_liste/app/node_modules/camel-case/camel-case.js @@ -0,0 +1,23 @@ +var upperCase = require('upper-case') +var noCase = require('no-case') + +/** + * Camel case a string. + * + * @param {string} value + * @param {string} [locale] + * @return {string} + */ +module.exports = function (value, locale, mergeNumbers) { + var result = noCase(value, locale) + + // Replace periods between numeric entities with an underscore. + if (!mergeNumbers) { + result = result.replace(/ (?=\d)/g, '_') + } + + // Replace spaces between words with an upper cased character. + return result.replace(/ (.)/g, function (m, $1) { + return upperCase($1, locale) + }) +} diff --git a/code/application_liste/app/node_modules/camel-case/package.json b/code/application_liste/app/node_modules/camel-case/package.json new file mode 100644 index 0000000..3d99de6 --- /dev/null +++ b/code/application_liste/app/node_modules/camel-case/package.json @@ -0,0 +1,81 @@ +{ + "_from": "camel-case@3.0.x", + "_id": "camel-case@3.0.0", + "_inBundle": false, + "_integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", + "_location": "/camel-case", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "camel-case@3.0.x", + "name": "camel-case", + "escapedName": "camel-case", + "rawSpec": "3.0.x", + "saveSpec": null, + "fetchSpec": "3.0.x" + }, + "_requiredBy": [ + "/html-minifier" + ], + "_resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", + "_shasum": "ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73", + "_spec": "camel-case@3.0.x", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\html-minifier", + "author": { + "name": "Blake Embrey", + "email": "hello@blakeembrey.com", + "url": "http://blakeembrey.me" + }, + "bugs": { + "url": "https://github.com/blakeembrey/camel-case/issues" + }, + "bundleDependencies": false, + "dependencies": { + "no-case": "^2.2.0", + "upper-case": "^1.1.1" + }, + "deprecated": false, + "description": "Camel case a string", + "devDependencies": { + "istanbul": "^0.4.3", + "mocha": "^2.2.1", + "standard": "^7.1.2" + }, + "files": [ + "camel-case.js", + "camel-case.d.ts", + "LICENSE" + ], + "homepage": "https://github.com/blakeembrey/camel-case", + "keywords": [ + "camel", + "case", + "camelcase", + "camel-case", + "dash", + "hyphen", + "dot", + "underscore", + "lodash", + "separator", + "string", + "text", + "convert" + ], + "license": "MIT", + "main": "camel-case.js", + "name": "camel-case", + "repository": { + "type": "git", + "url": "git://github.com/blakeembrey/camel-case.git" + }, + "scripts": { + "lint": "standard", + "test": "npm run lint && npm run test-cov", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- -R spec --bail", + "test-spec": "mocha -- -R spec --bail" + }, + "typings": "camel-case.d.ts", + "version": "3.0.0" +} diff --git a/code/application_liste/app/node_modules/camelcase-keys/index.js b/code/application_liste/app/node_modules/camelcase-keys/index.js new file mode 100644 index 0000000..0eca08c --- /dev/null +++ b/code/application_liste/app/node_modules/camelcase-keys/index.js @@ -0,0 +1,12 @@ +'use strict'; +var mapObj = require('map-obj'); +var camelCase = require('camelcase'); + +module.exports = function (input, options) { + options = options || {}; + var exclude = options.exclude || []; + return mapObj(input, function (key, val) { + key = exclude.indexOf(key) === -1 ? camelCase(key) : key; + return [key, val]; + }); +}; diff --git a/code/application_liste/app/node_modules/camelcase-keys/license b/code/application_liste/app/node_modules/camelcase-keys/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/code/application_liste/app/node_modules/camelcase-keys/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/camelcase-keys/node_modules/camelcase/index.js b/code/application_liste/app/node_modules/camelcase-keys/node_modules/camelcase/index.js new file mode 100644 index 0000000..929facb --- /dev/null +++ b/code/application_liste/app/node_modules/camelcase-keys/node_modules/camelcase/index.js @@ -0,0 +1,56 @@ +'use strict'; + +function preserveCamelCase(str) { + var isLastCharLower = false; + + for (var i = 0; i < str.length; i++) { + var c = str.charAt(i); + + if (isLastCharLower && (/[a-zA-Z]/).test(c) && c.toUpperCase() === c) { + str = str.substr(0, i) + '-' + str.substr(i); + isLastCharLower = false; + i++; + } else { + isLastCharLower = (c.toLowerCase() === c); + } + } + + return str; +} + +module.exports = function () { + var str = [].map.call(arguments, function (str) { + return str.trim(); + }).filter(function (str) { + return str.length; + }).join('-'); + + if (!str.length) { + return ''; + } + + if (str.length === 1) { + return str; + } + + if (!(/[_.\- ]+/).test(str)) { + if (str === str.toUpperCase()) { + return str.toLowerCase(); + } + + if (str[0] !== str[0].toLowerCase()) { + return str[0].toLowerCase() + str.slice(1); + } + + return str; + } + + str = preserveCamelCase(str); + + return str + .replace(/^[_.\- ]+/, '') + .toLowerCase() + .replace(/[_.\- ]+(\w|$)/g, function (m, p1) { + return p1.toUpperCase(); + }); +}; diff --git a/code/application_liste/app/node_modules/camelcase-keys/node_modules/camelcase/license b/code/application_liste/app/node_modules/camelcase-keys/node_modules/camelcase/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/code/application_liste/app/node_modules/camelcase-keys/node_modules/camelcase/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/camelcase-keys/node_modules/camelcase/package.json b/code/application_liste/app/node_modules/camelcase-keys/node_modules/camelcase/package.json new file mode 100644 index 0000000..b6963c9 --- /dev/null +++ b/code/application_liste/app/node_modules/camelcase-keys/node_modules/camelcase/package.json @@ -0,0 +1,71 @@ +{ + "_from": "camelcase@^2.0.0", + "_id": "camelcase@2.1.1", + "_inBundle": false, + "_integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "_location": "/camelcase-keys/camelcase", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "camelcase@^2.0.0", + "name": "camelcase", + "escapedName": "camelcase", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/camelcase-keys" + ], + "_resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "_shasum": "7c1d16d679a1bbe59ca02cacecfb011e201f5a1f", + "_spec": "camelcase@^2.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\camelcase-keys", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/camelcase/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Convert a dash/dot/underscore/space separated string to camelCase: foo-bar → fooBar", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/camelcase#readme", + "keywords": [ + "camelcase", + "camel-case", + "camel", + "case", + "dash", + "hyphen", + "dot", + "underscore", + "separator", + "string", + "text", + "convert" + ], + "license": "MIT", + "name": "camelcase", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/camelcase.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.1.1" +} diff --git a/code/application_liste/app/node_modules/camelcase-keys/node_modules/camelcase/readme.md b/code/application_liste/app/node_modules/camelcase-keys/node_modules/camelcase/readme.md new file mode 100644 index 0000000..080b2a1 --- /dev/null +++ b/code/application_liste/app/node_modules/camelcase-keys/node_modules/camelcase/readme.md @@ -0,0 +1,57 @@ +# camelcase [![Build Status](https://travis-ci.org/sindresorhus/camelcase.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase) + +> Convert a dash/dot/underscore/space separated string to camelCase: `foo-bar` → `fooBar` + + +## Install + +``` +$ npm install --save camelcase +``` + + +## Usage + +```js +const camelCase = require('camelcase'); + +camelCase('foo-bar'); +//=> 'fooBar' + +camelCase('foo_bar'); +//=> 'fooBar' + +camelCase('Foo-Bar'); +//=> 'fooBar' + +camelCase('--foo.bar'); +//=> 'fooBar' + +camelCase('__foo__bar__'); +//=> 'fooBar' + +camelCase('foo bar'); +//=> 'fooBar' + +console.log(process.argv[3]); +//=> '--foo-bar' +camelCase(process.argv[3]); +//=> 'fooBar' + +camelCase('foo', 'bar'); +//=> 'fooBar' + +camelCase('__foo__', '--bar'); +//=> 'fooBar' +``` + + +## Related + +- [decamelize](https://github.com/sindresorhus/decamelize) - The inverse of this module +- [uppercamelcase](https://github.com/SamVerschueren/uppercamelcase) - Like this module, but to PascalCase instead of camelCase + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/code/application_liste/app/node_modules/camelcase-keys/package.json b/code/application_liste/app/node_modules/camelcase-keys/package.json new file mode 100644 index 0000000..a492cb5 --- /dev/null +++ b/code/application_liste/app/node_modules/camelcase-keys/package.json @@ -0,0 +1,84 @@ +{ + "_from": "camelcase-keys@^2.0.0", + "_id": "camelcase-keys@2.1.0", + "_inBundle": false, + "_integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "_location": "/camelcase-keys", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "camelcase-keys@^2.0.0", + "name": "camelcase-keys", + "escapedName": "camelcase-keys", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/meow" + ], + "_resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "_shasum": "308beeaffdf28119051efa1d932213c91b8f92e7", + "_spec": "camelcase-keys@^2.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\meow", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/camelcase-keys/issues" + }, + "bundleDependencies": false, + "dependencies": { + "camelcase": "^2.0.0", + "map-obj": "^1.0.0" + }, + "deprecated": false, + "description": "Convert object keys to camelCase", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/camelcase-keys#readme", + "keywords": [ + "map", + "obj", + "object", + "key", + "keys", + "value", + "values", + "val", + "iterate", + "camelcase", + "camel-case", + "camel", + "case", + "dash", + "hyphen", + "dot", + "underscore", + "separator", + "string", + "text", + "convert" + ], + "license": "MIT", + "name": "camelcase-keys", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/camelcase-keys.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.1.0" +} diff --git a/code/application_liste/app/node_modules/camelcase-keys/readme.md b/code/application_liste/app/node_modules/camelcase-keys/readme.md new file mode 100644 index 0000000..ca37328 --- /dev/null +++ b/code/application_liste/app/node_modules/camelcase-keys/readme.md @@ -0,0 +1,54 @@ +# camelcase-keys [![Build Status](https://travis-ci.org/sindresorhus/camelcase-keys.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase-keys) + +> Convert object keys to camelCase using [`camelcase`](https://github.com/sindresorhus/camelcase) + + +## Install + +``` +$ npm install --save camelcase-keys +``` + + +## Usage + +```js +const camelcaseKeys = require('camelcase-keys'); + +camelcaseKeys({'foo-bar': true}); +//=> {fooBar: true} + + +const argv = require('minimist')(process.argv.slice(2)); +//=> {_: [], 'foo-bar': true} + +camelcaseKeys(argv); +//=> {_: [], fooBar: true} +``` + + +## API + +### camelcaseKeys(input, [options]) + +#### input + +Type: `object` + +Object to camelCase. + +#### options + +Type: `object` + +##### exclude + +Type: `array` +Default: `[]` + +Exclude keys from being camelCased. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/code/application_liste/app/node_modules/camelcase/index.js b/code/application_liste/app/node_modules/camelcase/index.js new file mode 100644 index 0000000..5670f73 --- /dev/null +++ b/code/application_liste/app/node_modules/camelcase/index.js @@ -0,0 +1,56 @@ +'use strict'; + +function preserveCamelCase(str) { + var isLastCharLower = false; + + for (var i = 0; i < str.length; i++) { + var c = str.charAt(i); + + if (isLastCharLower && (/[a-zA-Z]/).test(c) && c.toUpperCase() === c) { + str = str.substr(0, i) + '-' + str.substr(i); + isLastCharLower = false; + i++; + } else { + isLastCharLower = (c.toLowerCase() === c); + } + } + + return str; +} + +module.exports = function () { + var str = [].map.call(arguments, function (str) { + return str.trim(); + }).filter(function (str) { + return str.length; + }).join('-'); + + if (!str.length) { + return ''; + } + + if (str.length === 1) { + return str.toLowerCase(); + } + + if (!(/[_.\- ]+/).test(str)) { + if (str === str.toUpperCase()) { + return str.toLowerCase(); + } + + if (str[0] !== str[0].toLowerCase()) { + return str[0].toLowerCase() + str.slice(1); + } + + return str; + } + + str = preserveCamelCase(str); + + return str + .replace(/^[_.\- ]+/, '') + .toLowerCase() + .replace(/[_.\- ]+(\w|$)/g, function (m, p1) { + return p1.toUpperCase(); + }); +}; diff --git a/code/application_liste/app/node_modules/camelcase/license b/code/application_liste/app/node_modules/camelcase/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/code/application_liste/app/node_modules/camelcase/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/camelcase/package.json b/code/application_liste/app/node_modules/camelcase/package.json new file mode 100644 index 0000000..86606ef --- /dev/null +++ b/code/application_liste/app/node_modules/camelcase/package.json @@ -0,0 +1,72 @@ +{ + "_from": "camelcase@^3.0.0", + "_id": "camelcase@3.0.0", + "_inBundle": false, + "_integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "_location": "/camelcase", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "camelcase@^3.0.0", + "name": "camelcase", + "escapedName": "camelcase", + "rawSpec": "^3.0.0", + "saveSpec": null, + "fetchSpec": "^3.0.0" + }, + "_requiredBy": [ + "/yargs", + "/yargs-parser" + ], + "_resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "_shasum": "32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a", + "_spec": "camelcase@^3.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\yargs", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/camelcase/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Convert a dash/dot/underscore/space separated string to camelCase: foo-bar → fooBar", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/camelcase#readme", + "keywords": [ + "camelcase", + "camel-case", + "camel", + "case", + "dash", + "hyphen", + "dot", + "underscore", + "separator", + "string", + "text", + "convert" + ], + "license": "MIT", + "name": "camelcase", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/camelcase.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "3.0.0" +} diff --git a/code/application_liste/app/node_modules/camelcase/readme.md b/code/application_liste/app/node_modules/camelcase/readme.md new file mode 100644 index 0000000..080b2a1 --- /dev/null +++ b/code/application_liste/app/node_modules/camelcase/readme.md @@ -0,0 +1,57 @@ +# camelcase [![Build Status](https://travis-ci.org/sindresorhus/camelcase.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase) + +> Convert a dash/dot/underscore/space separated string to camelCase: `foo-bar` → `fooBar` + + +## Install + +``` +$ npm install --save camelcase +``` + + +## Usage + +```js +const camelCase = require('camelcase'); + +camelCase('foo-bar'); +//=> 'fooBar' + +camelCase('foo_bar'); +//=> 'fooBar' + +camelCase('Foo-Bar'); +//=> 'fooBar' + +camelCase('--foo.bar'); +//=> 'fooBar' + +camelCase('__foo__bar__'); +//=> 'fooBar' + +camelCase('foo bar'); +//=> 'fooBar' + +console.log(process.argv[3]); +//=> '--foo-bar' +camelCase(process.argv[3]); +//=> 'fooBar' + +camelCase('foo', 'bar'); +//=> 'fooBar' + +camelCase('__foo__', '--bar'); +//=> 'fooBar' +``` + + +## Related + +- [decamelize](https://github.com/sindresorhus/decamelize) - The inverse of this module +- [uppercamelcase](https://github.com/SamVerschueren/uppercamelcase) - Like this module, but to PascalCase instead of camelCase + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/code/application_liste/app/node_modules/caw/index.js b/code/application_liste/app/node_modules/caw/index.js new file mode 100644 index 0000000..69e7f55 --- /dev/null +++ b/code/application_liste/app/node_modules/caw/index.js @@ -0,0 +1,37 @@ +'use strict'; +const url = require('url'); +const getProxy = require('get-proxy'); +const isurl = require('isurl'); +const tunnelAgent = require('tunnel-agent'); +const urlToOptions = require('url-to-options'); + +module.exports = (proxy, opts) => { + proxy = proxy || getProxy(); + opts = Object.assign({}, opts); + + if (typeof proxy === 'object') { + opts = proxy; + proxy = getProxy(); + } + + if (!proxy) { + return null; + } + + proxy = isurl.lenient(proxy) ? urlToOptions(proxy) : url.parse(proxy); + + const uriProtocol = opts.protocol === 'https' ? 'https' : 'http'; + const proxyProtocol = proxy.protocol === 'https:' ? 'Https' : 'Http'; + const port = proxy.port || (proxyProtocol === 'Https' ? 443 : 80); + const method = `${uriProtocol}Over${proxyProtocol}`; + + delete opts.protocol; + + return tunnelAgent[method](Object.assign({ + proxy: { + port, + host: proxy.hostname, + proxyAuth: proxy.auth + } + }, opts)); +}; diff --git a/code/application_liste/app/node_modules/caw/license b/code/application_liste/app/node_modules/caw/license new file mode 100644 index 0000000..db6bc32 --- /dev/null +++ b/code/application_liste/app/node_modules/caw/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Kevin Mårtensson (github.com/kevva) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/caw/package.json b/code/application_liste/app/node_modules/caw/package.json new file mode 100644 index 0000000..bd4d5cc --- /dev/null +++ b/code/application_liste/app/node_modules/caw/package.json @@ -0,0 +1,82 @@ +{ + "_from": "caw@^2.0.0", + "_id": "caw@2.0.1", + "_inBundle": false, + "_integrity": "sha512-Cg8/ZSBEa8ZVY9HspcGUYaK63d/bN7rqS3CYCzEGUxuYv6UlmcjzDUz2fCFFHyTvUW5Pk0I+3hkA3iXlIj6guA==", + "_location": "/caw", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "caw@^2.0.0", + "name": "caw", + "escapedName": "caw", + "rawSpec": "^2.0.0", + "saveSpec": null, + "fetchSpec": "^2.0.0" + }, + "_requiredBy": [ + "/bin-wrapper/download", + "/download" + ], + "_resolved": "https://registry.npmjs.org/caw/-/caw-2.0.1.tgz", + "_shasum": "6c3ca071fc194720883c2dc5da9b074bfc7e9e95", + "_spec": "caw@^2.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\download", + "author": { + "name": "Kevin Mårtensson", + "email": "kevinmartensson@gmail.com", + "url": "github.com/kevva" + }, + "bugs": { + "url": "https://github.com/kevva/caw/issues" + }, + "bundleDependencies": false, + "dependencies": { + "get-proxy": "^2.0.0", + "isurl": "^1.0.0-alpha5", + "tunnel-agent": "^0.6.0", + "url-to-options": "^1.0.1" + }, + "deprecated": false, + "description": "Construct HTTP/HTTPS agents for tunneling proxies", + "devDependencies": { + "ava": "*", + "create-cert": "^1.0.4", + "get-port": "^3.1.0", + "got": "^7.0.0", + "pify": "^3.0.0", + "proxyquire": "^1.7.9", + "sinon": "^2.3.1", + "universal-url": "1.0.0-alpha", + "xo": "*" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/kevva/caw#readme", + "keywords": [ + "http", + "https", + "proxy", + "tunnel" + ], + "license": "MIT", + "name": "caw", + "repository": { + "type": "git", + "url": "git+https://github.com/kevva/caw.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "2.0.1", + "xo": { + "rules": { + "ava/no-skip-test": 0 + } + } +} diff --git a/code/application_liste/app/node_modules/caw/readme.md b/code/application_liste/app/node_modules/caw/readme.md new file mode 100644 index 0000000..447191f --- /dev/null +++ b/code/application_liste/app/node_modules/caw/readme.md @@ -0,0 +1,51 @@ +# caw [![Build Status](https://travis-ci.org/kevva/caw.svg?branch=master)](https://travis-ci.org/kevva/caw) + +> Construct HTTP/HTTPS agents for tunneling proxies + + +## Install + +``` +$ npm install caw +``` + + +## Usage + +```js +const caw = require('caw'); +const got = require('got'); + +got('todomvc.com', { + agent: caw() +}, () => {}); +``` + + +## API + +### caw([proxy], [options]) + +#### proxy + +Type: `string` + +Proxy URL. If not set, it'll try getting it using [`get-proxy`](https://github.com/kevva/get-proxy). + +#### options + +Type: `Object` + +Besides the options below, you can pass in options allowed in [tunnel-agent](https://github.com/request/tunnel-agent). + +##### protocol + +Type: `string`
+Default: `http` + +Endpoint protocol. + + +## License + +MIT © [Kevin Mårtensson](https://github.com/kevva) diff --git a/code/application_liste/app/node_modules/chalk/index.js b/code/application_liste/app/node_modules/chalk/index.js new file mode 100644 index 0000000..2d85a91 --- /dev/null +++ b/code/application_liste/app/node_modules/chalk/index.js @@ -0,0 +1,116 @@ +'use strict'; +var escapeStringRegexp = require('escape-string-regexp'); +var ansiStyles = require('ansi-styles'); +var stripAnsi = require('strip-ansi'); +var hasAnsi = require('has-ansi'); +var supportsColor = require('supports-color'); +var defineProps = Object.defineProperties; +var isSimpleWindowsTerm = process.platform === 'win32' && !/^xterm/i.test(process.env.TERM); + +function Chalk(options) { + // detect mode if not set manually + this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled; +} + +// use bright blue on Windows as the normal blue color is illegible +if (isSimpleWindowsTerm) { + ansiStyles.blue.open = '\u001b[94m'; +} + +var styles = (function () { + var ret = {}; + + Object.keys(ansiStyles).forEach(function (key) { + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + + ret[key] = { + get: function () { + return build.call(this, this._styles.concat(key)); + } + }; + }); + + return ret; +})(); + +var proto = defineProps(function chalk() {}, styles); + +function build(_styles) { + var builder = function () { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + builder.enabled = this.enabled; + // __proto__ is used because we must return a function, but there is + // no way to create a function with a different prototype. + /* eslint-disable no-proto */ + builder.__proto__ = proto; + + return builder; +} + +function applyStyle() { + // support varags, but simply cast to string in case there's only one arg + var args = arguments; + var argsLen = args.length; + var str = argsLen !== 0 && String(arguments[0]); + + if (argsLen > 1) { + // don't slice `arguments`, it prevents v8 optimizations + for (var a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || !str) { + return str; + } + + var nestedStyles = this._styles; + var i = nestedStyles.length; + + // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + var originalDim = ansiStyles.dim.open; + if (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) { + ansiStyles.dim.open = ''; + } + + while (i--) { + var code = ansiStyles[nestedStyles[i]]; + + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; + } + + // Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue. + ansiStyles.dim.open = originalDim; + + return str; +} + +function init() { + var ret = {}; + + Object.keys(styles).forEach(function (name) { + ret[name] = { + get: function () { + return build.call(this, [name]); + } + }; + }); + + return ret; +} + +defineProps(Chalk.prototype, init()); + +module.exports = new Chalk(); +module.exports.styles = ansiStyles; +module.exports.hasColor = hasAnsi; +module.exports.stripColor = stripAnsi; +module.exports.supportsColor = supportsColor; diff --git a/code/application_liste/app/node_modules/chalk/license b/code/application_liste/app/node_modules/chalk/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/code/application_liste/app/node_modules/chalk/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/code/application_liste/app/node_modules/chalk/package.json b/code/application_liste/app/node_modules/chalk/package.json new file mode 100644 index 0000000..7f08cbe --- /dev/null +++ b/code/application_liste/app/node_modules/chalk/package.json @@ -0,0 +1,114 @@ +{ + "_from": "chalk@^1.0.0", + "_id": "chalk@1.1.3", + "_inBundle": false, + "_integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "_location": "/chalk", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "chalk@^1.0.0", + "name": "chalk", + "escapedName": "chalk", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/squeak" + ], + "_resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "_shasum": "a8115c55e4a702fe4d150abd3872822a7e09fc98", + "_spec": "chalk@^1.0.0", + "_where": "C:\\Users\\andre\\Documents\\Ohm\\MSY\\8.Semester\\MDT1_2\\projekt\\code2\\code\\application_liste\\app\\node_modules\\squeak", + "bugs": { + "url": "https://github.com/chalk/chalk/issues" + }, + "bundleDependencies": false, + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "deprecated": false, + "description": "Terminal string styling done right. Much color.", + "devDependencies": { + "coveralls": "^2.11.2", + "matcha": "^0.6.0", + "mocha": "*", + "nyc": "^3.0.0", + "require-uncached": "^1.0.2", + "resolve-from": "^1.0.0", + "semver": "^4.3.3", + "xo": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/chalk/chalk#readme", + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "str", + "ansi", + "style", + "styles", + "tty", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "license": "MIT", + "maintainers": [ + { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + { + "name": "Joshua Appelman", + "email": "jappelman@xebia.com", + "url": "jbnicolai.com" + }, + { + "name": "JD Ballard", + "email": "i.am.qix@gmail.com", + "url": "github.com/qix-" + } + ], + "name": "chalk", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/chalk.git" + }, + "scripts": { + "bench": "matcha benchmark.js", + "coverage": "nyc npm test && nyc report", + "coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls", + "test": "xo && mocha" + }, + "version": "1.1.3", + "xo": { + "envs": [ + "node", + "mocha" + ] + } +} diff --git a/code/application_liste/app/node_modules/chalk/readme.md b/code/application_liste/app/node_modules/chalk/readme.md new file mode 100644 index 0000000..5cf111e --- /dev/null +++ b/code/application_liste/app/node_modules/chalk/readme.md @@ -0,0 +1,213 @@ +

+
+
+ chalk +
+
+
+

+ +> Terminal string styling done right + +[![Build Status](https://travis-ci.org/chalk/chalk.svg?branch=master)](https://travis-ci.org/chalk/chalk) +[![Coverage Status](https://coveralls.io/repos/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/r/chalk/chalk?branch=master) +[![](http://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) + + +[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough. + +**Chalk is a clean and focused alternative.** + +![](https://github.com/chalk/ansi-styles/raw/master/screenshot.png) + + +## Why + +- Highly performant +- Doesn't extend `String.prototype` +- Expressive API +- Ability to nest styles +- Clean and focused +- Auto-detects color support +- Actively maintained +- [Used by ~4500 modules](https://www.npmjs.com/browse/depended/chalk) as of July 15, 2015 + + +## Install + +``` +$ npm install --save chalk +``` + + +## Usage + +Chalk comes with an easy to use composable API where you just chain and nest the styles you want. + +```js +var chalk = require('chalk'); + +// style a string +chalk.blue('Hello world!'); + +// combine styled and normal strings +chalk.blue('Hello') + 'World' + chalk.red('!'); + +// compose multiple styles using the chainable API +chalk.blue.bgRed.bold('Hello world!'); + +// pass in multiple arguments +chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz'); + +// nest styles +chalk.red('Hello', chalk.underline.bgBlue('world') + '!'); + +// nest styles of the same type even (color, underline, background) +chalk.green( + 'I am a green line ' + + chalk.blue.underline.bold('with a blue substring') + + ' that becomes green again!' +); +``` + +Easily define your own themes. + +```js +var chalk = require('chalk'); +var error = chalk.bold.red; +console.log(error('Error!')); +``` + +Take advantage of console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data). + +```js +var name = 'Sindre'; +console.log(chalk.green('Hello %s'), name); +//=> Hello Sindre +``` + + +## API + +### chalk.`", + "expected": [ + { + "type": "style", + "name": "style", + "attribs": { + "type": "text/css" + }, + "children": [ + { + "data": "\n body > p\n\t{ font-weight: bold; }", + "type": "text" + } + ] + } + ] +} \ No newline at end of file diff --git a/code/application_liste/app/node_modules/domhandler/test/cases/08-extra_spaces_in_tag.json b/code/application_liste/app/node_modules/domhandler/test/cases/08-extra_spaces_in_tag.json new file mode 100644 index 0000000..5c2492e --- /dev/null +++ b/code/application_liste/app/node_modules/domhandler/test/cases/08-extra_spaces_in_tag.json @@ -0,0 +1,20 @@ +{ + "name": "Extra spaces in tag", + "options": {}, + "html": "the text", + "expected": [ + { + "type": "tag", + "name": "font", + "attribs": { + "size": "14" + }, + "children": [ + { + "data": "the text", + "type": "text" + } + ] + } + ] +} \ No newline at end of file diff --git a/code/application_liste/app/node_modules/domhandler/test/cases/09-unquoted_attrib.json b/code/application_liste/app/node_modules/domhandler/test/cases/09-unquoted_attrib.json new file mode 100644 index 0000000..543ccee --- /dev/null +++ b/code/application_liste/app/node_modules/domhandler/test/cases/09-unquoted_attrib.json @@ -0,0 +1,20 @@ +{ + "name": "Unquoted attributes", + "options": {}, + "html": "the text", + "expected": [ + { + "type": "tag", + "name": "font", + "attribs": { + "size": "14" + }, + "children": [ + { + "data": "the text", + "type": "text" + } + ] + } + ] +} \ No newline at end of file diff --git a/code/application_liste/app/node_modules/domhandler/test/cases/10-singular_attribute.json b/code/application_liste/app/node_modules/domhandler/test/cases/10-singular_attribute.json new file mode 100644 index 0000000..544636e --- /dev/null +++ b/code/application_liste/app/node_modules/domhandler/test/cases/10-singular_attribute.json @@ -0,0 +1,15 @@ +{ + "name": "Singular attribute", + "options": {}, + "html": "