alejandro.alvarez5 3 years ago
parent
commit
70bb213259
100 changed files with 4781 additions and 0 deletions
  1. BIN
      .DS_Store
  2. 25
    0
      config.xml
  3. BIN
      node_modules/.DS_Store
  4. 1
    0
      node_modules/.bin/cordova-browser
  5. 1
    0
      node_modules/.bin/create
  6. 1
    0
      node_modules/.bin/ios-sim
  7. 1
    0
      node_modules/.bin/mime
  8. 1
    0
      node_modules/.bin/nopt
  9. 1
    0
      node_modules/.bin/semver
  10. 1
    0
      node_modules/.bin/shjs
  11. 1
    0
      node_modules/.bin/uuid
  12. 1
    0
      node_modules/.bin/which
  13. 41
    0
      node_modules/@netflix/nerror/CHANGELOG.md
  14. 21
    0
      node_modules/@netflix/nerror/LICENSE
  15. 339
    0
      node_modules/@netflix/nerror/README.md
  16. 67
    0
      node_modules/@netflix/nerror/lib/index.d.ts
  17. 3
    0
      node_modules/@netflix/nerror/lib/index.js
  18. 813
    0
      node_modules/@netflix/nerror/lib/verror.js
  19. 77
    0
      node_modules/@netflix/nerror/package.json
  20. 21
    0
      node_modules/@nodelib/fs.scandir/LICENSE
  21. 171
    0
      node_modules/@nodelib/fs.scandir/README.md
  22. 20
    0
      node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts
  23. 19
    0
      node_modules/@nodelib/fs.scandir/out/adapters/fs.js
  24. 4
    0
      node_modules/@nodelib/fs.scandir/out/constants.d.ts
  25. 17
    0
      node_modules/@nodelib/fs.scandir/out/constants.js
  26. 12
    0
      node_modules/@nodelib/fs.scandir/out/index.d.ts
  27. 26
    0
      node_modules/@nodelib/fs.scandir/out/index.js
  28. 7
    0
      node_modules/@nodelib/fs.scandir/out/providers/async.d.ts
  29. 104
    0
      node_modules/@nodelib/fs.scandir/out/providers/async.js
  30. 1
    0
      node_modules/@nodelib/fs.scandir/out/providers/common.d.ts
  31. 13
    0
      node_modules/@nodelib/fs.scandir/out/providers/common.js
  32. 5
    0
      node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts
  33. 54
    0
      node_modules/@nodelib/fs.scandir/out/providers/sync.js
  34. 20
    0
      node_modules/@nodelib/fs.scandir/out/settings.d.ts
  35. 24
    0
      node_modules/@nodelib/fs.scandir/out/settings.js
  36. 20
    0
      node_modules/@nodelib/fs.scandir/out/types/index.d.ts
  37. 2
    0
      node_modules/@nodelib/fs.scandir/out/types/index.js
  38. 2
    0
      node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts
  39. 19
    0
      node_modules/@nodelib/fs.scandir/out/utils/fs.js
  40. 2
    0
      node_modules/@nodelib/fs.scandir/out/utils/index.d.ts
  41. 5
    0
      node_modules/@nodelib/fs.scandir/out/utils/index.js
  42. 73
    0
      node_modules/@nodelib/fs.scandir/package.json
  43. 21
    0
      node_modules/@nodelib/fs.stat/LICENSE
  44. 126
    0
      node_modules/@nodelib/fs.stat/README.md
  45. 13
    0
      node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts
  46. 17
    0
      node_modules/@nodelib/fs.stat/out/adapters/fs.js
  47. 12
    0
      node_modules/@nodelib/fs.stat/out/index.d.ts
  48. 26
    0
      node_modules/@nodelib/fs.stat/out/index.js
  49. 4
    0
      node_modules/@nodelib/fs.stat/out/providers/async.d.ts
  50. 36
    0
      node_modules/@nodelib/fs.stat/out/providers/async.js
  51. 3
    0
      node_modules/@nodelib/fs.stat/out/providers/sync.d.ts
  52. 23
    0
      node_modules/@nodelib/fs.stat/out/providers/sync.js
  53. 16
    0
      node_modules/@nodelib/fs.stat/out/settings.d.ts
  54. 16
    0
      node_modules/@nodelib/fs.stat/out/settings.js
  55. 4
    0
      node_modules/@nodelib/fs.stat/out/types/index.d.ts
  56. 2
    0
      node_modules/@nodelib/fs.stat/out/types/index.js
  57. 67
    0
      node_modules/@nodelib/fs.stat/package.json
  58. 21
    0
      node_modules/@nodelib/fs.walk/LICENSE
  59. 215
    0
      node_modules/@nodelib/fs.walk/README.md
  60. 14
    0
      node_modules/@nodelib/fs.walk/out/index.d.ts
  61. 34
    0
      node_modules/@nodelib/fs.walk/out/index.js
  62. 12
    0
      node_modules/@nodelib/fs.walk/out/providers/async.d.ts
  63. 30
    0
      node_modules/@nodelib/fs.walk/out/providers/async.js
  64. 4
    0
      node_modules/@nodelib/fs.walk/out/providers/index.d.ts
  65. 9
    0
      node_modules/@nodelib/fs.walk/out/providers/index.js
  66. 12
    0
      node_modules/@nodelib/fs.walk/out/providers/stream.d.ts
  67. 34
    0
      node_modules/@nodelib/fs.walk/out/providers/stream.js
  68. 10
    0
      node_modules/@nodelib/fs.walk/out/providers/sync.d.ts
  69. 14
    0
      node_modules/@nodelib/fs.walk/out/providers/sync.js
  70. 30
    0
      node_modules/@nodelib/fs.walk/out/readers/async.d.ts
  71. 97
    0
      node_modules/@nodelib/fs.walk/out/readers/async.js
  72. 7
    0
      node_modules/@nodelib/fs.walk/out/readers/common.d.ts
  73. 31
    0
      node_modules/@nodelib/fs.walk/out/readers/common.js
  74. 6
    0
      node_modules/@nodelib/fs.walk/out/readers/reader.d.ts
  75. 11
    0
      node_modules/@nodelib/fs.walk/out/readers/reader.js
  76. 15
    0
      node_modules/@nodelib/fs.walk/out/readers/sync.d.ts
  77. 59
    0
      node_modules/@nodelib/fs.walk/out/readers/sync.js
  78. 30
    0
      node_modules/@nodelib/fs.walk/out/settings.d.ts
  79. 26
    0
      node_modules/@nodelib/fs.walk/out/settings.js
  80. 8
    0
      node_modules/@nodelib/fs.walk/out/types/index.d.ts
  81. 2
    0
      node_modules/@nodelib/fs.walk/out/types/index.js
  82. 73
    0
      node_modules/@nodelib/fs.walk/package.json
  83. 46
    0
      node_modules/abbrev/LICENSE
  84. 23
    0
      node_modules/abbrev/README.md
  85. 61
    0
      node_modules/abbrev/abbrev.js
  86. 56
    0
      node_modules/abbrev/package.json
  87. 236
    0
      node_modules/accepts/HISTORY.md
  88. 23
    0
      node_modules/accepts/LICENSE
  89. 142
    0
      node_modules/accepts/README.md
  90. 238
    0
      node_modules/accepts/index.js
  91. 87
    0
      node_modules/accepts/package.json
  92. 8
    0
      node_modules/android-versions/.jshintignore
  93. 29
    0
      node_modules/android-versions/.jshintrc
  94. 3
    0
      node_modules/android-versions/.travis.yml
  95. 87
    0
      node_modules/android-versions/README.md
  96. 162
    0
      node_modules/android-versions/index.js
  97. 67
    0
      node_modules/android-versions/package.json
  98. 122
    0
      node_modules/android-versions/tests/index.test.js
  99. 165
    0
      node_modules/ansi-styles/index.js
  100. 0
    0
      node_modules/ansi-styles/license

BIN
.DS_Store View File


+ 25
- 0
config.xml View File

@@ -0,0 +1,25 @@
1
+<?xml version='1.0' encoding='utf-8'?>
2
+<widget id="io.cordova.hellocordova" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
3
+    <name>HelloCordova</name>
4
+    <description>
5
+        A sample Apache Cordova application that responds to the deviceready event.
6
+    </description>
7
+    <author email="dev@cordova.apache.org" href="http://cordova.io">
8
+        Apache Cordova Team
9
+    </author>
10
+    <content src="index.html" />
11
+    <access origin="*" />
12
+    <allow-intent href="http://*/*" />
13
+    <allow-intent href="https://*/*" />
14
+    <allow-intent href="tel:*" />
15
+    <allow-intent href="sms:*" />
16
+    <allow-intent href="mailto:*" />
17
+    <allow-intent href="geo:*" />
18
+    <platform name="android">
19
+        <allow-intent href="market:*" />
20
+    </platform>
21
+    <platform name="ios">
22
+        <allow-intent href="itms:*" />
23
+        <allow-intent href="itms-apps:*" />
24
+    </platform>
25
+</widget>

BIN
node_modules/.DS_Store View File


+ 1
- 0
node_modules/.bin/cordova-browser View File

@@ -0,0 +1 @@
1
+../cordova-browser/bin/create

+ 1
- 0
node_modules/.bin/create View File

@@ -0,0 +1 @@
1
+../cordova-android/bin/create

+ 1
- 0
node_modules/.bin/ios-sim View File

@@ -0,0 +1 @@
1
+../ios-sim/bin/ios-sim

+ 1
- 0
node_modules/.bin/mime View File

@@ -0,0 +1 @@
1
+../mime/cli.js

+ 1
- 0
node_modules/.bin/nopt View File

@@ -0,0 +1 @@
1
+../nopt/bin/nopt.js

+ 1
- 0
node_modules/.bin/semver View File

@@ -0,0 +1 @@
1
+../semver/bin/semver

+ 1
- 0
node_modules/.bin/shjs View File

@@ -0,0 +1 @@
1
+../shelljs/bin/shjs

+ 1
- 0
node_modules/.bin/uuid View File

@@ -0,0 +1 @@
1
+../uuid/dist/bin/uuid

+ 1
- 0
node_modules/.bin/which View File

@@ -0,0 +1 @@
1
+../which/bin/which

+ 41
- 0
node_modules/@netflix/nerror/CHANGELOG.md View File

@@ -0,0 +1,41 @@
1
+<a name="1.1.3"></a>
2
+### 1.1.3 (2019-11-27)
3
+
4
+
5
+#### Bug Fixes
6
+
7
+* **nerror:**  don't call extsprintf if single string passed to VError constructor (#11) ([89b2088b](https://github.com/Netflix/nerror/commit/89b2088b))
8
+
9
+
10
+<a name="1.1.2"></a>
11
+### 1.1.2 (2019-07-26)
12
+
13
+
14
+<a name="1.1.1"></a>
15
+### 1.1.1 (2019-07-09)
16
+
17
+
18
+<a name="1.1.0"></a>
19
+## 1.1.0 (2019-05-06)
20
+
21
+
22
+#### Features
23
+
24
+* **errorForEach:** make it MultiError support more general (#2) ([96cc8769](https://github.com/Netflix/nerror/commit/96cc8769))
25
+
26
+
27
+<a name="1.0.0"></a>
28
+## 1.0.0 (2019-05-02)
29
+
30
+
31
+#### Features
32
+
33
+* **nerror:** initial commit ([c959d4fc](https://github.com/Netflix/nerror/commit/c959d4fc))
34
+
35
+
36
+#### Breaking Changes
37
+
38
+* initial release
39
+
40
+ ([6ae8bd30](https://github.com/Netflix/nerror/commit/6ae8bd30))
41
+

+ 21
- 0
node_modules/@netflix/nerror/LICENSE View File

@@ -0,0 +1,21 @@
1
+The MIT License (MIT)
2
+
3
+Copyright (c) 2019, AUTHORS. All rights reserved.
4
+
5
+Permission is hereby granted, free of charge, to any person obtaining a copy
6
+of this software and associated documentation files (the "Software"), to deal
7
+in the Software without restriction, including without limitation the rights
8
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+copies of the Software, and to permit persons to whom the Software is
10
+furnished to do so, subject to the following conditions:
11
+
12
+The above copyright notice and this permission notice shall be included in
13
+all copies or substantial portions of the Software.
14
+
15
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+THE SOFTWARE

+ 339
- 0
node_modules/@netflix/nerror/README.md View File

@@ -0,0 +1,339 @@
1
+# nerror: rich JavaScript errors
2
+
3
+[![Build Status](https://travis-ci.org/Netflix/nerror.svg?branch=master)](https://travis-ci.org/Netflix/nerror)
4
+
5
+*Netflix services uses [VError](https://github.com/joyent/node-verror) to make
6
+operation of Node.js applications easier  through meaningful error chains.
7
+VError is an amazing library by Joyent and we  are glad for all the hard work
8
+for the contributors made during the years.
9
+In early 2019 Netflix error handling requirements started to broaden enough that
10
+we had to find a way to make quick iterations on VError with minimizing the
11
+churn on existing VError customers. As a result of this we decided to fork
12
+VError as NError. We hope in the future after the initial development period we
13
+can seek convergence between the two projects.*
14
+
15
+This module provides several classes in support of Joyent's [Best Practices for
16
+Error Handling in Node.js](http://www.joyent.com/developers/node/design/errors).
17
+If you find any of the behavior here confusing or surprising, check out that
18
+document first.
19
+
20
+## API
21
+
22
+See [API](/api.md)
23
+
24
+## Classes
25
+
26
+The error classes here support:
27
+
28
+* printf-style arguments for the message
29
+* chains of causes
30
+* properties to provide extra information about the error
31
+* creating your own subclasses that support all of these
32
+
33
+The classes here are:
34
+
35
+* **VError**, for chaining errors while preserving each one's error message.
36
+  This is useful in servers and command-line utilities when you want to
37
+  propagate an error up a call stack, but allow various levels to add their own
38
+  context.  See examples below.
39
+* **WError**, for wrapping errors while hiding the lower-level messages from the
40
+  top-level error.  This is useful for API endpoints where you don't want to
41
+  expose internal error messages, but you still want to preserve the error chain
42
+  for logging and debugging.
43
+* **PError**, which is just like VError but does not interpret printf-style
44
+  arguments at all.
45
+* **SError**, which is just like VError but interprets printf-style arguments
46
+  more strictly.
47
+* **MultiError**, which is just an Error that encapsulates one or more other
48
+  errors.  (This is used for parallel operations that return several errors.)
49
+
50
+For the full list of features see [API](/api.md).
51
+
52
+## Quick start
53
+
54
+First, install the package:
55
+
56
+    npm install @netflix/nerror
57
+
58
+If nothing else, you can use VError as a drop-in replacement for the built-in
59
+JavaScript Error class, with the addition of printf-style messages:
60
+
61
+```javascript
62
+const { VError } = require('@netflix/nerror');
63
+const err = new VError('missing file: "%s"', '/etc/passwd');
64
+console.log(err.message);
65
+```
66
+
67
+This prints:
68
+
69
+    missing file: "/etc/passwd"
70
+
71
+You can also pass a `cause` argument, which is any other Error object:
72
+
73
+```javascript
74
+const fs = require('fs');
75
+const filename = '/nonexistent';
76
+fs.stat(filename, function (err1) {
77
+	const err2 = new VError(err1, 'stat "%s"', filename);
78
+	console.error(err2.message);
79
+});
80
+```
81
+
82
+This prints out:
83
+
84
+    stat "/nonexistent": ENOENT, stat '/nonexistent'
85
+
86
+which resembles how Unix programs typically report errors:
87
+
88
+    $ sort /nonexistent
89
+    sort: open failed: /nonexistent: No such file or directory
90
+
91
+To match the Unixy feel, when you print out the error, just prepend the
92
+program's name to the VError's `message`.  Or just call
93
+[node-cmdutil.fail(your_verror)](https://github.com/joyent/node-cmdutil), which
94
+does this for you.
95
+
96
+You can get the next-level Error using `err.cause()`:
97
+
98
+```javascript
99
+console.error(err2.cause().message);
100
+```
101
+
102
+prints:
103
+
104
+    ENOENT, stat '/nonexistent'
105
+
106
+Of course, you can chain these as many times as you want, and it works with any
107
+kind of Error:
108
+
109
+```javascript
110
+const err1 = new Error('No such file or directory');
111
+const err2 = new VError(err1, 'failed to stat "%s"', '/junk');
112
+const err3 = new VError(err2, 'request failed');
113
+console.error(err3.message);
114
+```
115
+
116
+This prints:
117
+
118
+    request failed: failed to stat "/junk": No such file or directory
119
+
120
+The idea is that each layer in the stack annotates the error with a description
121
+of what it was doing.  The end result is a message that explains what happened
122
+at each level.
123
+
124
+You can also decorate Error objects with additional information so that callers
125
+can not only handle each kind of error differently, but also construct their own
126
+error messages (e.g., to localize them, format them, group them by type, and so
127
+on).  See the example below.
128
+
129
+
130
+## Deeper dive
131
+
132
+The two main goals for VError are:
133
+
134
+* **Make it easy to construct clear, complete error messages intended for
135
+  people.**  Clear error messages greatly improve both user experience and
136
+  debuggability, so we wanted to make it easy to build them.  That's why the
137
+  constructor takes printf-style arguments.
138
+* **Make it easy to construct objects with programmatically-accessible
139
+  metadata** (which we call _informational properties_).  Instead of just saying
140
+  "connection refused while connecting to 192.168.1.2:80", you can add
141
+  properties like `"ip": "192.168.1.2"` and `"tcpPort": 80`.  This can be used
142
+  for feeding into monitoring systems, analyzing large numbers of Errors (as
143
+  from a log file), or localizing error messages.
144
+
145
+To really make this useful, it also needs to be easy to compose Errors:
146
+higher-level code should be able to augment the Errors reported by lower-level
147
+code to provide a more complete description of what happened.  Instead of saying
148
+"connection refused", you can say "operation X failed: connection refused".
149
+That's why VError supports `causes`.
150
+
151
+In order for all this to work, programmers need to know that it's generally safe
152
+to wrap lower-level Errors with higher-level ones.  If you have existing code
153
+that handles Errors produced by a library, you should be able to wrap those
154
+Errors with a VError to add information without breaking the error handling
155
+code.  There are two obvious ways that this could break such consumers:
156
+
157
+* The error's name might change.  People typically use `name` to determine what
158
+  kind of Error they've got.  To ensure compatibility, you can create VErrors
159
+  with custom names, but this approach isn't great because it prevents you from
160
+  representing complex failures.  For this reason, VError provides
161
+  `findCauseByName`, which essentially asks: does this Error _or any of its
162
+  causes_ have this specific type?  If error handling code uses
163
+  `findCauseByName`, then subsystems can construct very specific causal chains
164
+  for debuggability and still let people handle simple cases easily.  There's an
165
+  example below.
166
+* The error's properties might change.  People often hang additional properties
167
+  off of Error objects.  If we wrap an existing Error in a new Error, those
168
+  properties would be lost unless we copied them.  But there are a variety of
169
+  both standard and non-standard Error properties that should _not_ be copied in
170
+  this way: most obviously `name`, `message`, and `stack`, but also `fileName`,
171
+  `lineNumber`, and a few others.  Plus, it's useful for some Error subclasses
172
+  to have their own private properties -- and there'd be no way to know whether
173
+  these should be copied.  For these reasons, VError first-classes these
174
+  information properties.  You have to provide them in the constructor, you can
175
+  only fetch them with the `info()` function, and VError takes care of making
176
+  sure properties from causes wind up in the `info()` output.
177
+
178
+Let's put this all together with an example from the node-fast RPC library.
179
+node-fast implements a simple RPC protocol for Node programs.  There's a server
180
+and client interface, and clients make RPC requests to servers.  Let's say the
181
+server fails with an UnauthorizedError with message "user 'bob' is not
182
+authorized".  The client wraps all server errors with a FastServerError.  The
183
+client also wraps all request errors with a FastRequestError that includes the
184
+name of the RPC call being made.  The result of this failed RPC might look like
185
+this:
186
+
187
+    name: FastRequestError
188
+    message: "request failed: server error: user 'bob' is not authorized"
189
+    rpcMsgid: <unique identifier for this request>
190
+    rpcMethod: GetObject
191
+    cause:
192
+        name: FastServerError
193
+        message: "server error: user 'bob' is not authorized"
194
+        cause:
195
+            name: UnauthorizedError
196
+            message: "user 'bob' is not authorized"
197
+            rpcUser: "bob"
198
+
199
+When the caller uses `VError.info()`, the information properties are collapsed
200
+so that it looks like this:
201
+
202
+    message: "request failed: server error: user 'bob' is not authorized"
203
+    rpcMsgid: <unique identifier for this request>
204
+    rpcMethod: GetObject
205
+    rpcUser: "bob"
206
+
207
+Taking this apart:
208
+
209
+* The error's message is a complete description of the problem.  The caller can
210
+  report this directly to its caller, which can potentially make its way back to
211
+  an end user (if appropriate).  It can also be logged.
212
+* The caller can tell that the request failed on the server, rather than as a
213
+  result of a client problem (e.g., failure to serialize the request), a
214
+  transport problem (e.g., failure to connect to the server), or something else
215
+  (e.g., a timeout).  They do this using `findCauseByName('FastServerError')`
216
+  rather than checking the `name` field directly.
217
+* If the caller logs this error, the logs can be analyzed to aggregate
218
+  errors by cause, by RPC method name, by user, or whatever.  Or the
219
+  error can be correlated with other events for the same rpcMsgid.
220
+* It wasn't very hard for any part of the code to contribute to this Error.
221
+  Each part of the stack has just a few lines to provide exactly what it knows,
222
+  with very little boilerplate.
223
+
224
+It's not expected that you'd use these complex forms all the time.  Despite
225
+supporting the complex case above, you can still just do:
226
+
227
+   new VError("my service isn't working");
228
+
229
+for the simple cases.
230
+
231
+
232
+## Examples
233
+
234
+The "Demo" section above covers several basic cases.  Here's a more advanced
235
+case:
236
+
237
+```javascript
238
+const err1 = new VError('something bad happened');
239
+/* ... */
240
+const err2 = new VError({
241
+    'name': 'ConnectionError',
242
+    'cause': err1,
243
+    'info': {
244
+        'errno': 'ECONNREFUSED',
245
+        'remote_ip': '127.0.0.1',
246
+        'port': 215
247
+    }
248
+}, 'failed to connect to "%s:%d"', '127.0.0.1', 215);
249
+
250
+console.log(err2.message);
251
+console.log(err2.name);
252
+console.log(VError.info(err2));
253
+console.log(err2.stack);
254
+```
255
+
256
+This outputs:
257
+
258
+    failed to connect to "127.0.0.1:215": something bad happened
259
+    ConnectionError
260
+    { errno: 'ECONNREFUSED', remote_ip: '127.0.0.1', port: 215 }
261
+    ConnectionError: failed to connect to "127.0.0.1:215": something bad happened
262
+        at Object.<anonymous> (/home/dap/node-verror/examples/info.js:5:12)
263
+        at Module._compile (module.js:456:26)
264
+        at Object.Module._extensions..js (module.js:474:10)
265
+        at Module.load (module.js:356:32)
266
+        at Function.Module._load (module.js:312:12)
267
+        at Function.Module.runMain (module.js:497:10)
268
+        at startup (node.js:119:16)
269
+        at node.js:935:3
270
+
271
+Information properties are inherited up the cause chain, with values at the top
272
+of the chain overriding same-named values lower in the chain.  To continue that
273
+example:
274
+
275
+```javascript
276
+const err3 = new VError({
277
+    'name': 'RequestError',
278
+    'cause': err2,
279
+    'info': {
280
+        'errno': 'EBADREQUEST'
281
+    }
282
+}, 'request failed');
283
+
284
+console.log(err3.message);
285
+console.log(err3.name);
286
+console.log(VError.info(err3));
287
+console.log(err3.stack);
288
+```
289
+
290
+This outputs:
291
+
292
+    request failed: failed to connect to "127.0.0.1:215": something bad happened
293
+    RequestError
294
+    { errno: 'EBADREQUEST', remote_ip: '127.0.0.1', port: 215 }
295
+    RequestError: request failed: failed to connect to "127.0.0.1:215": something bad happened
296
+        at Object.<anonymous> (/home/dap/node-verror/examples/info.js:20:12)
297
+        at Module._compile (module.js:456:26)
298
+        at Object.Module._extensions..js (module.js:474:10)
299
+        at Module.load (module.js:356:32)
300
+        at Function.Module._load (module.js:312:12)
301
+        at Function.Module.runMain (module.js:497:10)
302
+        at startup (node.js:119:16)
303
+        at node.js:935:3
304
+
305
+You can also print the complete stack trace of combined `Error`s by using
306
+`VError.fullStack(err).`
307
+
308
+```javascript
309
+const err1 = new VError('something bad happened');
310
+/* ... */
311
+const err2 = new VError(err1, 'something really bad happened here');
312
+
313
+console.log(VError.fullStack(err2));
314
+```
315
+
316
+This outputs:
317
+
318
+    VError: something really bad happened here: something bad happened
319
+        at Object.<anonymous> (/home/dap/node-verror/examples/fullStack.js:5:12)
320
+        at Module._compile (module.js:409:26)
321
+        at Object.Module._extensions..js (module.js:416:10)
322
+        at Module.load (module.js:343:32)
323
+        at Function.Module._load (module.js:300:12)
324
+        at Function.Module.runMain (module.js:441:10)
325
+        at startup (node.js:139:18)
326
+        at node.js:968:3
327
+    caused by: VError: something bad happened
328
+        at Object.<anonymous> (/home/dap/node-verror/examples/fullStack.js:3:12)
329
+        at Module._compile (module.js:409:26)
330
+        at Object.Module._extensions..js (module.js:416:10)
331
+        at Module.load (module.js:343:32)
332
+        at Function.Module._load (module.js:300:12)
333
+        at Function.Module.runMain (module.js:441:10)
334
+        at startup (node.js:139:18)
335
+        at node.js:968:3
336
+
337
+`VError.fullStack` is also safe to use on regular `Error`s, so feel free to use
338
+it whenever you need to extract the stack trace from an `Error`, regardless if
339
+it's a `VError` or not.

+ 67
- 0
node_modules/@netflix/nerror/lib/index.d.ts View File

@@ -0,0 +1,67 @@
1
+export class VError extends Error {
2
+    static VError: typeof VError;
3
+
4
+    static cause(err: Error): Error | null;
5
+    static info(err: Error): VError.Info;
6
+    static fullStack(err: Error): string;
7
+    static findCauseByName(err: Error, name: string): Error | null;
8
+    static hasCauseWithName(err: Error, name: string): boolean;
9
+    static errorFromList<T extends Error>(
10
+        errors: T[]
11
+    ): null | T | VError.MultiError;
12
+    static errorForEach(err: Error, func: (err: Error) => void): void;
13
+
14
+    cause(): Error | undefined;
15
+    constructor(
16
+        options: VError.Options | Error,
17
+        message: string,
18
+        ...params: any[]
19
+    );
20
+    constructor(message?: string, ...params: any[]);
21
+}
22
+
23
+export namespace VError {
24
+    interface Info {
25
+        [key: string]: any;
26
+    }
27
+
28
+    interface Options {
29
+        cause?: Error | null;
30
+        name?: string;
31
+        strict?: boolean;
32
+        constructorOpt?(...args: any[]): void;
33
+        info?: Info;
34
+    }
35
+
36
+    /*
37
+     * SError is like VError, but stricter about types.  You cannot pass "null" or
38
+     * "undefined" as string arguments to the formatter.  Since SError is only a
39
+     * different function, not really a different class, we don't set
40
+     * SError.prototype.name.
41
+     */
42
+    class SError extends VError {}
43
+
44
+    /*
45
+     * PError is like VError, but the message is not run through printf-style
46
+     * templating.
47
+     */
48
+    class PError extends VError {}
49
+
50
+    /*
51
+     * Represents a collection of errors for the purpose of consumers that generally
52
+     * only deal with one error.  Callers can extract the individual errors
53
+     * contained in this object, but may also just treat it as a normal single
54
+     * error, in which case a summary message will be printed.
55
+     */
56
+    class MultiError extends VError {
57
+        constructor(errors: Error[]);
58
+        errors(): Error[];
59
+    }
60
+
61
+    /*
62
+     * Like JavaScript's built-in Error class, but supports a "cause" argument which
63
+     * is wrapped, not "folded in" as with VError.	Accepts a printf-style message.
64
+     * The cause argument can be null.
65
+     */
66
+    class WError extends VError {}
67
+}

+ 3
- 0
node_modules/@netflix/nerror/lib/index.js View File

@@ -0,0 +1,3 @@
1
+'use strict';
2
+
3
+module.exports = require('./verror');

+ 813
- 0
node_modules/@netflix/nerror/lib/verror.js View File

@@ -0,0 +1,813 @@
1
+'use strict';
2
+
3
+/*
4
+ * verror.js: richer JavaScript errors
5
+ */
6
+const util = require('util');
7
+
8
+const _ = require('lodash');
9
+const assert = require('assert-plus');
10
+const { sprintf } = require('extsprintf');
11
+
12
+/*
13
+ * Public interface
14
+ */
15
+
16
+/* So you can 'var VError = require('@netflix/nerror')' */
17
+module.exports = VError;
18
+/* For compatibility */
19
+VError.VError = VError;
20
+/* Other exported classes */
21
+VError.PError = PError;
22
+VError.SError = SError;
23
+VError.WError = WError;
24
+VError.MultiError = MultiError;
25
+
26
+/**
27
+ * Normalized forms, producing an object with the following properties.
28
+ * @private
29
+ * @typedef {Object} ParsedOptions parsed Options
30
+ * @param {Object} options e- quivalent to "options" in third form. This will
31
+ *              never
32
+ *    			be a direct reference to what the caller passed in
33
+ *    			(i.e., it may be a shallow copy), so it can be freely
34
+ *    			modified.
35
+ * @param {String} shortmessage - result of sprintf(sprintf_args), taking
36
+ *              `options.strict` into account as described in README.md.
37
+ */
38
+
39
+/**
40
+ * Common function used to parse constructor arguments for VError, WError, and
41
+ * SError.  Named arguments to this function:
42
+ *
43
+ *     strict		force strict interpretation of sprintf arguments, even
44
+ *     			if the options in "argv" don't say so
45
+ *
46
+ *     argv		error's constructor arguments, which are to be
47
+ *     			interpreted as described in README.md.  For quick
48
+ *     			reference, "argv" has one of the following forms:
49
+ *
50
+ *          [ sprintf_args... ]           (argv[0] is a string)
51
+ *          [ cause, sprintf_args... ]    (argv[0] is an Error)
52
+ *          [ options, sprintf_args... ]  (argv[0] is an object)
53
+ *
54
+
55
+ * @private
56
+ * @param {Array} args - arguments
57
+ * @returns {ParsedOptions} parsed options
58
+ */
59
+function parseConstructorArguments(args) {
60
+    let options, sprintf_args, shortmessage, k;
61
+
62
+    assert.object(args, 'args');
63
+    assert.bool(args.strict, 'args.strict');
64
+    assert.array(args.argv, 'args.argv');
65
+    assert.optionalBool(args.skipPrintf, 'args.skipPrintf');
66
+    const argv = args.argv;
67
+
68
+    /*
69
+     * First, figure out which form of invocation we've been given.
70
+     */
71
+    if (argv.length === 0) {
72
+        options = {};
73
+        sprintf_args = [];
74
+    } else if (_.isError(argv[0])) {
75
+        options = { cause: argv[0] };
76
+        sprintf_args = argv.slice(1);
77
+    } else if (typeof argv[0] === 'object') {
78
+        options = {};
79
+        // eslint-disable-next-line guard-for-in
80
+        for (k in argv[0]) {
81
+            options[k] = argv[0][k];
82
+        }
83
+        sprintf_args = argv.slice(1);
84
+    } else {
85
+        assert.string(
86
+            argv[0],
87
+            'first argument to VError, PError, SError, or WError ' +
88
+                'constructor must be a string, object, or Error'
89
+        );
90
+        options = {};
91
+        sprintf_args = argv;
92
+    }
93
+
94
+    // Preserve options
95
+    if (args.skipPrintf) {
96
+        options.skipPrintf = args.skipPrintf;
97
+    }
98
+    if (args.strict) {
99
+        options.strict = args.strict;
100
+    }
101
+
102
+    /*
103
+     * Now construct the error's message.
104
+     *
105
+     * extsprintf (which we invoke here with our caller's arguments in order
106
+     * to construct this Error's message) is strict in its interpretation of
107
+     * values to be processed by the "%s" specifier.  The value passed to
108
+     * extsprintf must actually be a string or something convertible to a
109
+     * String using .toString().  Passing other values (notably "null" and
110
+     * "undefined") is considered a programmer error.  The assumption is
111
+     * that if you actually want to print the string "null" or "undefined",
112
+     * then that's easy to do that when you're calling extsprintf; on the
113
+     * other hand, if you did NOT want that (i.e., there's actually a bug
114
+     * where the program assumes some variable is non-null and tries to
115
+     * print it, which might happen when constructing a packet or file in
116
+     * some specific format), then it's better to stop immediately than
117
+     * produce bogus output.
118
+     *
119
+     * However, sometimes the bug is only in the code calling VError, and a
120
+     * programmer might prefer to have the error message contain "null" or
121
+     * "undefined" rather than have the bug in the error path crash the
122
+     * program (making the first bug harder to identify).  For that reason,
123
+     * by default VError converts "null" or "undefined" arguments to their
124
+     * string representations and passes those to extsprintf.  Programmers
125
+     * desiring the strict behavior can use the SError class or pass the
126
+     * "strict" option to the VError constructor.
127
+     */
128
+    assert.object(options);
129
+    if (!options.skipPrintf && !options.strict && !args.strict) {
130
+        sprintf_args = sprintf_args.map(function(a) {
131
+            return a === null ? 'null' : a === undefined ? 'undefined' : a;
132
+        });
133
+    }
134
+
135
+    if (sprintf_args.length === 0) {
136
+        shortmessage = '';
137
+    } else if (
138
+        options.skipPrintf ||
139
+        (sprintf_args.length === 1 && typeof sprintf_args[0] === 'string')
140
+    ) {
141
+        assert.equal(
142
+            sprintf_args.length,
143
+            1,
144
+            'only one argument is allowed with options.skipPrintf'
145
+        );
146
+        shortmessage = sprintf_args[0];
147
+    } else {
148
+        shortmessage = sprintf.apply(null, sprintf_args);
149
+    }
150
+
151
+    return {
152
+        options: options,
153
+        shortmessage: shortmessage
154
+    };
155
+}
156
+
157
+/**
158
+ * @public
159
+ * @typedef {Object} VErrorOptions Options
160
+ * @param {String} name - Name of the error.
161
+ * @param {Error} [cause] -  Indicates that the new error was caused by `cause`.
162
+ * @param {Boolean} [strict=false] - If true, then `null` and `undefined` values
163
+ *  in `sprintf_args` are passed through to `sprintf()`
164
+ * @param {Function} [constructorOpt] -If specified, then the stack trace for
165
+ *  this error ends at function `constructorOpt`.
166
+ * @param {Object} [info]- Specifies arbitrary informational properties.
167
+ * @param {Boolean} [skipPrintf=false] - If true, then `sprintf()` is not called
168
+ */
169
+
170
+/**
171
+ *
172
+ * About Constructor:
173
+ * All of these forms construct a new VError that behaves just like the built-in
174
+ * JavaScript `Error` class, with some additional methods described below.
175
+ *
176
+ * About Properties:
177
+ * For all of these classes except `PError`, the printf-style arguments passed to
178
+ * the constructor are processed with `sprintf()` to form a message.
179
+ * For `WError`, this becomes the complete `message` property.  For `SError` and
180
+ * `VError`, this message is prepended to the message of the cause, if any
181
+ * (with a suitable separator), and the result becomes the `message` property.
182
+ *
183
+ * The `stack` property is managed entirely by the underlying JavaScript
184
+ * implementation.  It's generally implemented using a getter function because
185
+ * constructing the human-readable stack trace is somewhat expensive.
186
+ *
187
+ * @public
188
+ * @class VError
189
+ * @param {...String|VErrorOptions|Error} [arg] - sprintf args, options or cause
190
+ * @param {...String} [args] - sprintf args
191
+ * @property {String} name - Programmatically-usable name of the error.
192
+ * @property {String} message - Human-readable summary of the failure.
193
+ * Programmatically-accessible details are provided through `VError.info(err)`
194
+ * class method.
195
+ * @property {String} stack - Human-readable stack trace where the Error was
196
+ * constructed.
197
+ * @example
198
+ * // This is the most general form.  You can specify any supported options
199
+ * // including "cause" and "info") this way.</caption>
200
+ * new VError(options, sprintf_args...)
201
+ * @example
202
+ * // This is a useful shorthand when the only option you need is "cause".
203
+ * new VError(cause, sprintf_args...)
204
+ * @example
205
+ * // This is a useful shorthand when you don't need any options at all.
206
+ * new VError(sprintf_args...)
207
+ */
208
+function VError(...args) {
209
+    let obj, ctor, message, k;
210
+
211
+    /*
212
+     * This is a regrettable pattern, but JavaScript's built-in Error class
213
+     * is defined to work this way, so we allow the constructor to be called
214
+     * without "new".
215
+     */
216
+    if (!(this instanceof VError)) {
217
+        obj = Object.create(VError.prototype);
218
+        VError.apply(obj, arguments);
219
+        return obj;
220
+    }
221
+
222
+    /*
223
+     * For convenience and backwards compatibility, we support several
224
+     * different calling forms.  Normalize them here.
225
+     */
226
+    const parsed = parseConstructorArguments({
227
+        argv: args,
228
+        strict: false
229
+    });
230
+
231
+    /*
232
+     * If we've been given a name, apply it now.
233
+     */
234
+    if (parsed.options.name) {
235
+        assert.string(parsed.options.name, 'error\'s "name" must be a string');
236
+        this.name = parsed.options.name;
237
+    }
238
+
239
+    /*
240
+     * For debugging, we keep track of the original short message (attached
241
+     * this Error particularly) separately from the complete message (which
242
+     * includes the messages of our cause chain).
243
+     */
244
+    this.jse_shortmsg = parsed.shortmessage;
245
+    message = parsed.shortmessage;
246
+
247
+    /*
248
+     * If we've been given a cause, record a reference to it and update our
249
+     * message appropriately.
250
+     */
251
+    const cause = parsed.options.cause;
252
+    if (cause) {
253
+        VError._assertError(cause, '"cause" must be an Error');
254
+        this.jse_cause = cause;
255
+
256
+        if (!parsed.options.skipCauseMessage) {
257
+            message += ': ' + cause.message;
258
+        }
259
+    }
260
+
261
+    /*
262
+     * If we've been given an object with properties, shallow-copy that
263
+     * here.  We don't want to use a deep copy in case there are non-plain
264
+     * objects here, but we don't want to use the original object in case
265
+     * the caller modifies it later.
266
+     */
267
+    this.jse_info = {};
268
+    if (parsed.options.info) {
269
+        // eslint-disable-next-line guard-for-in
270
+        for (k in parsed.options.info) {
271
+            this.jse_info[k] = parsed.options.info[k];
272
+        }
273
+    }
274
+
275
+    this.message = message;
276
+    Error.call(this, message);
277
+
278
+    if (Error.captureStackTrace) {
279
+        ctor = parsed.options.constructorOpt || this.constructor;
280
+        Error.captureStackTrace(this, ctor);
281
+    }
282
+
283
+    return this;
284
+}
285
+
286
+util.inherits(VError, Error);
287
+VError.prototype.name = 'VError';
288
+
289
+/**
290
+ * Appends any keys/fields to the existing jse_info. this can stomp over any
291
+ * existing fields.
292
+ * @public
293
+ * @memberof VError.prototype
294
+ * @param {Object} obj source obj to assign fields from
295
+ * @return {Object} new info object
296
+ */
297
+VError.prototype.assignInfo = function ve_assignInfo(obj) {
298
+    assert.optionalObject(obj, 'obj');
299
+    return Object.assign(this.jse_info, obj);
300
+};
301
+
302
+/**
303
+ * Instance level convenience method vs using the static methods on VError.
304
+ * @public
305
+ * @memberof VError.prototype
306
+ * @return {Object} info object
307
+ */
308
+VError.prototype.info = function ve_info() {
309
+    return VError.info(this);
310
+};
311
+
312
+/**
313
+ * A string representing the VError.
314
+ * @public
315
+ * @memberof VError.prototype
316
+ * @return {String} string representation
317
+ */
318
+VError.prototype.toString = function ve_toString() {
319
+    let str =
320
+        (this.hasOwnProperty('name') && this.name) ||
321
+        this.constructor.name ||
322
+        this.constructor.prototype.name;
323
+    if (this.message) {
324
+        str += ': ' + this.message;
325
+    }
326
+
327
+    return str;
328
+};
329
+
330
+/**
331
+ * This method is provided for compatibility.  New callers should use
332
+ * VError.cause() instead.  That method also uses the saner `null` return value
333
+ * when there is no cause.
334
+ * @public
335
+ * @memberof VError.prototype
336
+ * @return {undefined|Error} Error cause if any
337
+ */
338
+VError.prototype.cause = function ve_cause() {
339
+    const cause = VError.cause(this);
340
+    return cause === null ? undefined : cause;
341
+};
342
+
343
+/*
344
+ * Static methods
345
+ *
346
+ * These class-level methods are provided so that callers can use them on
347
+ * instances of Errors that are not VErrors.  New interfaces should be provided
348
+ * only using static methods to eliminate the class of programming mistake where
349
+ * people fail to check whether the Error object has the corresponding methods.
350
+ */
351
+
352
+/**
353
+ * @private
354
+ * @static
355
+ * @memberof VError
356
+ * @param {Error} err - error to assert
357
+ * @param {String} [msg] - optional message
358
+ * @returns {undefined} no return value
359
+ * @throws AssertationError - when input is not an error
360
+ */
361
+VError._assertError = function _assertError(err, msg) {
362
+    assert.optionalString(msg, 'msg');
363
+    const _msg = (msg || 'err must be an Error') + ` but got ${String(err)}`;
364
+    assert.ok(_.isError(err), _msg);
365
+};
366
+
367
+/**
368
+ * Checks if an error is a VError or VError sub-class.
369
+ *
370
+ * @public
371
+ * @static
372
+ * @memberof VError
373
+ * @param {Error} err - error
374
+ * @return {Boolean} is a VError or VError sub-class
375
+ */
376
+VError.isVError = function assignInfo(err) {
377
+    // We are checking on internals here instead of using
378
+    // `err instanceof VError` to being compatible with the original VError lib.
379
+    return err && err.hasOwnProperty('jse_info');
380
+};
381
+
382
+/**
383
+ * Appends any keys/fields to the `jse_info`. This can stomp over any existing
384
+ * fields.
385
+ *
386
+ * Note: This method is static because in this way we don't need to check on
387
+ * VError versions to be sure `assignInfo` method is supported.
388
+ *
389
+ * @public
390
+ * @static
391
+ * @memberof VError
392
+ * @param {Error} err - error
393
+ * @param {Object} obj - source obj to assign fields from
394
+ * @return {Object} new info object
395
+ */
396
+VError.assignInfo = function assignInfo(err, obj) {
397
+    VError._assertError(err);
398
+    assert.optionalObject(obj, 'obj');
399
+
400
+    if (!VError.isVError(err)) {
401
+        throw new TypeError('err must be an instance of VError');
402
+    }
403
+
404
+    return Object.assign(err.jse_info, obj);
405
+};
406
+
407
+/**
408
+ * Returns the next Error in the cause chain for `err`, or `null` if there is no
409
+ * next error.  See the `cause` argument to the constructor.
410
+ * Errors can have arbitrarily long cause chains.  You can walk the `cause`
411
+ * chain by invoking `VError.cause(err)` on each subsequent return value.
412
+ * If `err` is not a `VError`, the cause is `null`.
413
+ *
414
+ * @public
415
+ * @static
416
+ * @memberof VError
417
+ * @param {VError} err - error
418
+ * @return {undefined|Error} Error cause if any
419
+ */
420
+VError.cause = function cause(err) {
421
+    VError._assertError(err);
422
+    return _.isError(err.jse_cause) ? err.jse_cause : null;
423
+};
424
+
425
+/**
426
+ * Returns an object with all of the extra error information that's been
427
+ * associated with this Error and all of its causes. These are the properties
428
+ * passed in using the `info` option to the constructor. Properties not
429
+ * specified in the constructor for this Error are implicitly inherited from
430
+ * this error's cause.
431
+ *
432
+ * These properties are intended to provide programmatically-accessible metadata
433
+ * about the error.  For an error that indicates a failure to resolve a DNS
434
+ * name, informational properties might include the DNS name to be resolved, or
435
+ * even the list of resolvers used to resolve it.  The values of these
436
+ * properties should generally be plain objects (i.e., consisting only of null,
437
+ * undefined, numbers, booleans, strings, and objects and arrays containing only
438
+ * other plain objects).
439
+ *
440
+ * @public
441
+ * @static
442
+ * @memberof VError
443
+ * @param {VError} err - error
444
+ * @return {Object} info object
445
+ */
446
+VError.info = function info(err) {
447
+    let rv, k;
448
+
449
+    VError._assertError(err);
450
+    const cause = VError.cause(err);
451
+    if (cause !== null) {
452
+        rv = VError.info(cause);
453
+    } else {
454
+        rv = {};
455
+    }
456
+
457
+    if (typeof err.jse_info === 'object' && err.jse_info !== null) {
458
+        // eslint-disable-next-line guard-for-in
459
+        for (k in err.jse_info) {
460
+            rv[k] = err.jse_info[k];
461
+        }
462
+    }
463
+
464
+    return rv;
465
+};
466
+
467
+/**
468
+ * The `findCauseByName()` function traverses the cause chain for `err`, looking
469
+ * for an error whose `name` property matches the passed in `name` value. If no
470
+ * match is found, `null` is returned.
471
+ *
472
+ * If all you want is to know _whether_ there's a cause (and you don't care what
473
+ * it is), you can use `VError.hasCauseWithName(err, name)`.
474
+ *
475
+ * If a vanilla error or a non-VError error is passed in, then there is no cause
476
+ * chain to traverse. In this scenario, the function will check the `name`
477
+ * property of only `err`.
478
+ *
479
+ * @public
480
+ * @static
481
+ * @memberof VError
482
+ * @param {VError} err - error
483
+ * @param {String} name - name of cause Error
484
+ * @return {null|Error} cause if any
485
+ */
486
+VError.findCauseByName = function findCauseByName(err, name) {
487
+    let cause;
488
+
489
+    VError._assertError(err);
490
+    assert.string(name, 'name');
491
+    assert.ok(name.length > 0, 'name cannot be empty');
492
+
493
+    for (cause = err; cause !== null; cause = VError.cause(cause)) {
494
+        assert.ok(_.isError(cause));
495
+        if (cause.name === name) {
496
+            return cause;
497
+        }
498
+    }
499
+
500
+    return null;
501
+};
502
+
503
+/**
504
+ * Returns true if and only if `VError.findCauseByName(err, name)` would return
505
+ * a non-null value.  This essentially determines whether `err` has any cause in
506
+ * its cause chain that has name `name`.
507
+ *
508
+ * @public
509
+ * @static
510
+ * @memberof VError
511
+ * @param {VError} err - error
512
+ * @param {String} name - name of cause Error
513
+ * @return {Boolean} has cause
514
+ */
515
+VError.hasCauseWithName = function hasCauseWithName(err, name) {
516
+    return VError.findCauseByName(err, name) !== null;
517
+};
518
+
519
+/**
520
+ * Returns a string containing the full stack trace, with all nested errors
521
+ * recursively reported as `'caused by:' + err.stack`.
522
+ *
523
+ * @public
524
+ * @static
525
+ * @memberof VError
526
+ * @param {VError} err - error
527
+ * @return {String} full stack trace
528
+ */
529
+VError.fullStack = function fullStack(err) {
530
+    VError._assertError(err);
531
+
532
+    const cause = VError.cause(err);
533
+
534
+    if (cause) {
535
+        return err.stack + '\ncaused by: ' + VError.fullStack(cause);
536
+    }
537
+
538
+    return err.stack;
539
+};
540
+
541
+/**
542
+ * Given an array of Error objects (possibly empty), return a single error
543
+ * representing the whole collection of errors. If the list has:
544
+ *
545
+ * * 0 elements, returns `null`
546
+ * * 1 element, returns the sole error
547
+ * * more than 1 element, returns a MultiError referencing the whole list
548
+ *
549
+ * This is useful for cases where an operation may produce any number of errors,
550
+ * and you ultimately want to implement the usual `callback(err)` pattern.
551
+ * You can accumulate the errors in an array and then invoke
552
+ * `callback(VError.errorFromList(errors))` when the operation is complete.
553
+ *
554
+ * @public
555
+ * @static
556
+ * @memberof VError
557
+ * @param {Array<Error>} errors - errors
558
+ * @return {null|Error|MultiError} single or multi error if any
559
+ */
560
+VError.errorFromList = function errorFromList(errors) {
561
+    assert.arrayOfObject(errors, 'errors');
562
+
563
+    if (errors.length === 0) {
564
+        return null;
565
+    }
566
+
567
+    errors.forEach(function(e) {
568
+        assert.ok(_.isError(e), 'all errors must be an Error');
569
+    });
570
+
571
+    if (errors.length === 1) {
572
+        return errors[0];
573
+    }
574
+
575
+    return new MultiError(errors);
576
+};
577
+
578
+/**
579
+ * Convenience function for iterating an error that may itself be a MultiError.
580
+ *
581
+ * In all cases, `err` must be an Error.  If `err` is a MultiError, then `func`
582
+ * is invoked as `func(errorN)` for each of the underlying errors of the
583
+ * MultiError.
584
+ * If `err` is any other kind of error, `func` is invoked once as `func(err)`.
585
+ * In all cases, `func` is invoked synchronously.
586
+ *
587
+ * This is useful for cases where an operation may produce any number of
588
+ * warnings that may be encapsulated with a MultiError -- but may not be.
589
+ *
590
+ * This function does not iterate an error's cause chain.
591
+ *
592
+ * @public
593
+ * @static
594
+ * @memberof VError
595
+ * @param {Error} err - error
596
+ * @param {Function} func - iterator
597
+ * @return {undefined} no return value
598
+ */
599
+VError.errorForEach = function errorForEach(err, func) {
600
+    VError._assertError(err);
601
+    assert.func(func, 'func');
602
+
603
+    if (err.name === 'MultiError') {
604
+        err.errors().forEach(function iterError(e) {
605
+            func(e);
606
+        });
607
+    } else {
608
+        func(err);
609
+    }
610
+};
611
+
612
+/**
613
+ * PError is like VError, but the message is not run through printf-style
614
+ * templating.
615
+ *
616
+ * @public
617
+ * @class PError
618
+ * @extends VError
619
+ * @param {...String|VErrorOptions|Error} [arg] - sprintf args, options or cause
620
+ * @param {...String} [args] - sprintf args
621
+ */
622
+function PError(...args) {
623
+    let obj;
624
+
625
+    if (!(this instanceof PError)) {
626
+        obj = Object.create(PError.prototype);
627
+        PError.apply(obj, args);
628
+        return obj;
629
+    }
630
+
631
+    const parsed = parseConstructorArguments({
632
+        argv: args,
633
+        strict: false,
634
+        skipPrintf: true
635
+    });
636
+
637
+    VError.call(this, parsed.options, parsed.shortmessage);
638
+
639
+    return this;
640
+}
641
+
642
+util.inherits(PError, VError);
643
+PError.prototype.name = 'PError';
644
+
645
+/**
646
+ * SError is like VError, but stricter about types. You cannot pass "null" or
647
+ * "undefined" as string arguments to the formatter.
648
+ *
649
+ * @public
650
+ * @class SError
651
+ * @extends VError
652
+ * @param {...String|VErrorOptions|Error} [arg] - sprintf args, options or cause
653
+ * @param {...String} [args] - sprintf args
654
+ */
655
+function SError(...args) {
656
+    let obj;
657
+
658
+    if (!(this instanceof SError)) {
659
+        obj = Object.create(SError.prototype);
660
+        SError.apply(obj, arguments);
661
+        return obj;
662
+    }
663
+
664
+    const parsed = parseConstructorArguments({
665
+        argv: args,
666
+        strict: true
667
+    });
668
+
669
+    const options = parsed.options;
670
+    options.skipPrintf = false;
671
+    VError.call(this, options, '%s', parsed.shortmessage);
672
+
673
+    return this;
674
+}
675
+
676
+/*
677
+ * We don't bother setting SError.prototype.name because once constructed,
678
+ * SErrors are just like VErrors.
679
+ */
680
+util.inherits(SError, VError);
681
+
682
+/**
683
+ * Represents a collection of errors for the purpose of consumers that generally
684
+ * only deal with one error.  Callers can extract the individual errors
685
+ * contained in this object, but may also just treat it as a normal single
686
+ * error, in which case a summary message will be printed.
687
+ *
688
+ * @public
689
+ * @class MultiError
690
+ * @extends VError
691
+ * @param {Array<Error>} errors - errors
692
+ * @example
693
+ * // `error_list` is an array of at least one `Error` object.
694
+ * new MultiError(error_list)
695
+ *
696
+ * // The cause of the MultiError is the first error provided.  None of the
697
+ * // other `VError` options are supported.  The `message` for a MultiError
698
+ * // consists the `message` from the first error, prepended with a message
699
+ * // indicating that there were other errors.
700
+ *
701
+ * //For example:
702
+ * err = new MultiError([
703
+ *     new Error('failed to resolve DNS name "abc.example.com"'),
704
+ *     new Error('failed to resolve DNS name "def.example.com"'),
705
+ * ]);
706
+ * console.error(err.message);
707
+ *
708
+ * // outputs:
709
+ * //   first of 2 errors: failed to resolve DNS name "abc.example.com"
710
+ */
711
+function MultiError(errors) {
712
+    assert.array(errors, 'list of errors');
713
+    assert.ok(errors.length > 0, 'must be at least one error');
714
+    this.ase_errors = errors;
715
+
716
+    VError.call(
717
+        this,
718
+        {
719
+            cause: errors[0]
720
+        },
721
+        'first of %d error%s',
722
+        errors.length,
723
+        errors.length === 1 ? '' : 's'
724
+    );
725
+}
726
+
727
+util.inherits(MultiError, VError);
728
+MultiError.prototype.name = 'MultiError';
729
+
730
+/**
731
+ * Returns an array of the errors used to construct this MultiError.
732
+ *
733
+ * @public
734
+ * @memberof MultiError.prototype
735
+ * @returns {Array<Error>} errors
736
+ */
737
+MultiError.prototype.errors = function me_errors() {
738
+    return this.ase_errors.slice(0);
739
+};
740
+
741
+/**
742
+ * WError for wrapping errors while hiding the lower-level messages from the
743
+ * top-level error.  This is useful for API endpoints where you don't want to
744
+ * expose internal error messages, but you still want to preserve the error
745
+ * chain for logging and debugging
746
+ *
747
+ * @public
748
+ * @class WError
749
+ * @extends VError
750
+ * @param {...String|VErrorOptions|Error} [arg] - sprintf args, options or cause
751
+ * @param {...String} [args] - sprintf args
752
+ */
753
+function WError(...args) {
754
+    let obj;
755
+
756
+    if (!(this instanceof WError)) {
757
+        obj = Object.create(WError.prototype);
758
+        WError.apply(obj, args);
759
+        return obj;
760
+    }
761
+
762
+    const parsed = parseConstructorArguments({
763
+        argv: args,
764
+        strict: false
765
+    });
766
+
767
+    const options = parsed.options;
768
+    options.skipCauseMessage = true;
769
+    options.skipPrintf = false;
770
+    VError.call(this, options, '%s', parsed.shortmessage);
771
+
772
+    return this;
773
+}
774
+
775
+util.inherits(WError, VError);
776
+WError.prototype.name = 'WError';
777
+
778
+/**
779
+ * A string representing the WError.
780
+ * @public
781
+ * @memberof WError.prototype
782
+ * @return {String} string representation
783
+ */
784
+WError.prototype.toString = function we_toString() {
785
+    let str =
786
+        (this.hasOwnProperty('name') && this.name) ||
787
+        this.constructor.name ||
788
+        this.constructor.prototype.name;
789
+    if (this.message) {
790
+        str += ': ' + this.message;
791
+    }
792
+    if (this.jse_cause && this.jse_cause.message) {
793
+        str += '; caused by ' + this.jse_cause.toString();
794
+    }
795
+
796
+    return str;
797
+};
798
+
799
+/**
800
+ * For purely historical reasons, WError's cause() function allows you to set
801
+ * the cause.
802
+ * @public
803
+ * @memberof WError.prototype
804
+ * @param {Error} c - cause
805
+ * @return {undefined|Error} Error cause
806
+ */
807
+WError.prototype.cause = function we_cause(c) {
808
+    if (_.isError(c)) {
809
+        this.jse_cause = c;
810
+    }
811
+
812
+    return this.jse_cause;
813
+};

+ 77
- 0
node_modules/@netflix/nerror/package.json View File

@@ -0,0 +1,77 @@
1
+{
2
+  "_from": "@netflix/nerror@^1.1.3",
3
+  "_id": "@netflix/nerror@1.1.3",
4
+  "_inBundle": false,
5
+  "_integrity": "sha512-b+MGNyP9/LXkapreJzNUzcvuzZslj/RGgdVVJ16P2wSlYatfLycPObImqVJSmNAdyeShvNeM/pl3sVZsObFueg==",
6
+  "_location": "/@netflix/nerror",
7
+  "_phantomChildren": {},
8
+  "_requested": {
9
+    "type": "range",
10
+    "registry": true,
11
+    "raw": "@netflix/nerror@^1.1.3",
12
+    "name": "@netflix/nerror",
13
+    "escapedName": "@netflix%2fnerror",
14
+    "scope": "@netflix",
15
+    "rawSpec": "^1.1.3",
16
+    "saveSpec": null,
17
+    "fetchSpec": "^1.1.3"
18
+  },
19
+  "_requiredBy": [
20
+    "/cordova-ios/cordova-common"
21
+  ],
22
+  "_resolved": "https://registry.npmjs.org/@netflix/nerror/-/nerror-1.1.3.tgz",
23
+  "_shasum": "9d88eccca442f1d544f2761d15ea557dc0a44ed2",
24
+  "_spec": "@netflix/nerror@^1.1.3",
25
+  "_where": "/Users/alexmanuel/MyApp/node_modules/cordova-ios/node_modules/cordova-common",
26
+  "bugs": {
27
+    "url": "https://github.com/Netflix/nerror/issues"
28
+  },
29
+  "bundleDependencies": false,
30
+  "dependencies": {
31
+    "assert-plus": "^1.0.0",
32
+    "extsprintf": "^1.4.0",
33
+    "lodash": "^4.17.15"
34
+  },
35
+  "deprecated": false,
36
+  "description": "Rich errors",
37
+  "devDependencies": {
38
+    "chai": "^4.1.2",
39
+    "conventional-changelog-angular": "^5.0.0",
40
+    "conventional-recommended-bump": "^4.0.0",
41
+    "documentation": "^8.0.0",
42
+    "eslint": "^4.19.1",
43
+    "eslint-config-prettier": "^2.9.0",
44
+    "eslint-plugin-prettier": "^2.6.0",
45
+    "mocha": "^5.2.0",
46
+    "nyc": "^12.0.2",
47
+    "prettier": "^1.13.5",
48
+    "tsd": "^0.7.3",
49
+    "unleash": "^2.0.1"
50
+  },
51
+  "files": [
52
+    "lib",
53
+    "lib/index.d.ts"
54
+  ],
55
+  "homepage": "https://github.com/Netflix/nerror",
56
+  "keywords": [
57
+    "nerror",
58
+    "error",
59
+    "multierror",
60
+    "verror"
61
+  ],
62
+  "license": "MIT",
63
+  "main": "lib/index.js",
64
+  "name": "@netflix/nerror",
65
+  "repository": {
66
+    "type": "git",
67
+    "url": "git+https://github.com/Netflix/nerror.git"
68
+  },
69
+  "scripts": {
70
+    "test": "make prepush & tsd"
71
+  },
72
+  "tsd": {
73
+    "directory": "test"
74
+  },
75
+  "types": "lib/index.d.ts",
76
+  "version": "1.1.3"
77
+}

+ 21
- 0
node_modules/@nodelib/fs.scandir/LICENSE View File

@@ -0,0 +1,21 @@
1
+The MIT License (MIT)
2
+
3
+Copyright (c) Denis Malinochkin
4
+
5
+Permission is hereby granted, free of charge, to any person obtaining a copy
6
+of this software and associated documentation files (the "Software"), to deal
7
+in the Software without restriction, including without limitation the rights
8
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+copies of the Software, and to permit persons to whom the Software is
10
+furnished to do so, subject to the following conditions:
11
+
12
+The above copyright notice and this permission notice shall be included in all
13
+copies or substantial portions of the Software.
14
+
15
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+SOFTWARE.

+ 171
- 0
node_modules/@nodelib/fs.scandir/README.md View File

@@ -0,0 +1,171 @@
1
+# @nodelib/fs.scandir
2
+
3
+> List files and directories inside the specified directory.
4
+
5
+## :bulb: Highlights
6
+
7
+The package is aimed at obtaining information about entries in the directory.
8
+
9
+* :moneybag: Returns useful information: `name`, `path`, `dirent` and `stats` (optional).
10
+* :gear: On Node.js 10.10+ uses the mechanism without additional calls to determine the entry type. See [`old` and `modern` mode](#old-and-modern-mode).
11
+* :link: Can safely work with broken symbolic links.
12
+
13
+## Install
14
+
15
+```console
16
+npm install @nodelib/fs.scandir
17
+```
18
+
19
+## Usage
20
+
21
+```ts
22
+import * as fsScandir from '@nodelib/fs.scandir';
23
+
24
+fsScandir.scandir('path', (error, stats) => { /* … */ });
25
+```
26
+
27
+## API
28
+
29
+### .scandir(path, [optionsOrSettings], callback)
30
+
31
+Returns an array of plain objects ([`Entry`](#entry)) with information about entry for provided path with standard callback-style.
32
+
33
+```ts
34
+fsScandir.scandir('path', (error, entries) => { /* … */ });
35
+fsScandir.scandir('path', {}, (error, entries) => { /* … */ });
36
+fsScandir.scandir('path', new fsScandir.Settings(), (error, entries) => { /* … */ });
37
+```
38
+
39
+### .scandirSync(path, [optionsOrSettings])
40
+
41
+Returns an array of plain objects ([`Entry`](#entry)) with information about entry for provided path.
42
+
43
+```ts
44
+const entries = fsScandir.scandirSync('path');
45
+const entries = fsScandir.scandirSync('path', {});
46
+const entries = fsScandir.scandirSync(('path', new fsScandir.Settings());
47
+```
48
+
49
+#### path
50
+
51
+* Required: `true`
52
+* Type: `string | Buffer | URL`
53
+
54
+A path to a file. If a URL is provided, it must use the `file:` protocol.
55
+
56
+#### optionsOrSettings
57
+
58
+* Required: `false`
59
+* Type: `Options | Settings`
60
+* Default: An instance of `Settings` class
61
+
62
+An [`Options`](#options) object or an instance of [`Settings`](#settingsoptions) class.
63
+
64
+> :book: When you pass a plain object, an instance of the `Settings` class will be created automatically. If you plan to call the method frequently, use a pre-created instance of the `Settings` class.
65
+
66
+### Settings([options])
67
+
68
+A class of full settings of the package.
69
+
70
+```ts
71
+const settings = new fsScandir.Settings({ followSymbolicLinks: false });
72
+
73
+const entries = fsScandir.scandirSync('path', settings);
74
+```
75
+
76
+## Entry
77
+
78
+* `name` — The name of the entry (`unknown.txt`).
79
+* `path` — The path of the entry relative to call directory (`root/unknown.txt`).
80
+* `dirent` — An instance of [`fs.Dirent`](./src/types/index.ts) class. On Node.js below 10.10 will be emulated by [`DirentFromStats`](./src/utils/fs.ts) class.
81
+* `stats` (optional) — An instance of `fs.Stats` class.
82
+
83
+For example, the `scandir` call for `tools` directory with one directory inside:
84
+
85
+```ts
86
+{
87
+	dirent: Dirent { name: 'typedoc', /* … */ },
88
+	name: 'typedoc',
89
+	path: 'tools/typedoc'
90
+}
91
+```
92
+
93
+## Options
94
+
95
+### stats
96
+
97
+* Type: `boolean`
98
+* Default: `false`
99
+
100
+Adds an instance of `fs.Stats` class to the [`Entry`](#entry).
101
+
102
+> :book: Always use `fs.readdir` without the `withFileTypes` option. ??TODO??
103
+
104
+### followSymbolicLinks
105
+
106
+* Type: `boolean`
107
+* Default: `false`
108
+
109
+Follow symbolic links or not. Call `fs.stat` on symbolic link if `true`.
110
+
111
+### `throwErrorOnBrokenSymbolicLink`
112
+
113
+* Type: `boolean`
114
+* Default: `true`
115
+
116
+Throw an error when symbolic link is broken if `true` or safely use `lstat` call if `false`.
117
+
118
+### `pathSegmentSeparator`
119
+
120
+* Type: `string`
121
+* Default: `path.sep`
122
+
123
+By default, this package uses the correct path separator for your OS (`\` on Windows, `/` on Unix-like systems). But you can set this option to any separator character(s) that you want to use instead.
124
+
125
+### `fs`
126
+
127
+* Type: [`FileSystemAdapter`](./src/adapters/fs.ts)
128
+* Default: A default FS methods
129
+
130
+By default, the built-in Node.js module (`fs`) is used to work with the file system. You can replace any method with your own.
131
+
132
+```ts
133
+interface FileSystemAdapter {
134
+	lstat?: typeof fs.lstat;
135
+	stat?: typeof fs.stat;
136
+	lstatSync?: typeof fs.lstatSync;
137
+	statSync?: typeof fs.statSync;
138
+	readdir?: typeof fs.readdir;
139
+	readdirSync?: typeof fs.readdirSync;
140
+}
141
+
142
+const settings = new fsScandir.Settings({
143
+	fs: { lstat: fakeLstat }
144
+});
145
+```
146
+
147
+## `old` and `modern` mode
148
+
149
+This package has two modes that are used depending on the environment and parameters of use.
150
+
151
+### old
152
+
153
+* Node.js below `10.10` or when the `stats` option is enabled
154
+
155
+When working in the old mode, the directory is read first (`fs.readdir`), then the type of entries is determined (`fs.lstat` and/or `fs.stat` for symbolic links).
156
+
157
+### modern
158
+
159
+* Node.js 10.10+ and the `stats` option is disabled
160
+
161
+In the modern mode, reading the directory (`fs.readdir` with the `withFileTypes` option) is combined with obtaining information about its entries. An additional call for symbolic links (`fs.stat`) is still present.
162
+
163
+This mode makes fewer calls to the file system. It's faster.
164
+
165
+## Changelog
166
+
167
+See the [Releases section of our GitHub project](https://github.com/nodelib/nodelib/releases) for changelog for each release version.
168
+
169
+## License
170
+
171
+This software is released under the terms of the MIT license.

+ 20
- 0
node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts View File

@@ -0,0 +1,20 @@
1
+import type * as fsStat from '@nodelib/fs.stat';
2
+import type { Dirent, ErrnoException } from '../types';
3
+export interface ReaddirAsynchronousMethod {
4
+    (filepath: string, options: {
5
+        withFileTypes: true;
6
+    }, callback: (error: ErrnoException | null, files: Dirent[]) => void): void;
7
+    (filepath: string, callback: (error: ErrnoException | null, files: string[]) => void): void;
8
+}
9
+export interface ReaddirSynchronousMethod {
10
+    (filepath: string, options: {
11
+        withFileTypes: true;
12
+    }): Dirent[];
13
+    (filepath: string): string[];
14
+}
15
+export declare type FileSystemAdapter = fsStat.FileSystemAdapter & {
16
+    readdir: ReaddirAsynchronousMethod;
17
+    readdirSync: ReaddirSynchronousMethod;
18
+};
19
+export declare const FILE_SYSTEM_ADAPTER: FileSystemAdapter;
20
+export declare function createFileSystemAdapter(fsMethods?: Partial<FileSystemAdapter>): FileSystemAdapter;

+ 19
- 0
node_modules/@nodelib/fs.scandir/out/adapters/fs.js View File

@@ -0,0 +1,19 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
4
+const fs = require("fs");
5
+exports.FILE_SYSTEM_ADAPTER = {
6
+    lstat: fs.lstat,
7
+    stat: fs.stat,
8
+    lstatSync: fs.lstatSync,
9
+    statSync: fs.statSync,
10
+    readdir: fs.readdir,
11
+    readdirSync: fs.readdirSync
12
+};
13
+function createFileSystemAdapter(fsMethods) {
14
+    if (fsMethods === undefined) {
15
+        return exports.FILE_SYSTEM_ADAPTER;
16
+    }
17
+    return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
18
+}
19
+exports.createFileSystemAdapter = createFileSystemAdapter;

+ 4
- 0
node_modules/@nodelib/fs.scandir/out/constants.d.ts View File

@@ -0,0 +1,4 @@
1
+/**
2
+ * IS `true` for Node.js 10.10 and greater.
3
+ */
4
+export declare const IS_SUPPORT_READDIR_WITH_FILE_TYPES: boolean;

+ 17
- 0
node_modules/@nodelib/fs.scandir/out/constants.js View File

@@ -0,0 +1,17 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0;
4
+const NODE_PROCESS_VERSION_PARTS = process.versions.node.split('.');
5
+if (NODE_PROCESS_VERSION_PARTS[0] === undefined || NODE_PROCESS_VERSION_PARTS[1] === undefined) {
6
+    throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);
7
+}
8
+const MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10);
9
+const MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10);
10
+const SUPPORTED_MAJOR_VERSION = 10;
11
+const SUPPORTED_MINOR_VERSION = 10;
12
+const IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION;
13
+const IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION;
14
+/**
15
+ * IS `true` for Node.js 10.10 and greater.
16
+ */
17
+exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR;

+ 12
- 0
node_modules/@nodelib/fs.scandir/out/index.d.ts View File

@@ -0,0 +1,12 @@
1
+import type { FileSystemAdapter, ReaddirAsynchronousMethod, ReaddirSynchronousMethod } from './adapters/fs';
2
+import * as async from './providers/async';
3
+import Settings, { Options } from './settings';
4
+import type { Dirent, Entry } from './types';
5
+declare type AsyncCallback = async.AsyncCallback;
6
+declare function scandir(path: string, callback: AsyncCallback): void;
7
+declare function scandir(path: string, optionsOrSettings: Options | Settings, callback: AsyncCallback): void;
8
+declare namespace scandir {
9
+    function __promisify__(path: string, optionsOrSettings?: Options | Settings): Promise<Entry[]>;
10
+}
11
+declare function scandirSync(path: string, optionsOrSettings?: Options | Settings): Entry[];
12
+export { scandir, scandirSync, Settings, AsyncCallback, Dirent, Entry, FileSystemAdapter, ReaddirAsynchronousMethod, ReaddirSynchronousMethod, Options };

+ 26
- 0
node_modules/@nodelib/fs.scandir/out/index.js View File

@@ -0,0 +1,26 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+exports.Settings = exports.scandirSync = exports.scandir = void 0;
4
+const async = require("./providers/async");
5
+const sync = require("./providers/sync");
6
+const settings_1 = require("./settings");
7
+exports.Settings = settings_1.default;
8
+function scandir(path, optionsOrSettingsOrCallback, callback) {
9
+    if (typeof optionsOrSettingsOrCallback === 'function') {
10
+        async.read(path, getSettings(), optionsOrSettingsOrCallback);
11
+        return;
12
+    }
13
+    async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
14
+}
15
+exports.scandir = scandir;
16
+function scandirSync(path, optionsOrSettings) {
17
+    const settings = getSettings(optionsOrSettings);
18
+    return sync.read(path, settings);
19
+}
20
+exports.scandirSync = scandirSync;
21
+function getSettings(settingsOrOptions = {}) {
22
+    if (settingsOrOptions instanceof settings_1.default) {
23
+        return settingsOrOptions;
24
+    }
25
+    return new settings_1.default(settingsOrOptions);
26
+}

+ 7
- 0
node_modules/@nodelib/fs.scandir/out/providers/async.d.ts View File

@@ -0,0 +1,7 @@
1
+/// <reference types="node" />
2
+import type Settings from '../settings';
3
+import type { Entry } from '../types';
4
+export declare type AsyncCallback = (error: NodeJS.ErrnoException, entries: Entry[]) => void;
5
+export declare function read(directory: string, settings: Settings, callback: AsyncCallback): void;
6
+export declare function readdirWithFileTypes(directory: string, settings: Settings, callback: AsyncCallback): void;
7
+export declare function readdir(directory: string, settings: Settings, callback: AsyncCallback): void;

+ 104
- 0
node_modules/@nodelib/fs.scandir/out/providers/async.js View File

@@ -0,0 +1,104 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+exports.readdir = exports.readdirWithFileTypes = exports.read = void 0;
4
+const fsStat = require("@nodelib/fs.stat");
5
+const rpl = require("run-parallel");
6
+const constants_1 = require("../constants");
7
+const utils = require("../utils");
8
+const common = require("./common");
9
+function read(directory, settings, callback) {
10
+    if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
11
+        readdirWithFileTypes(directory, settings, callback);
12
+        return;
13
+    }
14
+    readdir(directory, settings, callback);
15
+}
16
+exports.read = read;
17
+function readdirWithFileTypes(directory, settings, callback) {
18
+    settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {
19
+        if (readdirError !== null) {
20
+            callFailureCallback(callback, readdirError);
21
+            return;
22
+        }
23
+        const entries = dirents.map((dirent) => ({
24
+            dirent,
25
+            name: dirent.name,
26
+            path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
27
+        }));
28
+        if (!settings.followSymbolicLinks) {
29
+            callSuccessCallback(callback, entries);
30
+            return;
31
+        }
32
+        const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));
33
+        rpl(tasks, (rplError, rplEntries) => {
34
+            if (rplError !== null) {
35
+                callFailureCallback(callback, rplError);
36
+                return;
37
+            }
38
+            callSuccessCallback(callback, rplEntries);
39
+        });
40
+    });
41
+}
42
+exports.readdirWithFileTypes = readdirWithFileTypes;
43
+function makeRplTaskEntry(entry, settings) {
44
+    return (done) => {
45
+        if (!entry.dirent.isSymbolicLink()) {
46
+            done(null, entry);
47
+            return;
48
+        }
49
+        settings.fs.stat(entry.path, (statError, stats) => {
50
+            if (statError !== null) {
51
+                if (settings.throwErrorOnBrokenSymbolicLink) {
52
+                    done(statError);
53
+                    return;
54
+                }
55
+                done(null, entry);
56
+                return;
57
+            }
58
+            entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
59
+            done(null, entry);
60
+        });
61
+    };
62
+}
63
+function readdir(directory, settings, callback) {
64
+    settings.fs.readdir(directory, (readdirError, names) => {
65
+        if (readdirError !== null) {
66
+            callFailureCallback(callback, readdirError);
67
+            return;
68
+        }
69
+        const tasks = names.map((name) => {
70
+            const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
71
+            return (done) => {
72
+                fsStat.stat(path, settings.fsStatSettings, (error, stats) => {
73
+                    if (error !== null) {
74
+                        done(error);
75
+                        return;
76
+                    }
77
+                    const entry = {
78
+                        name,
79
+                        path,
80
+                        dirent: utils.fs.createDirentFromStats(name, stats)
81
+                    };
82
+                    if (settings.stats) {
83
+                        entry.stats = stats;
84
+                    }
85
+                    done(null, entry);
86
+                });
87
+            };
88
+        });
89
+        rpl(tasks, (rplError, entries) => {
90
+            if (rplError !== null) {
91
+                callFailureCallback(callback, rplError);
92
+                return;
93
+            }
94
+            callSuccessCallback(callback, entries);
95
+        });
96
+    });
97
+}
98
+exports.readdir = readdir;
99
+function callFailureCallback(callback, error) {
100
+    callback(error);
101
+}
102
+function callSuccessCallback(callback, result) {
103
+    callback(null, result);
104
+}

+ 1
- 0
node_modules/@nodelib/fs.scandir/out/providers/common.d.ts View File

@@ -0,0 +1 @@
1
+export declare function joinPathSegments(a: string, b: string, separator: string): string;

+ 13
- 0
node_modules/@nodelib/fs.scandir/out/providers/common.js View File

@@ -0,0 +1,13 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+exports.joinPathSegments = void 0;
4
+function joinPathSegments(a, b, separator) {
5
+    /**
6
+     * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`).
7
+     */
8
+    if (a.endsWith(separator)) {
9
+        return a + b;
10
+    }
11
+    return a + separator + b;
12
+}
13
+exports.joinPathSegments = joinPathSegments;

+ 5
- 0
node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts View File

@@ -0,0 +1,5 @@
1
+import type Settings from '../settings';
2
+import type { Entry } from '../types';
3
+export declare function read(directory: string, settings: Settings): Entry[];
4
+export declare function readdirWithFileTypes(directory: string, settings: Settings): Entry[];
5
+export declare function readdir(directory: string, settings: Settings): Entry[];

+ 54
- 0
node_modules/@nodelib/fs.scandir/out/providers/sync.js View File

@@ -0,0 +1,54 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+exports.readdir = exports.readdirWithFileTypes = exports.read = void 0;
4
+const fsStat = require("@nodelib/fs.stat");
5
+const constants_1 = require("../constants");
6
+const utils = require("../utils");
7
+const common = require("./common");
8
+function read(directory, settings) {
9
+    if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
10
+        return readdirWithFileTypes(directory, settings);
11
+    }
12
+    return readdir(directory, settings);
13
+}
14
+exports.read = read;
15
+function readdirWithFileTypes(directory, settings) {
16
+    const dirents = settings.fs.readdirSync(directory, { withFileTypes: true });
17
+    return dirents.map((dirent) => {
18
+        const entry = {
19
+            dirent,
20
+            name: dirent.name,
21
+            path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
22
+        };
23
+        if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) {
24
+            try {
25
+                const stats = settings.fs.statSync(entry.path);
26
+                entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
27
+            }
28
+            catch (error) {
29
+                if (settings.throwErrorOnBrokenSymbolicLink) {
30
+                    throw error;
31
+                }
32
+            }
33
+        }
34
+        return entry;
35
+    });
36
+}
37
+exports.readdirWithFileTypes = readdirWithFileTypes;
38
+function readdir(directory, settings) {
39
+    const names = settings.fs.readdirSync(directory);
40
+    return names.map((name) => {
41
+        const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
42
+        const stats = fsStat.statSync(entryPath, settings.fsStatSettings);
43
+        const entry = {
44
+            name,
45
+            path: entryPath,
46
+            dirent: utils.fs.createDirentFromStats(name, stats)
47
+        };
48
+        if (settings.stats) {
49
+            entry.stats = stats;
50
+        }
51
+        return entry;
52
+    });
53
+}
54
+exports.readdir = readdir;

+ 20
- 0
node_modules/@nodelib/fs.scandir/out/settings.d.ts View File

@@ -0,0 +1,20 @@
1
+import * as fsStat from '@nodelib/fs.stat';
2
+import * as fs from './adapters/fs';
3
+export interface Options {
4
+    followSymbolicLinks?: boolean;
5
+    fs?: Partial<fs.FileSystemAdapter>;
6
+    pathSegmentSeparator?: string;
7
+    stats?: boolean;
8
+    throwErrorOnBrokenSymbolicLink?: boolean;
9
+}
10
+export default class Settings {
11
+    private readonly _options;
12
+    readonly followSymbolicLinks: boolean;
13
+    readonly fs: fs.FileSystemAdapter;
14
+    readonly pathSegmentSeparator: string;
15
+    readonly stats: boolean;
16
+    readonly throwErrorOnBrokenSymbolicLink: boolean;
17
+    readonly fsStatSettings: fsStat.Settings;
18
+    constructor(_options?: Options);
19
+    private _getValue;
20
+}

+ 24
- 0
node_modules/@nodelib/fs.scandir/out/settings.js View File

@@ -0,0 +1,24 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const path = require("path");
4
+const fsStat = require("@nodelib/fs.stat");
5
+const fs = require("./adapters/fs");
6
+class Settings {
7
+    constructor(_options = {}) {
8
+        this._options = _options;
9
+        this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
10
+        this.fs = fs.createFileSystemAdapter(this._options.fs);
11
+        this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
12
+        this.stats = this._getValue(this._options.stats, false);
13
+        this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
14
+        this.fsStatSettings = new fsStat.Settings({
15
+            followSymbolicLink: this.followSymbolicLinks,
16
+            fs: this.fs,
17
+            throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink
18
+        });
19
+    }
20
+    _getValue(option, value) {
21
+        return option !== null && option !== void 0 ? option : value;
22
+    }
23
+}
24
+exports.default = Settings;

+ 20
- 0
node_modules/@nodelib/fs.scandir/out/types/index.d.ts View File

@@ -0,0 +1,20 @@
1
+/// <reference types="node" />
2
+import type * as fs from 'fs';
3
+export interface Entry {
4
+    dirent: Dirent;
5
+    name: string;
6
+    path: string;
7
+    stats?: Stats;
8
+}
9
+export declare type Stats = fs.Stats;
10
+export declare type ErrnoException = NodeJS.ErrnoException;
11
+export interface Dirent {
12
+    isBlockDevice: () => boolean;
13
+    isCharacterDevice: () => boolean;
14
+    isDirectory: () => boolean;
15
+    isFIFO: () => boolean;
16
+    isFile: () => boolean;
17
+    isSocket: () => boolean;
18
+    isSymbolicLink: () => boolean;
19
+    name: string;
20
+}

+ 2
- 0
node_modules/@nodelib/fs.scandir/out/types/index.js View File

@@ -0,0 +1,2 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });

+ 2
- 0
node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts View File

@@ -0,0 +1,2 @@
1
+import type { Dirent, Stats } from '../types';
2
+export declare function createDirentFromStats(name: string, stats: Stats): Dirent;

+ 19
- 0
node_modules/@nodelib/fs.scandir/out/utils/fs.js View File

@@ -0,0 +1,19 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+exports.createDirentFromStats = void 0;
4
+class DirentFromStats {
5
+    constructor(name, stats) {
6
+        this.name = name;
7
+        this.isBlockDevice = stats.isBlockDevice.bind(stats);
8
+        this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
9
+        this.isDirectory = stats.isDirectory.bind(stats);
10
+        this.isFIFO = stats.isFIFO.bind(stats);
11
+        this.isFile = stats.isFile.bind(stats);
12
+        this.isSocket = stats.isSocket.bind(stats);
13
+        this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
14
+    }
15
+}
16
+function createDirentFromStats(name, stats) {
17
+    return new DirentFromStats(name, stats);
18
+}
19
+exports.createDirentFromStats = createDirentFromStats;

+ 2
- 0
node_modules/@nodelib/fs.scandir/out/utils/index.d.ts View File

@@ -0,0 +1,2 @@
1
+import * as fs from './fs';
2
+export { fs };

+ 5
- 0
node_modules/@nodelib/fs.scandir/out/utils/index.js View File

@@ -0,0 +1,5 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+exports.fs = void 0;
4
+const fs = require("./fs");
5
+exports.fs = fs;

+ 73
- 0
node_modules/@nodelib/fs.scandir/package.json View File

@@ -0,0 +1,73 @@
1
+{
2
+  "_from": "@nodelib/fs.scandir@2.1.5",
3
+  "_id": "@nodelib/fs.scandir@2.1.5",
4
+  "_inBundle": false,
5
+  "_integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
6
+  "_location": "/@nodelib/fs.scandir",
7
+  "_phantomChildren": {},
8
+  "_requested": {
9
+    "type": "version",
10
+    "registry": true,
11
+    "raw": "@nodelib/fs.scandir@2.1.5",
12
+    "name": "@nodelib/fs.scandir",
13
+    "escapedName": "@nodelib%2ffs.scandir",
14
+    "scope": "@nodelib",
15
+    "rawSpec": "2.1.5",
16
+    "saveSpec": null,
17
+    "fetchSpec": "2.1.5"
18
+  },
19
+  "_requiredBy": [
20
+    "/@nodelib/fs.walk"
21
+  ],
22
+  "_resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
23
+  "_shasum": "7619c2eb21b25483f6d167548b4cfd5a7488c3d5",
24
+  "_spec": "@nodelib/fs.scandir@2.1.5",
25
+  "_where": "/Users/alexmanuel/MyApp/node_modules/@nodelib/fs.walk",
26
+  "bundleDependencies": false,
27
+  "dependencies": {
28
+    "@nodelib/fs.stat": "2.0.5",
29
+    "run-parallel": "^1.1.9"
30
+  },
31
+  "deprecated": false,
32
+  "description": "List files and directories inside the specified directory",
33
+  "devDependencies": {
34
+    "@nodelib/fs.macchiato": "1.0.4",
35
+    "@types/run-parallel": "^1.1.0"
36
+  },
37
+  "engines": {
38
+    "node": ">= 8"
39
+  },
40
+  "files": [
41
+    "out/**",
42
+    "!out/**/*.map",
43
+    "!out/**/*.spec.*"
44
+  ],
45
+  "gitHead": "d6a7960d5281d3dd5f8e2efba49bb552d090f562",
46
+  "keywords": [
47
+    "NodeLib",
48
+    "fs",
49
+    "FileSystem",
50
+    "file system",
51
+    "scandir",
52
+    "readdir",
53
+    "dirent"
54
+  ],
55
+  "license": "MIT",
56
+  "main": "out/index.js",
57
+  "name": "@nodelib/fs.scandir",
58
+  "repository": {
59
+    "type": "git",
60
+    "url": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.scandir"
61
+  },
62
+  "scripts": {
63
+    "build": "npm run clean && npm run compile && npm run lint && npm test",
64
+    "clean": "rimraf {tsconfig.tsbuildinfo,out}",
65
+    "compile": "tsc -b .",
66
+    "compile:watch": "tsc -p . --watch --sourceMap",
67
+    "lint": "eslint \"src/**/*.ts\" --cache",
68
+    "test": "mocha \"out/**/*.spec.js\" -s 0",
69
+    "watch": "npm run clean && npm run compile:watch"
70
+  },
71
+  "typings": "out/index.d.ts",
72
+  "version": "2.1.5"
73
+}

+ 21
- 0
node_modules/@nodelib/fs.stat/LICENSE View File

@@ -0,0 +1,21 @@
1
+The MIT License (MIT)
2
+
3
+Copyright (c) Denis Malinochkin
4
+
5
+Permission is hereby granted, free of charge, to any person obtaining a copy
6
+of this software and associated documentation files (the "Software"), to deal
7
+in the Software without restriction, including without limitation the rights
8
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+copies of the Software, and to permit persons to whom the Software is
10
+furnished to do so, subject to the following conditions:
11
+
12
+The above copyright notice and this permission notice shall be included in all
13
+copies or substantial portions of the Software.
14
+
15
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+SOFTWARE.

+ 126
- 0
node_modules/@nodelib/fs.stat/README.md View File

@@ -0,0 +1,126 @@
1
+# @nodelib/fs.stat
2
+
3
+> Get the status of a file with some features.
4
+
5
+## :bulb: Highlights
6
+
7
+Wrapper around standard method `fs.lstat` and `fs.stat` with some features.
8
+
9
+* :beginner: Normally follows symbolic link.
10
+* :gear: Can safely work with broken symbolic link.
11
+
12
+## Install
13
+
14
+```console
15
+npm install @nodelib/fs.stat
16
+```
17
+
18
+## Usage
19
+
20
+```ts
21
+import * as fsStat from '@nodelib/fs.stat';
22
+
23
+fsStat.stat('path', (error, stats) => { /* … */ });
24
+```
25
+
26
+## API
27
+
28
+### .stat(path, [optionsOrSettings], callback)
29
+
30
+Returns an instance of `fs.Stats` class for provided path with standard callback-style.
31
+
32
+```ts
33
+fsStat.stat('path', (error, stats) => { /* … */ });
34
+fsStat.stat('path', {}, (error, stats) => { /* … */ });
35
+fsStat.stat('path', new fsStat.Settings(), (error, stats) => { /* … */ });
36
+```
37
+
38
+### .statSync(path, [optionsOrSettings])
39
+
40
+Returns an instance of `fs.Stats` class for provided path.
41
+
42
+```ts
43
+const stats = fsStat.stat('path');
44
+const stats = fsStat.stat('path', {});
45
+const stats = fsStat.stat('path', new fsStat.Settings());
46
+```
47
+
48
+#### path
49
+
50
+* Required: `true`
51
+* Type: `string | Buffer | URL`
52
+
53
+A path to a file. If a URL is provided, it must use the `file:` protocol.
54
+
55
+#### optionsOrSettings
56
+
57
+* Required: `false`
58
+* Type: `Options | Settings`
59
+* Default: An instance of `Settings` class
60
+
61
+An [`Options`](#options) object or an instance of [`Settings`](#settings) class.
62
+
63
+> :book: When you pass a plain object, an instance of the `Settings` class will be created automatically. If you plan to call the method frequently, use a pre-created instance of the `Settings` class.
64
+
65
+### Settings([options])
66
+
67
+A class of full settings of the package.
68
+
69
+```ts
70
+const settings = new fsStat.Settings({ followSymbolicLink: false });
71
+
72
+const stats = fsStat.stat('path', settings);
73
+```
74
+
75
+## Options
76
+
77
+### `followSymbolicLink`
78
+
79
+* Type: `boolean`
80
+* Default: `true`
81
+
82
+Follow symbolic link or not. Call `fs.stat` on symbolic link if `true`.
83
+
84
+### `markSymbolicLink`
85
+
86
+* Type: `boolean`
87
+* Default: `false`
88
+
89
+Mark symbolic link by setting the return value of `isSymbolicLink` function to always `true` (even after `fs.stat`).
90
+
91
+> :book: Can be used if you want to know what is hidden behind a symbolic link, but still continue to know that it is a symbolic link.
92
+
93
+### `throwErrorOnBrokenSymbolicLink`
94
+
95
+* Type: `boolean`
96
+* Default: `true`
97
+
98
+Throw an error when symbolic link is broken if `true` or safely return `lstat` call if `false`.
99
+
100
+### `fs`
101
+
102
+* Type: [`FileSystemAdapter`](./src/adapters/fs.ts)
103
+* Default: A default FS methods
104
+
105
+By default, the built-in Node.js module (`fs`) is used to work with the file system. You can replace any method with your own.
106
+
107
+```ts
108
+interface FileSystemAdapter {
109
+	lstat?: typeof fs.lstat;
110
+	stat?: typeof fs.stat;
111
+	lstatSync?: typeof fs.lstatSync;
112
+	statSync?: typeof fs.statSync;
113
+}
114
+
115
+const settings = new fsStat.Settings({
116
+	fs: { lstat: fakeLstat }
117
+});
118
+```
119
+
120
+## Changelog
121
+
122
+See the [Releases section of our GitHub project](https://github.com/nodelib/nodelib/releases) for changelog for each release version.
123
+
124
+## License
125
+
126
+This software is released under the terms of the MIT license.

+ 13
- 0
node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts View File

@@ -0,0 +1,13 @@
1
+/// <reference types="node" />
2
+import * as fs from 'fs';
3
+import type { ErrnoException } from '../types';
4
+export declare type StatAsynchronousMethod = (path: string, callback: (error: ErrnoException | null, stats: fs.Stats) => void) => void;
5
+export declare type StatSynchronousMethod = (path: string) => fs.Stats;
6
+export interface FileSystemAdapter {
7
+    lstat: StatAsynchronousMethod;
8
+    stat: StatAsynchronousMethod;
9
+    lstatSync: StatSynchronousMethod;
10
+    statSync: StatSynchronousMethod;
11
+}
12
+export declare const FILE_SYSTEM_ADAPTER: FileSystemAdapter;
13
+export declare function createFileSystemAdapter(fsMethods?: Partial<FileSystemAdapter>): FileSystemAdapter;

+ 17
- 0
node_modules/@nodelib/fs.stat/out/adapters/fs.js View File

@@ -0,0 +1,17 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
4
+const fs = require("fs");
5
+exports.FILE_SYSTEM_ADAPTER = {
6
+    lstat: fs.lstat,
7
+    stat: fs.stat,
8
+    lstatSync: fs.lstatSync,
9
+    statSync: fs.statSync
10
+};
11
+function createFileSystemAdapter(fsMethods) {
12
+    if (fsMethods === undefined) {
13
+        return exports.FILE_SYSTEM_ADAPTER;
14
+    }
15
+    return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
16
+}
17
+exports.createFileSystemAdapter = createFileSystemAdapter;

+ 12
- 0
node_modules/@nodelib/fs.stat/out/index.d.ts View File

@@ -0,0 +1,12 @@
1
+import type { FileSystemAdapter, StatAsynchronousMethod, StatSynchronousMethod } from './adapters/fs';
2
+import * as async from './providers/async';
3
+import Settings, { Options } from './settings';
4
+import type { Stats } from './types';
5
+declare type AsyncCallback = async.AsyncCallback;
6
+declare function stat(path: string, callback: AsyncCallback): void;
7
+declare function stat(path: string, optionsOrSettings: Options | Settings, callback: AsyncCallback): void;
8
+declare namespace stat {
9
+    function __promisify__(path: string, optionsOrSettings?: Options | Settings): Promise<Stats>;
10
+}
11
+declare function statSync(path: string, optionsOrSettings?: Options | Settings): Stats;
12
+export { Settings, stat, statSync, AsyncCallback, FileSystemAdapter, StatAsynchronousMethod, StatSynchronousMethod, Options, Stats };

+ 26
- 0
node_modules/@nodelib/fs.stat/out/index.js View File

@@ -0,0 +1,26 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+exports.statSync = exports.stat = exports.Settings = void 0;
4
+const async = require("./providers/async");
5
+const sync = require("./providers/sync");
6
+const settings_1 = require("./settings");
7
+exports.Settings = settings_1.default;
8
+function stat(path, optionsOrSettingsOrCallback, callback) {
9
+    if (typeof optionsOrSettingsOrCallback === 'function') {
10
+        async.read(path, getSettings(), optionsOrSettingsOrCallback);
11
+        return;
12
+    }
13
+    async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
14
+}
15
+exports.stat = stat;
16
+function statSync(path, optionsOrSettings) {
17
+    const settings = getSettings(optionsOrSettings);
18
+    return sync.read(path, settings);
19
+}
20
+exports.statSync = statSync;
21
+function getSettings(settingsOrOptions = {}) {
22
+    if (settingsOrOptions instanceof settings_1.default) {
23
+        return settingsOrOptions;
24
+    }
25
+    return new settings_1.default(settingsOrOptions);
26
+}

+ 4
- 0
node_modules/@nodelib/fs.stat/out/providers/async.d.ts View File

@@ -0,0 +1,4 @@
1
+import type Settings from '../settings';
2
+import type { ErrnoException, Stats } from '../types';
3
+export declare type AsyncCallback = (error: ErrnoException, stats: Stats) => void;
4
+export declare function read(path: string, settings: Settings, callback: AsyncCallback): void;

+ 36
- 0
node_modules/@nodelib/fs.stat/out/providers/async.js View File

@@ -0,0 +1,36 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+exports.read = void 0;
4
+function read(path, settings, callback) {
5
+    settings.fs.lstat(path, (lstatError, lstat) => {
6
+        if (lstatError !== null) {
7
+            callFailureCallback(callback, lstatError);
8
+            return;
9
+        }
10
+        if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
11
+            callSuccessCallback(callback, lstat);
12
+            return;
13
+        }
14
+        settings.fs.stat(path, (statError, stat) => {
15
+            if (statError !== null) {
16
+                if (settings.throwErrorOnBrokenSymbolicLink) {
17
+                    callFailureCallback(callback, statError);
18
+                    return;
19
+                }
20
+                callSuccessCallback(callback, lstat);
21
+                return;
22
+            }
23
+            if (settings.markSymbolicLink) {
24
+                stat.isSymbolicLink = () => true;
25
+            }
26
+            callSuccessCallback(callback, stat);
27
+        });
28
+    });
29
+}
30
+exports.read = read;
31
+function callFailureCallback(callback, error) {
32
+    callback(error);
33
+}
34
+function callSuccessCallback(callback, result) {
35
+    callback(null, result);
36
+}

+ 3
- 0
node_modules/@nodelib/fs.stat/out/providers/sync.d.ts View File

@@ -0,0 +1,3 @@
1
+import type Settings from '../settings';
2
+import type { Stats } from '../types';
3
+export declare function read(path: string, settings: Settings): Stats;

+ 23
- 0
node_modules/@nodelib/fs.stat/out/providers/sync.js View File

@@ -0,0 +1,23 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+exports.read = void 0;
4
+function read(path, settings) {
5
+    const lstat = settings.fs.lstatSync(path);
6
+    if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
7
+        return lstat;
8
+    }
9
+    try {
10
+        const stat = settings.fs.statSync(path);
11
+        if (settings.markSymbolicLink) {
12
+            stat.isSymbolicLink = () => true;
13
+        }
14
+        return stat;
15
+    }
16
+    catch (error) {
17
+        if (!settings.throwErrorOnBrokenSymbolicLink) {
18
+            return lstat;
19
+        }
20
+        throw error;
21
+    }
22
+}
23
+exports.read = read;

+ 16
- 0
node_modules/@nodelib/fs.stat/out/settings.d.ts View File

@@ -0,0 +1,16 @@
1
+import * as fs from './adapters/fs';
2
+export interface Options {
3
+    followSymbolicLink?: boolean;
4
+    fs?: Partial<fs.FileSystemAdapter>;
5
+    markSymbolicLink?: boolean;
6
+    throwErrorOnBrokenSymbolicLink?: boolean;
7
+}
8
+export default class Settings {
9
+    private readonly _options;
10
+    readonly followSymbolicLink: boolean;
11
+    readonly fs: fs.FileSystemAdapter;
12
+    readonly markSymbolicLink: boolean;
13
+    readonly throwErrorOnBrokenSymbolicLink: boolean;
14
+    constructor(_options?: Options);
15
+    private _getValue;
16
+}

+ 16
- 0
node_modules/@nodelib/fs.stat/out/settings.js View File

@@ -0,0 +1,16 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const fs = require("./adapters/fs");
4
+class Settings {
5
+    constructor(_options = {}) {
6
+        this._options = _options;
7
+        this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
8
+        this.fs = fs.createFileSystemAdapter(this._options.fs);
9
+        this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);
10
+        this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
11
+    }
12
+    _getValue(option, value) {
13
+        return option !== null && option !== void 0 ? option : value;
14
+    }
15
+}
16
+exports.default = Settings;

+ 4
- 0
node_modules/@nodelib/fs.stat/out/types/index.d.ts View File

@@ -0,0 +1,4 @@
1
+/// <reference types="node" />
2
+import type * as fs from 'fs';
3
+export declare type Stats = fs.Stats;
4
+export declare type ErrnoException = NodeJS.ErrnoException;

+ 2
- 0
node_modules/@nodelib/fs.stat/out/types/index.js View File

@@ -0,0 +1,2 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });

+ 67
- 0
node_modules/@nodelib/fs.stat/package.json View File

@@ -0,0 +1,67 @@
1
+{
2
+  "_from": "@nodelib/fs.stat@^2.0.2",
3
+  "_id": "@nodelib/fs.stat@2.0.5",
4
+  "_inBundle": false,
5
+  "_integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
6
+  "_location": "/@nodelib/fs.stat",
7
+  "_phantomChildren": {},
8
+  "_requested": {
9
+    "type": "range",
10
+    "registry": true,
11
+    "raw": "@nodelib/fs.stat@^2.0.2",
12
+    "name": "@nodelib/fs.stat",
13
+    "escapedName": "@nodelib%2ffs.stat",
14
+    "scope": "@nodelib",
15
+    "rawSpec": "^2.0.2",
16
+    "saveSpec": null,
17
+    "fetchSpec": "^2.0.2"
18
+  },
19
+  "_requiredBy": [
20
+    "/@nodelib/fs.scandir",
21
+    "/fast-glob"
22
+  ],
23
+  "_resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
24
+  "_shasum": "5bd262af94e9d25bd1e71b05deed44876a222e8b",
25
+  "_spec": "@nodelib/fs.stat@^2.0.2",
26
+  "_where": "/Users/alexmanuel/MyApp/node_modules/fast-glob",
27
+  "bundleDependencies": false,
28
+  "deprecated": false,
29
+  "description": "Get the status of a file with some features",
30
+  "devDependencies": {
31
+    "@nodelib/fs.macchiato": "1.0.4"
32
+  },
33
+  "engines": {
34
+    "node": ">= 8"
35
+  },
36
+  "files": [
37
+    "out/**",
38
+    "!out/**/*.map",
39
+    "!out/**/*.spec.*"
40
+  ],
41
+  "gitHead": "d6a7960d5281d3dd5f8e2efba49bb552d090f562",
42
+  "keywords": [
43
+    "NodeLib",
44
+    "fs",
45
+    "FileSystem",
46
+    "file system",
47
+    "stat"
48
+  ],
49
+  "license": "MIT",
50
+  "main": "out/index.js",
51
+  "name": "@nodelib/fs.stat",
52
+  "repository": {
53
+    "type": "git",
54
+    "url": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.stat"
55
+  },
56
+  "scripts": {
57
+    "build": "npm run clean && npm run compile && npm run lint && npm test",
58
+    "clean": "rimraf {tsconfig.tsbuildinfo,out}",
59
+    "compile": "tsc -b .",
60
+    "compile:watch": "tsc -p . --watch --sourceMap",
61
+    "lint": "eslint \"src/**/*.ts\" --cache",
62
+    "test": "mocha \"out/**/*.spec.js\" -s 0",
63
+    "watch": "npm run clean && npm run compile:watch"
64
+  },
65
+  "typings": "out/index.d.ts",
66
+  "version": "2.0.5"
67
+}

+ 21
- 0
node_modules/@nodelib/fs.walk/LICENSE View File

@@ -0,0 +1,21 @@
1
+The MIT License (MIT)
2
+
3
+Copyright (c) Denis Malinochkin
4
+
5
+Permission is hereby granted, free of charge, to any person obtaining a copy
6
+of this software and associated documentation files (the "Software"), to deal
7
+in the Software without restriction, including without limitation the rights
8
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+copies of the Software, and to permit persons to whom the Software is
10
+furnished to do so, subject to the following conditions:
11
+
12
+The above copyright notice and this permission notice shall be included in all
13
+copies or substantial portions of the Software.
14
+
15
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+SOFTWARE.

+ 215
- 0
node_modules/@nodelib/fs.walk/README.md View File

@@ -0,0 +1,215 @@
1
+# @nodelib/fs.walk
2
+
3
+> A library for efficiently walking a directory recursively.
4
+
5
+## :bulb: Highlights
6
+
7
+* :moneybag: Returns useful information: `name`, `path`, `dirent` and `stats` (optional).
8
+* :rocket: On Node.js 10.10+ uses the mechanism without additional calls to determine the entry type for performance reasons. See [`old` and `modern` mode](https://github.com/nodelib/nodelib/blob/master/packages/fs/fs.scandir/README.md#old-and-modern-mode).
9
+* :gear: Built-in directories/files and error filtering system.
10
+* :link: Can safely work with broken symbolic links.
11
+
12
+## Install
13
+
14
+```console
15
+npm install @nodelib/fs.walk
16
+```
17
+
18
+## Usage
19
+
20
+```ts
21
+import * as fsWalk from '@nodelib/fs.walk';
22
+
23
+fsWalk.walk('path', (error, entries) => { /* … */ });
24
+```
25
+
26
+## API
27
+
28
+### .walk(path, [optionsOrSettings], callback)
29
+
30
+Reads the directory recursively and asynchronously. Requires a callback function.
31
+
32
+> :book: If you want to use the Promise API, use `util.promisify`.
33
+
34
+```ts
35
+fsWalk.walk('path', (error, entries) => { /* … */ });
36
+fsWalk.walk('path', {}, (error, entries) => { /* … */ });
37
+fsWalk.walk('path', new fsWalk.Settings(), (error, entries) => { /* … */ });
38
+```
39
+
40
+### .walkStream(path, [optionsOrSettings])
41
+
42
+Reads the directory recursively and asynchronously. [Readable Stream](https://nodejs.org/dist/latest-v12.x/docs/api/stream.html#stream_readable_streams) is used as a provider.
43
+
44
+```ts
45
+const stream = fsWalk.walkStream('path');
46
+const stream = fsWalk.walkStream('path', {});
47
+const stream = fsWalk.walkStream('path', new fsWalk.Settings());
48
+```
49
+
50
+### .walkSync(path, [optionsOrSettings])
51
+
52
+Reads the directory recursively and synchronously. Returns an array of entries.
53
+
54
+```ts
55
+const entries = fsWalk.walkSync('path');
56
+const entries = fsWalk.walkSync('path', {});
57
+const entries = fsWalk.walkSync('path', new fsWalk.Settings());
58
+```
59
+
60
+#### path
61
+
62
+* Required: `true`
63
+* Type: `string | Buffer | URL`
64
+
65
+A path to a file. If a URL is provided, it must use the `file:` protocol.
66
+
67
+#### optionsOrSettings
68
+
69
+* Required: `false`
70
+* Type: `Options | Settings`
71
+* Default: An instance of `Settings` class
72
+
73
+An [`Options`](#options) object or an instance of [`Settings`](#settings) class.
74
+
75
+> :book: When you pass a plain object, an instance of the `Settings` class will be created automatically. If you plan to call the method frequently, use a pre-created instance of the `Settings` class.
76
+
77
+### Settings([options])
78
+
79
+A class of full settings of the package.
80
+
81
+```ts
82
+const settings = new fsWalk.Settings({ followSymbolicLinks: true });
83
+
84
+const entries = fsWalk.walkSync('path', settings);
85
+```
86
+
87
+## Entry
88
+
89
+* `name` — The name of the entry (`unknown.txt`).
90
+* `path` — The path of the entry relative to call directory (`root/unknown.txt`).
91
+* `dirent` — An instance of [`fs.Dirent`](./src/types/index.ts) class.
92
+* [`stats`] — An instance of `fs.Stats` class.
93
+
94
+## Options
95
+
96
+### basePath
97
+
98
+* Type: `string`
99
+* Default: `undefined`
100
+
101
+By default, all paths are built relative to the root path. You can use this option to set custom root path.
102
+
103
+In the example below we read the files from the `root` directory, but in the results the root path will be `custom`.
104
+
105
+```ts
106
+fsWalk.walkSync('root'); // → ['root/file.txt']
107
+fsWalk.walkSync('root', { basePath: 'custom' }); // → ['custom/file.txt']
108
+```
109
+
110
+### concurrency
111
+
112
+* Type: `number`
113
+* Default: `Infinity`
114
+
115
+The maximum number of concurrent calls to `fs.readdir`.
116
+
117
+> :book: The higher the number, the higher performance and the load on the File System. If you want to read in quiet mode, set the value to `4 * os.cpus().length` (4 is default size of [thread pool work scheduling](http://docs.libuv.org/en/v1.x/threadpool.html#thread-pool-work-scheduling)).
118
+
119
+### deepFilter
120
+
121
+* Type: [`DeepFilterFunction`](./src/settings.ts)
122
+* Default: `undefined`
123
+
124
+A function that indicates whether the directory will be read deep or not.
125
+
126
+```ts
127
+// Skip all directories that starts with `node_modules`
128
+const filter: DeepFilterFunction = (entry) => !entry.path.startsWith('node_modules');
129
+```
130
+
131
+### entryFilter
132
+
133
+* Type: [`EntryFilterFunction`](./src/settings.ts)
134
+* Default: `undefined`
135
+
136
+A function that indicates whether the entry will be included to results or not.
137
+
138
+```ts
139
+// Exclude all `.js` files from results
140
+const filter: EntryFilterFunction = (entry) => !entry.name.endsWith('.js');
141
+```
142
+
143
+### errorFilter
144
+
145
+* Type: [`ErrorFilterFunction`](./src/settings.ts)
146
+* Default: `undefined`
147
+
148
+A function that allows you to skip errors that occur when reading directories.
149
+
150
+For example, you can skip `ENOENT` errors if required:
151
+
152
+```ts
153
+// Skip all ENOENT errors
154
+const filter: ErrorFilterFunction = (error) => error.code == 'ENOENT';
155
+```
156
+
157
+### stats
158
+
159
+* Type: `boolean`
160
+* Default: `false`
161
+
162
+Adds an instance of `fs.Stats` class to the [`Entry`](#entry).
163
+
164
+> :book: Always use `fs.readdir` with additional `fs.lstat/fs.stat` calls to determine the entry type.
165
+
166
+### followSymbolicLinks
167
+
168
+* Type: `boolean`
169
+* Default: `false`
170
+
171
+Follow symbolic links or not. Call `fs.stat` on symbolic link if `true`.
172
+
173
+### `throwErrorOnBrokenSymbolicLink`
174
+
175
+* Type: `boolean`
176
+* Default: `true`
177
+
178
+Throw an error when symbolic link is broken if `true` or safely return `lstat` call if `false`.
179
+
180
+### `pathSegmentSeparator`
181
+
182
+* Type: `string`
183
+* Default: `path.sep`
184
+
185
+By default, this package uses the correct path separator for your OS (`\` on Windows, `/` on Unix-like systems). But you can set this option to any separator character(s) that you want to use instead.
186
+
187
+### `fs`
188
+
189
+* Type: `FileSystemAdapter`
190
+* Default: A default FS methods
191
+
192
+By default, the built-in Node.js module (`fs`) is used to work with the file system. You can replace any method with your own.
193
+
194
+```ts
195
+interface FileSystemAdapter {
196
+	lstat: typeof fs.lstat;
197
+	stat: typeof fs.stat;
198
+	lstatSync: typeof fs.lstatSync;
199
+	statSync: typeof fs.statSync;
200
+	readdir: typeof fs.readdir;
201
+	readdirSync: typeof fs.readdirSync;
202
+}
203
+
204
+const settings = new fsWalk.Settings({
205
+	fs: { lstat: fakeLstat }
206
+});
207
+```
208
+
209
+## Changelog
210
+
211
+See the [Releases section of our GitHub project](https://github.com/nodelib/nodelib/releases) for changelog for each release version.
212
+
213
+## License
214
+
215
+This software is released under the terms of the MIT license.

+ 14
- 0
node_modules/@nodelib/fs.walk/out/index.d.ts View File

@@ -0,0 +1,14 @@
1
+/// <reference types="node" />
2
+import type { Readable } from 'stream';
3
+import type { Dirent, FileSystemAdapter } from '@nodelib/fs.scandir';
4
+import { AsyncCallback } from './providers/async';
5
+import Settings, { DeepFilterFunction, EntryFilterFunction, ErrorFilterFunction, Options } from './settings';
6
+import type { Entry } from './types';
7
+declare function walk(directory: string, callback: AsyncCallback): void;
8
+declare function walk(directory: string, optionsOrSettings: Options | Settings, callback: AsyncCallback): void;
9
+declare namespace walk {
10
+    function __promisify__(directory: string, optionsOrSettings?: Options | Settings): Promise<Entry[]>;
11
+}
12
+declare function walkSync(directory: string, optionsOrSettings?: Options | Settings): Entry[];
13
+declare function walkStream(directory: string, optionsOrSettings?: Options | Settings): Readable;
14
+export { walk, walkSync, walkStream, Settings, AsyncCallback, Dirent, Entry, FileSystemAdapter, Options, DeepFilterFunction, EntryFilterFunction, ErrorFilterFunction };

+ 34
- 0
node_modules/@nodelib/fs.walk/out/index.js View File

@@ -0,0 +1,34 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+exports.Settings = exports.walkStream = exports.walkSync = exports.walk = void 0;
4
+const async_1 = require("./providers/async");
5
+const stream_1 = require("./providers/stream");
6
+const sync_1 = require("./providers/sync");
7
+const settings_1 = require("./settings");
8
+exports.Settings = settings_1.default;
9
+function walk(directory, optionsOrSettingsOrCallback, callback) {
10
+    if (typeof optionsOrSettingsOrCallback === 'function') {
11
+        new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback);
12
+        return;
13
+    }
14
+    new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback);
15
+}
16
+exports.walk = walk;
17
+function walkSync(directory, optionsOrSettings) {
18
+    const settings = getSettings(optionsOrSettings);
19
+    const provider = new sync_1.default(directory, settings);
20
+    return provider.read();
21
+}
22
+exports.walkSync = walkSync;
23
+function walkStream(directory, optionsOrSettings) {
24
+    const settings = getSettings(optionsOrSettings);
25
+    const provider = new stream_1.default(directory, settings);
26
+    return provider.read();
27
+}
28
+exports.walkStream = walkStream;
29
+function getSettings(settingsOrOptions = {}) {
30
+    if (settingsOrOptions instanceof settings_1.default) {
31
+        return settingsOrOptions;
32
+    }
33
+    return new settings_1.default(settingsOrOptions);
34
+}

+ 12
- 0
node_modules/@nodelib/fs.walk/out/providers/async.d.ts View File

@@ -0,0 +1,12 @@
1
+import AsyncReader from '../readers/async';
2
+import type Settings from '../settings';
3
+import type { Entry, Errno } from '../types';
4
+export declare type AsyncCallback = (error: Errno, entries: Entry[]) => void;
5
+export default class AsyncProvider {
6
+    private readonly _root;
7
+    private readonly _settings;
8
+    protected readonly _reader: AsyncReader;
9
+    private readonly _storage;
10
+    constructor(_root: string, _settings: Settings);
11
+    read(callback: AsyncCallback): void;
12
+}

+ 30
- 0
node_modules/@nodelib/fs.walk/out/providers/async.js View File

@@ -0,0 +1,30 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const async_1 = require("../readers/async");
4
+class AsyncProvider {
5
+    constructor(_root, _settings) {
6
+        this._root = _root;
7
+        this._settings = _settings;
8
+        this._reader = new async_1.default(this._root, this._settings);
9
+        this._storage = [];
10
+    }
11
+    read(callback) {
12
+        this._reader.onError((error) => {
13
+            callFailureCallback(callback, error);
14
+        });
15
+        this._reader.onEntry((entry) => {
16
+            this._storage.push(entry);
17
+        });
18
+        this._reader.onEnd(() => {
19
+            callSuccessCallback(callback, this._storage);
20
+        });
21
+        this._reader.read();
22
+    }
23
+}
24
+exports.default = AsyncProvider;
25
+function callFailureCallback(callback, error) {
26
+    callback(error);
27
+}
28
+function callSuccessCallback(callback, entries) {
29
+    callback(null, entries);
30
+}

+ 4
- 0
node_modules/@nodelib/fs.walk/out/providers/index.d.ts View File

@@ -0,0 +1,4 @@
1
+import AsyncProvider from './async';
2
+import StreamProvider from './stream';
3
+import SyncProvider from './sync';
4
+export { AsyncProvider, StreamProvider, SyncProvider };

+ 9
- 0
node_modules/@nodelib/fs.walk/out/providers/index.js View File

@@ -0,0 +1,9 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+exports.SyncProvider = exports.StreamProvider = exports.AsyncProvider = void 0;
4
+const async_1 = require("./async");
5
+exports.AsyncProvider = async_1.default;
6
+const stream_1 = require("./stream");
7
+exports.StreamProvider = stream_1.default;
8
+const sync_1 = require("./sync");
9
+exports.SyncProvider = sync_1.default;

+ 12
- 0
node_modules/@nodelib/fs.walk/out/providers/stream.d.ts View File

@@ -0,0 +1,12 @@
1
+/// <reference types="node" />
2
+import { Readable } from 'stream';
3
+import AsyncReader from '../readers/async';
4
+import type Settings from '../settings';
5
+export default class StreamProvider {
6
+    private readonly _root;
7
+    private readonly _settings;
8
+    protected readonly _reader: AsyncReader;
9
+    protected readonly _stream: Readable;
10
+    constructor(_root: string, _settings: Settings);
11
+    read(): Readable;
12
+}

+ 34
- 0
node_modules/@nodelib/fs.walk/out/providers/stream.js View File

@@ -0,0 +1,34 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const stream_1 = require("stream");
4
+const async_1 = require("../readers/async");
5
+class StreamProvider {
6
+    constructor(_root, _settings) {
7
+        this._root = _root;
8
+        this._settings = _settings;
9
+        this._reader = new async_1.default(this._root, this._settings);
10
+        this._stream = new stream_1.Readable({
11
+            objectMode: true,
12
+            read: () => { },
13
+            destroy: () => {
14
+                if (!this._reader.isDestroyed) {
15
+                    this._reader.destroy();
16
+                }
17
+            }
18
+        });
19
+    }
20
+    read() {
21
+        this._reader.onError((error) => {
22
+            this._stream.emit('error', error);
23
+        });
24
+        this._reader.onEntry((entry) => {
25
+            this._stream.push(entry);
26
+        });
27
+        this._reader.onEnd(() => {
28
+            this._stream.push(null);
29
+        });
30
+        this._reader.read();
31
+        return this._stream;
32
+    }
33
+}
34
+exports.default = StreamProvider;

+ 10
- 0
node_modules/@nodelib/fs.walk/out/providers/sync.d.ts View File

@@ -0,0 +1,10 @@
1
+import SyncReader from '../readers/sync';
2
+import type Settings from '../settings';
3
+import type { Entry } from '../types';
4
+export default class SyncProvider {
5
+    private readonly _root;
6
+    private readonly _settings;
7
+    protected readonly _reader: SyncReader;
8
+    constructor(_root: string, _settings: Settings);
9
+    read(): Entry[];
10
+}

+ 14
- 0
node_modules/@nodelib/fs.walk/out/providers/sync.js View File

@@ -0,0 +1,14 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const sync_1 = require("../readers/sync");
4
+class SyncProvider {
5
+    constructor(_root, _settings) {
6
+        this._root = _root;
7
+        this._settings = _settings;
8
+        this._reader = new sync_1.default(this._root, this._settings);
9
+    }
10
+    read() {
11
+        return this._reader.read();
12
+    }
13
+}
14
+exports.default = SyncProvider;

+ 30
- 0
node_modules/@nodelib/fs.walk/out/readers/async.d.ts View File

@@ -0,0 +1,30 @@
1
+/// <reference types="node" />
2
+import { EventEmitter } from 'events';
3
+import * as fsScandir from '@nodelib/fs.scandir';
4
+import type Settings from '../settings';
5
+import type { Entry, Errno } from '../types';
6
+import Reader from './reader';
7
+declare type EntryEventCallback = (entry: Entry) => void;
8
+declare type ErrorEventCallback = (error: Errno) => void;
9
+declare type EndEventCallback = () => void;
10
+export default class AsyncReader extends Reader {
11
+    protected readonly _settings: Settings;
12
+    protected readonly _scandir: typeof fsScandir.scandir;
13
+    protected readonly _emitter: EventEmitter;
14
+    private readonly _queue;
15
+    private _isFatalError;
16
+    private _isDestroyed;
17
+    constructor(_root: string, _settings: Settings);
18
+    read(): EventEmitter;
19
+    get isDestroyed(): boolean;
20
+    destroy(): void;
21
+    onEntry(callback: EntryEventCallback): void;
22
+    onError(callback: ErrorEventCallback): void;
23
+    onEnd(callback: EndEventCallback): void;
24
+    private _pushToQueue;
25
+    private _worker;
26
+    private _handleError;
27
+    private _handleEntry;
28
+    private _emitEntry;
29
+}
30
+export {};

+ 97
- 0
node_modules/@nodelib/fs.walk/out/readers/async.js View File

@@ -0,0 +1,97 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const events_1 = require("events");
4
+const fsScandir = require("@nodelib/fs.scandir");
5
+const fastq = require("fastq");
6
+const common = require("./common");
7
+const reader_1 = require("./reader");
8
+class AsyncReader extends reader_1.default {
9
+    constructor(_root, _settings) {
10
+        super(_root, _settings);
11
+        this._settings = _settings;
12
+        this._scandir = fsScandir.scandir;
13
+        this._emitter = new events_1.EventEmitter();
14
+        this._queue = fastq(this._worker.bind(this), this._settings.concurrency);
15
+        this._isFatalError = false;
16
+        this._isDestroyed = false;
17
+        this._queue.drain = () => {
18
+            if (!this._isFatalError) {
19
+                this._emitter.emit('end');
20
+            }
21
+        };
22
+    }
23
+    read() {
24
+        this._isFatalError = false;
25
+        this._isDestroyed = false;
26
+        setImmediate(() => {
27
+            this._pushToQueue(this._root, this._settings.basePath);
28
+        });
29
+        return this._emitter;
30
+    }
31
+    get isDestroyed() {
32
+        return this._isDestroyed;
33
+    }
34
+    destroy() {
35
+        if (this._isDestroyed) {
36
+            throw new Error('The reader is already destroyed');
37
+        }
38
+        this._isDestroyed = true;
39
+        this._queue.killAndDrain();
40
+    }
41
+    onEntry(callback) {
42
+        this._emitter.on('entry', callback);
43
+    }
44
+    onError(callback) {
45
+        this._emitter.once('error', callback);
46
+    }
47
+    onEnd(callback) {
48
+        this._emitter.once('end', callback);
49
+    }
50
+    _pushToQueue(directory, base) {
51
+        const queueItem = { directory, base };
52
+        this._queue.push(queueItem, (error) => {
53
+            if (error !== null) {
54
+                this._handleError(error);
55
+            }
56
+        });
57
+    }
58
+    _worker(item, done) {
59
+        this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => {
60
+            if (error !== null) {
61
+                done(error, undefined);
62
+                return;
63
+            }
64
+            for (const entry of entries) {
65
+                this._handleEntry(entry, item.base);
66
+            }
67
+            done(null, undefined);
68
+        });
69
+    }
70
+    _handleError(error) {
71
+        if (this._isDestroyed || !common.isFatalError(this._settings, error)) {
72
+            return;
73
+        }
74
+        this._isFatalError = true;
75
+        this._isDestroyed = true;
76
+        this._emitter.emit('error', error);
77
+    }
78
+    _handleEntry(entry, base) {
79
+        if (this._isDestroyed || this._isFatalError) {
80
+            return;
81
+        }
82
+        const fullpath = entry.path;
83
+        if (base !== undefined) {
84
+            entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);
85
+        }
86
+        if (common.isAppliedFilter(this._settings.entryFilter, entry)) {
87
+            this._emitEntry(entry);
88
+        }
89
+        if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {
90
+            this._pushToQueue(fullpath, base === undefined ? undefined : entry.path);
91
+        }
92
+    }
93
+    _emitEntry(entry) {
94
+        this._emitter.emit('entry', entry);
95
+    }
96
+}
97
+exports.default = AsyncReader;

+ 7
- 0
node_modules/@nodelib/fs.walk/out/readers/common.d.ts View File

@@ -0,0 +1,7 @@
1
+import type { FilterFunction } from '../settings';
2
+import type Settings from '../settings';
3
+import type { Errno } from '../types';
4
+export declare function isFatalError(settings: Settings, error: Errno): boolean;
5
+export declare function isAppliedFilter<T>(filter: FilterFunction<T> | null, value: T): boolean;
6
+export declare function replacePathSegmentSeparator(filepath: string, separator: string): string;
7
+export declare function joinPathSegments(a: string, b: string, separator: string): string;

+ 31
- 0
node_modules/@nodelib/fs.walk/out/readers/common.js View File

@@ -0,0 +1,31 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0;
4
+function isFatalError(settings, error) {
5
+    if (settings.errorFilter === null) {
6
+        return true;
7
+    }
8
+    return !settings.errorFilter(error);
9
+}
10
+exports.isFatalError = isFatalError;
11
+function isAppliedFilter(filter, value) {
12
+    return filter === null || filter(value);
13
+}
14
+exports.isAppliedFilter = isAppliedFilter;
15
+function replacePathSegmentSeparator(filepath, separator) {
16
+    return filepath.split(/[/\\]/).join(separator);
17
+}
18
+exports.replacePathSegmentSeparator = replacePathSegmentSeparator;
19
+function joinPathSegments(a, b, separator) {
20
+    if (a === '') {
21
+        return b;
22
+    }
23
+    /**
24
+     * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`).
25
+     */
26
+    if (a.endsWith(separator)) {
27
+        return a + b;
28
+    }
29
+    return a + separator + b;
30
+}
31
+exports.joinPathSegments = joinPathSegments;

+ 6
- 0
node_modules/@nodelib/fs.walk/out/readers/reader.d.ts View File

@@ -0,0 +1,6 @@
1
+import type Settings from '../settings';
2
+export default class Reader {
3
+    protected readonly _root: string;
4
+    protected readonly _settings: Settings;
5
+    constructor(_root: string, _settings: Settings);
6
+}

+ 11
- 0
node_modules/@nodelib/fs.walk/out/readers/reader.js View File

@@ -0,0 +1,11 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const common = require("./common");
4
+class Reader {
5
+    constructor(_root, _settings) {
6
+        this._root = _root;
7
+        this._settings = _settings;
8
+        this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator);
9
+    }
10
+}
11
+exports.default = Reader;

+ 15
- 0
node_modules/@nodelib/fs.walk/out/readers/sync.d.ts View File

@@ -0,0 +1,15 @@
1
+import * as fsScandir from '@nodelib/fs.scandir';
2
+import type { Entry } from '../types';
3
+import Reader from './reader';
4
+export default class SyncReader extends Reader {
5
+    protected readonly _scandir: typeof fsScandir.scandirSync;
6
+    private readonly _storage;
7
+    private readonly _queue;
8
+    read(): Entry[];
9
+    private _pushToQueue;
10
+    private _handleQueue;
11
+    private _handleDirectory;
12
+    private _handleError;
13
+    private _handleEntry;
14
+    private _pushToStorage;
15
+}

+ 59
- 0
node_modules/@nodelib/fs.walk/out/readers/sync.js View File

@@ -0,0 +1,59 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const fsScandir = require("@nodelib/fs.scandir");
4
+const common = require("./common");
5
+const reader_1 = require("./reader");
6
+class SyncReader extends reader_1.default {
7
+    constructor() {
8
+        super(...arguments);
9
+        this._scandir = fsScandir.scandirSync;
10
+        this._storage = [];
11
+        this._queue = new Set();
12
+    }
13
+    read() {
14
+        this._pushToQueue(this._root, this._settings.basePath);
15
+        this._handleQueue();
16
+        return this._storage;
17
+    }
18
+    _pushToQueue(directory, base) {
19
+        this._queue.add({ directory, base });
20
+    }
21
+    _handleQueue() {
22
+        for (const item of this._queue.values()) {
23
+            this._handleDirectory(item.directory, item.base);
24
+        }
25
+    }
26
+    _handleDirectory(directory, base) {
27
+        try {
28
+            const entries = this._scandir(directory, this._settings.fsScandirSettings);
29
+            for (const entry of entries) {
30
+                this._handleEntry(entry, base);
31
+            }
32
+        }
33
+        catch (error) {
34
+            this._handleError(error);
35
+        }
36
+    }
37
+    _handleError(error) {
38
+        if (!common.isFatalError(this._settings, error)) {
39
+            return;
40
+        }
41
+        throw error;
42
+    }
43
+    _handleEntry(entry, base) {
44
+        const fullpath = entry.path;
45
+        if (base !== undefined) {
46
+            entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);
47
+        }
48
+        if (common.isAppliedFilter(this._settings.entryFilter, entry)) {
49
+            this._pushToStorage(entry);
50
+        }
51
+        if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {
52
+            this._pushToQueue(fullpath, base === undefined ? undefined : entry.path);
53
+        }
54
+    }
55
+    _pushToStorage(entry) {
56
+        this._storage.push(entry);
57
+    }
58
+}
59
+exports.default = SyncReader;

+ 30
- 0
node_modules/@nodelib/fs.walk/out/settings.d.ts View File

@@ -0,0 +1,30 @@
1
+import * as fsScandir from '@nodelib/fs.scandir';
2
+import type { Entry, Errno } from './types';
3
+export declare type FilterFunction<T> = (value: T) => boolean;
4
+export declare type DeepFilterFunction = FilterFunction<Entry>;
5
+export declare type EntryFilterFunction = FilterFunction<Entry>;
6
+export declare type ErrorFilterFunction = FilterFunction<Errno>;
7
+export interface Options {
8
+    basePath?: string;
9
+    concurrency?: number;
10
+    deepFilter?: DeepFilterFunction;
11
+    entryFilter?: EntryFilterFunction;
12
+    errorFilter?: ErrorFilterFunction;
13
+    followSymbolicLinks?: boolean;
14
+    fs?: Partial<fsScandir.FileSystemAdapter>;
15
+    pathSegmentSeparator?: string;
16
+    stats?: boolean;
17
+    throwErrorOnBrokenSymbolicLink?: boolean;
18
+}
19
+export default class Settings {
20
+    private readonly _options;
21
+    readonly basePath?: string;
22
+    readonly concurrency: number;
23
+    readonly deepFilter: DeepFilterFunction | null;
24
+    readonly entryFilter: EntryFilterFunction | null;
25
+    readonly errorFilter: ErrorFilterFunction | null;
26
+    readonly pathSegmentSeparator: string;
27
+    readonly fsScandirSettings: fsScandir.Settings;
28
+    constructor(_options?: Options);
29
+    private _getValue;
30
+}

+ 26
- 0
node_modules/@nodelib/fs.walk/out/settings.js View File

@@ -0,0 +1,26 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const path = require("path");
4
+const fsScandir = require("@nodelib/fs.scandir");
5
+class Settings {
6
+    constructor(_options = {}) {
7
+        this._options = _options;
8
+        this.basePath = this._getValue(this._options.basePath, undefined);
9
+        this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY);
10
+        this.deepFilter = this._getValue(this._options.deepFilter, null);
11
+        this.entryFilter = this._getValue(this._options.entryFilter, null);
12
+        this.errorFilter = this._getValue(this._options.errorFilter, null);
13
+        this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
14
+        this.fsScandirSettings = new fsScandir.Settings({
15
+            followSymbolicLinks: this._options.followSymbolicLinks,
16
+            fs: this._options.fs,
17
+            pathSegmentSeparator: this._options.pathSegmentSeparator,
18
+            stats: this._options.stats,
19
+            throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink
20
+        });
21
+    }
22
+    _getValue(option, value) {
23
+        return option !== null && option !== void 0 ? option : value;
24
+    }
25
+}
26
+exports.default = Settings;

+ 8
- 0
node_modules/@nodelib/fs.walk/out/types/index.d.ts View File

@@ -0,0 +1,8 @@
1
+/// <reference types="node" />
2
+import type * as scandir from '@nodelib/fs.scandir';
3
+export declare type Entry = scandir.Entry;
4
+export declare type Errno = NodeJS.ErrnoException;
5
+export interface QueueItem {
6
+    directory: string;
7
+    base?: string;
8
+}

+ 2
- 0
node_modules/@nodelib/fs.walk/out/types/index.js View File

@@ -0,0 +1,2 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });

+ 73
- 0
node_modules/@nodelib/fs.walk/package.json View File

@@ -0,0 +1,73 @@
1
+{
2
+  "_from": "@nodelib/fs.walk@^1.2.3",
3
+  "_id": "@nodelib/fs.walk@1.2.8",
4
+  "_inBundle": false,
5
+  "_integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
6
+  "_location": "/@nodelib/fs.walk",
7
+  "_phantomChildren": {},
8
+  "_requested": {
9
+    "type": "range",
10
+    "registry": true,
11
+    "raw": "@nodelib/fs.walk@^1.2.3",
12
+    "name": "@nodelib/fs.walk",
13
+    "escapedName": "@nodelib%2ffs.walk",
14
+    "scope": "@nodelib",
15
+    "rawSpec": "^1.2.3",
16
+    "saveSpec": null,
17
+    "fetchSpec": "^1.2.3"
18
+  },
19
+  "_requiredBy": [
20
+    "/fast-glob"
21
+  ],
22
+  "_resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
23
+  "_shasum": "e95737e8bb6746ddedf69c556953494f196fe69a",
24
+  "_spec": "@nodelib/fs.walk@^1.2.3",
25
+  "_where": "/Users/alexmanuel/MyApp/node_modules/fast-glob",
26
+  "bundleDependencies": false,
27
+  "dependencies": {
28
+    "@nodelib/fs.scandir": "2.1.5",
29
+    "fastq": "^1.6.0"
30
+  },
31
+  "deprecated": false,
32
+  "description": "A library for efficiently walking a directory recursively",
33
+  "devDependencies": {
34
+    "@nodelib/fs.macchiato": "1.0.4"
35
+  },
36
+  "engines": {
37
+    "node": ">= 8"
38
+  },
39
+  "files": [
40
+    "out/**",
41
+    "!out/**/*.map",
42
+    "!out/**/*.spec.*",
43
+    "!out/**/tests/**"
44
+  ],
45
+  "gitHead": "1e5bad48565da2b06b8600e744324ea240bf49d8",
46
+  "keywords": [
47
+    "NodeLib",
48
+    "fs",
49
+    "FileSystem",
50
+    "file system",
51
+    "walk",
52
+    "scanner",
53
+    "crawler"
54
+  ],
55
+  "license": "MIT",
56
+  "main": "out/index.js",
57
+  "name": "@nodelib/fs.walk",
58
+  "repository": {
59
+    "type": "git",
60
+    "url": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.walk"
61
+  },
62
+  "scripts": {
63
+    "build": "npm run clean && npm run compile && npm run lint && npm test",
64
+    "clean": "rimraf {tsconfig.tsbuildinfo,out}",
65
+    "compile": "tsc -b .",
66
+    "compile:watch": "tsc -p . --watch --sourceMap",
67
+    "lint": "eslint \"src/**/*.ts\" --cache",
68
+    "test": "mocha \"out/**/*.spec.js\" -s 0",
69
+    "watch": "npm run clean && npm run compile:watch"
70
+  },
71
+  "typings": "out/index.d.ts",
72
+  "version": "1.2.8"
73
+}

+ 46
- 0
node_modules/abbrev/LICENSE View File

@@ -0,0 +1,46 @@
1
+This software is dual-licensed under the ISC and MIT licenses.
2
+You may use this software under EITHER of the following licenses.
3
+
4
+----------
5
+
6
+The ISC License
7
+
8
+Copyright (c) Isaac Z. Schlueter and Contributors
9
+
10
+Permission to use, copy, modify, and/or distribute this software for any
11
+purpose with or without fee is hereby granted, provided that the above
12
+copyright notice and this permission notice appear in all copies.
13
+
14
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
15
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
16
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
17
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
18
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
19
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
20
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21
+
22
+----------
23
+
24
+Copyright Isaac Z. Schlueter and Contributors
25
+All rights reserved.
26
+
27
+Permission is hereby granted, free of charge, to any person
28
+obtaining a copy of this software and associated documentation
29
+files (the "Software"), to deal in the Software without
30
+restriction, including without limitation the rights to use,
31
+copy, modify, merge, publish, distribute, sublicense, and/or sell
32
+copies of the Software, and to permit persons to whom the
33
+Software is furnished to do so, subject to the following
34
+conditions:
35
+
36
+The above copyright notice and this permission notice shall be
37
+included in all copies or substantial portions of the Software.
38
+
39
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
40
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
41
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
42
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
43
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
44
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
45
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
46
+OTHER DEALINGS IN THE SOFTWARE.

+ 23
- 0
node_modules/abbrev/README.md View File

@@ -0,0 +1,23 @@
1
+# abbrev-js
2
+
3
+Just like [ruby's Abbrev](http://apidock.com/ruby/Abbrev).
4
+
5
+Usage:
6
+
7
+    var abbrev = require("abbrev");
8
+    abbrev("foo", "fool", "folding", "flop");
9
+    
10
+    // returns:
11
+    { fl: 'flop'
12
+    , flo: 'flop'
13
+    , flop: 'flop'
14
+    , fol: 'folding'
15
+    , fold: 'folding'
16
+    , foldi: 'folding'
17
+    , foldin: 'folding'
18
+    , folding: 'folding'
19
+    , foo: 'foo'
20
+    , fool: 'fool'
21
+    }
22
+
23
+This is handy for command-line scripts, or other cases where you want to be able to accept shorthands.

+ 61
- 0
node_modules/abbrev/abbrev.js View File

@@ -0,0 +1,61 @@
1
+module.exports = exports = abbrev.abbrev = abbrev
2
+
3
+abbrev.monkeyPatch = monkeyPatch
4
+
5
+function monkeyPatch () {
6
+  Object.defineProperty(Array.prototype, 'abbrev', {
7
+    value: function () { return abbrev(this) },
8
+    enumerable: false, configurable: true, writable: true
9
+  })
10
+
11
+  Object.defineProperty(Object.prototype, 'abbrev', {
12
+    value: function () { return abbrev(Object.keys(this)) },
13
+    enumerable: false, configurable: true, writable: true
14
+  })
15
+}
16
+
17
+function abbrev (list) {
18
+  if (arguments.length !== 1 || !Array.isArray(list)) {
19
+    list = Array.prototype.slice.call(arguments, 0)
20
+  }
21
+  for (var i = 0, l = list.length, args = [] ; i < l ; i ++) {
22
+    args[i] = typeof list[i] === "string" ? list[i] : String(list[i])
23
+  }
24
+
25
+  // sort them lexicographically, so that they're next to their nearest kin
26
+  args = args.sort(lexSort)
27
+
28
+  // walk through each, seeing how much it has in common with the next and previous
29
+  var abbrevs = {}
30
+    , prev = ""
31
+  for (var i = 0, l = args.length ; i < l ; i ++) {
32
+    var current = args[i]
33
+      , next = args[i + 1] || ""
34
+      , nextMatches = true
35
+      , prevMatches = true
36
+    if (current === next) continue
37
+    for (var j = 0, cl = current.length ; j < cl ; j ++) {
38
+      var curChar = current.charAt(j)
39
+      nextMatches = nextMatches && curChar === next.charAt(j)
40
+      prevMatches = prevMatches && curChar === prev.charAt(j)
41
+      if (!nextMatches && !prevMatches) {
42
+        j ++
43
+        break
44
+      }
45
+    }
46
+    prev = current
47
+    if (j === cl) {
48
+      abbrevs[current] = current
49
+      continue
50
+    }
51
+    for (var a = current.substr(0, j) ; j <= cl ; j ++) {
52
+      abbrevs[a] = current
53
+      a += current.charAt(j)
54
+    }
55
+  }
56
+  return abbrevs
57
+}
58
+
59
+function lexSort (a, b) {
60
+  return a === b ? 0 : a > b ? 1 : -1
61
+}

+ 56
- 0
node_modules/abbrev/package.json View File

@@ -0,0 +1,56 @@
1
+{
2
+  "_from": "abbrev@1",
3
+  "_id": "abbrev@1.1.1",
4
+  "_inBundle": false,
5
+  "_integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
6
+  "_location": "/abbrev",
7
+  "_phantomChildren": {},
8
+  "_requested": {
9
+    "type": "range",
10
+    "registry": true,
11
+    "raw": "abbrev@1",
12
+    "name": "abbrev",
13
+    "escapedName": "abbrev",
14
+    "rawSpec": "1",
15
+    "saveSpec": null,
16
+    "fetchSpec": "1"
17
+  },
18
+  "_requiredBy": [
19
+    "/nopt"
20
+  ],
21
+  "_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
22
+  "_shasum": "f8f2c887ad10bf67f634f005b6987fed3179aac8",
23
+  "_spec": "abbrev@1",
24
+  "_where": "/Users/alexmanuel/MyApp/node_modules/nopt",
25
+  "author": {
26
+    "name": "Isaac Z. Schlueter",
27
+    "email": "i@izs.me"
28
+  },
29
+  "bugs": {
30
+    "url": "https://github.com/isaacs/abbrev-js/issues"
31
+  },
32
+  "bundleDependencies": false,
33
+  "deprecated": false,
34
+  "description": "Like ruby's abbrev module, but in js",
35
+  "devDependencies": {
36
+    "tap": "^10.1"
37
+  },
38
+  "files": [
39
+    "abbrev.js"
40
+  ],
41
+  "homepage": "https://github.com/isaacs/abbrev-js#readme",
42
+  "license": "ISC",
43
+  "main": "abbrev.js",
44
+  "name": "abbrev",
45
+  "repository": {
46
+    "type": "git",
47
+    "url": "git+ssh://git@github.com/isaacs/abbrev-js.git"
48
+  },
49
+  "scripts": {
50
+    "postpublish": "git push origin --all; git push origin --tags",
51
+    "postversion": "npm publish",
52
+    "preversion": "npm test",
53
+    "test": "tap test.js --100"
54
+  },
55
+  "version": "1.1.1"
56
+}

+ 236
- 0
node_modules/accepts/HISTORY.md View File

@@ -0,0 +1,236 @@
1
+1.3.7 / 2019-04-29
2
+==================
3
+
4
+  * deps: negotiator@0.6.2
5
+    - Fix sorting charset, encoding, and language with extra parameters
6
+
7
+1.3.6 / 2019-04-28
8
+==================
9
+
10
+  * deps: mime-types@~2.1.24
11
+    - deps: mime-db@~1.40.0
12
+
13
+1.3.5 / 2018-02-28
14
+==================
15
+
16
+  * deps: mime-types@~2.1.18
17
+    - deps: mime-db@~1.33.0
18
+
19
+1.3.4 / 2017-08-22
20
+==================
21
+
22
+  * deps: mime-types@~2.1.16
23
+    - deps: mime-db@~1.29.0
24
+
25
+1.3.3 / 2016-05-02
26
+==================
27
+
28
+  * deps: mime-types@~2.1.11
29
+    - deps: mime-db@~1.23.0
30
+  * deps: negotiator@0.6.1
31
+    - perf: improve `Accept` parsing speed
32
+    - perf: improve `Accept-Charset` parsing speed
33
+    - perf: improve `Accept-Encoding` parsing speed
34
+    - perf: improve `Accept-Language` parsing speed
35
+
36
+1.3.2 / 2016-03-08
37
+==================
38
+
39
+  * deps: mime-types@~2.1.10
40
+    - Fix extension of `application/dash+xml`
41
+    - Update primary extension for `audio/mp4`
42
+    - deps: mime-db@~1.22.0
43
+
44
+1.3.1 / 2016-01-19
45
+==================
46
+
47
+  * deps: mime-types@~2.1.9
48
+    - deps: mime-db@~1.21.0
49
+
50
+1.3.0 / 2015-09-29
51
+==================
52
+
53
+  * deps: mime-types@~2.1.7
54
+    - deps: mime-db@~1.19.0
55
+  * deps: negotiator@0.6.0
56
+    - Fix including type extensions in parameters in `Accept` parsing
57
+    - Fix parsing `Accept` parameters with quoted equals
58
+    - Fix parsing `Accept` parameters with quoted semicolons
59
+    - Lazy-load modules from main entry point
60
+    - perf: delay type concatenation until needed
61
+    - perf: enable strict mode
62
+    - perf: hoist regular expressions
63
+    - perf: remove closures getting spec properties
64
+    - perf: remove a closure from media type parsing
65
+    - perf: remove property delete from media type parsing
66
+
67
+1.2.13 / 2015-09-06
68
+===================
69
+
70
+  * deps: mime-types@~2.1.6
71
+    - deps: mime-db@~1.18.0
72
+
73
+1.2.12 / 2015-07-30
74
+===================
75
+
76
+  * deps: mime-types@~2.1.4
77
+    - deps: mime-db@~1.16.0
78
+
79
+1.2.11 / 2015-07-16
80
+===================
81
+
82
+  * deps: mime-types@~2.1.3
83
+    - deps: mime-db@~1.15.0
84
+
85
+1.2.10 / 2015-07-01
86
+===================
87
+
88
+  * deps: mime-types@~2.1.2
89
+    - deps: mime-db@~1.14.0
90
+
91
+1.2.9 / 2015-06-08
92
+==================
93
+
94
+  * deps: mime-types@~2.1.1
95
+    - perf: fix deopt during mapping
96
+
97
+1.2.8 / 2015-06-07
98
+==================
99
+
100
+  * deps: mime-types@~2.1.0
101
+    - deps: mime-db@~1.13.0
102
+  * perf: avoid argument reassignment & argument slice
103
+  * perf: avoid negotiator recursive construction
104
+  * perf: enable strict mode
105
+  * perf: remove unnecessary bitwise operator
106
+
107
+1.2.7 / 2015-05-10
108
+==================
109
+
110
+  * deps: negotiator@0.5.3
111
+    - Fix media type parameter matching to be case-insensitive
112
+
113
+1.2.6 / 2015-05-07
114
+==================
115
+
116
+  * deps: mime-types@~2.0.11
117
+    - deps: mime-db@~1.9.1
118
+  * deps: negotiator@0.5.2
119
+    - Fix comparing media types with quoted values
120
+    - Fix splitting media types with quoted commas
121
+
122
+1.2.5 / 2015-03-13
123
+==================
124
+
125
+  * deps: mime-types@~2.0.10
126
+    - deps: mime-db@~1.8.0
127
+
128
+1.2.4 / 2015-02-14
129
+==================
130
+
131
+  * Support Node.js 0.6
132
+  * deps: mime-types@~2.0.9
133
+    - deps: mime-db@~1.7.0
134
+  * deps: negotiator@0.5.1
135
+    - Fix preference sorting to be stable for long acceptable lists
136
+
137
+1.2.3 / 2015-01-31
138
+==================
139
+
140
+  * deps: mime-types@~2.0.8
141
+    - deps: mime-db@~1.6.0
142
+
143
+1.2.2 / 2014-12-30
144
+==================
145
+
146
+  * deps: mime-types@~2.0.7
147
+    - deps: mime-db@~1.5.0
148
+
149
+1.2.1 / 2014-12-30
150
+==================
151
+
152
+  * deps: mime-types@~2.0.5
153
+    - deps: mime-db@~1.3.1
154
+
155
+1.2.0 / 2014-12-19
156
+==================
157
+
158
+  * deps: negotiator@0.5.0
159
+    - Fix list return order when large accepted list
160
+    - Fix missing identity encoding when q=0 exists
161
+    - Remove dynamic building of Negotiator class
162
+
163
+1.1.4 / 2014-12-10
164
+==================
165
+
166
+  * deps: mime-types@~2.0.4
167
+    - deps: mime-db@~1.3.0
168
+
169
+1.1.3 / 2014-11-09
170
+==================
171
+
172
+  * deps: mime-types@~2.0.3
173
+    - deps: mime-db@~1.2.0
174
+
175
+1.1.2 / 2014-10-14
176
+==================
177
+
178
+  * deps: negotiator@0.4.9
179
+    - Fix error when media type has invalid parameter
180
+
181
+1.1.1 / 2014-09-28
182
+==================
183
+
184
+  * deps: mime-types@~2.0.2
185
+    - deps: mime-db@~1.1.0
186
+  * deps: negotiator@0.4.8
187
+    - Fix all negotiations to be case-insensitive
188
+    - Stable sort preferences of same quality according to client order
189
+
190
+1.1.0 / 2014-09-02
191
+==================
192
+
193
+  * update `mime-types`
194
+
195
+1.0.7 / 2014-07-04
196
+==================
197
+
198
+  * Fix wrong type returned from `type` when match after unknown extension
199
+
200
+1.0.6 / 2014-06-24
201
+==================
202
+
203
+  * deps: negotiator@0.4.7
204
+
205
+1.0.5 / 2014-06-20
206
+==================
207
+
208
+ * fix crash when unknown extension given
209
+
210
+1.0.4 / 2014-06-19
211
+==================
212
+
213
+  * use `mime-types`
214
+
215
+1.0.3 / 2014-06-11
216
+==================
217
+
218
+  * deps: negotiator@0.4.6
219
+    - Order by specificity when quality is the same
220
+
221
+1.0.2 / 2014-05-29
222
+==================
223
+
224
+  * Fix interpretation when header not in request
225
+  * deps: pin negotiator@0.4.5
226
+
227
+1.0.1 / 2014-01-18
228
+==================
229
+
230
+  * Identity encoding isn't always acceptable
231
+  * deps: negotiator@~0.4.0
232
+
233
+1.0.0 / 2013-12-27
234
+==================
235
+
236
+  * Genesis

+ 23
- 0
node_modules/accepts/LICENSE View File

@@ -0,0 +1,23 @@
1
+(The MIT License)
2
+
3
+Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
4
+Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
5
+
6
+Permission is hereby granted, free of charge, to any person obtaining
7
+a copy of this software and associated documentation files (the
8
+'Software'), to deal in the Software without restriction, including
9
+without limitation the rights to use, copy, modify, merge, publish,
10
+distribute, sublicense, and/or sell copies of the Software, and to
11
+permit persons to whom the Software is furnished to do so, subject to
12
+the following conditions:
13
+
14
+The above copyright notice and this permission notice shall be
15
+included in all copies or substantial portions of the Software.
16
+
17
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
18
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
21
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 142
- 0
node_modules/accepts/README.md View File

@@ -0,0 +1,142 @@
1
+# accepts
2
+
3
+[![NPM Version][npm-version-image]][npm-url]
4
+[![NPM Downloads][npm-downloads-image]][npm-url]
5
+[![Node.js Version][node-version-image]][node-version-url]
6
+[![Build Status][travis-image]][travis-url]
7
+[![Test Coverage][coveralls-image]][coveralls-url]
8
+
9
+Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator).
10
+Extracted from [koa](https://www.npmjs.com/package/koa) for general use.
11
+
12
+In addition to negotiator, it allows:
13
+
14
+- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])`
15
+  as well as `('text/html', 'application/json')`.
16
+- Allows type shorthands such as `json`.
17
+- Returns `false` when no types match
18
+- Treats non-existent headers as `*`
19
+
20
+## Installation
21
+
22
+This is a [Node.js](https://nodejs.org/en/) module available through the
23
+[npm registry](https://www.npmjs.com/). Installation is done using the
24
+[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
25
+
26
+```sh
27
+$ npm install accepts
28
+```
29
+
30
+## API
31
+
32
+<!-- eslint-disable no-unused-vars -->
33
+
34
+```js
35
+var accepts = require('accepts')
36
+```
37
+
38
+### accepts(req)
39
+
40
+Create a new `Accepts` object for the given `req`.
41
+
42
+#### .charset(charsets)
43
+
44
+Return the first accepted charset. If nothing in `charsets` is accepted,
45
+then `false` is returned.
46
+
47
+#### .charsets()
48
+
49
+Return the charsets that the request accepts, in the order of the client's
50
+preference (most preferred first).
51
+
52
+#### .encoding(encodings)
53
+
54
+Return the first accepted encoding. If nothing in `encodings` is accepted,
55
+then `false` is returned.
56
+
57
+#### .encodings()
58
+
59
+Return the encodings that the request accepts, in the order of the client's
60
+preference (most preferred first).
61
+
62
+#### .language(languages)
63
+
64
+Return the first accepted language. If nothing in `languages` is accepted,
65
+then `false` is returned.
66
+
67
+#### .languages()
68
+
69
+Return the languages that the request accepts, in the order of the client's
70
+preference (most preferred first).
71
+
72
+#### .type(types)
73
+
74
+Return the first accepted type (and it is returned as the same text as what
75
+appears in the `types` array). If nothing in `types` is accepted, then `false`
76
+is returned.
77
+
78
+The `types` array can contain full MIME types or file extensions. Any value
79
+that is not a full MIME types is passed to `require('mime-types').lookup`.
80
+
81
+#### .types()
82
+
83
+Return the types that the request accepts, in the order of the client's
84
+preference (most preferred first).
85
+
86
+## Examples
87
+
88
+### Simple type negotiation
89
+
90
+This simple example shows how to use `accepts` to return a different typed
91
+respond body based on what the client wants to accept. The server lists it's
92
+preferences in order and will get back the best match between the client and
93
+server.
94
+
95
+```js
96
+var accepts = require('accepts')
97
+var http = require('http')
98
+
99
+function app (req, res) {
100
+  var accept = accepts(req)
101
+
102
+  // the order of this list is significant; should be server preferred order
103
+  switch (accept.type(['json', 'html'])) {
104
+    case 'json':
105
+      res.setHeader('Content-Type', 'application/json')
106
+      res.write('{"hello":"world!"}')
107
+      break
108
+    case 'html':
109
+      res.setHeader('Content-Type', 'text/html')
110
+      res.write('<b>hello, world!</b>')
111
+      break
112
+    default:
113
+      // the fallback is text/plain, so no need to specify it above
114
+      res.setHeader('Content-Type', 'text/plain')
115
+      res.write('hello, world!')
116
+      break
117
+  }
118
+
119
+  res.end()
120
+}
121
+
122
+http.createServer(app).listen(3000)
123
+```
124
+
125
+You can test this out with the cURL program:
126
+```sh
127
+curl -I -H'Accept: text/html' http://localhost:3000/
128
+```
129
+
130
+## License
131
+
132
+[MIT](LICENSE)
133
+
134
+[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/accepts/master
135
+[coveralls-url]: https://coveralls.io/r/jshttp/accepts?branch=master
136
+[node-version-image]: https://badgen.net/npm/node/accepts
137
+[node-version-url]: https://nodejs.org/en/download
138
+[npm-downloads-image]: https://badgen.net/npm/dm/accepts
139
+[npm-url]: https://npmjs.org/package/accepts
140
+[npm-version-image]: https://badgen.net/npm/v/accepts
141
+[travis-image]: https://badgen.net/travis/jshttp/accepts/master
142
+[travis-url]: https://travis-ci.org/jshttp/accepts

+ 238
- 0
node_modules/accepts/index.js View File

@@ -0,0 +1,238 @@
1
+/*!
2
+ * accepts
3
+ * Copyright(c) 2014 Jonathan Ong
4
+ * Copyright(c) 2015 Douglas Christopher Wilson
5
+ * MIT Licensed
6
+ */
7
+
8
+'use strict'
9
+
10
+/**
11
+ * Module dependencies.
12
+ * @private
13
+ */
14
+
15
+var Negotiator = require('negotiator')
16
+var mime = require('mime-types')
17
+
18
+/**
19
+ * Module exports.
20
+ * @public
21
+ */
22
+
23
+module.exports = Accepts
24
+
25
+/**
26
+ * Create a new Accepts object for the given req.
27
+ *
28
+ * @param {object} req
29
+ * @public
30
+ */
31
+
32
+function Accepts (req) {
33
+  if (!(this instanceof Accepts)) {
34
+    return new Accepts(req)
35
+  }
36
+
37
+  this.headers = req.headers
38
+  this.negotiator = new Negotiator(req)
39
+}
40
+
41
+/**
42
+ * Check if the given `type(s)` is acceptable, returning
43
+ * the best match when true, otherwise `undefined`, in which
44
+ * case you should respond with 406 "Not Acceptable".
45
+ *
46
+ * The `type` value may be a single mime type string
47
+ * such as "application/json", the extension name
48
+ * such as "json" or an array `["json", "html", "text/plain"]`. When a list
49
+ * or array is given the _best_ match, if any is returned.
50
+ *
51
+ * Examples:
52
+ *
53
+ *     // Accept: text/html
54
+ *     this.types('html');
55
+ *     // => "html"
56
+ *
57
+ *     // Accept: text/*, application/json
58
+ *     this.types('html');
59
+ *     // => "html"
60
+ *     this.types('text/html');
61
+ *     // => "text/html"
62
+ *     this.types('json', 'text');
63
+ *     // => "json"
64
+ *     this.types('application/json');
65
+ *     // => "application/json"
66
+ *
67
+ *     // Accept: text/*, application/json
68
+ *     this.types('image/png');
69
+ *     this.types('png');
70
+ *     // => undefined
71
+ *
72
+ *     // Accept: text/*;q=.5, application/json
73
+ *     this.types(['html', 'json']);
74
+ *     this.types('html', 'json');
75
+ *     // => "json"
76
+ *
77
+ * @param {String|Array} types...
78
+ * @return {String|Array|Boolean}
79
+ * @public
80
+ */
81
+
82
+Accepts.prototype.type =
83
+Accepts.prototype.types = function (types_) {
84
+  var types = types_
85
+
86
+  // support flattened arguments
87
+  if (types && !Array.isArray(types)) {
88
+    types = new Array(arguments.length)
89
+    for (var i = 0; i < types.length; i++) {
90
+      types[i] = arguments[i]
91
+    }
92
+  }
93
+
94
+  // no types, return all requested types
95
+  if (!types || types.length === 0) {
96
+    return this.negotiator.mediaTypes()
97
+  }
98
+
99
+  // no accept header, return first given type
100
+  if (!this.headers.accept) {
101
+    return types[0]
102
+  }
103
+
104
+  var mimes = types.map(extToMime)
105
+  var accepts = this.negotiator.mediaTypes(mimes.filter(validMime))
106
+  var first = accepts[0]
107
+
108
+  return first
109
+    ? types[mimes.indexOf(first)]
110
+    : false
111
+}
112
+
113
+/**
114
+ * Return accepted encodings or best fit based on `encodings`.
115
+ *
116
+ * Given `Accept-Encoding: gzip, deflate`
117
+ * an array sorted by quality is returned:
118
+ *
119
+ *     ['gzip', 'deflate']
120
+ *
121
+ * @param {String|Array} encodings...
122
+ * @return {String|Array}
123
+ * @public
124
+ */
125
+
126
+Accepts.prototype.encoding =
127
+Accepts.prototype.encodings = function (encodings_) {
128
+  var encodings = encodings_
129
+
130
+  // support flattened arguments
131
+  if (encodings && !Array.isArray(encodings)) {
132
+    encodings = new Array(arguments.length)
133
+    for (var i = 0; i < encodings.length; i++) {
134
+      encodings[i] = arguments[i]
135
+    }
136
+  }
137
+
138
+  // no encodings, return all requested encodings
139
+  if (!encodings || encodings.length === 0) {
140
+    return this.negotiator.encodings()
141
+  }
142
+
143
+  return this.negotiator.encodings(encodings)[0] || false
144
+}
145
+
146
+/**
147
+ * Return accepted charsets or best fit based on `charsets`.
148
+ *
149
+ * Given `Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5`
150
+ * an array sorted by quality is returned:
151
+ *
152
+ *     ['utf-8', 'utf-7', 'iso-8859-1']
153
+ *
154
+ * @param {String|Array} charsets...
155
+ * @return {String|Array}
156
+ * @public
157
+ */
158
+
159
+Accepts.prototype.charset =
160
+Accepts.prototype.charsets = function (charsets_) {
161
+  var charsets = charsets_
162
+
163
+  // support flattened arguments
164
+  if (charsets && !Array.isArray(charsets)) {
165
+    charsets = new Array(arguments.length)
166
+    for (var i = 0; i < charsets.length; i++) {
167
+      charsets[i] = arguments[i]
168
+    }
169
+  }
170
+
171
+  // no charsets, return all requested charsets
172
+  if (!charsets || charsets.length === 0) {
173
+    return this.negotiator.charsets()
174
+  }
175
+
176
+  return this.negotiator.charsets(charsets)[0] || false
177
+}
178
+
179
+/**
180
+ * Return accepted languages or best fit based on `langs`.
181
+ *
182
+ * Given `Accept-Language: en;q=0.8, es, pt`
183
+ * an array sorted by quality is returned:
184
+ *
185
+ *     ['es', 'pt', 'en']
186
+ *
187
+ * @param {String|Array} langs...
188
+ * @return {Array|String}
189
+ * @public
190
+ */
191
+
192
+Accepts.prototype.lang =
193
+Accepts.prototype.langs =
194
+Accepts.prototype.language =
195
+Accepts.prototype.languages = function (languages_) {
196
+  var languages = languages_
197
+
198
+  // support flattened arguments
199
+  if (languages && !Array.isArray(languages)) {
200
+    languages = new Array(arguments.length)
201
+    for (var i = 0; i < languages.length; i++) {
202
+      languages[i] = arguments[i]
203
+    }
204
+  }
205
+
206
+  // no languages, return all requested languages
207
+  if (!languages || languages.length === 0) {
208
+    return this.negotiator.languages()
209
+  }
210
+
211
+  return this.negotiator.languages(languages)[0] || false
212
+}
213
+
214
+/**
215
+ * Convert extnames to mime.
216
+ *
217
+ * @param {String} type
218
+ * @return {String}
219
+ * @private
220
+ */
221
+
222
+function extToMime (type) {
223
+  return type.indexOf('/') === -1
224
+    ? mime.lookup(type)
225
+    : type
226
+}
227
+
228
+/**
229
+ * Check if mime is valid.
230
+ *
231
+ * @param {String} type
232
+ * @return {String}
233
+ * @private
234
+ */
235
+
236
+function validMime (type) {
237
+  return typeof type === 'string'
238
+}

+ 87
- 0
node_modules/accepts/package.json View File

@@ -0,0 +1,87 @@
1
+{
2
+  "_from": "accepts@~1.3.5",
3
+  "_id": "accepts@1.3.7",
4
+  "_inBundle": false,
5
+  "_integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
6
+  "_location": "/accepts",
7
+  "_phantomChildren": {},
8
+  "_requested": {
9
+    "type": "range",
10
+    "registry": true,
11
+    "raw": "accepts@~1.3.5",
12
+    "name": "accepts",
13
+    "escapedName": "accepts",
14
+    "rawSpec": "~1.3.5",
15
+    "saveSpec": null,
16
+    "fetchSpec": "~1.3.5"
17
+  },
18
+  "_requiredBy": [
19
+    "/compression",
20
+    "/express"
21
+  ],
22
+  "_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
23
+  "_shasum": "531bc726517a3b2b41f850021c6cc15eaab507cd",
24
+  "_spec": "accepts@~1.3.5",
25
+  "_where": "/Users/alexmanuel/MyApp/node_modules/compression",
26
+  "bugs": {
27
+    "url": "https://github.com/jshttp/accepts/issues"
28
+  },
29
+  "bundleDependencies": false,
30
+  "contributors": [
31
+    {
32
+      "name": "Douglas Christopher Wilson",
33
+      "email": "doug@somethingdoug.com"
34
+    },
35
+    {
36
+      "name": "Jonathan Ong",
37
+      "email": "me@jongleberry.com",
38
+      "url": "http://jongleberry.com"
39
+    }
40
+  ],
41
+  "dependencies": {
42
+    "mime-types": "~2.1.24",
43
+    "negotiator": "0.6.2"
44
+  },
45
+  "deprecated": false,
46
+  "description": "Higher-level content negotiation",
47
+  "devDependencies": {
48
+    "deep-equal": "1.0.1",
49
+    "eslint": "5.16.0",
50
+    "eslint-config-standard": "12.0.0",
51
+    "eslint-plugin-import": "2.17.2",
52
+    "eslint-plugin-markdown": "1.0.0",
53
+    "eslint-plugin-node": "8.0.1",
54
+    "eslint-plugin-promise": "4.1.1",
55
+    "eslint-plugin-standard": "4.0.0",
56
+    "mocha": "6.1.4",
57
+    "nyc": "14.0.0"
58
+  },
59
+  "engines": {
60
+    "node": ">= 0.6"
61
+  },
62
+  "files": [
63
+    "LICENSE",
64
+    "HISTORY.md",
65
+    "index.js"
66
+  ],
67
+  "homepage": "https://github.com/jshttp/accepts#readme",
68
+  "keywords": [
69
+    "content",
70
+    "negotiation",
71
+    "accept",
72
+    "accepts"
73
+  ],
74
+  "license": "MIT",
75
+  "name": "accepts",
76
+  "repository": {
77
+    "type": "git",
78
+    "url": "git+https://github.com/jshttp/accepts.git"
79
+  },
80
+  "scripts": {
81
+    "lint": "eslint --plugin markdown --ext js,md .",
82
+    "test": "mocha --reporter spec --check-leaks --bail test/",
83
+    "test-cov": "nyc --reporter=html --reporter=text npm test",
84
+    "test-travis": "nyc --reporter=text npm test"
85
+  },
86
+  "version": "1.3.7"
87
+}

+ 8
- 0
node_modules/android-versions/.jshintignore View File

@@ -0,0 +1,8 @@
1
+.git/
2
+node_modules/
3
+coverage/
4
+build/
5
+assets/
6
+dist/
7
+docs/
8
+tests/

+ 29
- 0
node_modules/android-versions/.jshintrc View File

@@ -0,0 +1,29 @@
1
+{
2
+  "esversion": 6,
3
+  "indent":   2,
4
+  "forin":    true,
5
+  "noarg":    true,
6
+  "bitwise":  true,
7
+  "nonew":    true,
8
+  "strict":   true,
9
+
10
+  "browser":  true,
11
+  "devel":    true,
12
+  "node":     false,
13
+  "jquery":   false,
14
+  "esnext":   false,
15
+  "moz":      false,
16
+  "es3":      false,
17
+
18
+  "asi":      true,
19
+
20
+  "eqnull":   true,
21
+  "debug":    true,
22
+  "boss":     true,
23
+  "evil":     true,
24
+  "loopfunc": true,
25
+  "laxbreak": true,
26
+
27
+  "unused":   true,
28
+  "undef":    true
29
+}

+ 3
- 0
node_modules/android-versions/.travis.yml View File

@@ -0,0 +1,3 @@
1
+language: node_js
2
+node_js:
3
+  - "6.1.0"

+ 87
- 0
node_modules/android-versions/README.md View File

@@ -0,0 +1,87 @@
1
+Android Versions
2
+================
3
+
4
+A node module to get Android versions by API level, NDK level, semantic version, or version name.
5
+
6
+Versions are referenced from [source.android.com/source/build-numbers.html](https://source.android.com/source/build-numbers.html#platform-code-names-versions-api-levels-and-ndk-releases). The version for "Current Development Build" (`"CUR_DEVELOPMENT"`) is not included in the list of `VERSIONS`.
7
+
8
+[![NPM version][npm-image]][npm-url]
9
+[![build status][travis-image]][travis-url]
10
+
11
+[npm-image]: https://img.shields.io/npm/v/android-versions.svg?style=flat-square
12
+[npm-url]: https://npmjs.org/package/android-versions
13
+[travis-image]: https://img.shields.io/travis/dvoiss/android-versions.svg?style=flat-square
14
+[travis-url]: https://travis-ci.org/dvoiss/android-versions
15
+
16
+## Install
17
+
18
+```bash
19
+# NPM
20
+npm install android-versions --save
21
+# YARN
22
+yarn add android-versions
23
+```
24
+
25
+## Usage
26
+
27
+View the tests for more advanced usage.
28
+
29
+```javascript
30
+const android = require('android-versions')
31
+```
32
+
33
+#### Get by API level:
34
+```javascript
35
+console.log(android.get(23))
36
+
37
+=> { api: 23, ndk: 8, semver: "6.0", name: "Marshmallow", versionCode: "M" }
38
+```
39
+
40
+#### Get by version:
41
+
42
+```javascript
43
+console.log(android.get("2.3.3"))
44
+
45
+=> { api: 10, ndk: 5, semver: "2.3.3", name: "Gingerbread", versionCode: "GINGERBREAD_MR1" }
46
+```
47
+
48
+#### Get all by predicate:
49
+
50
+```
51
+android.getAll((version) => {
52
+  return version.ndk > 5 && version.api < 15
53
+}).map((version) => version.versionCode)
54
+
55
+=> [ "HONEYCOMB_MR1", "HONEYCOMB_MR2", "ICE_CREAM_SANDWICH" ]
56
+```
57
+
58
+#### Access a specific version with all info:
59
+
60
+```
61
+android.LOLLIPOP
62
+
63
+=> { api: 21, ndk: 8, semver: "5.0", name: "Lollipop", versionCode: "LOLLIPOP" }
64
+```
65
+
66
+#### Access the complete reference of Android versions with all info:
67
+
68
+```javascript
69
+android.VERSIONS
70
+
71
+=> {
72
+  BASE:    { api: 1,  ndk: 0, semver: "1.0", name: "(no code name)", versionCode: "BASE" },
73
+  ...
74
+  N:       { api: 24, ndk: 8, semver: "7.0", name: "Nougat",         versionCode: "N" }
75
+  ...
76
+}
77
+```
78
+
79
+## Test
80
+
81
+```bash
82
+npm run test
83
+```
84
+
85
+## License
86
+
87
+MIT

+ 162
- 0
node_modules/android-versions/index.js View File

@@ -0,0 +1,162 @@
1
+/**
2
+ * Copyright (c) 2016, David Voiss <davidvoiss@gmail.com>
3
+ *
4
+ * Permission to use, copy, modify, and/or distribute this software for any purpose
5
+ * with or without fee is hereby granted, provided that the above copyright notice
6
+ * and this permission notice appear in all copies.
7
+ *
8
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
10
+ * FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
12
+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
13
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
14
+ * THIS SOFTWARE.
15
+*/
16
+
17
+/* jshint node: true */
18
+"use strict";
19
+
20
+/**
21
+ * A module to get Android versions by API level, NDK level, semantic version, or version name.
22
+ *
23
+ * Versions are referenced from here:
24
+ * {@link https://source.android.com/source/build-numbers.html#platform-code-names-versions-api-levels-and-ndk-releases}
25
+ * {@link https://github.com/android/platform_frameworks_base/blob/master/core/java/android/os/Build.java}
26
+ *
27
+ * The version for "Current Development Build" ("CUR_DEVELOPMENT") is not included.
28
+ *
29
+ * @module android-versions
30
+ */
31
+
32
+var VERSIONS = {
33
+  BASE:                   { api: 1,     ndk: 0, semver: "1.0",               name: "(no code name)",     },
34
+  BASE_1_1:               { api: 2,     ndk: 0, semver: "1.1",               name: "(no code name)",     },
35
+  CUPCAKE:                { api: 3,     ndk: 1, semver: "1.5",               name: "Cupcake",            },
36
+  DONUT:                  { api: 4,     ndk: 2, semver: "1.6",               name: "Donut",              },
37
+  ECLAIR:                 { api: 5,     ndk: 2, semver: "2.0",               name: "Eclair",             },
38
+  ECLAIR_0_1:             { api: 6,     ndk: 2, semver: "2.0.1",             name: "Eclair",             },
39
+  ECLAIR_MR1:             { api: 7,     ndk: 3, semver: "2.1",               name: "Eclair",             },
40
+  FROYO:                  { api: 8,     ndk: 4, semver: "2.2.x",             name: "Froyo",              },
41
+  GINGERBREAD:            { api: 9,     ndk: 5, semver: "2.3.0 - 2.3.2",     name: "Gingerbread",        },
42
+  GINGERBREAD_MR1:        { api: 10,    ndk: 5, semver: "2.3.3 - 2.3.7",     name: "Gingerbread",        },
43
+  HONEYCOMB:              { api: 11,    ndk: 5, semver: "3.0",               name: "Honeycomb",          },
44
+  HONEYCOMB_MR1:          { api: 12,    ndk: 6, semver: "3.1",               name: "Honeycomb",          },
45
+  HONEYCOMB_MR2:          { api: 13,    ndk: 6, semver: "3.2.x",             name: "Honeycomb",          },
46
+  ICE_CREAM_SANDWICH:     { api: 14,    ndk: 7, semver: "4.0.1 - 4.0.2",     name: "Ice Cream Sandwich", },
47
+  ICE_CREAM_SANDWICH_MR1: { api: 15,    ndk: 8, semver: "4.0.3 - 4.0.4",     name: "Ice Cream Sandwich", },
48
+  JELLY_BEAN:             { api: 16,    ndk: 8, semver: "4.1.x",             name: "Jellybean",          },
49
+  JELLY_BEAN_MR1:         { api: 17,    ndk: 8, semver: "4.2.x",             name: "Jellybean",          },
50
+  JELLY_BEAN_MR2:         { api: 18,    ndk: 8, semver: "4.3.x",             name: "Jellybean",          },
51
+  KITKAT:                 { api: 19,    ndk: 8, semver: "4.4.0 - 4.4.4",     name: "KitKat",             },
52
+  KITKAT_WATCH:           { api: 20,    ndk: 8, semver: "4.4",               name: "KitKat Watch",       },
53
+  LOLLIPOP:               { api: 21,    ndk: 8, semver: "5.0",               name: "Lollipop",           },
54
+  LOLLIPOP_MR1:           { api: 22,    ndk: 8, semver: "5.1",               name: "Lollipop",           },
55
+  M:                      { api: 23,    ndk: 8, semver: "6.0",               name: "Marshmallow",        },
56
+  N:                      { api: 24,    ndk: 8, semver: "7.0",               name: "Nougat",             },
57
+  N_MR1:                  { api: 25,    ndk: 8, semver: "7.1",               name: "Nougat",             },
58
+  O:                      { api: 26,    ndk: 8, semver: "8.0.0",             name: "Oreo",               },
59
+  O_MR1:                  { api: 27,    ndk: 8, semver: "8.1.0",             name: "Oreo",               },
60
+  P:                      { api: 28,    ndk: 8, semver: "9",                 name: "Pie",                },
61
+  Q:                      { api: 29,    ndk: 8, semver: "10",                name: "Android10",          },
62
+  R:                      { api: 30,    ndk: 8, semver: "11",                name: "Android11",          },
63
+  S:                      { api: 31,    ndk: 8, semver: "12",                name: "Android12",          }
64
+}
65
+
66
+// Add a key to each version of Android for the "versionCode".
67
+// This is the same key we use in the VERSIONS map above.
68
+Object.keys(VERSIONS).forEach(function(version) {
69
+  VERSIONS[version].versionCode = version
70
+})
71
+
72
+var semver = require('semver');
73
+
74
+// semver format requires <major>.<minor>.<patch> but we allow just <major>.<minor> format.
75
+// Coerce <major>.<minor> to <major>.<minor>.0
76
+function formatSemver(semver) {
77
+  if (semver.match(/^\d+.\d+$/)) {
78
+    return semver + '.0'
79
+  } else {
80
+    return semver
81
+  }
82
+}
83
+
84
+// The default predicate compares against API level, semver, name, or code.
85
+function getFromDefaultPredicate(arg) {
86
+  // Coerce arg to string for comparisons below.
87
+  arg = arg.toString()
88
+
89
+  return getFromPredicate(function(version) {
90
+    // Check API level before all else.
91
+    if (arg === version.api.toString()) {
92
+      return true
93
+    }
94
+
95
+    var argSemver = formatSemver(arg)
96
+    if (semver.valid(argSemver) && semver.satisfies(argSemver, version.semver)) {
97
+      return true
98
+    }
99
+
100
+    // Compare version name and code.
101
+    return arg === version.name || arg === version.versionCode
102
+  })
103
+}
104
+
105
+// The function to allow passing a predicate.
106
+function getFromPredicate(predicate) {
107
+  if (predicate === null) {
108
+    return null
109
+  }
110
+
111
+  return Object.keys(VERSIONS).filter(function(version) {
112
+    return predicate(VERSIONS[version])
113
+  }).map(function(key) { return VERSIONS[key] })
114
+}
115
+
116
+/**
117
+ * The Android version codes available as keys for easier look-up.
118
+ */
119
+Object.keys(VERSIONS).forEach(function(name) {
120
+  exports[name] = VERSIONS[name]
121
+})
122
+
123
+/**
124
+ * The complete reference of Android versions for easier look-up.
125
+ */
126
+exports.VERSIONS = VERSIONS
127
+
128
+/**
129
+ * Retrieve a single Android version.
130
+ *
131
+ * @param {object | Function} arg - The value or predicate to use to retrieve values.
132
+ *
133
+ * @return {object} An object representing the version found or null if none found.
134
+ */
135
+exports.get = function(arg) {
136
+  var result = exports.getAll(arg)
137
+
138
+  if (result === null || result.length === 0) {
139
+    return null
140
+  }
141
+
142
+  return result[0]
143
+}
144
+
145
+/**
146
+ * Retrieve all Android versions that meet the criteria of the argument.
147
+ *
148
+ * @param {object | Function} arg - The value or predicate to use to retrieve values.
149
+ *
150
+ * @return {object} An object representing the version found or null if none found.
151
+ */
152
+exports.getAll = function(arg) {
153
+  if (arg === null) {
154
+    return null
155
+  }
156
+
157
+  if (typeof arg === "function") {
158
+    return getFromPredicate(arg)
159
+  } else {
160
+    return getFromDefaultPredicate(arg)
161
+  }
162
+}

+ 67
- 0
node_modules/android-versions/package.json View File

@@ -0,0 +1,67 @@
1
+{
2
+  "_from": "android-versions@^1.5.0",
3
+  "_id": "android-versions@1.7.0",
4
+  "_inBundle": false,
5
+  "_integrity": "sha512-TCy4b8Dk8YS6A23ZPfhSKqK66JHFq0D8avGYiwvYpjno6HrrcI0DRgHx9+jtkvWYmrsE2vQWgbHJhvGGhhOb0g==",
6
+  "_location": "/android-versions",
7
+  "_phantomChildren": {},
8
+  "_requested": {
9
+    "type": "range",
10
+    "registry": true,
11
+    "raw": "android-versions@^1.5.0",
12
+    "name": "android-versions",
13
+    "escapedName": "android-versions",
14
+    "rawSpec": "^1.5.0",
15
+    "saveSpec": null,
16
+    "fetchSpec": "^1.5.0"
17
+  },
18
+  "_requiredBy": [
19
+    "/cordova-android"
20
+  ],
21
+  "_resolved": "https://registry.npmjs.org/android-versions/-/android-versions-1.7.0.tgz",
22
+  "_shasum": "d901af361746fe6de9a6d855fbc35bcb514f54d2",
23
+  "_spec": "android-versions@^1.5.0",
24
+  "_where": "/Users/alexmanuel/MyApp/node_modules/cordova-android",
25
+  "author": {
26
+    "name": "dvoiss"
27
+  },
28
+  "bugs": {
29
+    "url": "https://github.com/dvoiss/android-versions/issues"
30
+  },
31
+  "bundleDependencies": false,
32
+  "dependencies": {
33
+    "semver": "^5.7.1"
34
+  },
35
+  "deprecated": false,
36
+  "description": "Get the name, API level, version level, NDK level, or version code from any version of Android.",
37
+  "devDependencies": {
38
+    "jshint": "^2.10.2",
39
+    "tape": "^4.11.0"
40
+  },
41
+  "homepage": "https://github.com/dvoiss/android-versions#readme",
42
+  "keywords": [
43
+    "android",
44
+    "version",
45
+    "versions",
46
+    "ndk",
47
+    "nougat",
48
+    "marshmallow",
49
+    "api",
50
+    "level"
51
+  ],
52
+  "license": "MIT",
53
+  "main": "index.js",
54
+  "name": "android-versions",
55
+  "pre-commit": [
56
+    "jshint"
57
+  ],
58
+  "repository": {
59
+    "type": "git",
60
+    "url": "git+https://github.com/dvoiss/android-versions.git"
61
+  },
62
+  "scripts": {
63
+    "jshint": "jshint .",
64
+    "test": "tape tests/**/*.js"
65
+  },
66
+  "version": "1.7.0"
67
+}

+ 122
- 0
node_modules/android-versions/tests/index.test.js View File

@@ -0,0 +1,122 @@
1
+"use strict";
2
+
3
+const test = require('tape')
4
+const android = require('..')
5
+
6
+test('get specific version by API level', (t) => {
7
+  t.plan(1)
8
+  t.equal(android.get(24).name, "Nougat")
9
+})
10
+
11
+test('getAll versions by API level', (t) => {
12
+  t.plan(1)
13
+  t.equal(android.getAll(24)[0].name, "Nougat")
14
+})
15
+
16
+test('get specific version by predicate', (t) => {
17
+  t.plan(2)
18
+
19
+  let actual = android.get((version) => {
20
+    return version.name.indexOf("on") !== -1
21
+  })
22
+  t.equal(actual.name, "Donut")
23
+
24
+  actual = android.get((version) => {
25
+    return version.ndk > 5 && version.api < 15
26
+  })
27
+  t.equal(actual.versionCode, "HONEYCOMB_MR1")
28
+})
29
+
30
+test('getAll versions by predicate', (t) => {
31
+  t.plan(3)
32
+
33
+  let actual = android.getAll((version) => {
34
+    return version.name.indexOf("on") !== -1
35
+  }).map((version) => version.name)
36
+  t.deepEqual(actual, ["Donut", "Honeycomb", "Honeycomb", "Honeycomb"])
37
+
38
+  actual = android.getAll((version) => {
39
+    return version.ndk > 5 && version.api < 15
40
+  }).map((version) => version.versionCode)
41
+  t.deepEqual(actual, ["HONEYCOMB_MR1", "HONEYCOMB_MR2", "ICE_CREAM_SANDWICH"])
42
+
43
+  actual = android.getAll((version) => {
44
+    return version.api > 22
45
+  }).map((version) => version.versionCode)
46
+  t.deepEqual(actual, ["M", "N", "N_MR1", "O", "O_MR1", "P", "Q", "R", "S"])
47
+})
48
+
49
+test('get version by semantic version', (t) => {
50
+  t.plan(4)
51
+  t.equal(android.get("6.0").versionCode, android.M.versionCode)
52
+  t.equal(android.get("6.0.0").versionCode, android.M.versionCode)
53
+  t.equal(android.get("2.3").versionCode, android.GINGERBREAD.versionCode)
54
+  t.equal(android.get("2.3.3").versionCode, android.GINGERBREAD_MR1.versionCode)
55
+})
56
+
57
+test('matches incomplete semver when given more specific version', (t) => {
58
+  t.plan(3)
59
+  t.equal(android.get("9.0").versionCode, android.P.versionCode)
60
+  t.equal(android.get("9.0.0").versionCode, android.P.versionCode)
61
+  t.equal(android.get("7.1.1").versionCode, android.N_MR1.versionCode)
62
+})
63
+
64
+test('support version ranges', (t) => {
65
+  t.plan(7)
66
+  let tests = [ "4.4", "4.4.0", "4.4.1", "4.4.2", "4.4.3", "4.4.4" ]
67
+  tests.forEach((versionCode) => {
68
+    t.equal(android.get(versionCode).versionCode, android.KITKAT.versionCode)
69
+  })
70
+  t.equal(android.get("4.4.5").versionCode, android.KITKAT_WATCH.versionCode)
71
+})
72
+
73
+test('support x-ranges', (t) => {
74
+  t.plan(12)
75
+  let tests = [
76
+    "4.1", "4.1.0", "4.1.1", "4.1.2", "4.1.3", "4.1.4",
77
+    "4.1.5", "4.1.6", "4.1.7", "4.1.8", "4.1.9", "4.1.10"
78
+  ]
79
+  tests.forEach((versionCode) => {
80
+    t.equal(android.get(versionCode).versionCode, android.JELLY_BEAN.versionCode)
81
+  })
82
+})
83
+
84
+test('access version codes object', (t) => {
85
+  t.plan(1)
86
+  t.ok(android.VERSIONS)
87
+})
88
+
89
+test('access specific versions directly', (t) => {
90
+  t.plan(31)
91
+  t.ok(android.BASE)
92
+  t.ok(android.BASE_1_1)
93
+  t.ok(android.CUPCAKE)
94
+  t.ok(android.DONUT)
95
+  t.ok(android.ECLAIR)
96
+  t.ok(android.ECLAIR_0_1)
97
+  t.ok(android.ECLAIR_MR1)
98
+  t.ok(android.FROYO)
99
+  t.ok(android.GINGERBREAD)
100
+  t.ok(android.GINGERBREAD_MR1)
101
+  t.ok(android.HONEYCOMB)
102
+  t.ok(android.HONEYCOMB_MR1)
103
+  t.ok(android.HONEYCOMB_MR2)
104
+  t.ok(android.ICE_CREAM_SANDWICH)
105
+  t.ok(android.ICE_CREAM_SANDWICH_MR1)
106
+  t.ok(android.JELLY_BEAN)
107
+  t.ok(android.JELLY_BEAN_MR1)
108
+  t.ok(android.JELLY_BEAN_MR2)
109
+  t.ok(android.KITKAT)
110
+  t.ok(android.KITKAT_WATCH)
111
+  t.ok(android.LOLLIPOP)
112
+  t.ok(android.LOLLIPOP_MR1)
113
+  t.ok(android.M)
114
+  t.ok(android.N)
115
+  t.ok(android.N_MR1)
116
+  t.ok(android.O)
117
+  t.ok(android.O_MR1)
118
+  t.ok(android.P)
119
+  t.ok(android.Q)
120
+  t.ok(android.R)
121
+  t.ok(android.S)
122
+})

+ 165
- 0
node_modules/ansi-styles/index.js View File

@@ -0,0 +1,165 @@
1
+'use strict';
2
+const colorConvert = require('color-convert');
3
+
4
+const wrapAnsi16 = (fn, offset) => function () {
5
+	const code = fn.apply(colorConvert, arguments);
6
+	return `\u001B[${code + offset}m`;
7
+};
8
+
9
+const wrapAnsi256 = (fn, offset) => function () {
10
+	const code = fn.apply(colorConvert, arguments);
11
+	return `\u001B[${38 + offset};5;${code}m`;
12
+};
13
+
14
+const wrapAnsi16m = (fn, offset) => function () {
15
+	const rgb = fn.apply(colorConvert, arguments);
16
+	return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
17
+};
18
+
19
+function assembleStyles() {
20
+	const codes = new Map();
21
+	const styles = {
22
+		modifier: {
23
+			reset: [0, 0],
24
+			// 21 isn't widely supported and 22 does the same thing
25
+			bold: [1, 22],
26
+			dim: [2, 22],
27
+			italic: [3, 23],
28
+			underline: [4, 24],
29
+			inverse: [7, 27],
30
+			hidden: [8, 28],
31
+			strikethrough: [9, 29]
32
+		},
33
+		color: {
34
+			black: [30, 39],
35
+			red: [31, 39],
36
+			green: [32, 39],
37
+			yellow: [33, 39],
38
+			blue: [34, 39],
39
+			magenta: [35, 39],
40
+			cyan: [36, 39],
41
+			white: [37, 39],
42
+			gray: [90, 39],
43
+
44
+			// Bright color
45
+			redBright: [91, 39],
46
+			greenBright: [92, 39],
47
+			yellowBright: [93, 39],
48
+			blueBright: [94, 39],
49
+			magentaBright: [95, 39],
50
+			cyanBright: [96, 39],
51
+			whiteBright: [97, 39]
52
+		},
53
+		bgColor: {
54
+			bgBlack: [40, 49],
55
+			bgRed: [41, 49],
56
+			bgGreen: [42, 49],
57
+			bgYellow: [43, 49],
58
+			bgBlue: [44, 49],
59
+			bgMagenta: [45, 49],
60
+			bgCyan: [46, 49],
61
+			bgWhite: [47, 49],
62
+
63
+			// Bright color
64
+			bgBlackBright: [100, 49],
65
+			bgRedBright: [101, 49],
66
+			bgGreenBright: [102, 49],
67
+			bgYellowBright: [103, 49],
68
+			bgBlueBright: [104, 49],
69
+			bgMagentaBright: [105, 49],
70
+			bgCyanBright: [106, 49],
71
+			bgWhiteBright: [107, 49]
72
+		}
73
+	};
74
+
75
+	// Fix humans
76
+	styles.color.grey = styles.color.gray;
77
+
78
+	for (const groupName of Object.keys(styles)) {
79
+		const group = styles[groupName];
80
+
81
+		for (const styleName of Object.keys(group)) {
82
+			const style = group[styleName];
83
+
84
+			styles[styleName] = {
85
+				open: `\u001B[${style[0]}m`,
86
+				close: `\u001B[${style[1]}m`
87
+			};
88
+
89
+			group[styleName] = styles[styleName];
90
+
91
+			codes.set(style[0], style[1]);
92
+		}
93
+
94
+		Object.defineProperty(styles, groupName, {
95
+			value: group,
96
+			enumerable: false
97
+		});
98
+
99
+		Object.defineProperty(styles, 'codes', {
100
+			value: codes,
101
+			enumerable: false
102
+		});
103
+	}
104
+
105
+	const ansi2ansi = n => n;
106
+	const rgb2rgb = (r, g, b) => [r, g, b];
107
+
108
+	styles.color.close = '\u001B[39m';
109
+	styles.bgColor.close = '\u001B[49m';
110
+
111
+	styles.color.ansi = {
112
+		ansi: wrapAnsi16(ansi2ansi, 0)
113
+	};
114
+	styles.color.ansi256 = {
115
+		ansi256: wrapAnsi256(ansi2ansi, 0)
116
+	};
117
+	styles.color.ansi16m = {
118
+		rgb: wrapAnsi16m(rgb2rgb, 0)
119
+	};
120
+
121
+	styles.bgColor.ansi = {
122
+		ansi: wrapAnsi16(ansi2ansi, 10)
123
+	};
124
+	styles.bgColor.ansi256 = {
125
+		ansi256: wrapAnsi256(ansi2ansi, 10)
126
+	};
127
+	styles.bgColor.ansi16m = {
128
+		rgb: wrapAnsi16m(rgb2rgb, 10)
129
+	};
130
+
131
+	for (let key of Object.keys(colorConvert)) {
132
+		if (typeof colorConvert[key] !== 'object') {
133
+			continue;
134
+		}
135
+
136
+		const suite = colorConvert[key];
137
+
138
+		if (key === 'ansi16') {
139
+			key = 'ansi';
140
+		}
141
+
142
+		if ('ansi16' in suite) {
143
+			styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
144
+			styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
145
+		}
146
+
147
+		if ('ansi256' in suite) {
148
+			styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
149
+			styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
150
+		}
151
+
152
+		if ('rgb' in suite) {
153
+			styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
154
+			styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
155
+		}
156
+	}
157
+
158
+	return styles;
159
+}
160
+
161
+// Make the export immutable
162
+Object.defineProperty(module, 'exports', {
163
+	enumerable: true,
164
+	get: assembleStyles
165
+});

+ 0
- 0
node_modules/ansi-styles/license View File


Some files were not shown because too many files changed in this diff