924 Commits

Author SHA1 Message Date
Sem van der Hoeven
93ac0ad866 update code for report 2023-06-13 21:53:44 +02:00
Sem van der Hoeven
953c7d6884 remove select 2023-06-13 20:41:17 +02:00
Sem van der Hoeven
f671fa0535 add land test 2023-06-13 11:17:50 +02:00
Sem van der Hoeven
30fe217df0 substring pos and vel values 2023-06-12 17:16:33 +02:00
Sem van der Hoeven
95b19be4be add sleep to back 2023-06-12 16:57:59 +02:00
Sem van der Hoeven
3d51438fa1 change values 2023-06-12 16:57:01 +02:00
Sem van der Hoeven
eece400e32 increase back time 2023-06-12 16:51:33 +02:00
Sem van der Hoeven
85188015e2 add still test 2023-06-12 16:49:15 +02:00
Sem van der Hoeven
0eef99b793 fix checking msg for back test 2023-06-12 16:47:34 +02:00
Sem van der Hoeven
e55a2cf53a add left and back tests 2023-06-12 16:46:07 +02:00
Sem van der Hoeven
b377155baa fix test number 2023-06-12 16:42:47 +02:00
Sem van der Hoeven
887d36a229 extra stop 2023-06-12 16:42:34 +02:00
Sem van der Hoeven
ac3c6860ce add right test 2023-06-12 16:40:38 +02:00
Sem van der Hoeven
f3e84d5382 check only front 2023-06-12 16:38:17 +02:00
Sem van der Hoeven
6074fb52c1 the drone should always move away from objects, not only if it's moving in that direction 2023-06-12 16:27:12 +02:00
Sem van der Hoeven
3629424089 check all directions 2023-06-12 16:13:16 +02:00
Sem van der Hoeven
6dcaaef638 add switching lidar direction 2023-06-12 16:08:36 +02:00
Sem van der Hoeven
8034702db0 change msg 2023-06-12 16:05:59 +02:00
Sem van der Hoeven
9cf5eae78f whoops 2023-06-12 15:53:55 +02:00
Sem van der Hoeven
8eea606db3 add test for back and more for front 2023-06-12 15:52:59 +02:00
Sem van der Hoeven
5b7f239f8f remove log 2023-06-12 15:44:49 +02:00
Sem van der Hoeven
62c7e67e82 change node name 2023-06-12 15:43:49 +02:00
Sem van der Hoeven
d451b78e96 extra log msg 2023-06-12 15:36:37 +02:00
Sem van der Hoeven
21683cb92c fix text 2023-06-12 15:34:03 +02:00
Sem van der Hoeven
f23e56a9a0 log 2023-06-12 15:32:38 +02:00
Sem van der Hoeven
8d2bb7446f update test text 2023-06-12 15:32:17 +02:00
Sem van der Hoeven
f56bd7f735 ; 2023-06-12 15:18:04 +02:00
Sem van der Hoeven
8cb03ec4e7 fix collision prevention 2023-06-12 15:16:09 +02:00
Sem van der Hoeven
b7cba3e2ec collision log msgs 2023-06-12 12:03:59 +02:00
Sem van der Hoeven
d0d27552cf add launch_testing 2023-06-12 12:00:22 +02:00
Sem van der Hoeven
d986b96faf add type of proc_output 2023-06-12 11:56:36 +02:00
Sem van der Hoeven
5c46b857e0 add type of proc_output 2023-06-12 11:55:26 +02:00
Sem van der Hoeven
3d18a14dcf fix 2023-06-12 11:51:11 +02:00
Sem van der Hoeven
100c19db79 add validate output? 2023-06-12 11:49:52 +02:00
Sem van der Hoeven
2155e4a8e0 move assertwaitfor statement 2023-06-12 11:43:06 +02:00
Sem van der Hoeven
1f3a2754ea move position callback 2023-06-12 11:39:45 +02:00
Sem van der Hoeven
7cee4c1543 move move away test to different file 2023-06-12 11:36:54 +02:00
Sem van der Hoeven
e706a38ea4 add test for moving away with lidar 2023-06-12 11:31:22 +02:00
Sem van der Hoeven
bcc14c9e0d make node publish on status topic 2023-06-09 19:40:38 +02:00
Sem van der Hoeven
8cc120c10f add qos profile 2023-06-09 19:37:14 +02:00
Sem van der Hoeven
2f9d45c79d status 2023-06-09 19:32:01 +02:00
Sem van der Hoeven
2aff2bcf12 logs 2023-06-09 19:30:15 +02:00
Sem van der Hoeven
f0bb159c4b add wait on nodes 2023-06-09 19:27:57 +02:00
Sem van der Hoeven
e139d111f6 add heartbeat node 2023-06-09 19:25:27 +02:00
Sem van der Hoeven
89473e4612 add qos to publisher 2023-06-09 19:24:37 +02:00
Sem van der Hoeven
87608ff637 fix logging 2023-06-09 18:28:08 +02:00
Sem van der Hoeven
da0a35f98f fix logging 2023-06-09 18:26:04 +02:00
Sem van der Hoeven
bf48ee04c3 fix typos 2023-06-09 18:23:08 +02:00
Sem van der Hoeven
473de62451 fix test name 2023-06-09 18:19:48 +02:00
Sem van der Hoeven
defd91b473 add land service 2023-06-09 18:13:02 +02:00
Sem van der Hoeven
a3fb87ead3 add API battery test 2023-06-09 17:54:16 +02:00
Sem van der Hoeven
cc78321421 add landing functionality with height meter 2023-06-08 21:44:27 +02:00
Sem van der Hoeven
4daf79cdc0 add land service 2023-06-08 21:21:12 +02:00
Sem van der Hoeven
ca2049b0db add height to drone status 2023-06-08 20:43:19 +02:00
Sem van der Hoeven
d1e2b5960e fix? 2023-06-08 19:48:51 +02:00
Sem van der Hoeven
fcf9f15fb3 fix? 2023-06-08 19:44:09 +02:00
Sem van der Hoeven
17bfcc323c fix? 2023-06-08 19:42:03 +02:00
Sem van der Hoeven
e3babad383 temp no timeout 2023-06-08 13:20:56 +02:00
Sem van der Hoeven
e31b0346bc boolean to set_timeout 2023-06-08 13:19:33 +02:00
Sem van der Hoeven
032dc1dea9 increase timeout time 2023-06-08 13:17:53 +02:00
Sem van der Hoeven
6b21465a35 timeout in status receive 2023-06-08 13:16:57 +02:00
Sem van der Hoeven
dd38be123f log type of error 2023-06-08 13:10:23 +02:00
Sem van der Hoeven
4138673893 add checking timeout 2023-06-08 13:04:09 +02:00
Sem van der Hoeven
ba0fdc7863 add timeout 2023-06-08 12:36:59 +02:00
Sem van der Hoeven
a7c22aa362 add camera error 2023-06-08 12:24:17 +02:00
Sem van der Hoeven
545119633c try 2023-06-08 12:18:56 +02:00
Sem van der Hoeven
74353bb128 try 2023-06-08 12:17:39 +02:00
Sem van der Hoeven
f50e2d0d57 add continuous checking 2023-06-08 12:15:48 +02:00
Sem van der Hoeven
b22d8228aa add log 2023-06-08 12:08:43 +02:00
Sem van der Hoeven
9826afbd49 add checking for connection 2023-06-08 11:50:35 +02:00
Sem van der Hoeven
07f2320e91 extra connection loss alert 2023-06-08 11:42:21 +02:00
Sem van der Hoeven
abbd8717a8 change turn_left_right to yaw 2023-06-08 11:18:46 +02:00
Sem van der Hoeven
6569261ab2 add label 2023-06-08 11:14:26 +02:00
Sem van der Hoeven
d246d0b5f9 add control mode select 2023-06-08 11:13:32 +02:00
Sem van der Hoeven
8a85857155 add camera timer to check if it should exit 2023-06-08 11:09:12 +02:00
Sem van der Hoeven
e48efb93e1 remove extra parse 2023-06-08 11:05:53 +02:00
Sem van der Hoeven
19787aa2ca pass message.data 2023-06-08 11:04:07 +02:00
Sem van der Hoeven
35331e3714 pass message.data 2023-06-08 11:02:59 +02:00
Sem van der Hoeven
bc55fbc757 print message 2023-06-08 11:01:59 +02:00
Sem van der Hoeven
94eae1d8a9 add log error 2023-06-08 11:00:33 +02:00
Sem van der Hoeven
9a207dabcc remove checking for strings 2023-06-08 00:09:35 +02:00
Sem van der Hoeven
328f439270 change strings 2023-06-08 00:06:09 +02:00
Sem van der Hoeven
970d093a31 add spin timeout 2023-06-08 00:01:02 +02:00
Sem van der Hoeven
5707bb74c7 try sending only 1 msg 2023-06-07 23:59:30 +02:00
Sem van der Hoeven
39929b6d58 fix other bug 2023-06-07 23:57:34 +02:00
Sem van der Hoeven
4686a90e0a fix bug 2023-06-07 23:55:34 +02:00
Sem van der Hoeven
9dbd747295 logs 2023-06-07 23:53:44 +02:00
Sem van der Hoeven
a76b99789c logs 2023-06-07 23:53:01 +02:00
Sem van der Hoeven
f63814c6f2 add sleep 2023-06-07 23:52:10 +02:00
Sem van der Hoeven
e55da2375e logs 2023-06-07 23:50:54 +02:00
Sem van der Hoeven
4a82a3d602 logs 2023-06-07 23:49:32 +02:00
Sem van der Hoeven
b3c2505c0a add heartbeat node 2023-06-07 23:43:54 +02:00
Sem van der Hoeven
7ca1452908 add heartbeat node 2023-06-07 23:42:59 +02:00
Sem van der Hoeven
4ec2c8c79b add px4controller node 2023-06-07 23:41:27 +02:00
Sem van der Hoeven
56a6c579af change yaw to angle 2023-06-07 23:40:31 +02:00
Sem van der Hoeven
7dfa1e77df function arguments 2023-06-07 23:38:42 +02:00
Sem van der Hoeven
d0b8f3dafa fix name 2023-06-07 23:36:58 +02:00
Sem van der Hoeven
a740fa7c45 add positiionchanger tests 2023-06-07 23:19:26 +02:00
Sem van der Hoeven
f846d31ac2 fix name 2023-06-07 18:39:12 +02:00
Sem van der Hoeven
0fa5751c29 typo 2023-06-07 18:38:28 +02:00
Sem van der Hoeven
e141326733 add heartbeat control mode test 2023-06-07 18:37:36 +02:00
Sem van der Hoeven
7e8da56382 fix service name 2023-06-07 18:06:16 +02:00
Sem van der Hoeven
49bb33b275 fix name 2023-06-07 18:05:03 +02:00
Sem van der Hoeven
e673846113 add camera unit test 2023-06-07 18:01:58 +02:00
Sem van der Hoeven
35ee9611e4 remove lint dependencies for testing 2023-06-07 17:36:18 +02:00
Sem van der Hoeven
47b4ed15f8 remove lint and license test dependencies 2023-06-07 17:34:15 +02:00
Sem van der Hoeven
7966bdec9e add called attitude service 2023-06-07 17:31:54 +02:00
Sem van der Hoeven
745b5bc4e9 float values 2023-06-07 17:30:03 +02:00
Sem van der Hoeven
4c61e4e1e2 add failsafe node to launchdescription 2023-06-07 17:28:37 +02:00
Sem van der Hoeven
cc9f4e7f5c show which service is waiting 2023-06-07 17:27:31 +02:00
Sem van der Hoeven
a8facbf521 launch failsafe node 2023-06-07 17:26:22 +02:00
Sem van der Hoeven
91d1762687 use launch_ros.actions node 2023-06-07 17:24:50 +02:00
Sem van der Hoeven
909504d305 typo 2023-06-07 17:21:31 +02:00
Sem van der Hoeven
ebf4264ae3 add tests for px4 failsafe 2023-06-07 17:16:20 +02:00
Sem van der Hoeven
9b05ac0fa0 add test file for px4controller 2023-06-07 16:25:58 +02:00
Sem van der Hoeven
a2ffd58069 add waiting for service call 2023-06-07 16:16:45 +02:00
Sem van der Hoeven
6f08d3ff32 remove test assert 2023-06-07 16:14:35 +02:00
Sem van der Hoeven
4bbbaa2183 add pytest 2023-06-07 16:07:58 +02:00
Sem van der Hoeven
3ab0304473 add failsafe unit test 2023-06-07 15:54:28 +02:00
Sem van der Hoeven
1535e9e480 remove br 2023-06-07 11:08:06 +02:00
Sem van der Hoeven
6f4a9cd7b2 big imgs 2023-06-07 11:07:13 +02:00
Sem van der Hoeven
355d31d97c move imgs 2023-06-07 11:06:44 +02:00
Sem van der Hoeven
8c6219965f move imgs 2023-06-07 11:06:06 +02:00
Sem van der Hoeven
c4451eede0 float right 2023-06-07 11:05:10 +02:00
Sem van der Hoeven
6550713780 br 2023-06-07 11:04:19 +02:00
Sem van der Hoeven
d6f9f15205 change img size 2023-06-07 11:03:33 +02:00
Sem van der Hoeven
d6020cf904 add images 2023-06-07 11:02:59 +02:00
Sem van der Hoeven
d3ac417f6f add close event 2023-06-07 10:56:58 +02:00
Sem van der Hoeven
3012e611cd fix websocket event listeners 2023-06-07 10:54:36 +02:00
Sem van der Hoeven
258e5cf289 ADD LOCAL CONNECT 2023-06-07 10:52:35 +02:00
Sem van der Hoeven
1c855540ef fix bat perc 2023-06-06 17:49:00 +02:00
Sem van der Hoeven
3dea3e6d5d fix bat perc 2023-06-06 17:46:27 +02:00
Sem van der Hoeven
60d2aeaa7f change qos for drone status 2023-06-06 17:30:15 +02:00
Sem van der Hoeven
d876a9ba24 add logging of publishing arm status 2023-06-06 17:24:05 +02:00
Sem van der Hoeven
ee79147c8c print drone status arm 2023-06-06 17:17:43 +02:00
Sem van der Hoeven
4998acc7d2 typo 2023-06-06 16:52:05 +02:00
Sem van der Hoeven
07e9357a1f add readydrone to cmakelists.txt 2023-06-06 16:46:02 +02:00
Sem van der Hoeven
b9270f7745 add ready drone to api listener 2023-06-06 16:42:22 +02:00
Sem van der Hoeven
41209ceab0 add setting drone ready 2023-06-06 16:38:07 +02:00
Sem van der Hoeven
231556683d Add ready drone request 2023-06-06 16:14:02 +02:00
Sem van der Hoeven
842e3e4534 add readydrone service 2023-06-06 15:58:36 +02:00
Sem van der Hoeven
e808e93cf3 try closing camera 2023-06-05 21:59:19 +02:00
Sem van der Hoeven
edde183c7b change all spin_until_complte into callbacks 2023-06-05 21:52:55 +02:00
Sem van der Hoeven
5ca202e8c0 log enabling failsafe 2023-06-05 21:46:34 +02:00
Sem van der Hoeven
902adb42f3 made failsafe enable when battery level too low 2023-06-05 21:41:14 +02:00
Sem van der Hoeven
bcd4f891d2 made camera controller destroy 2023-06-05 21:33:48 +02:00
Sem van der Hoeven
8b2dfd27e2 make camera controller exit on many errors 2023-06-05 21:23:05 +02:00
Sem van der Hoeven
096cee40be change floats to ints 2023-06-05 21:21:03 +02:00
Sem van der Hoeven
56b8f147c4 convert pos and vel data to floats 2023-06-05 21:17:23 +02:00
Sem van der Hoeven
ef0c6222ea remove spamming log 2023-06-05 21:14:14 +02:00
Sem van der Hoeven
a725c593ff try except with parsing status message 2023-06-05 21:12:08 +02:00
Sem van der Hoeven
49be78f16c logs 2023-06-05 21:03:43 +02:00
Sem van der Hoeven
0aff792254 the fuck 2023-06-05 20:58:37 +02:00
Sem van der Hoeven
b4ae183829 the fuck 2023-06-05 20:57:22 +02:00
Sem van der Hoeven
7669514ff6 change connected status to h2 2023-06-05 20:41:56 +02:00
Sem van der Hoeven
ab3a1725a3 fix checking for first lidar message 2023-06-05 20:38:11 +02:00
Sem van der Hoeven
45426bea1e only send failsafe msg once 2023-06-05 20:36:37 +02:00
Sem van der Hoeven
b7037a3e6f try fix lidar taking long to send messages 2023-06-05 17:51:09 +02:00
Sem van der Hoeven
cbf01d7875 better displaying info to user 2023-06-05 17:17:19 +02:00
Sem van der Hoeven
0548955969 fix error on error log 2023-06-05 17:14:44 +02:00
Sem van der Hoeven
a6a57b9689 connect logs 2023-06-05 17:13:10 +02:00
Sem van der Hoeven
582e65126e add longer waiting on LIDAR 2023-06-05 17:09:57 +02:00
Sem van der Hoeven
c967eea3f2 add waiting on first lidar message 2023-06-05 17:04:57 +02:00
Sem van der Hoeven
4916584e13 add showing of failsafe message in failsafe node 2023-06-05 16:57:13 +02:00
Sem van der Hoeven
561daf035c add positionchanger wait 10 seconds before checking lidar health 2023-06-05 16:50:46 +02:00
Sem van der Hoeven
d80b20e05a update status message definition 2023-06-05 16:10:23 +02:00
Sem van der Hoeven
b565832773 try resetting connection on loss 2023-06-05 16:06:19 +02:00
Sem van der Hoeven
2b36a9a383 comments 2023-06-05 15:00:18 +02:00
Sem van der Hoeven
273d979beb add remaining functionality and comments 2023-06-05 13:36:44 +02:00
Sem van der Hoeven
267e818d66 add velocity and position display 2023-06-05 12:43:01 +02:00
Sem van der Hoeven
508cbfe720 change battery info 2023-06-03 16:02:12 +02:00
Sem van der Hoeven
f4d57025a4 change width 2023-06-03 15:58:15 +02:00
Sem van der Hoeven
4684b7adb2 typo 2023-06-03 15:57:23 +02:00
Sem van der Hoeven
57f60fe44a convert canvas to img 2023-06-03 15:56:09 +02:00
Sem van der Hoeven
98efc65b86 convert canvas to img 2023-06-03 15:53:27 +02:00
Sem van der Hoeven
4ce6ff67da convert canvas to img 2023-06-03 15:52:36 +02:00
Sem van der Hoeven
402fcbab96 fix 2023-06-03 15:46:55 +02:00
Sem van der Hoeven
9a255bad12 add asyncio new loop 2023-06-03 15:45:22 +02:00
Sem van der Hoeven
ce65da2ed2 add asyncio new loop 2023-06-03 15:43:32 +02:00
Sem van der Hoeven
e0ab883144 add asyncio new loop 2023-06-03 15:42:14 +02:00
Sem van der Hoeven
f29509e16d fix asyncio 2023-06-03 15:40:19 +02:00
Sem van der Hoeven
38c9266ceb add websockets to camera controller 2023-06-03 15:38:08 +02:00
Sem van der Hoeven
2ac3f22ea7 change width 2023-06-03 15:02:00 +02:00
Sem van der Hoeven
5df44d0fb4 change width 2023-06-03 15:00:56 +02:00
Sem van der Hoeven
8db7fec055 change width 2023-06-03 14:59:29 +02:00
Sem van der Hoeven
0397c23a62 add error msg 2023-06-03 14:38:35 +02:00
Sem van der Hoeven
b2b8c2081f add error msg 2023-06-03 14:37:48 +02:00
Sem van der Hoeven
822f63aaa1 change width 2023-06-03 14:36:40 +02:00
Sem van der Hoeven
331d543300 change width 2023-06-03 14:35:40 +02:00
Sem van der Hoeven
fe086b2ef9 open socket on load 2023-06-03 14:23:15 +02:00
Sem van der Hoeven
36a262dcb5 open socket on load 2023-06-03 14:22:15 +02:00
Sem van der Hoeven
2c9b12cd8d try streaming with websockets 2023-06-03 14:19:03 +02:00
Sem van der Hoeven
8fca2086ac try streaming with websockets 2023-06-03 14:13:34 +02:00
Sem van der Hoeven
f30a51ca68 try changing resolution 2023-06-02 15:40:58 +02:00
Sem van der Hoeven
1a7efcfa23 change from asyncio to normal thread 2023-06-02 15:33:22 +02:00
Sem van der Hoeven
50eafe6720 fix overflow 2023-06-02 13:12:08 +02:00
Sem van der Hoeven
e2f4cde884 fix overflow 2023-06-02 13:10:21 +02:00
Sem van der Hoeven
ca3fdcf760 fix overflow 2023-06-02 13:09:52 +02:00
Sem van der Hoeven
49456cca65 fix overflow 2023-06-02 13:09:05 +02:00
Sem van der Hoeven
86ec261e81 fix overflow 2023-06-02 13:07:52 +02:00
Sem van der Hoeven
4182be2872 fix overflow 2023-06-02 13:07:24 +02:00
Sem van der Hoeven
140aced268 fix overflow 2023-06-02 13:06:47 +02:00
Sem van der Hoeven
0144fa9a51 fix overflow 2023-06-02 13:06:06 +02:00
Sem van der Hoeven
e4a5a3aeac fix overflow 2023-06-02 13:05:38 +02:00
Sem van der Hoeven
53ab71036f fix overflow 2023-06-02 13:04:41 +02:00
Sem van der Hoeven
1237bc4c78 take_picture 2023-06-02 13:03:47 +02:00
Sem van der Hoeven
1850a490f1 take_picture 2023-06-02 13:01:52 +02:00
Sem van der Hoeven
dd364da5be decode base64 image 2023-06-02 12:58:10 +02:00
Sem van der Hoeven
823a8ead89 log image 2023-06-02 12:57:04 +02:00
Sem van der Hoeven
c5fbefa497 convert base64 image 2023-06-02 12:55:55 +02:00
Sem van der Hoeven
7c0333a18f remove connect to video stream 2023-06-02 12:52:49 +02:00
Sem van der Hoeven
1e1b9c0e93 try with http post video 2023-06-02 12:47:11 +02:00
Sem van der Hoeven
f197f595c5 camera sleep every second 2023-06-02 12:22:31 +02:00
Sem van der Hoeven
99dbd03edf fix ws address 2023-06-02 12:14:00 +02:00
Sem van der Hoeven
8045c0c96e camera controler 2023-06-02 12:10:33 +02:00
Sem van der Hoeven
9cbd7f1be8 format cpu usage 2023-06-02 12:07:48 +02:00
Sem van der Hoeven
575950a945 format cpu usage 2023-06-02 12:06:38 +02:00
Sem van der Hoeven
79a9e2d853 display data from status 2023-06-02 12:05:29 +02:00
Sem van der Hoeven
cd653fc026 logs 2023-06-02 12:01:43 +02:00
Sem van der Hoeven
f76943b36c send messages async 2023-06-02 11:59:10 +02:00
Sem van der Hoeven
8ed216785c logging sse 2023-06-02 11:57:04 +02:00
Sem van der Hoeven
0a70283df0 log status data 2023-06-02 11:52:49 +02:00
Sem van der Hoeven
ae4d2a980d remove ensure future 2023-06-02 11:46:14 +02:00
Sem van der Hoeven
d9a4e87756 wait until websocket is active 2023-06-02 11:45:02 +02:00
Sem van der Hoeven
13e3ebc900 wait for event loop 2023-06-02 11:43:16 +02:00
Sem van der Hoeven
109827b897 fix camera coroutines not being awaited 2023-06-02 11:40:26 +02:00
Sem van der Hoeven
28b4309fbf Merge branch 'api' of github.com:SemvdH/5g_drone_ROS2 into api 2023-06-02 11:40:23 +02:00
Sem van der Hoeven
43b39f4002 fix camera coroutines not being awaited 2023-06-02 11:40:13 +02:00
Sem van der Hoeven
72123d0f10 scripts 2023-06-02 11:37:19 +02:00
Sem van der Hoeven
560d6ca866 change send video thread to use asyncio.run because webserver thread does not use asyncio 2023-06-02 11:22:28 +02:00
Sem van der Hoeven
baa0f0c35f add connecting to websocket on client side 2023-06-02 11:19:52 +02:00
Sem van der Hoeven
5031dd9aa8 add websocket to cameracontroller for video stream 2023-06-02 11:11:38 +02:00
Sem van der Hoeven
d1b51dd7f4 try 2023-05-31 22:50:50 +02:00
Sem van der Hoeven
49a6991bb2 try setting resolution 2023-05-31 22:45:01 +02:00
Sem van der Hoeven
e1c3864811 try to use same event loop 2023-05-31 22:07:42 +02:00
Sem van der Hoeven
ea5d9429d8 remove updating status through get request 2023-05-31 21:41:27 +02:00
Sem van der Hoeven
05abff6c67 publish video on same event loop as websocket 2023-05-31 21:35:55 +02:00
Sem van der Hoeven
3d5b593941 change to nodejs buffer and base64 2023-05-31 21:15:25 +02:00
Sem van der Hoeven
df8f391c9f add displaying video stream using sse 2023-05-31 21:03:40 +02:00
Sem van der Hoeven
bdcdb19d96 log 2023-05-31 20:35:42 +02:00
Sem van der Hoeven
5fdc4d6642 add log 2023-05-31 20:34:37 +02:00
Sem van der Hoeven
caa8c98afd add other code 2023-05-31 20:32:52 +02:00
Sem van der Hoeven
209828d35a move websockets to html 2023-05-31 20:30:24 +02:00
Sem van der Hoeven
2839e0cfcf attempt to log image size in bytes 2023-05-31 20:27:06 +02:00
Sem van der Hoeven
f117ead9b1 add sending video test 2023-05-31 20:05:10 +02:00
Sem van der Hoeven
1c8229ad98 comments 2023-05-30 22:33:15 +02:00
Sem van der Hoeven
7a7d0c4f01 fix sse? 2023-05-30 22:30:25 +02:00
Sem van der Hoeven
294e45b9b7 pass data through 2023-05-30 22:27:15 +02:00
Sem van der Hoeven
4163113a52 pass data through 2023-05-30 22:24:52 +02:00
Sem van der Hoeven
f115d3e60c pass data through 2023-05-30 22:22:55 +02:00
Sem van der Hoeven
6c0aa9e15f sse stuff 2023-05-30 22:20:42 +02:00
Sem van der Hoeven
e6e1b11369 add SSE for receiving failsafe status 2023-05-30 22:02:02 +02:00
Sem van der Hoeven
48e1ce8f5b try 2023-05-30 16:18:22 +02:00
Sem van der Hoeven
30c6c8499d try sending image as binary data 2023-05-30 16:09:56 +02:00
Sem van der Hoeven
c3ab03b617 remove logging image 2023-05-30 16:02:14 +02:00
Sem van der Hoeven
213d753168 try decode base64 2023-05-30 15:56:07 +02:00
Sem van der Hoeven
a58556a8a5 add base64 image 2023-05-30 15:50:38 +02:00
Sem van der Hoeven
59e9ff84f8 typo 2023-05-30 15:40:17 +02:00
Sem van der Hoeven
0cc0d16091 fix filename 2023-05-30 14:58:26 +02:00
Sem van der Hoeven
23619a9f72 add filename of result 2023-05-30 14:57:02 +02:00
Sem van der Hoeven
00f6307909 change location of camera image 2023-05-30 14:50:51 +02:00
Sem van der Hoeven
bc1bc0dae6 add callback for service response 2023-05-30 13:04:52 +02:00
Sem van der Hoeven
5843575649 more picture logging 2023-05-30 12:48:17 +02:00
Sem van der Hoeven
02875313f6 fix pciture client 2023-05-30 12:41:54 +02:00
Sem van der Hoeven
753760302e fix filename typo 2023-05-30 12:37:45 +02:00
Sem van der Hoeven
e4f06440fb fix bug 2023-05-30 12:35:43 +02:00
Sem van der Hoeven
c871da0641 try getting picture to work 2023-05-30 12:14:24 +02:00
Sem van der Hoeven
bd0d12cf67 fix camera error 2023-05-30 12:09:42 +02:00
Sem van der Hoeven
e3b2e067f6 remove onclicks 2023-05-30 11:58:23 +02:00
Sem van der Hoeven
ad2ee62ead add mousedown eventlisteners 2023-05-30 11:57:05 +02:00
Sem van der Hoeven
b2798a8c8a button mouseup 2023-05-30 11:53:56 +02:00
Sem van der Hoeven
87b951060d made api listener exit after waiting for services too long 2023-05-30 11:23:50 +02:00
Sem van der Hoeven
c8c7723ad7 fix message in failsafe 2023-05-30 11:07:03 +02:00
Sem van der Hoeven
8c8abba2b4 fix failsafe spin 2023-05-30 11:03:30 +02:00
Sem van der Hoeven
9ce69bf93e fix failsafe init 2023-05-30 11:02:25 +02:00
Sem van der Hoeven
91c02d2abe add describe service position changer is waiting for 2023-05-30 10:57:20 +02:00
Sem van der Hoeven
cb37cbc02c fix button disappearing 2023-05-30 10:52:17 +02:00
Sem van der Hoeven
62f5dfe06b button dissappears? 2023-05-30 10:50:10 +02:00
Sem van der Hoeven
02f278e61c only alert once 2023-05-30 10:48:28 +02:00
Sem van der Hoeven
c481260638 remove status log spam 2023-05-30 10:46:49 +02:00
Sem van der Hoeven
ea87fbc98c try with settimeout 2023-05-30 10:43:06 +02:00
Sem van der Hoeven
fe958e7e05 add connect function 2023-05-30 10:40:19 +02:00
Sem van der Hoeven
a6226ef99a add API error handling 2023-05-30 10:36:50 +02:00
Sem van der Hoeven
e8fc4e9275 add connect button 2023-05-30 10:34:02 +02:00
Sem van der Hoeven
338ed03004 add waiting on websockets 2023-05-30 10:29:27 +02:00
Sem van der Hoeven
3f3ee06925 add land and takeoff 2023-05-29 19:04:37 +02:00
Sem van der Hoeven
6010f903cb change to multithreaded executor 2023-05-29 18:38:52 +02:00
Sem van der Hoeven
b502c5b285 add try except for sending move request 2023-05-29 18:36:02 +02:00
Sem van der Hoeven
b5271fe5f3 remove log spam 2023-05-29 18:28:54 +02:00
Sem van der Hoeven
a3cfc5cd97 logs 2023-05-29 18:25:12 +02:00
Sem van der Hoeven
c12f016545 handle image 2023-05-29 18:19:45 +02:00
Sem van der Hoeven
6e3e3dc022 change move ints to floats 2023-05-29 15:57:29 +02:00
Sem van der Hoeven
ba31680b67 use json and body 2023-05-29 15:54:22 +02:00
Sem van der Hoeven
56d39487a6 print req before sending 2023-05-29 15:49:30 +02:00
Sem van der Hoeven
4b3eb9a8ce print query before sending 2023-05-29 15:48:50 +02:00
Sem van der Hoeven
6e0b0da412 change data to query 2023-05-29 15:45:59 +02:00
Sem van der Hoeven
c76b66e8b2 set xhr request header after opening 2023-05-29 15:43:08 +02:00
Sem van der Hoeven
bf9dc4de72 send move requests 2023-05-29 15:00:44 +02:00
Sem van der Hoeven
cdc6fecce7 check for empty result 2023-05-29 14:47:41 +02:00
Sem van der Hoeven
98a8808bed more logs 2023-05-29 14:43:14 +02:00
Sem van der Hoeven
a7e836593a sending would be useful 2023-05-29 14:40:29 +02:00
Sem van der Hoeven
084fa9dc77 change if statement for xhr result 2023-05-29 14:39:26 +02:00
Sem van der Hoeven
a0c2c8e05f updating status log 2023-05-29 14:32:02 +02:00
Sem van der Hoeven
0054ba6500 parse status request 2023-05-29 14:30:58 +02:00
Sem van der Hoeven
b69bc88b66 receive status 2023-05-29 14:27:24 +02:00
Sem van der Hoeven
8e4e42cf0a log type and data 2023-05-29 14:17:34 +02:00
Sem van der Hoeven
f98b44917c add more websocket connected checks 2023-05-29 14:14:55 +02:00
Sem van der Hoeven
73709a257f add up request 2023-05-29 14:08:06 +02:00
Sem van der Hoeven
1f4fbb2246 button callbacks 2023-05-29 13:33:16 +02:00
Sem van der Hoeven
369a4c2b75 add buttons 2023-05-29 13:19:56 +02:00
Sem van der Hoeven
d656338993 typo 2023-05-29 13:07:16 +02:00
Sem van der Hoeven
98133c8815 css? 2023-05-29 13:05:10 +02:00
Sem van der Hoeven
7c1bb248e7 typo 2023-05-29 13:01:02 +02:00
Sem van der Hoeven
340419a187 update gui 2023-05-29 12:57:23 +02:00
Sem van der Hoeven
3b97c44ed8 publish status? 2023-05-29 12:47:40 +02:00
Sem van der Hoeven
c67d4ac73a add labels 2023-05-29 12:41:57 +02:00
Sem van der Hoeven
0ac76f788a add labels 2023-05-29 12:41:12 +02:00
Sem van der Hoeven
8d021678da how to position two divs nexto to eachoter 2023-05-29 12:40:02 +02:00
Sem van der Hoeven
a539dff7ea how to position two divs nexto to eachoter 2023-05-29 12:39:16 +02:00
Sem van der Hoeven
133c2a04ab how to position two divs nexto to eachoter 2023-05-29 12:38:04 +02:00
Sem van der Hoeven
37437f9a53 border 2023-05-29 12:35:58 +02:00
Sem van der Hoeven
0c3f561c38 change heights 2023-05-29 12:35:21 +02:00
Sem van der Hoeven
a1643f9a5c video elements 2023-05-29 12:32:51 +02:00
Sem van der Hoeven
78421ccf6f update style 2023-05-29 12:29:18 +02:00
Sem van der Hoeven
4b18669bb3 update api 2023-05-29 12:25:29 +02:00
Sem van der Hoeven
34e4748737 add u16 [prefix 2023-05-29 12:07:21 +02:00
Sem van der Hoeven
bb8182baa0 add handling of velocity 2023-05-29 12:02:18 +02:00
Sem van der Hoeven
641dd746c4 change failsafe wstring (char16) to string (char) 2023-05-29 10:56:17 +02:00
Sem van der Hoeven
437ea4f536 change string in enable_failsafe to be same type of string as in failsafe message request 2023-05-29 10:48:05 +02:00
Sem van der Hoeven
d5ce727c3d add failsafe to msg interfaces 2023-05-29 10:40:03 +02:00
Sem van der Hoeven
7fc72064c1 Merge branch 'api' of github.com:SemvdH/5g_drone_ROS2 into api 2023-05-29 10:40:00 +02:00
Sem van der Hoeven
581f53735b add failsafe to msg interfaces 2023-05-29 10:39:52 +02:00
Sem van der Hoeven
38fb51709d change scripts 2023-05-29 10:16:04 +02:00
Sem van der Hoeven
fe4ab53c87 change heartbeat hz to 100 2023-05-26 23:44:49 +02:00
Sem van der Hoeven
90f3b55dc9 add failsafe landing 2023-05-26 22:05:50 +02:00
Sem van der Hoeven
aaa7bce6b7 make px4controller land after enabling failsafe 2023-05-26 21:48:12 +02:00
Sem van der Hoeven
b779dba01a add failsafe node 2023-05-26 21:38:58 +02:00
Sem van der Hoeven
e65c2ff081 merge with api 2023-05-26 21:27:20 +02:00
Sem van der Hoeven
5b4e3f737f comments 2023-05-26 21:25:42 +02:00
Sem van der Hoeven
b9077562ca Merge branch 'position_changer' of github.com:SemvdH/5g_drone_ROS2 into position_changer 2023-05-26 21:25:39 +02:00
Sem van der Hoeven
7a5782ae29 comments 2023-05-26 21:25:32 +02:00
Sem van der Hoeven
d5b4f3b401 add failsafe node 2023-05-26 21:24:57 +02:00
Sem van der Hoeven
d5816214d0 scripts 2023-05-26 21:21:22 +02:00
Sem van der Hoeven
8621d17c8e verslag stuff 2023-05-26 14:48:44 +02:00
Sem van der Hoeven
bab1c0c3bc remove start_trajectory and stuff 2023-05-25 21:31:31 +02:00
Sem van der Hoeven
f44f1ff9b0 comments 2023-05-25 21:27:54 +02:00
Sem van der Hoeven
752e1560c8 remove some logs 2023-05-25 21:08:43 +02:00
Sem van der Hoeven
741e710940 fix if statement 2023-05-25 17:18:36 +02:00
Sem van der Hoeven
b8513f6dc5 change log 2023-05-25 17:15:51 +02:00
Sem van der Hoeven
75cf679168 change log 2023-05-25 17:15:13 +02:00
Sem van der Hoeven
6db5b797b0 typo 2023-05-25 17:11:03 +02:00
Sem van der Hoeven
93c78b1db3 test? 2023-05-25 17:10:25 +02:00
Sem van der Hoeven
3e02699c9d test? 2023-05-25 17:08:30 +02:00
Sem van der Hoeven
2359b38c70 more logs 2023-05-25 17:06:43 +02:00
Sem van der Hoeven
346b337f59 handle disconnection 2023-05-25 17:04:43 +02:00
Sem van der Hoeven
ac79ba7d76 more clear sending of available commands 2023-05-25 16:59:10 +02:00
Sem van der Hoeven
3046572d4c add checking for value 2023-05-25 16:56:30 +02:00
Sem van der Hoeven
a05dd8a4b9 only send data if we received status info 2023-05-25 16:53:11 +02:00
Sem van der Hoeven
f63bbad247 error 2023-05-25 16:46:24 +02:00
Sem van der Hoeven
3532720d15 service name 2023-05-25 16:44:52 +02:00
Sem van der Hoeven
88e726dd1b remove sending all messages for testing 2023-05-25 16:42:49 +02:00
Sem van der Hoeven
fe5132d05d bigger try except and more logging 2023-05-25 16:40:25 +02:00
Sem van der Hoeven
650c9bbf6b more logging 2023-05-25 16:37:34 +02:00
Sem van der Hoeven
4fa546511d serialize name instead of enum message 2023-05-25 16:35:09 +02:00
Sem van der Hoeven
2ead06f900 add exception handling for when no json message 2023-05-25 16:31:17 +02:00
Sem van der Hoeven
0d6a1b7c19 Merge branch 'api' of github.com:SemvdH/5g_drone_ROS2 into api 2023-05-25 16:31:15 +02:00
Sem van der Hoeven
61cd779f5e add exception handling for when no json message 2023-05-25 16:31:07 +02:00
Sem van der Hoeven
32c58b74b7 add websocket client test 2023-05-25 16:25:48 +02:00
Sem van der Hoeven
3831b8a371 Merge branch 'api' of github.com:SemvdH/5g_drone_ROS2 into api 2023-05-25 16:25:46 +02:00
Sem van der Hoeven
fe8e6b7126 add websocket client test 2023-05-25 16:25:38 +02:00
Sem van der Hoeven
d15d5511da use require 2023-05-25 16:22:20 +02:00
Sem van der Hoeven
c2c2a606cf use npm websocket library 2023-05-25 16:18:55 +02:00
Sem van der Hoeven
cccd06541e use npm websocket library 2023-05-25 16:18:17 +02:00
Sem van der Hoeven
bd1bdbd0e8 connect to websocket 2023-05-25 16:13:26 +02:00
Sem van der Hoeven
ce807ef422 Merge branch 'api' of github.com:SemvdH/5g_drone_ROS2 into api 2023-05-25 16:02:52 +02:00
Sem van der Hoeven
28f8a79a9a make drone move away from object if it is too close 2023-05-25 15:52:26 +02:00
Sem van der Hoeven
b94007eabc add handling collision weights 2023-05-25 15:49:29 +02:00
Sem
b426a85ebe add bootstrap 2023-05-25 13:33:15 +00:00
Sem van der Hoeven
dc5138cb8f change px4controller add velocity to set velocity 2023-05-25 14:19:51 +02:00
Sem van der Hoeven
b5b2da909d change adding of angle to setting of angle in px4controller, the angle is already added in the positionchanger 2023-05-25 12:57:50 +02:00
Sem van der Hoeven
a491269ace log of sending message 2023-05-25 12:55:35 +02:00
Sem van der Hoeven
f356f45c26 add up down handling 2023-05-25 12:53:03 +02:00
Sem van der Hoeven
47ff135422 add converting control mode 2023-05-25 12:50:32 +02:00
Sem van der Hoeven
d59da4f5ac add checking of request angle 2023-05-25 12:42:59 +02:00
Sem van der Hoeven
f5c50f366f cast-iron stuff 2023-05-25 12:41:35 +02:00
Sem van der Hoeven
89a36829f7 cast modulo to float 2023-05-25 12:40:07 +02:00
Sem van der Hoeven
3542fd3ade modulo float 2023-05-25 12:39:26 +02:00
Sem van der Hoeven
1e0acb8e7a add log on handle request 2023-05-25 12:38:39 +02:00
Sem van der Hoeven
4532e33c7f add response 2023-05-25 12:37:27 +02:00
Sem van der Hoeven
e7dc035a83 change default control mode to velocity 2023-05-25 12:33:45 +02:00
Sem van der Hoeven
66c0591bed install target 2023-05-25 12:32:07 +02:00
Sem van der Hoeven
40d3d42323 typo 2023-05-25 12:29:22 +02:00
Sem van der Hoeven
952620c0a8 fixes 2023-05-25 12:28:08 +02:00
Sem van der Hoeven
8700014e11 add callback to trajectory message service call 2023-05-25 12:25:06 +02:00
Sem van der Hoeven
06f833bda0 remove non callback 2023-05-25 12:21:20 +02:00
Sem van der Hoeven
680b7a2792 add service callback 2023-05-25 12:20:40 +02:00
Sem van der Hoeven
6ca7597703 fix control request 2023-05-25 12:14:14 +02:00
Sem van der Hoeven
7b304866d3 fix pointer 2023-05-25 12:12:14 +02:00
Sem van der Hoeven
3d8074e823 remove this 2023-05-25 12:10:24 +02:00
Sem van der Hoeven
a48408ee0c remove lidar subscription placeholder 2023-05-25 12:07:03 +02:00
Sem van der Hoeven
73ca2a5e2d stuff 2023-05-25 12:06:06 +02:00
Sem van der Hoeven
e4d5228cd5 ; 2023-05-25 12:03:17 +02:00
Sem van der Hoeven
54a7636417 typo 2023-05-25 12:00:27 +02:00
Sem van der Hoeven
f94186c916 add position changer executable 2023-05-25 11:58:27 +02:00
Sem van der Hoeven
c0c67d65a0 remove object detection and height packages from position changer cmakelists 2023-05-25 11:56:27 +02:00
Sem van der Hoeven
dae0d06d61 update drone services msg definitions in positionchanger 2023-05-25 11:55:36 +02:00
Sem van der Hoeven
fe3917050e move height and lidar message definitions to drone_services package 2023-05-25 11:53:55 +02:00
Sem van der Hoeven
bb9fcd97ab add publish client and log incoming message 2023-05-25 11:45:30 +02:00
Sem van der Hoeven
f372d8d32d fix moveposition service floats 2023-05-25 11:28:41 +02:00
Sem
db3fde448a add API setup 2023-05-25 09:27:21 +00:00
Sem van der Hoeven
ced23113d7 typo 2023-05-25 10:40:57 +02:00
Sem van der Hoeven
9f9b0e3392 add service 2023-05-24 20:02:37 +02:00
Sem van der Hoeven
59f0ee7deb add clients for heartbeat 2023-05-24 19:14:19 +02:00
Sem van der Hoeven
cfa2a39612 clean up checking move direction 2023-05-24 17:09:57 +02:00
Sem van der Hoeven
c7f764726f add calculation of rotation x and y values 2023-05-24 17:01:45 +02:00
Sem van der Hoeven
9ea338f37f Merge branch 'api' of github.com:SemvdH/5g_drone_ROS2 into api 2023-05-24 15:40:31 +02:00
Sem van der Hoeven
62a5b276fb usbcam config file 2023-05-24 15:40:21 +02:00
Sem van der Hoeven
ea7ae0f6d1 add subscribtion to lidar topic 2023-05-24 09:00:18 +02:00
Sem van der Hoeven
e96880f68b Merge branch 'stable_flight' into position_changer 2023-05-24 08:49:21 +02:00
Sem van der Hoeven
6493a4f85d add PositionController file 2023-05-24 08:48:07 +02:00
Sem van der Hoeven
d180392666 add processing of messages via queue 2023-05-22 20:49:21 +02:00
Sem van der Hoeven
dc67324184 proper formatting 2023-05-22 17:20:54 +02:00
Sem van der Hoeven
1df4ccc3c5 change status_data to dict 2023-05-22 17:11:01 +02:00
Sem van der Hoeven
eead97f8fa json dumps 2023-05-22 17:03:33 +02:00
Sem van der Hoeven
37dc3f093e add json 2023-05-22 16:59:26 +02:00
Sem van der Hoeven
44a6dde339 add publishing every second 2023-05-22 16:52:42 +02:00
Sem van der Hoeven
55f89d9516 send drone data 2023-05-22 16:49:41 +02:00
Sem van der Hoeven
b08e801f3c add await for websocket 2023-05-22 16:48:35 +02:00
Sem van der Hoeven
adaf933664 try different approach 2023-05-22 16:47:37 +02:00
Sem van der Hoeven
81ddc95b01 try different approach 2023-05-22 16:39:54 +02:00
Sem van der Hoeven
5740e14fac try with consumer 2023-05-22 16:36:15 +02:00
Sem van der Hoeven
9f2f47aac4 add logging and sending back message 2023-05-22 16:21:45 +02:00
Sem van der Hoeven
2f5f117db8 add callback for receiving message 2023-05-22 16:18:39 +02:00
Sem van der Hoeven
1b5a2f9c3a add thread that runs asyncio daemon 2023-05-22 15:54:03 +02:00
Sem van der Hoeven
0165538cbc add daemon thread for api 2023-05-22 15:50:21 +02:00
Sem van der Hoeven
890ba3d121 add manual spin 2023-05-22 15:09:54 +02:00
Sem van der Hoeven
8d26aefe79 use asyncio event loop 2023-05-22 15:07:47 +02:00
Sem van der Hoeven
1ab95054f2 add task wrapper for api 2023-05-22 15:06:10 +02:00
Sem van der Hoeven
72d9249c69 add sending values back 2023-05-22 14:47:58 +02:00
Sem van der Hoeven
3bfb61f29d change qos 2023-05-22 14:43:53 +02:00
Sem van der Hoeven
45fed345d4 add proper qos preset 2023-05-22 14:38:59 +02:00
Sem van der Hoeven
3cea683760 add qos profile sensor data 2023-05-22 14:34:47 +02:00
Sem van der Hoeven
ff5b900fd1 change print: 2023-05-22 14:27:46 +02:00
Sem van der Hoeven
05936b733b change name of drone status node as to not clash with drone status message 2023-05-22 14:26:38 +02:00
Sem van der Hoeven
426b8c3d6f add main: 2023-05-22 14:23:47 +02:00
Sem van der Hoeven
e573c4a658 add message definitions 2023-05-22 14:17:25 +02:00
Sem van der Hoeven
0ceb7ac098 typo 2023-05-22 14:13:38 +02:00
Sem van der Hoeven
c742816827 add drone status entry point 2023-05-22 14:12:33 +02:00
Sem van der Hoeven
851c098be7 add subscribe to drone status 2023-05-22 14:09:43 +02:00
Sem van der Hoeven
d2caabc110 change interface 2023-05-22 12:46:36 +02:00
Sem van der Hoeven
703b0a20f0 change port 2023-05-22 12:40:47 +02:00
Sem van der Hoeven
f5e6e6a1b7 add self.messages 2023-05-22 12:34:55 +02:00
Sem van der Hoeven
fee116a0fe test async 2023-05-22 12:32:37 +02:00
Sem van der Hoeven
c3ea77a068 async spin with rclpy.spin_once 2023-05-22 12:26:21 +02:00
Sem van der Hoeven
4864cf339c try asyncio.async 2023-05-22 12:13:55 +02:00
Sem van der Hoeven
2ee2536007 switch to threading 2023-05-22 12:10:29 +02:00
Sem van der Hoeven
18546545a4 create asyncio task for api 2023-05-22 11:59:37 +02:00
Sem van der Hoeven
8d32db3bbd try to thread 2023-05-22 11:57:54 +02:00
Sem van der Hoeven
7f5ab30962 add api basics 2023-05-22 11:51:19 +02:00
Sem van der Hoeven
39e32fb796 create api package 2023-05-22 11:39:45 +02:00
SemvdH
d50bdef82a Merge pull request #9 from SemvdH/stable_flight
Merge pull request #8 from SemvdH/main
2023-05-22 11:38:02 +02:00
SemvdH
e6461d9622 Merge pull request #8 from SemvdH/main
fix some errors
2023-05-22 11:37:39 +02:00
SemvdH
1f83916e0f Merge branch 'stable_flight' into main 2023-05-22 11:36:25 +02:00
Sem van der Hoeven
3abaee8250 make px4_controller publish armed message 2023-05-19 17:31:18 +02:00
Sem van der Hoeven
8cbcf17b11 add drone status node 2023-05-19 17:25:52 +02:00
Sem van der Hoeven
d1b2f866e0 create drone status package 2023-05-17 14:07:50 +02:00
Sem van der Hoeven
b3b2a9fe61 change response bits 2023-05-17 11:40:48 +02:00
Sem van der Hoeven
19367da170 change service name to include drone prefix 2023-05-17 11:38:27 +02:00
Sem van der Hoeven
02b60650ba fix naming of request parameters 2023-05-17 11:37:44 +02:00
Sem van der Hoeven
8f537fbc48 fix spin function 2023-05-17 11:35:49 +02:00
Sem van der Hoeven
e16e083dd0 add service for controlling relais 2023-05-17 11:31:22 +02:00
Sem van der Hoeven
e8f7c1610a log string 2023-05-17 11:21:35 +02:00
Sem van der Hoeven
443e1b8765 typo in init function 2023-05-17 11:20:43 +02:00
Sem van der Hoeven
7935787cec create relais control node 2023-05-17 11:18:44 +02:00
Sem van der Hoeven
fdc15dbe37 create relais control package 2023-05-17 11:05:52 +02:00
Sem van der Hoeven
b3a9b4bf90 remove attitude spamming 2023-05-16 16:00:58 +02:00
Sem van der Hoeven
4062d145f9 typo 2023-05-16 15:53:42 +02:00
Sem van der Hoeven
6467007795 move up or down slower 2023-05-16 15:50:57 +02:00
Sem van der Hoeven
9b915ee698 add saving of local position 2023-05-16 15:48:58 +02:00
Sem van der Hoeven
40ea450b78 decrease values for moving up and down 2023-05-16 13:32:11 +02:00
Sem van der Hoeven
0935a1b328 set gain to 0 2023-05-15 19:10:50 +02:00
Sem van der Hoeven
4fa2387c85 assign angle to starting angle while not in user control 2023-05-15 19:07:39 +02:00
Sem van der Hoeven
4a5a8eb25e add log of des_x,y,z 2023-05-15 18:48:09 +02:00
Sem van der Hoeven
af85c1fc20 make starting polar coordinates not const 2023-05-15 18:26:15 +02:00
Sem van der Hoeven
3412fe75c1 comment 2023-05-15 18:22:24 +02:00
Sem van der Hoeven
c95191af5f change starting polar coordinates 2023-05-15 17:30:18 +02:00
Sem van der Hoeven
9c7c90653d typo 2023-05-15 17:26:58 +02:00
Sem van der Hoeven
6ae6de7b98 typo 2023-05-15 17:23:01 +02:00
Sem van der Hoeven
a38ca838fd negative height 2023-05-15 17:19:37 +02:00
Sem van der Hoeven
e7e06cf6d7 add z in calculation 2023-05-15 17:15:58 +02:00
Sem van der Hoeven
1c0e6ade6d typo 2023-05-15 17:01:40 +02:00
Sem van der Hoeven
f18b00867d add vehicle local position import 2023-05-15 17:00:42 +02:00
Sem van der Hoeven
b2254dec57 try position with polar coordinates 2023-05-15 16:57:25 +02:00
Sem van der Hoeven
06eb59901e change z velocity to negative 2023-05-15 16:07:43 +02:00
Sem van der Hoeven
9bca57a915 do not use D_SPEED for z velocity 2023-05-15 16:03:40 +02:00
Sem van der Hoeven
10ae3f3e3b set position values to nan when sending velocity setpoint 2023-05-15 15:59:16 +02:00
Sem van der Hoeven
d50758cb73 only send trajectory setpoint once 2023-05-15 11:01:25 +02:00
Sem van der Hoeven
61ee751642 better logging 2023-05-15 10:54:20 +02:00
Sem van der Hoeven
25a9aa3509 add logging of receiving correct trajectory setpoint message 2023-05-15 10:51:56 +02:00
Sem van der Hoeven
8cb032b8d7 fix trajectory setpoint control mode checking 2023-05-15 10:49:15 +02:00
Sem van der Hoeven
3d74ee2c41 add proper checking of control modes 2023-05-15 10:45:20 +02:00
Sem van der Hoeven
3ee881772c edit commands for test controller and remove spamming logs 2023-05-15 10:37:47 +02:00
Sem van der Hoeven
d1c8ca537f change flying bool to user_in_control for clarity 2023-05-15 10:33:27 +02:00
Sem van der Hoeven
33872ab999 typo 2023-05-15 10:30:00 +02:00
Sem van der Hoeven
e240058f44 change types of service 2023-05-15 10:29:17 +02:00
Sem van der Hoeven
1575afc49c add new services to cmakelists.txt 2023-05-15 10:16:23 +02:00
Sem van der Hoeven
dcd707fb34 add arm and disarm service that return boolean for status and use this in test controller 2023-05-15 10:15:31 +02:00
Sem van der Hoeven
03e9b2f20f add logs after connecting to services 2023-05-15 09:55:18 +02:00
Sem van der Hoeven
71a7c30cef arming?? 2023-05-12 17:52:20 +02:00
Sem van der Hoeven
f080d283f6 arming? 2023-05-12 17:49:45 +02:00
Sem van der Hoeven
4257b90da7 remove arming 2023-05-12 17:45:08 +02:00
Sem van der Hoeven
0c86cdcb53 test 2023-05-12 17:43:55 +02:00
Sem van der Hoeven
eb599f7641 test 2023-05-12 17:42:54 +02:00
Sem van der Hoeven
5654e44088 huh 2023-05-12 17:42:02 +02:00
Sem van der Hoeven
fa16f6e304 add arm service instead of message 2023-05-12 17:40:45 +02:00
Sem van der Hoeven
e245e143ca correct control modes 2023-05-12 17:34:36 +02:00
Sem van der Hoeven
f58fb50f26 actually send control mode 2023-05-12 17:33:02 +02:00
Sem van der Hoeven
a670aa8c1a add ability to arm 2023-05-12 17:30:00 +02:00
Sem van der Hoeven
ff9b01cc79 add changing control modes in test controller 2023-05-12 17:25:02 +02:00
Sem van der Hoeven
5b4c6c149c change back control mode 2023-05-12 16:19:27 +02:00
Sem van der Hoeven
2c4f601759 add trajectory setpoint handling 2023-05-12 16:18:39 +02:00
Sem van der Hoeven
46d32066a2 bruh 2023-05-12 15:46:22 +02:00
ubuntu
6b7481da84 fix some errors 2023-05-12 15:40:54 +02:00
Sem van der Hoeven
3b41f4f81d add test arming back after 20 setpoints 2023-05-12 15:13:08 +02:00
Sem van der Hoeven
eae3620848 remove new_setpoint bool 2023-05-12 15:06:05 +02:00
Sem van der Hoeven
3ba698cc5c log variables 2023-05-12 15:02:13 +02:00
Sem van der Hoeven
94c71e4aa0 log 2023-05-12 14:59:01 +02:00
Sem van der Hoeven
e4e9d60ead add more logs 2023-05-12 14:54:22 +02:00
Sem van der Hoeven
cdc8a9fed2 add extra log 2023-05-12 14:20:37 +02:00
Sem van der Hoeven
503d8f80a9 fix name of arm service variable 2023-05-12 14:05:38 +02:00
Sem van der Hoeven
ceb1c8222b fix include name 2023-05-12 14:03:05 +02:00
Sem van der Hoeven
77262e42e5 setting default yaw speed 2023-05-12 13:57:54 +02:00
Sem van der Hoeven
55e7af159f add sending different setpoints 2023-05-12 13:56:49 +02:00
Sem van der Hoeven
3da7ac0306 change service response to success boolean 2023-05-12 12:52:33 +02:00
Sem van der Hoeven
6bc357b6f8 add control modes h file 2023-05-12 12:42:13 +02:00
Sem van der Hoeven
10191e122b change checking of control_mode 2023-05-12 12:29:31 +02:00
Sem van der Hoeven
b20a75dc92 typo 2023-05-12 12:22:47 +02:00
Sem van der Hoeven
9faab231e7 change checking of set bit 2023-05-12 12:19:03 +02:00
Sem van der Hoeven
9785136a48 defines and logging control mode 2023-05-12 12:16:14 +02:00
Sem van der Hoeven
5424cfb3f4 add drone control mode message definition 2023-05-11 14:02:24 +02:00
Sem van der Hoeven
89a37a8f9c add print of service 2023-05-10 16:40:01 +02:00
Sem van der Hoeven
567604033b ; 2023-05-10 16:28:46 +02:00
Sem van der Hoeven
436051db5e typo 2023-05-10 16:28:01 +02:00
Sem van der Hoeven
3665d0ddd7 add bind and fix typo 2023-05-10 16:27:10 +02:00
Sem van der Hoeven
b3d170a3db add include for drone services 2023-05-10 16:25:02 +02:00
Sem van der Hoeven
8a94168414 try to build 2023-05-10 16:23:01 +02:00
Sem van der Hoeven
1d5ecf96c8 add drone services in dependencies of heartbeat target 2023-05-10 15:43:57 +02:00
Sem van der Hoeven
55ec3d7f89 merge with main 2023-05-10 15:42:15 +02:00
Sem van der Hoeven
7ad74287e4 add changing control mode of heartbeat through service 2023-05-10 15:31:37 +02:00
Sem van der Hoeven
b1dbd291a8 remove images 2023-05-10 14:45:14 +02:00
Sem van der Hoeven
678d0e5443 remove log file 2023-05-10 14:44:45 +02:00
Sem van der Hoeven
e9b80144c7 remove webcam shot 2023-05-10 14:44:28 +02:00
SemvdH
1036530ed2 Merge pull request #6 from SemvdH/camera
Camera node to take pictures is done
2023-05-10 14:43:47 +02:00
Sem van der Hoeven
35207a0c04 add vehicle control service to drone services 2023-05-10 14:42:00 +02:00
Sem van der Hoeven
b178db9c33 add seetting resolution according to variables 2023-05-10 11:36:40 +02:00
Sem van der Hoeven
d0800b90ab add images 2023-05-10 11:32:45 +02:00
Sem van der Hoeven
6880dcc8b2 fix result image path 2023-05-10 11:31:20 +02:00
Sem van der Hoeven
905360db88 remove opencv 2023-05-10 11:29:47 +02:00
Sem van der Hoeven
6c4050742b add taking picture with fswebcam 2023-05-10 11:27:38 +02:00
Sem van der Hoeven
fdab7ff112 camera img 2023-05-10 10:36:32 +02:00
Sem van der Hoeven
e739736477 camera img 2023-05-10 10:34:47 +02:00
Sem van der Hoeven
021b75dd39 bruh 2023-05-10 10:26:11 +02:00
Sem van der Hoeven
097ca3c533 fjkdashfjdal 2023-05-10 10:17:59 +02:00
Sem van der Hoeven
57662f42b4 fjkdashfjdal 2023-05-10 10:14:02 +02:00
Sem van der Hoeven
e4c0db4553 the fuck 2023-05-10 10:11:43 +02:00
Sem van der Hoeven
31f3959de4 add services 2023-05-09 12:48:18 +02:00
Sem van der Hoeven
7ff51fc904 smaller movements to be safe 2023-05-09 08:45:11 +02:00
Sem van der Hoeven
5aad5c4ce2 add small up or down to test controller 2023-05-09 08:43:56 +02:00
Sem van der Hoeven
5d07a5975f add opencv back 2023-05-08 18:14:24 +02:00
Sem van der Hoeven
1fb07c5cc3 remove opencv 2023-05-08 18:09:24 +02:00
Sem van der Hoeven
8fb2121056 add picamera 2023-05-08 18:08:41 +02:00
Sem van der Hoeven
1d80e9530c smaller resolution 2023-05-08 17:55:33 +02:00
Sem van der Hoeven
c7fac34a23 add print of resolution 2023-05-08 17:54:56 +02:00
Sem van der Hoeven
59871da656 add resize function 2023-05-08 17:53:41 +02:00
Sem van der Hoeven
4117f415c7 change setting resolution in constructor 2023-05-08 17:44:24 +02:00
Sem van der Hoeven
ecc49c0751 convert result tuple to string 2023-05-08 17:39:53 +02:00
Sem van der Hoeven
63b40d7e8f add setting resolution 2023-05-08 17:38:40 +02:00
Sem van der Hoeven
cc78c73349 add setting resolution 2023-05-08 17:35:55 +02:00
Sem van der Hoeven
475d2c20c0 add 4k capture 2023-05-08 17:30:42 +02:00
Sem van der Hoeven
228b140c95 add drone image 2023-05-08 17:21:10 +02:00
Sem van der Hoeven
3366364778 add dedicated folder 2023-05-08 17:19:42 +02:00
Sem van der Hoeven
93b09a49a9 add formatting image name 2023-05-08 17:17:58 +02:00
Sem van der Hoeven
68dd9d4a01 add image? 2023-05-08 17:14:30 +02:00
Sem van der Hoeven
ed68bf3a03 add image? 2023-05-08 17:12:53 +02:00
Sem van der Hoeven
43e8245844 remove import * 2023-05-08 17:10:54 +02:00
Sem van der Hoeven
7d82c1f33a use opencv for image taking and writing 2023-05-08 17:08:34 +02:00
Sem van der Hoeven
d9707d6157 add service to cmakelists.txt of drone_services package 2023-05-08 16:25:57 +02:00
Sem van der Hoeven
3cb0184771 fill in setup.py for camera controller 2023-05-08 16:23:29 +02:00
Sem van der Hoeven
f83520c29a add camera service 2023-05-08 16:20:37 +02:00
Sem van der Hoeven
124466c65b add camera package to src folder 2023-05-08 15:50:46 +02:00
Sem van der Hoeven
a236b0d52f add camera package 2023-05-08 15:44:55 +02:00
SemvdH
10d03949ca Merge pull request #5 from SemvdH/service
merge Service branch into main
2023-05-08 15:42:59 +02:00
Sem van der Hoeven
44b3f135a9 add comments and improve code for object_detection package 2023-05-05 16:28:27 +02:00
Sem van der Hoeven
0a1ef8af3d add comments and code to lidar node 2023-05-05 16:19:24 +02:00
Sem van der Hoeven
6a29220bc9 add comments 2023-05-05 12:57:48 +02:00
Sem van der Hoeven
07f0202d51 remove unnecessary pipe operator from height 2023-05-05 12:49:18 +02:00
Sem van der Hoeven
615190ca06 add comments to heartbeat 2023-05-05 11:52:29 +02:00
Sem van der Hoeven
b93a616f58 add emergency stop 2023-05-04 14:55:39 +02:00
Sem van der Hoeven
4f4c148b69 add printing q only if new setpoint has been received 2023-05-04 14:53:05 +02:00
Sem van der Hoeven
5bd2885ad8 add print of q_d 2023-05-04 14:49:07 +02:00
Sem van der Hoeven
3baad7c7bd set proper getting average of base_q 2023-05-04 14:43:39 +02:00
Sem van der Hoeven
e9e6e033d1 add printing of base_q 2023-05-04 14:27:30 +02:00
Sem van der Hoeven
97a72d5a4a add calculation of base_q into message setpoint 2023-05-04 14:25:29 +02:00
Sem van der Hoeven
5ab0a39ee3 change up to 0.05 2023-05-04 11:53:40 +02:00
Sem van der Hoeven
2485647c72 add checking for up or down with sshkeyboard¨v 2023-05-04 11:51:59 +02:00
Sem van der Hoeven
7133a11e92 change char to key 2023-05-04 11:49:06 +02:00
Sem van der Hoeven
96edc69227 use sshkeyboard library 2023-05-04 11:23:03 +02:00
Sem van der Hoeven
be2ef48f0e add _1 placeholder to subscription bind 2023-05-03 16:49:39 +02:00
Sem van der Hoeven
78d5221633 add base_q amount 2023-05-03 16:40:59 +02:00
Sem van der Hoeven
2b287c561d add subscription to vehicle attitude 2023-05-03 16:33:09 +02:00
Sem van der Hoeven
5f90c53128 add extra print in service receive: 2023-05-03 15:45:18 +02:00
Sem van der Hoeven
741fa5b096 change sending to floats 2023-05-03 15:38:45 +02:00
Sem van der Hoeven
c88e82d42d bug 2023-05-03 15:36:10 +02:00
Sem van der Hoeven
adac3eb022 change setting thrust and angles 2023-05-03 15:34:57 +02:00
Sem van der Hoeven
db1322e2de add incrementing/decrementing values 2023-05-03 15:21:49 +02:00
Sem van der Hoeven
2c3123039e change pitch and yaw 2023-05-03 15:08:58 +02:00
Sem van der Hoeven
72b252a970 change pitch and yaw 2023-05-03 15:01:51 +02:00
Sem van der Hoeven
bb26e74f54 change position of parameters 2023-05-03 14:58:00 +02:00
Sem van der Hoeven
a23286f282 change service to be correct 2023-05-03 14:38:22 +02:00
Sem van der Hoeven
fbef263682 remove yaw pitch and roll body 2023-05-03 14:35:44 +02:00
Sem van der Hoeven
6db6c89bd3 add increasing/decreasing yaw pitch roll instead of setting 2023-05-03 14:23:42 +02:00
Sem van der Hoeven
779a5c9987 remove prints of keys 2023-05-03 14:20:21 +02:00
Sem van der Hoeven
85b56aef7b change vk to ints 2023-05-03 14:19:28 +02:00
Sem van der Hoeven
bb426cf1dc add printing directions 2023-05-03 14:18:02 +02:00
Sem van der Hoeven
80fa83a42f remove waiting on service for testing 2023-05-03 14:12:40 +02:00
Sem van der Hoeven
4fd44cec46 add controls info 2023-05-03 14:12:09 +02:00
Sem van der Hoeven
1b48c1d4b7 change every self.logger to self.get_logger 2023-05-03 14:09:54 +02:00
Sem van der Hoeven
cfa773231e add on_release 2023-05-03 14:06:05 +02:00
Sem van der Hoeven
d23a16358b test keys 2023-05-03 14:03:11 +02:00
Sem van der Hoeven
e5ae3dedfb add package description and licence 2023-05-03 14:02:01 +02:00
Sem van der Hoeven
8a017bd7b9 add entry point 2023-05-03 13:54:34 +02:00
Sem van der Hoeven
5b779a9ae3 add keyboard listener 2023-05-03 13:49:36 +02:00
Sem van der Hoeven
0a56a1fbb9 change passing q array by reference 2023-05-03 12:30:04 +02:00
Sem van der Hoeven
66880f710d add print of q 2023-05-03 12:23:48 +02:00
Sem van der Hoeven
1ea831d1c4 add extra checks for when armed or not armed 2023-05-03 12:06:10 +02:00
Sem van der Hoeven
ade2b38a58 add extra checks for when armed or not armed 2023-05-03 12:05:03 +02:00
Sem van der Hoeven
d084827f67 add empty service 2023-05-03 11:54:41 +02:00
Sem van der Hoeven
796c74f318 add disarm service 2023-05-03 11:48:25 +02:00
Sem van der Hoeven
09b6c6110e change to use _body msg params 2023-05-02 16:39:13 +02:00
Sem van der Hoeven
0a18a68f5c change to attitude heartbeat 2023-05-02 16:24:24 +02:00
Sem van der Hoeven
b0f261848c change to attitude setpoint 2023-05-02 16:10:01 +02:00
Sem van der Hoeven
38079342ff change to attitude 2023-05-02 15:40:54 +02:00
Sem van der Hoeven
5b04a69e78 change to trajectorysetpoint 2023-05-02 14:26:27 +02:00
Sem van der Hoeven
7d2624e717 add import for velocity service 2023-05-02 14:08:24 +02:00
Sem van der Hoeven
dab4077cef change to acceleration setpoints 2023-05-02 13:55:19 +02:00
Sem van der Hoeven
a62a640c73 Merge branch 'service' of github.com:SemvdH/5g_drone_ROS2 into service 2023-05-02 13:55:13 +02:00
Sem van der Hoeven
b971c7989e change to acceleration setpoints 2023-05-02 13:55:06 +02:00
Sem van der Hoeven
9852edb8b6 add python package for testing controls 2023-05-02 13:48:52 +02:00
Sem van der Hoeven
a65c6b5894 Merge branch 'service' of github.com:SemvdH/5g_drone_ROS2 into service 2023-05-02 13:48:48 +02:00
Sem van der Hoeven
e134bb2b72 add python package for testing controls 2023-05-02 13:48:41 +02:00
Sem van der Hoeven
dd474bf8ea add more log 2023-05-02 12:11:46 +02:00
Sem van der Hoeven
2a69321147 Merge branch 'service' of github.com:SemvdH/5g_drone_ROS2 into service 2023-05-02 12:01:41 +02:00
Sem van der Hoeven
b058713903 fix bug v2 2023-05-02 12:01:36 +02:00
Sem van der Hoeven
e25abc3973 fix bug 2023-05-02 12:00:57 +02:00
Sem van der Hoeven
1e521ea890 add service control 2023-05-02 11:54:57 +02:00
Sem van der Hoeven
517240a463 change to gradually increase thrust 2023-05-02 11:43:35 +02:00
Sem van der Hoeven
ce89e730fa change to attitude setpoints 2023-05-02 11:40:15 +02:00
Sem van der Hoeven
716c80d905 add back offboard control mode publisher 2023-05-02 11:27:05 +02:00
Sem van der Hoeven
f23415f60d test 2023-05-02 11:24:06 +02:00
Sem van der Hoeven
0b5d4c2c4f change px4 controller to setvelocity service 2023-05-02 11:08:53 +02:00
Sem van der Hoeven
4249f2b589 add setAttitude service 2023-05-02 11:05:51 +02:00
Sem van der Hoeven
d149b72c24 change printout 2023-05-01 16:17:39 +02:00
Sem van der Hoeven
767c658900 add service back 2023-05-01 16:15:49 +02:00
Sem van der Hoeven
2513e56631 add include srv 2023-05-01 16:13:55 +02:00
Sem van der Hoeven
a9b91d7a49 add drone services to package.xml 2023-05-01 16:11:24 +02:00
Sem van der Hoeven
64464d06a5 remove srv from px4controller 2023-05-01 16:07:49 +02:00
Sem van der Hoeven
0f0c84cf0c add separate package for service 2023-05-01 16:06:43 +02:00
ubuntu
bb3942c301 add services package 2023-05-01 16:02:19 +02:00
Sem van der Hoeven
c219359487 test 2023-05-01 15:58:15 +02:00
Sem van der Hoeven
ea4cfb17ec test 2023-05-01 15:55:15 +02:00
Sem van der Hoeven
8efa23948d no placeholders? 2023-05-01 15:53:39 +02:00
Sem van der Hoeven
a919c5b7f7 add test 2023-05-01 15:52:38 +02:00
Sem van der Hoeven
8be8a6d1f3 bull 2023-05-01 15:51:01 +02:00
Sem van der Hoeven
a24c145968 remove attitude message codes 2023-05-01 15:48:06 +02:00
Sem van der Hoeven
baad3abae2 use pointers 2023-05-01 15:42:29 +02:00
Sem van der Hoeven
0b98dfbf02 add processing of service request 2023-05-01 15:41:51 +02:00
Sem van der Hoeven
4846ee5052 add placeholders back 2023-05-01 15:31:02 +02:00
Sem van der Hoeven
22126929a7 remove placeholders 2023-05-01 15:30:30 +02:00
Sem van der Hoeven
d74b7db6b3 add request header? 2023-05-01 15:29:57 +02:00
Sem van der Hoeven
8f7e496107 add placeholders 2023-05-01 15:28:58 +02:00
Sem van der Hoeven
de2af0cf7c try according to tutorial 2023-05-01 15:27:15 +02:00
Sem van der Hoeven
9abee2b965 add shared ptr 2023-05-01 15:18:06 +02:00
Sem van der Hoeven
f4819381a5 stupid 2023-05-01 15:16:45 +02:00
Sem van der Hoeven
1ff1218359 try something else 2023-05-01 14:50:41 +02:00
Sem van der Hoeven
1c995253bd oops 2023-05-01 14:48:08 +02:00
Sem van der Hoeven
8f807bdfa3 try setting callback with bind 2023-05-01 14:47:22 +02:00
Sem van der Hoeven
b9b8c99f20 add server function 2023-05-01 14:46:06 +02:00
Sem van der Hoeven
6129216d80 add message code hpp file 2023-05-01 14:41:28 +02:00
Sem van der Hoeven
5996ac225a add include own package 2023-05-01 14:34:07 +02:00
Sem van der Hoeven
e7582c5760 add srv include 2023-05-01 14:32:39 +02:00
Sem van der Hoeven
db2b25e60d change int to int8 2023-05-01 14:29:11 +02:00
Sem van der Hoeven
fb34e50b38 add service definition 2023-05-01 14:28:00 +02:00
ubuntu
d82b1925a4 add srv file 2023-05-01 14:17:59 +02:00
Sem van der Hoeven
3e740de48e add circling 2023-05-01 14:07:09 +02:00
Sem van der Hoeven
c7dd7a25a0 try changing yawspeed 2023-05-01 14:02:23 +02:00
Sem van der Hoeven
65cd11ca11 add changing yawspeed 2023-05-01 13:59:48 +02:00
ubuntu
eeb67733d3 create drone_controls package 2023-05-01 13:49:31 +02:00
Sem van der Hoeven
568197a95a change to use d_speed 2023-05-01 12:47:31 +02:00
Sem van der Hoeven
500356f4e9 fix bug 2023-05-01 12:45:34 +02:00
Sem van der Hoeven
7b0520c920 use pointer method get 2023-05-01 12:43:41 +02:00
Sem van der Hoeven
3f2ffd6dc7 add hover after 20 s 2023-05-01 12:43:02 +02:00
Sem van der Hoeven
04cad041b6 change value 2023-05-01 12:39:12 +02:00
Sem van der Hoeven
ac759ace13 change to not check for 30 2023-05-01 12:38:25 +02:00
Sem van der Hoeven
a739fb51c3 change value 2023-05-01 12:36:38 +02:00
Sem van der Hoeven
a9c63cc235 change value 2023-05-01 12:35:08 +02:00
Sem van der Hoeven
e0c9c2601d add launch file to cmakelists 2023-05-01 11:38:16 +02:00
Sem van der Hoeven
6348e5371f add launch file 2023-05-01 11:30:06 +02:00
ubuntu
4eb876df0c add run script 2023-05-01 11:27:38 +02:00
Sem van der Hoeven
9c3dcb463d make dat boi schmoov 2023-05-01 11:23:25 +02:00
Sem van der Hoeven
048a1b4929 change values 2023-05-01 11:18:35 +02:00
Sem van der Hoeven
346e41f475 change values 2023-05-01 11:08:39 +02:00
Sem van der Hoeven
33d173d1e0 try to hover 2023-05-01 11:07:27 +02:00
Sem van der Hoeven
088af872f9 try negative down speed 2023-05-01 11:02:50 +02:00
Sem van der Hoeven
60033323d4 change speeds 2023-05-01 11:01:24 +02:00
Sem van der Hoeven
6b33ded940 add compensation for earth gravity pull 2023-05-01 10:56:43 +02:00
Sem van der Hoeven
ae18d7834a try up velocity of 1 2023-05-01 10:55:01 +02:00
Sem van der Hoeven
4449c6cc1f change checking of ready to fly 2023-05-01 10:51:03 +02:00
Sem van der Hoeven
23a59a449c typo 2023-05-01 10:21:03 +02:00
Sem van der Hoeven
3fe7b60374 add try sending trajectory setpoints 2023-05-01 10:19:45 +02:00
Sem van der Hoeven
19d1987484 try adding hover? 2023-04-28 21:01:12 +02:00
Sem van der Hoeven
c0d327165c change formatting numbers to f in strings 2023-04-28 20:59:38 +02:00
Sem van der Hoeven
799ef4237e try adding hover? 2023-04-28 20:57:35 +02:00
Sem van der Hoeven
0c543614a9 oops 2023-04-28 20:52:38 +02:00
Sem van der Hoeven
c4e9e3bb10 remove heartbeat from px4 controller 2023-04-28 20:52:02 +02:00
Sem van der Hoeven
37b5f14f72 change throttle 2023-04-28 20:48:07 +02:00
Sem van der Hoeven
1515206e2e set throttle to negative 2023-04-28 20:46:41 +02:00
Sem van der Hoeven
52f237fcb5 add extra parameters 2023-04-28 20:45:08 +02:00
Sem van der Hoeven
a037b7f00e try diff values 2023-04-28 20:40:28 +02:00
Sem van der Hoeven
b775f8015c try diff values 2023-04-28 20:36:01 +02:00
Sem van der Hoeven
10c0b5ae5f increase thrust 2023-04-28 20:33:20 +02:00
Sem van der Hoeven
4b063ce9b2 try with increasing thrust 2023-04-28 18:36:23 +02:00
Sem van der Hoeven
f767ee2583 try different values 2023-04-28 18:29:20 +02:00
Sem van der Hoeven
1224735954 waited longer before arming 2023-04-28 18:25:22 +02:00
Sem van der Hoeven
a3b0b761e7 made px4controller also send heartbeat 2023-04-28 18:22:41 +02:00
Sem van der Hoeven
806317a04c oops v2 2023-04-28 18:07:42 +02:00
Sem van der Hoeven
b03951faab oops 2023-04-28 18:07:04 +02:00
Sem van der Hoeven
5b935af894 change attitude value 2023-04-28 18:03:43 +02:00
Sem van der Hoeven
7545a8a2a8 add disarm 2023-04-28 18:03:14 +02:00
Sem van der Hoeven
9464dbf5ac try different values 2023-04-28 17:57:32 +02:00
Sem van der Hoeven
c9f546cb0c try different values 2023-04-28 17:53:46 +02:00
Sem van der Hoeven
f883d826ec change to 100% thrust 2023-04-28 17:50:15 +02:00
Sem van der Hoeven
5a7a54fc53 change 0.5 thrust to 0.8 2023-04-28 17:44:22 +02:00
Sem van der Hoeven
7a2f19d311 add comment 2023-04-28 17:37:07 +02:00
Sem van der Hoeven
b8f572d86f fix 2023-04-28 17:31:16 +02:00
Sem van der Hoeven
c8a61cac40 change name of quaternion array 2023-04-28 17:29:35 +02:00
Sem van der Hoeven
52132684d2 test move up 2023-04-28 17:25:26 +02:00
Sem van der Hoeven
8acd7f2c73 add print of quaternion 2023-04-28 16:50:28 +02:00
Sem van der Hoeven
b4494a726d change heartbeat to attitude 2023-04-28 16:47:54 +02:00
Sem van der Hoeven
c44dcb7f89 change ptr to std::array 2023-04-28 16:40:12 +02:00
Sem van der Hoeven
29931565e2 change ptr to std::array 2023-04-28 16:40:00 +02:00
Sem van der Hoeven
abd5931461 add calculating quaternion 2023-04-28 15:53:44 +02:00
Sem van der Hoeven
7fa1cd5816 100% thrust 2023-04-28 15:19:04 +02:00
Sem van der Hoeven
1775cae443 remove timesync includes 2023-04-28 15:16:13 +02:00
Sem van der Hoeven
d24f91512f change quaternion values 2023-04-28 15:12:08 +02:00
Sem van der Hoeven
bd8cec8516 typo 2023-04-28 14:51:14 +02:00
Sem van der Hoeven
388963511a test with 0 values 2023-04-28 14:47:36 +02:00
Sem van der Hoeven
e3466a1077 change float f to .0 2023-04-28 13:39:18 +02:00
Sem van der Hoeven
0107bb3c0b change vehicle attitude setpoint to trajectory setpoint for velocity 2023-04-28 12:46:05 +02:00
Sem van der Hoeven
6bdb10dd5c change vehicle attitude setpoint to trajectory setpoint for velocity 2023-04-28 12:45:27 +02:00
Sem van der Hoeven
5496e400cf it finally works 2023-04-25 15:45:14 +00:00
Sem van der Hoeven
4ed6dde80e typo v3 2023-04-25 16:58:10 +02:00
Sem van der Hoeven
78ac1963df typo v2 2023-04-25 16:55:55 +02:00
Sem van der Hoeven
fd2ace29ce typo 2023-04-25 16:54:57 +02:00
Sem van der Hoeven
455c495685 add setting to offboard mode and arming 2023-04-25 16:53:40 +02:00
Sem van der Hoeven
4540a24d85 fix name 2023-04-25 16:46:28 +02:00
Sem van der Hoeven
a12d1836fe add filling message with test values 2023-04-25 16:45:01 +02:00
Sem van der Hoeven
43f3838979 add vehicle attitude setpoint publisher 2023-04-25 16:39:15 +02:00
Sem van der Hoeven
5b6c097bd9 update CMakeLists.txt to be similar to object detection 2023-04-25 16:34:05 +02:00
Sem van der Hoeven
b5daa4a77a add px4 controller cmakelists 2023-04-25 14:32:19 +00:00
Sem van der Hoeven
15e530067e remove send setpoints 2023-04-25 14:24:28 +00:00
Sem van der Hoeven
8b1790f763 change CMakeLists.txt of heartbeat to include packages for ros 2023-04-25 16:15:03 +02:00
Sem van der Hoeven
010559ea9b put px4_connection package in src folder 2023-04-25 13:56:48 +00:00
Sem van der Hoeven
9ace6a70b3 add heartbeat package 2023-04-25 13:52:47 +00:00
Sem van der Hoeven
5ea8d5674f finish sending offboard control and check if 5 seconds elapsed 2023-04-25 14:24:56 +02:00
Sem van der Hoeven
f53385ae0a add sending offboardcontrolmode message 2023-04-25 14:08:42 +02:00
Sem van der Hoeven
c748bc5da8 add timer and publisher 2023-04-25 11:58:21 +00:00
Sem van der Hoeven
5c4d47b590 add message includes for sending offboard control mode messages 2023-04-25 11:53:49 +00:00
Sem van der Hoeven
0d52a66d2a Merge branch 'main' into send_setpoints 2023-04-25 11:27:04 +00:00
Sem van der Hoeven
40facd933b move microxrcedds log to script_outputs 2023-04-25 11:15:32 +00:00
Sem van der Hoeven
59421316b4 add script log outputs 2023-04-25 11:15:09 +00:00
Sem van der Hoeven
078a4a1a1a tested microxrcedds 2023-04-25 11:13:18 +00:00
SemvdH
39ca39e983 Merge pull request #4 from SemvdH/heigth_sensor
merge Heigth sensor into main
2023-04-25 11:12:28 +02:00
Sem van der Hoeven
9af542d4ad everything built 2023-04-25 09:11:44 +00:00
Sem van der Hoeven
48b5016897 why 2023-04-24 15:41:11 +00:00
Sem van der Hoeven
09cda4e1d0 bruh 2023-04-24 17:20:42 +02:00
Sem van der Hoeven
8aa5e6fe35 add generators to cmake 2023-04-24 17:19:22 +02:00
Sem van der Hoeven
8fb86a5e2d add publishing of topic 2023-04-24 15:48:50 +02:00
Sem van der Hoeven
ed542e2f21 update package.xml of height package 2023-04-24 15:41:57 +02:00
Sem van der Hoeven
df18c9bba6 add height message definition 2023-04-24 15:38:16 +02:00
Sem van der Hoeven
1c1ea30dc0 created node to read basics of height sensor 2023-04-24 13:36:08 +00:00
Sem van der Hoeven
b258131480 Revert "add node with basic code to read sensor"
This reverts commit 5f98cb2f10.
2023-04-24 13:18:42 +00:00
Sem van der Hoeven
5f98cb2f10 add node with basic code to read sensor 2023-04-24 15:12:34 +02:00
Sem van der Hoeven
8cbf27cd63 add dependencies for terabee api 2023-04-24 14:52:31 +02:00
Sem van der Hoeven
85390c0d4d add height sensor files 2023-04-24 12:47:15 +00:00
Sem van der Hoeven
6da45f1240 remove unnecessary folders 2023-04-24 12:49:44 +02:00
Sem van der Hoeven
9942e65bd3 merge main into this branch 2023-04-24 12:48:30 +02:00
SemvdH
0c944ce3b6 Merge pull request #3 from SemvdH/object_detection
Finished object detection nodes
2023-04-24 12:41:12 +02:00
Sem van der Hoeven
2103260f0f oops 2023-04-24 12:31:23 +02:00
Sem van der Hoeven
1fc71c7ca7 add parameter and launch for lidar reader 2023-04-24 12:29:53 +02:00
Sem van der Hoeven
8fd8662e0d add launch file 2023-04-24 12:21:43 +02:00
Sem van der Hoeven
e8ecc7eac4 add publishing message 2023-04-24 12:10:34 +02:00
Sem van der Hoeven
fd83eb616a fix typo in include 2023-04-24 12:05:10 +02:00
Sem van der Hoeven
3110abcbf0 add message definition include 2023-04-24 12:04:12 +02:00
Sem van der Hoeven
076bb6507b add message interface for multiflex readings 2023-04-24 12:00:48 +02:00
Sem van der Hoeven
de9510c096 add example reading of multiflex data 2023-04-24 11:57:13 +02:00
Sem van der Hoeven
32d73ba229 add files for multiflex reader 2023-04-24 09:41:08 +00:00
Sem van der Hoeven
91354beb0b stuff 2023-04-24 09:18:37 +00:00
Sem van der Hoeven
a1b778b74b fix typo 2023-04-20 16:00:09 +02:00
Sem van der Hoeven
be267f2aff fix typo 2023-04-20 15:59:16 +02:00
Sem van der Hoeven
615d026eb6 fix typo 2023-04-20 15:58:01 +02:00
Sem van der Hoeven
263f1c154e comment 2023-04-20 15:56:18 +02:00
Sem van der Hoeven
68cb8effa9 add px4 includes 2023-04-20 15:54:47 +02:00
Sem van der Hoeven
a444ce3193 add setpoints package 2023-04-20 13:49:43 +00:00
Sem van der Hoeven
091fe9a4ee add putting reading values in message 2023-04-20 13:21:54 +02:00
Sem van der Hoeven
988c546f15 add i to cout of distance data 2023-04-20 12:04:26 +02:00
Sem van der Hoeven
225c9ef7ae fix typo 2023-04-20 12:02:56 +02:00
Sem van der Hoeven
16192c6c8b add imu data to message 2023-04-20 11:50:24 +02:00
Sem van der Hoeven
cedff67864 add todo 2023-04-19 17:00:06 +02:00
Sem van der Hoeven
682b18d396 add terabee log 2023-04-19 14:59:11 +00:00
Sem van der Hoeven
38a34a6de7 Merge branch 'object_detection' of github.com:SemvdH/5g_drone_ROS2 into object_detection 2023-04-19 14:56:52 +00:00
Sem van der Hoeven
1ac0bfead3 lil fix 2023-04-19 16:56:38 +02:00
Sem van der Hoeven
8712315b92 Merge branch 'object_detection' of github.com:SemvdH/5g_drone_ROS2 into object_detection 2023-04-19 14:55:31 +00:00
Sem van der Hoeven
7ae5295134 change to pointer 2023-04-19 16:55:17 +02:00
Sem van der Hoeven
bec6025654 Merge branch 'object_detection' of github.com:SemvdH/5g_drone_ROS2 into object_detection 2023-04-19 14:52:45 +00:00
Sem van der Hoeven
4d4647f348 add example code from terabee 2023-04-19 16:52:29 +02:00
Sem van der Hoeven
98668938cc Merge branch 'object_detection' of github.com:SemvdH/5g_drone_ROS2 into object_detection 2023-04-19 14:44:08 +00:00
Sem van der Hoeven
99b34fa55e custom msg 2023-04-19 14:43:51 +00:00
Sem van der Hoeven
f3e4468339 custom message bullshit doesnt fucking work 2023-04-19 16:19:20 +02:00
Sem van der Hoeven
645754e56f add include of message 2023-04-19 16:14:48 +02:00
Sem van der Hoeven
200f1f97ec add message definition 2023-04-19 16:10:27 +02:00
Sem van der Hoeven
1c3ab27707 add object detection package 2023-04-19 14:00:44 +00:00
Sem van der Hoeven
8dd6d58034 add log folder to gitignore 2023-04-19 13:59:56 +00:00
Sem van der Hoeven
fe9d3bd8b9 remove log dir from tracking 2023-04-19 13:59:25 +00:00
Sem van der Hoeven
b016c1c887 built 2023-04-19 13:19:25 +00:00
Sem van der Hoeven
6b752142f7 remove build and install directory from tracking 2023-04-19 12:18:10 +00:00
Sem van der Hoeven
3405c36e47 package builds with custom message definitions 2023-04-19 12:16:49 +00:00
Sem van der Hoeven
35e28ca6d4 add package again 2023-04-19 10:14:50 +00:00
Sem van der Hoeven
f6b74583c7 remove package not working 2023-04-19 10:04:22 +00:00
Sem van der Hoeven
c9c2add7c7 change rtls device as field 2023-04-19 11:25:25 +02:00
Sem van der Hoeven
3d00ee7182 remove drone sensors package 2023-04-19 11:16:07 +02:00
Sem van der Hoeven
0815776c2a add beacons package to cmakelists 2023-04-19 11:13:42 +02:00
Sem van der Hoeven
a7990a4079 add mavproxy install script 2023-04-18 15:37:13 +02:00
Sem van der Hoeven
4621c0c8a7 fix include? 2023-04-18 12:02:06 +02:00
Sem van der Hoeven
f42e5058da fix message include 2023-04-18 11:59:53 +02:00
Sem van der Hoeven
e2bbf8448b add tracker id to message 2023-04-18 10:45:24 +02:00
Sem van der Hoeven
b726e8a4fc add publishing of custom message 2023-04-18 10:37:23 +02:00
Sem van der Hoeven
8f41abba9f add message definitions for tracker 2023-04-18 10:06:03 +02:00
Sem van der Hoeven
dee4c1f69c change executor to multi threaded 2023-04-17 17:15:38 +02:00
Sem van der Hoeven
2f46cb7e26 launch file stuff 2023-04-17 15:14:15 +00:00
Sem van der Hoeven
6fbcc9fdf2 increase update time 2023-04-17 16:59:03 +02:00
Sem van der Hoeven
89c833623c declare parameter 2023-04-17 16:52:01 +02:00
Sem van der Hoeven
5174031c6e oops 2023-04-17 16:49:15 +02:00
Sem van der Hoeven
148071d43d add setting params based on serial port 2023-04-17 16:47:45 +02:00
Sem van der Hoeven
bf9a652c82 add launch file 2023-04-17 14:46:59 +00:00
Sem van der Hoeven
396e735173 remove newlines 2023-04-17 15:45:54 +02:00
Sem van der Hoeven
ae33b835e6 change floats to ints 2023-04-17 15:43:39 +02:00
Sem van der Hoeven
2428ad6855 use normal for i loop 2023-04-17 15:40:50 +02:00
Sem van der Hoeven
43458c3bfc add anchor data printing 2023-04-17 15:36:49 +02:00
Sem van der Hoeven
a0ff62d631 add anchor data printing 2023-04-17 15:35:40 +02:00
Sem van der Hoeven
10f006fd72 show position even when invalid 2023-04-17 15:33:04 +02:00
Sem van der Hoeven
2bb75e4a99 show position even when invalid 2023-04-17 15:31:34 +02:00
Sem van der Hoeven
b0d8be45b3 show position even when invalid 2023-04-17 15:11:13 +02:00
Sem van der Hoeven
80acfc8049 show position even when invalid 2023-04-17 15:06:27 +02:00
Sem van der Hoeven
4ec347e0c4 change position of starting reading 2023-04-17 15:04:17 +02:00
Sem van der Hoeven
55891c62c1 change network id and label 2023-04-17 14:56:09 +02:00
Sem van der Hoeven
8fea9ddabf change create location of executor 2023-04-17 13:56:05 +02:00
Sem van der Hoeven
3587185f34 change publish parameter to string message 2023-04-17 13:52:21 +02:00
Sem van der Hoeven
b88eab8f1a fix error 2023-04-17 13:50:12 +02:00
Sem van der Hoeven
afdf304e0c change std pointer to normal pointer 2023-04-17 13:47:10 +02:00
Sem van der Hoeven
b48b1c2344 change way of using rtls device 2023-04-17 13:45:02 +02:00
Sem van der Hoeven
d3630d1af4 rtls_device fix? 2023-04-17 13:23:53 +02:00
Sem van der Hoeven
4f16bef4b8 rtls_device fix? 2023-04-17 13:18:02 +02:00
Sem van der Hoeven
f935061eec rtls_device fix? 2023-04-17 13:16:47 +02:00
Sem van der Hoeven
1f9f697d5e rtls_device fix? 2023-04-17 13:15:35 +02:00
Sem van der Hoeven
d6111aaffb rtls_device fix? 2023-04-17 13:13:01 +02:00
Sem van der Hoeven
0354b2019d rtls_device fix? 2023-04-17 13:10:05 +02:00
Sem van der Hoeven
409632b28e rtls_device fix? Use same method as in example 2023-04-17 13:08:44 +02:00
Sem van der Hoeven
24886c110a rtls_device fix? 2023-04-17 13:06:40 +02:00
Sem van der Hoeven
b91178553b rtls_device fix? 2023-04-17 13:04:45 +02:00
Sem van der Hoeven
d6a6ef95bf rtls_device fix? 2023-04-17 11:37:46 +02:00
Sem van der Hoeven
f2d1334ab0 rtls_device fix? 2023-04-17 11:36:22 +02:00
Sem van der Hoeven
273d2e3ee1 rtls_device fix? 2023-04-17 11:31:37 +02:00
Sem van der Hoeven
4c2b5c17c1 add parameter for serial port 2023-04-17 11:27:23 +02:00
Sem van der Hoeven
b6f02f2146 built with v1.13 branch 2023-04-17 09:00:45 +00:00
Sem van der Hoeven
de5dc5d615 merge ros2_foxy_ubuntu2204 into beacons 2023-04-17 08:12:36 +00:00
Sem van der Hoeven
51e183a6c0 Merge branch 'beacons' of github.com:SemvdH/5g_drone_ROS2 into beacons 2023-04-17 10:06:56 +02:00
Sem van der Hoeven
67ea1693aa add gitignore with build folder 2023-04-17 10:06:24 +02:00
Sem van der Hoeven
5fc0558100 built again and added script output 2023-04-14 08:53:52 +00:00
Sem van der Hoeven
b7109c3170 built with new pi with 8gb of ram, it took less than a minute -_- 2023-04-14 08:46:48 +00:00
Sem van der Hoeven
16373457cd built beacons package 2023-04-14 08:40:17 +00:00
Sem van der Hoeven
0afc4592fc add positioning systems api 2023-04-13 17:30:47 +02:00
Sem van der Hoeven
d89b0698ec Merge branch 'beacons' of github.com:SemvdH/5g_drone_ROS2 into beacons 2023-04-13 17:28:53 +02:00
Sem van der Hoeven
2abed3f289 Add positioning driver API 2023-04-13 17:22:28 +02:00
Sem van der Hoeven
0e388f34a8 bruh 2023-04-13 15:01:01 +00:00
Sem van der Hoeven
c51905ddd4 Add terabee api 2023-04-13 14:57:24 +00:00
Sem van der Hoeven
64853a50e2 add git pull script 2023-04-13 16:36:49 +02:00
Sem van der Hoeven
65eb163bd9 remove printfs 2023-04-13 16:35:45 +02:00
Sem van der Hoeven
0391f1f3ec add more printfs 2023-04-13 16:30:42 +02:00
Sem van der Hoeven
54fc6cae86 add beacon positioning node 2023-04-13 16:24:12 +02:00
Sem van der Hoeven
49e752d6b7 add beacons positioning package 2023-04-13 14:10:35 +00:00
Sem van der Hoeven
92cf3f1f51 add package for beacons positioning 2023-04-13 14:02:41 +00:00
Sem van der Hoeven
fd4bd6f8cb tried building on ubuntu 20 and ROS 2 foxy, got out of memory error 2023-04-13 13:41:31 +00:00
Sem van der Hoeven
f194ab90ed Built overnight, failed after 2,5 hours because some errors 2023-04-13 08:07:08 +00:00
Sem van der Hoeven
e2639a8fe1 delete build dir and add submodules 2023-04-12 15:32:42 +00:00
Sem van der Hoeven
4e8e1c8177 change binary mode 2023-03-03 14:54:55 +01:00
Sem van der Hoeven
0f0324ab9d add modes and remove close of port 2023-03-03 14:52:43 +01:00
Sem van der Hoeven
126ff49a35 change string to char* 2023-03-03 14:47:11 +01:00
Sem van der Hoeven
345e796392 decrease timer delay 2023-03-03 14:45:26 +01:00
Sem van der Hoeven
e5ddab280e add printing of T value 2023-03-03 14:45:06 +01:00
Sem van der Hoeven
9e5f2363f6 extra print 2023-03-03 14:26:09 +01:00
Sem van der Hoeven
4f530da21d change T to number 2023-03-03 14:22:08 +01:00
Sem van der Hoeven
1df349b478 add reading bytes when getting a T 2023-03-03 14:19:42 +01:00
Sem van der Hoeven
24fc0c2ca5 fix error 2023-03-03 14:04:14 +01:00
Sem van der Hoeven
31503b8b70 add check start of measurement test 2023-03-03 13:59:11 +01:00
Sem van der Hoeven
a6fd08738c change test method 2023-03-03 12:55:22 +00:00
Sem van der Hoeven
b88d8beb39 add test calling method while node spinning 2023-03-03 13:37:31 +01:00
Sem van der Hoeven
4df0d69b53 Merge branch 'heigth_sensor' of github.com:SemvdH/5g_drone_ROS2 into heigth_sensor 2023-03-03 13:29:09 +01:00
Sem van der Hoeven
ed71dfb0e9 test 2023-03-03 13:28:41 +01:00
Sem van der Hoeven
353bf74930 change wait to 1 ms 2023-03-03 12:23:20 +00:00
Sem van der Hoeven
015d7d7596 reading single byte 2023-03-03 13:10:05 +01:00
Sem van der Hoeven
f0f63b1817 serial port test if it can be opened 2023-03-03 12:58:55 +01:00
Sem van der Hoeven
eaeb2dba5a add test print 2023-03-03 12:47:04 +01:00
Sem van der Hoeven
ee2d5c4d54 add gitignore 2023-03-03 11:29:59 +01:00
Sem van der Hoeven
5ce3d43841 initial commit 2023-03-03 10:15:52 +00:00
14037 changed files with 218035 additions and 2101763 deletions

4
.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
.vscode/
build/
install/
log/

27
.vscode/c_cpp_properties.json vendored Normal file
View File

@@ -0,0 +1,27 @@
{
"configurations": [
{
"browse": {
"databaseFilename": "",
"limitSymbolsToIncludedHeaders": true
},
"includePath": [
"/opt/ros/humble/include/**",
"/home/ubuntu/ros2_ws/src/beacon_positioning/include/**",
"/usr/include/**",
"/mnt/Homework/Avans/AFSTUDEERSTAGE/positioning_systems_api/rtls_driver/include/**",
"/mnt/Homework/Avans/AFSTUDEERSTAGE/positioning_systems_api/serial_communication/include/**",
"/mnt/Homework/Avans/AFSTUDEERSTAGE/terabee_api/include/**",
"/home/ubuntu/ros2_ws/build/px4_msgs/rosidl_generator_cpp/px4_msgs/msg/**",
"/home/ubuntu/ros2_ws/src/px4_connection/include/**"
],
"name": "ROS",
"intelliSenseMode": "gcc-x64",
"compilerPath": "/usr/bin/gcc",
"cStandard": "c11",
"cppStandard": "c++14",
"configurationProvider": "ms-vscode.cmake-tools"
}
],
"version": 4
}

90
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,90 @@
{
"ros.distro": "humble",
"files.associations": {
"chrono": "cpp",
"array": "cpp",
"atomic": "cpp",
"bit": "cpp",
"*.tcc": "cpp",
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"codecvt": "cpp",
"compare": "cpp",
"concepts": "cpp",
"condition_variable": "cpp",
"csignal": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"list": "cpp",
"map": "cpp",
"set": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"vector": "cpp",
"exception": "cpp",
"functional": "cpp",
"future": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"limits": "cpp",
"memory": "cpp",
"mutex": "cpp",
"new": "cpp",
"numbers": "cpp",
"numeric": "cpp",
"optional": "cpp",
"ostream": "cpp",
"ratio": "cpp",
"semaphore": "cpp",
"shared_mutex": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"stop_token": "cpp",
"streambuf": "cpp",
"string": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"thread": "cpp",
"type_traits": "cpp",
"tuple": "cpp",
"typeindex": "cpp",
"typeinfo": "cpp",
"utility": "cpp",
"variant": "cpp",
"*.srv": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"strstream": "cpp",
"bitset": "cpp",
"complex": "cpp",
"forward_list": "cpp",
"algorithm": "cpp",
"iterator": "cpp",
"memory_resource": "cpp",
"random": "cpp",
"fstream": "cpp",
"cfenv": "cpp",
"cinttypes": "cpp"
},
"python.autoComplete.extraPaths": [
"/home/ubuntu/ros2_ws/install/px4_msgs/lib/python3.8/site-packages",
"/opt/ros/humble/lib/python3.10/site-packages",
"/opt/ros/humble/local/lib/python3.10/dist-packages"
],
"python.analysis.extraPaths": [
"/home/ubuntu/ros2_ws/install/px4_msgs/lib/python3.8/site-packages",
"/opt/ros/humble/lib/python3.10/site-packages",
"/opt/ros/humble/local/lib/python3.10/dist-packages"
],
"cmake.sourceDirectory": "${workspaceFolder}/src/beacon_positioning"
}

191
api/index.js Normal file
View File

@@ -0,0 +1,191 @@
var express = require("express");
var app = express();
const WebSocket = require("ws");
//# TODO SSE https://www.digitalocean.com/community/tutorials/nodejs-server-sent-events-build-realtime-app
var last_status = {};
var last_image;
var received_picture = false;
var received_error = false;
let sse_clients = [];
app.use(express.static("public"));
app.use(express.json());
var ws;
var api_connected = false;
function send_events_to_clients(data) {
// console.log("sending events to clients");
sse_clients.forEach((client) => {
client.response.write("event: message\n");
client.response.write("data:" + JSON.stringify(data) + "\n\n");
});
}
function handle_sse_client(request, response, next) {
console.log("handling sse client");
const headers = {
"Content-Type": "text/event-stream",
Connection: "keep-alive",
"Cache-Control": "no-cache",
};
response.writeHead(200, headers);
response.write(JSON.stringify("yeet") + "\n\n");
const clientID = Date.now();
const newClient = {
id: clientID,
response,
};
sse_clients.push(newClient);
request.on("close", () => {
console.log(`${clientID} Connection closed`);
sse_clients = sse_clients.filter((client) => client.id !== clientID);
});
}
var connect_to_api = function () {
console.log("Connecting to API");
ws = new WebSocket("ws://10.100.0.40:9001/");
ws.on("open", function open() {
console.log("connected with websockets to API!");
api_connected = true;
});
ws.on("message", function message(message) {
try {
var msg = JSON.parse(message);
if (msg.type != "IMAGE") {
// console.log("got message");
send_events_to_clients(msg);
} else {
console.log("got image");
}
} catch (error) {
console.log("could not parse as json");
// send_image_data_to_clients(message);
}
});
ws.on("error", function error(err) {
console.log("there was an error");
console.error("error: " + err);
received_error = true;
});
};
function send_image_data_to_clients(videoData) {
sse_clients.forEach((client) => {
// Set the SSE event name as 'message'
client.response.write("event: message\n");
// Convert the Buffer to a base64-encoded string
const base64Data = videoData.toString("base64");
// Set the SSE event data as the base64-encoded string
client.response.write(
"data: " + JSON.stringify({ image: base64Data }) + "\n\n"
);
});
}
// Define the endpoint to receive video data
app.post("/video", (req, res) => {
// console.log("got video endpoint")
let videoData = Buffer.from("");
req.on("data", (chunk) => {
// Accumulate the received video data
videoData = Buffer.concat([videoData, chunk]);
});
req.on("end", () => {
// Process the received video data
// console.log("Received video data:" + videoData.length);
send_image_data_to_clients(videoData);
// Send a response indicating successful receipt
res.sendStatus(200);
});
});
// set the view engine to ejs
app.set("view engine", "ejs");
// use res.render to load up an ejs view file
// index page
app.get("/", function (req, res) {
res.render("index", { api_connected: api_connected });
});
app.get("/events", handle_sse_client);
app.get("/image", function (req, res) {
console.log("got picture request");
var request = JSON.stringify({
command: 5,
});
console.log("sending picture request");
ws.send(request);
res.status(200).send(last_image);
});
app.post("/move", function (req, res) {
console.log("got move request");
var request = JSON.stringify({
command: 3,
up_down: req.body.up_down,
left_right: req.body.left_right,
forward_backward: req.body.forward_backward,
yaw: req.body.turn_left_right,
});
ws.send(request);
});
app.post("/estop", function (req, res) {
console.log("got estop request");
var request = JSON.stringify({
command: 6,
});
ws.send(request);
});
app.post("/land", function (req, res) {
console.log("got land request");
var request = JSON.stringify({ command: 0 });
ws.send(request);
});
app.post("/arm_disarm", function (req, res) {
console.log("got arm/disarm request");
var request = JSON.stringify({ command: 1 });
ws.send(request);
});
app.get("/connect", function (req, res) {
console.log("got connect request");
connect_to_api();
setTimeout(function () {
if (api_connected) {
console.log("Connected to API");
res.status(200).json({ connected: true });
} else {
received_error = false;
res.status(400).json({ connected: false });
}
}, 1000);
});
app.get("/test", function (req, res) {
res.render("test");
});
app.listen(8080);
console.log("Server is listening on port 8080");

1
api/node_modules/.bin/ejs generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../ejs/bin/cli.js

1
api/node_modules/.bin/jake generated vendored Symbolic link
View File

@@ -0,0 +1 @@
../jake/bin/cli.js

1
api/node_modules/.bin/mime generated vendored Symbolic link
View File

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

243
api/node_modules/accepts/HISTORY.md generated vendored Normal file
View File

@@ -0,0 +1,243 @@
1.3.8 / 2022-02-02
==================
* deps: mime-types@~2.1.34
- deps: mime-db@~1.51.0
* deps: negotiator@0.6.3
1.3.7 / 2019-04-29
==================
* deps: negotiator@0.6.2
- Fix sorting charset, encoding, and language with extra parameters
1.3.6 / 2019-04-28
==================
* deps: mime-types@~2.1.24
- deps: mime-db@~1.40.0
1.3.5 / 2018-02-28
==================
* deps: mime-types@~2.1.18
- deps: mime-db@~1.33.0
1.3.4 / 2017-08-22
==================
* deps: mime-types@~2.1.16
- deps: mime-db@~1.29.0
1.3.3 / 2016-05-02
==================
* deps: mime-types@~2.1.11
- deps: mime-db@~1.23.0
* deps: negotiator@0.6.1
- perf: improve `Accept` parsing speed
- perf: improve `Accept-Charset` parsing speed
- perf: improve `Accept-Encoding` parsing speed
- perf: improve `Accept-Language` parsing speed
1.3.2 / 2016-03-08
==================
* deps: mime-types@~2.1.10
- Fix extension of `application/dash+xml`
- Update primary extension for `audio/mp4`
- deps: mime-db@~1.22.0
1.3.1 / 2016-01-19
==================
* deps: mime-types@~2.1.9
- deps: mime-db@~1.21.0
1.3.0 / 2015-09-29
==================
* deps: mime-types@~2.1.7
- deps: mime-db@~1.19.0
* deps: negotiator@0.6.0
- Fix including type extensions in parameters in `Accept` parsing
- Fix parsing `Accept` parameters with quoted equals
- Fix parsing `Accept` parameters with quoted semicolons
- Lazy-load modules from main entry point
- perf: delay type concatenation until needed
- perf: enable strict mode
- perf: hoist regular expressions
- perf: remove closures getting spec properties
- perf: remove a closure from media type parsing
- perf: remove property delete from media type parsing
1.2.13 / 2015-09-06
===================
* deps: mime-types@~2.1.6
- deps: mime-db@~1.18.0
1.2.12 / 2015-07-30
===================
* deps: mime-types@~2.1.4
- deps: mime-db@~1.16.0
1.2.11 / 2015-07-16
===================
* deps: mime-types@~2.1.3
- deps: mime-db@~1.15.0
1.2.10 / 2015-07-01
===================
* deps: mime-types@~2.1.2
- deps: mime-db@~1.14.0
1.2.9 / 2015-06-08
==================
* deps: mime-types@~2.1.1
- perf: fix deopt during mapping
1.2.8 / 2015-06-07
==================
* deps: mime-types@~2.1.0
- deps: mime-db@~1.13.0
* perf: avoid argument reassignment & argument slice
* perf: avoid negotiator recursive construction
* perf: enable strict mode
* perf: remove unnecessary bitwise operator
1.2.7 / 2015-05-10
==================
* deps: negotiator@0.5.3
- Fix media type parameter matching to be case-insensitive
1.2.6 / 2015-05-07
==================
* deps: mime-types@~2.0.11
- deps: mime-db@~1.9.1
* deps: negotiator@0.5.2
- Fix comparing media types with quoted values
- Fix splitting media types with quoted commas
1.2.5 / 2015-03-13
==================
* deps: mime-types@~2.0.10
- deps: mime-db@~1.8.0
1.2.4 / 2015-02-14
==================
* Support Node.js 0.6
* deps: mime-types@~2.0.9
- deps: mime-db@~1.7.0
* deps: negotiator@0.5.1
- Fix preference sorting to be stable for long acceptable lists
1.2.3 / 2015-01-31
==================
* deps: mime-types@~2.0.8
- deps: mime-db@~1.6.0
1.2.2 / 2014-12-30
==================
* deps: mime-types@~2.0.7
- deps: mime-db@~1.5.0
1.2.1 / 2014-12-30
==================
* deps: mime-types@~2.0.5
- deps: mime-db@~1.3.1
1.2.0 / 2014-12-19
==================
* deps: negotiator@0.5.0
- Fix list return order when large accepted list
- Fix missing identity encoding when q=0 exists
- Remove dynamic building of Negotiator class
1.1.4 / 2014-12-10
==================
* deps: mime-types@~2.0.4
- deps: mime-db@~1.3.0
1.1.3 / 2014-11-09
==================
* deps: mime-types@~2.0.3
- deps: mime-db@~1.2.0
1.1.2 / 2014-10-14
==================
* deps: negotiator@0.4.9
- Fix error when media type has invalid parameter
1.1.1 / 2014-09-28
==================
* deps: mime-types@~2.0.2
- deps: mime-db@~1.1.0
* deps: negotiator@0.4.8
- Fix all negotiations to be case-insensitive
- Stable sort preferences of same quality according to client order
1.1.0 / 2014-09-02
==================
* update `mime-types`
1.0.7 / 2014-07-04
==================
* Fix wrong type returned from `type` when match after unknown extension
1.0.6 / 2014-06-24
==================
* deps: negotiator@0.4.7
1.0.5 / 2014-06-20
==================
* fix crash when unknown extension given
1.0.4 / 2014-06-19
==================
* use `mime-types`
1.0.3 / 2014-06-11
==================
* deps: negotiator@0.4.6
- Order by specificity when quality is the same
1.0.2 / 2014-05-29
==================
* Fix interpretation when header not in request
* deps: pin negotiator@0.4.5
1.0.1 / 2014-01-18
==================
* Identity encoding isn't always acceptable
* deps: negotiator@~0.4.0
1.0.0 / 2013-12-27
==================
* Genesis

23
api/node_modules/accepts/LICENSE generated vendored Normal file
View File

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

140
api/node_modules/accepts/README.md generated vendored Normal file
View File

@@ -0,0 +1,140 @@
# accepts
[![NPM Version][npm-version-image]][npm-url]
[![NPM Downloads][npm-downloads-image]][npm-url]
[![Node.js Version][node-version-image]][node-version-url]
[![Build Status][github-actions-ci-image]][github-actions-ci-url]
[![Test Coverage][coveralls-image]][coveralls-url]
Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator).
Extracted from [koa](https://www.npmjs.com/package/koa) for general use.
In addition to negotiator, it allows:
- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])`
as well as `('text/html', 'application/json')`.
- Allows type shorthands such as `json`.
- Returns `false` when no types match
- Treats non-existent headers as `*`
## Installation
This is a [Node.js](https://nodejs.org/en/) module available through the
[npm registry](https://www.npmjs.com/). Installation is done using the
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
```sh
$ npm install accepts
```
## API
```js
var accepts = require('accepts')
```
### accepts(req)
Create a new `Accepts` object for the given `req`.
#### .charset(charsets)
Return the first accepted charset. If nothing in `charsets` is accepted,
then `false` is returned.
#### .charsets()
Return the charsets that the request accepts, in the order of the client's
preference (most preferred first).
#### .encoding(encodings)
Return the first accepted encoding. If nothing in `encodings` is accepted,
then `false` is returned.
#### .encodings()
Return the encodings that the request accepts, in the order of the client's
preference (most preferred first).
#### .language(languages)
Return the first accepted language. If nothing in `languages` is accepted,
then `false` is returned.
#### .languages()
Return the languages that the request accepts, in the order of the client's
preference (most preferred first).
#### .type(types)
Return the first accepted type (and it is returned as the same text as what
appears in the `types` array). If nothing in `types` is accepted, then `false`
is returned.
The `types` array can contain full MIME types or file extensions. Any value
that is not a full MIME types is passed to `require('mime-types').lookup`.
#### .types()
Return the types that the request accepts, in the order of the client's
preference (most preferred first).
## Examples
### Simple type negotiation
This simple example shows how to use `accepts` to return a different typed
respond body based on what the client wants to accept. The server lists it's
preferences in order and will get back the best match between the client and
server.
```js
var accepts = require('accepts')
var http = require('http')
function app (req, res) {
var accept = accepts(req)
// the order of this list is significant; should be server preferred order
switch (accept.type(['json', 'html'])) {
case 'json':
res.setHeader('Content-Type', 'application/json')
res.write('{"hello":"world!"}')
break
case 'html':
res.setHeader('Content-Type', 'text/html')
res.write('<b>hello, world!</b>')
break
default:
// the fallback is text/plain, so no need to specify it above
res.setHeader('Content-Type', 'text/plain')
res.write('hello, world!')
break
}
res.end()
}
http.createServer(app).listen(3000)
```
You can test this out with the cURL program:
```sh
curl -I -H'Accept: text/html' http://localhost:3000/
```
## License
[MIT](LICENSE)
[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/accepts/master
[coveralls-url]: https://coveralls.io/r/jshttp/accepts?branch=master
[github-actions-ci-image]: https://badgen.net/github/checks/jshttp/accepts/master?label=ci
[github-actions-ci-url]: https://github.com/jshttp/accepts/actions/workflows/ci.yml
[node-version-image]: https://badgen.net/npm/node/accepts
[node-version-url]: https://nodejs.org/en/download
[npm-downloads-image]: https://badgen.net/npm/dm/accepts
[npm-url]: https://npmjs.org/package/accepts
[npm-version-image]: https://badgen.net/npm/v/accepts

238
api/node_modules/accepts/index.js generated vendored Normal file
View File

@@ -0,0 +1,238 @@
/*!
* accepts
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/
'use strict'
/**
* Module dependencies.
* @private
*/
var Negotiator = require('negotiator')
var mime = require('mime-types')
/**
* Module exports.
* @public
*/
module.exports = Accepts
/**
* Create a new Accepts object for the given req.
*
* @param {object} req
* @public
*/
function Accepts (req) {
if (!(this instanceof Accepts)) {
return new Accepts(req)
}
this.headers = req.headers
this.negotiator = new Negotiator(req)
}
/**
* Check if the given `type(s)` is acceptable, returning
* the best match when true, otherwise `undefined`, in which
* case you should respond with 406 "Not Acceptable".
*
* The `type` value may be a single mime type string
* such as "application/json", the extension name
* such as "json" or an array `["json", "html", "text/plain"]`. When a list
* or array is given the _best_ match, if any is returned.
*
* Examples:
*
* // Accept: text/html
* this.types('html');
* // => "html"
*
* // Accept: text/*, application/json
* this.types('html');
* // => "html"
* this.types('text/html');
* // => "text/html"
* this.types('json', 'text');
* // => "json"
* this.types('application/json');
* // => "application/json"
*
* // Accept: text/*, application/json
* this.types('image/png');
* this.types('png');
* // => undefined
*
* // Accept: text/*;q=.5, application/json
* this.types(['html', 'json']);
* this.types('html', 'json');
* // => "json"
*
* @param {String|Array} types...
* @return {String|Array|Boolean}
* @public
*/
Accepts.prototype.type =
Accepts.prototype.types = function (types_) {
var types = types_
// support flattened arguments
if (types && !Array.isArray(types)) {
types = new Array(arguments.length)
for (var i = 0; i < types.length; i++) {
types[i] = arguments[i]
}
}
// no types, return all requested types
if (!types || types.length === 0) {
return this.negotiator.mediaTypes()
}
// no accept header, return first given type
if (!this.headers.accept) {
return types[0]
}
var mimes = types.map(extToMime)
var accepts = this.negotiator.mediaTypes(mimes.filter(validMime))
var first = accepts[0]
return first
? types[mimes.indexOf(first)]
: false
}
/**
* Return accepted encodings or best fit based on `encodings`.
*
* Given `Accept-Encoding: gzip, deflate`
* an array sorted by quality is returned:
*
* ['gzip', 'deflate']
*
* @param {String|Array} encodings...
* @return {String|Array}
* @public
*/
Accepts.prototype.encoding =
Accepts.prototype.encodings = function (encodings_) {
var encodings = encodings_
// support flattened arguments
if (encodings && !Array.isArray(encodings)) {
encodings = new Array(arguments.length)
for (var i = 0; i < encodings.length; i++) {
encodings[i] = arguments[i]
}
}
// no encodings, return all requested encodings
if (!encodings || encodings.length === 0) {
return this.negotiator.encodings()
}
return this.negotiator.encodings(encodings)[0] || false
}
/**
* Return accepted charsets or best fit based on `charsets`.
*
* Given `Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5`
* an array sorted by quality is returned:
*
* ['utf-8', 'utf-7', 'iso-8859-1']
*
* @param {String|Array} charsets...
* @return {String|Array}
* @public
*/
Accepts.prototype.charset =
Accepts.prototype.charsets = function (charsets_) {
var charsets = charsets_
// support flattened arguments
if (charsets && !Array.isArray(charsets)) {
charsets = new Array(arguments.length)
for (var i = 0; i < charsets.length; i++) {
charsets[i] = arguments[i]
}
}
// no charsets, return all requested charsets
if (!charsets || charsets.length === 0) {
return this.negotiator.charsets()
}
return this.negotiator.charsets(charsets)[0] || false
}
/**
* Return accepted languages or best fit based on `langs`.
*
* Given `Accept-Language: en;q=0.8, es, pt`
* an array sorted by quality is returned:
*
* ['es', 'pt', 'en']
*
* @param {String|Array} langs...
* @return {Array|String}
* @public
*/
Accepts.prototype.lang =
Accepts.prototype.langs =
Accepts.prototype.language =
Accepts.prototype.languages = function (languages_) {
var languages = languages_
// support flattened arguments
if (languages && !Array.isArray(languages)) {
languages = new Array(arguments.length)
for (var i = 0; i < languages.length; i++) {
languages[i] = arguments[i]
}
}
// no languages, return all requested languages
if (!languages || languages.length === 0) {
return this.negotiator.languages()
}
return this.negotiator.languages(languages)[0] || false
}
/**
* Convert extnames to mime.
*
* @param {String} type
* @return {String}
* @private
*/
function extToMime (type) {
return type.indexOf('/') === -1
? mime.lookup(type)
: type
}
/**
* Check if mime is valid.
*
* @param {String} type
* @return {String}
* @private
*/
function validMime (type) {
return typeof type === 'string'
}

86
api/node_modules/accepts/package.json generated vendored Normal file
View File

@@ -0,0 +1,86 @@
{
"_from": "accepts@~1.3.8",
"_id": "accepts@1.3.8",
"_inBundle": false,
"_integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
"_location": "/accepts",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "accepts@~1.3.8",
"name": "accepts",
"escapedName": "accepts",
"rawSpec": "~1.3.8",
"saveSpec": null,
"fetchSpec": "~1.3.8"
},
"_requiredBy": [
"/express"
],
"_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
"_shasum": "0bf0be125b67014adcb0b0921e62db7bffe16b2e",
"_spec": "accepts@~1.3.8",
"_where": "/home/hub/5g_drone_ROS2/api/node_modules/express",
"bugs": {
"url": "https://github.com/jshttp/accepts/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Douglas Christopher Wilson",
"email": "doug@somethingdoug.com"
},
{
"name": "Jonathan Ong",
"email": "me@jongleberry.com",
"url": "http://jongleberry.com"
}
],
"dependencies": {
"mime-types": "~2.1.34",
"negotiator": "0.6.3"
},
"deprecated": false,
"description": "Higher-level content negotiation",
"devDependencies": {
"deep-equal": "1.0.1",
"eslint": "7.32.0",
"eslint-config-standard": "14.1.1",
"eslint-plugin-import": "2.25.4",
"eslint-plugin-markdown": "2.2.1",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "4.3.1",
"eslint-plugin-standard": "4.1.0",
"mocha": "9.2.0",
"nyc": "15.1.0"
},
"engines": {
"node": ">= 0.6"
},
"files": [
"LICENSE",
"HISTORY.md",
"index.js"
],
"homepage": "https://github.com/jshttp/accepts#readme",
"keywords": [
"content",
"negotiation",
"accept",
"accepts"
],
"license": "MIT",
"name": "accepts",
"repository": {
"type": "git",
"url": "git+https://github.com/jshttp/accepts.git"
},
"scripts": {
"lint": "eslint .",
"test": "mocha --reporter spec --check-leaks --bail test/",
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
"test-cov": "nyc --reporter=html --reporter=text npm test"
},
"version": "1.3.8"
}

345
api/node_modules/ansi-styles/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,345 @@
declare type CSSColor =
| 'aliceblue'
| 'antiquewhite'
| 'aqua'
| 'aquamarine'
| 'azure'
| 'beige'
| 'bisque'
| 'black'
| 'blanchedalmond'
| 'blue'
| 'blueviolet'
| 'brown'
| 'burlywood'
| 'cadetblue'
| 'chartreuse'
| 'chocolate'
| 'coral'
| 'cornflowerblue'
| 'cornsilk'
| 'crimson'
| 'cyan'
| 'darkblue'
| 'darkcyan'
| 'darkgoldenrod'
| 'darkgray'
| 'darkgreen'
| 'darkgrey'
| 'darkkhaki'
| 'darkmagenta'
| 'darkolivegreen'
| 'darkorange'
| 'darkorchid'
| 'darkred'
| 'darksalmon'
| 'darkseagreen'
| 'darkslateblue'
| 'darkslategray'
| 'darkslategrey'
| 'darkturquoise'
| 'darkviolet'
| 'deeppink'
| 'deepskyblue'
| 'dimgray'
| 'dimgrey'
| 'dodgerblue'
| 'firebrick'
| 'floralwhite'
| 'forestgreen'
| 'fuchsia'
| 'gainsboro'
| 'ghostwhite'
| 'gold'
| 'goldenrod'
| 'gray'
| 'green'
| 'greenyellow'
| 'grey'
| 'honeydew'
| 'hotpink'
| 'indianred'
| 'indigo'
| 'ivory'
| 'khaki'
| 'lavender'
| 'lavenderblush'
| 'lawngreen'
| 'lemonchiffon'
| 'lightblue'
| 'lightcoral'
| 'lightcyan'
| 'lightgoldenrodyellow'
| 'lightgray'
| 'lightgreen'
| 'lightgrey'
| 'lightpink'
| 'lightsalmon'
| 'lightseagreen'
| 'lightskyblue'
| 'lightslategray'
| 'lightslategrey'
| 'lightsteelblue'
| 'lightyellow'
| 'lime'
| 'limegreen'
| 'linen'
| 'magenta'
| 'maroon'
| 'mediumaquamarine'
| 'mediumblue'
| 'mediumorchid'
| 'mediumpurple'
| 'mediumseagreen'
| 'mediumslateblue'
| 'mediumspringgreen'
| 'mediumturquoise'
| 'mediumvioletred'
| 'midnightblue'
| 'mintcream'
| 'mistyrose'
| 'moccasin'
| 'navajowhite'
| 'navy'
| 'oldlace'
| 'olive'
| 'olivedrab'
| 'orange'
| 'orangered'
| 'orchid'
| 'palegoldenrod'
| 'palegreen'
| 'paleturquoise'
| 'palevioletred'
| 'papayawhip'
| 'peachpuff'
| 'peru'
| 'pink'
| 'plum'
| 'powderblue'
| 'purple'
| 'rebeccapurple'
| 'red'
| 'rosybrown'
| 'royalblue'
| 'saddlebrown'
| 'salmon'
| 'sandybrown'
| 'seagreen'
| 'seashell'
| 'sienna'
| 'silver'
| 'skyblue'
| 'slateblue'
| 'slategray'
| 'slategrey'
| 'snow'
| 'springgreen'
| 'steelblue'
| 'tan'
| 'teal'
| 'thistle'
| 'tomato'
| 'turquoise'
| 'violet'
| 'wheat'
| 'white'
| 'whitesmoke'
| 'yellow'
| 'yellowgreen';
declare namespace ansiStyles {
interface ColorConvert {
/**
The RGB color space.
@param red - (`0`-`255`)
@param green - (`0`-`255`)
@param blue - (`0`-`255`)
*/
rgb(red: number, green: number, blue: number): string;
/**
The RGB HEX color space.
@param hex - A hexadecimal string containing RGB data.
*/
hex(hex: string): string;
/**
@param keyword - A CSS color name.
*/
keyword(keyword: CSSColor): string;
/**
The HSL color space.
@param hue - (`0`-`360`)
@param saturation - (`0`-`100`)
@param lightness - (`0`-`100`)
*/
hsl(hue: number, saturation: number, lightness: number): string;
/**
The HSV color space.
@param hue - (`0`-`360`)
@param saturation - (`0`-`100`)
@param value - (`0`-`100`)
*/
hsv(hue: number, saturation: number, value: number): string;
/**
The HSV color space.
@param hue - (`0`-`360`)
@param whiteness - (`0`-`100`)
@param blackness - (`0`-`100`)
*/
hwb(hue: number, whiteness: number, blackness: number): string;
/**
Use a [4-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4-bit) to set text color.
*/
ansi(ansi: number): string;
/**
Use an [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color.
*/
ansi256(ansi: number): string;
}
interface CSPair {
/**
The ANSI terminal control sequence for starting this style.
*/
readonly open: string;
/**
The ANSI terminal control sequence for ending this style.
*/
readonly close: string;
}
interface ColorBase {
readonly ansi: ColorConvert;
readonly ansi256: ColorConvert;
readonly ansi16m: ColorConvert;
/**
The ANSI terminal control sequence for ending this color.
*/
readonly close: string;
}
interface Modifier {
/**
Resets the current color chain.
*/
readonly reset: CSPair;
/**
Make text bold.
*/
readonly bold: CSPair;
/**
Emitting only a small amount of light.
*/
readonly dim: CSPair;
/**
Make text italic. (Not widely supported)
*/
readonly italic: CSPair;
/**
Make text underline. (Not widely supported)
*/
readonly underline: CSPair;
/**
Inverse background and foreground colors.
*/
readonly inverse: CSPair;
/**
Prints the text, but makes it invisible.
*/
readonly hidden: CSPair;
/**
Puts a horizontal line through the center of the text. (Not widely supported)
*/
readonly strikethrough: CSPair;
}
interface ForegroundColor {
readonly black: CSPair;
readonly red: CSPair;
readonly green: CSPair;
readonly yellow: CSPair;
readonly blue: CSPair;
readonly cyan: CSPair;
readonly magenta: CSPair;
readonly white: CSPair;
/**
Alias for `blackBright`.
*/
readonly gray: CSPair;
/**
Alias for `blackBright`.
*/
readonly grey: CSPair;
readonly blackBright: CSPair;
readonly redBright: CSPair;
readonly greenBright: CSPair;
readonly yellowBright: CSPair;
readonly blueBright: CSPair;
readonly cyanBright: CSPair;
readonly magentaBright: CSPair;
readonly whiteBright: CSPair;
}
interface BackgroundColor {
readonly bgBlack: CSPair;
readonly bgRed: CSPair;
readonly bgGreen: CSPair;
readonly bgYellow: CSPair;
readonly bgBlue: CSPair;
readonly bgCyan: CSPair;
readonly bgMagenta: CSPair;
readonly bgWhite: CSPair;
/**
Alias for `bgBlackBright`.
*/
readonly bgGray: CSPair;
/**
Alias for `bgBlackBright`.
*/
readonly bgGrey: CSPair;
readonly bgBlackBright: CSPair;
readonly bgRedBright: CSPair;
readonly bgGreenBright: CSPair;
readonly bgYellowBright: CSPair;
readonly bgBlueBright: CSPair;
readonly bgCyanBright: CSPair;
readonly bgMagentaBright: CSPair;
readonly bgWhiteBright: CSPair;
}
}
declare const ansiStyles: {
readonly modifier: ansiStyles.Modifier;
readonly color: ansiStyles.ForegroundColor & ansiStyles.ColorBase;
readonly bgColor: ansiStyles.BackgroundColor & ansiStyles.ColorBase;
readonly codes: ReadonlyMap<number, number>;
} & ansiStyles.BackgroundColor & ansiStyles.ForegroundColor & ansiStyles.Modifier;
export = ansiStyles;

163
api/node_modules/ansi-styles/index.js generated vendored Normal file
View File

@@ -0,0 +1,163 @@
'use strict';
const wrapAnsi16 = (fn, offset) => (...args) => {
const code = fn(...args);
return `\u001B[${code + offset}m`;
};
const wrapAnsi256 = (fn, offset) => (...args) => {
const code = fn(...args);
return `\u001B[${38 + offset};5;${code}m`;
};
const wrapAnsi16m = (fn, offset) => (...args) => {
const rgb = fn(...args);
return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
};
const ansi2ansi = n => n;
const rgb2rgb = (r, g, b) => [r, g, b];
const setLazyProperty = (object, property, get) => {
Object.defineProperty(object, property, {
get: () => {
const value = get();
Object.defineProperty(object, property, {
value,
enumerable: true,
configurable: true
});
return value;
},
enumerable: true,
configurable: true
});
};
/** @type {typeof import('color-convert')} */
let colorConvert;
const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
if (colorConvert === undefined) {
colorConvert = require('color-convert');
}
const offset = isBackground ? 10 : 0;
const styles = {};
for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
const name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace;
if (sourceSpace === targetSpace) {
styles[name] = wrap(identity, offset);
} else if (typeof suite === 'object') {
styles[name] = wrap(suite[targetSpace], offset);
}
}
return styles;
};
function assembleStyles() {
const codes = new Map();
const styles = {
modifier: {
reset: [0, 0],
// 21 isn't widely supported and 22 does the same thing
bold: [1, 22],
dim: [2, 22],
italic: [3, 23],
underline: [4, 24],
inverse: [7, 27],
hidden: [8, 28],
strikethrough: [9, 29]
},
color: {
black: [30, 39],
red: [31, 39],
green: [32, 39],
yellow: [33, 39],
blue: [34, 39],
magenta: [35, 39],
cyan: [36, 39],
white: [37, 39],
// Bright color
blackBright: [90, 39],
redBright: [91, 39],
greenBright: [92, 39],
yellowBright: [93, 39],
blueBright: [94, 39],
magentaBright: [95, 39],
cyanBright: [96, 39],
whiteBright: [97, 39]
},
bgColor: {
bgBlack: [40, 49],
bgRed: [41, 49],
bgGreen: [42, 49],
bgYellow: [43, 49],
bgBlue: [44, 49],
bgMagenta: [45, 49],
bgCyan: [46, 49],
bgWhite: [47, 49],
// Bright color
bgBlackBright: [100, 49],
bgRedBright: [101, 49],
bgGreenBright: [102, 49],
bgYellowBright: [103, 49],
bgBlueBright: [104, 49],
bgMagentaBright: [105, 49],
bgCyanBright: [106, 49],
bgWhiteBright: [107, 49]
}
};
// Alias bright black as gray (and grey)
styles.color.gray = styles.color.blackBright;
styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
styles.color.grey = styles.color.blackBright;
styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
for (const [groupName, group] of Object.entries(styles)) {
for (const [styleName, style] of Object.entries(group)) {
styles[styleName] = {
open: `\u001B[${style[0]}m`,
close: `\u001B[${style[1]}m`
};
group[styleName] = styles[styleName];
codes.set(style[0], style[1]);
}
Object.defineProperty(styles, groupName, {
value: group,
enumerable: false
});
}
Object.defineProperty(styles, 'codes', {
value: codes,
enumerable: false
});
styles.color.close = '\u001B[39m';
styles.bgColor.close = '\u001B[49m';
setLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false));
setLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false));
setLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false));
setLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true));
setLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true));
setLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true));
return styles;
}
// Make the export immutable
Object.defineProperty(module, 'exports', {
enumerable: true,
get: assembleStyles
});

9
api/node_modules/ansi-styles/license generated vendored Normal file
View File

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

88
api/node_modules/ansi-styles/package.json generated vendored Normal file
View File

@@ -0,0 +1,88 @@
{
"_from": "ansi-styles@^4.1.0",
"_id": "ansi-styles@4.3.0",
"_inBundle": false,
"_integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"_location": "/ansi-styles",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "ansi-styles@^4.1.0",
"name": "ansi-styles",
"escapedName": "ansi-styles",
"rawSpec": "^4.1.0",
"saveSpec": null,
"fetchSpec": "^4.1.0"
},
"_requiredBy": [
"/chalk"
],
"_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"_shasum": "edd803628ae71c04c85ae7a0906edad34b648937",
"_spec": "ansi-styles@^4.1.0",
"_where": "/home/hub/5g_drone_ROS2/api/node_modules/chalk",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"bugs": {
"url": "https://github.com/chalk/ansi-styles/issues"
},
"bundleDependencies": false,
"dependencies": {
"color-convert": "^2.0.1"
},
"deprecated": false,
"description": "ANSI escape codes for styling strings in the terminal",
"devDependencies": {
"@types/color-convert": "^1.9.0",
"ava": "^2.3.0",
"svg-term-cli": "^2.1.1",
"tsd": "^0.11.0",
"xo": "^0.25.3"
},
"engines": {
"node": ">=8"
},
"files": [
"index.js",
"index.d.ts"
],
"funding": "https://github.com/chalk/ansi-styles?sponsor=1",
"homepage": "https://github.com/chalk/ansi-styles#readme",
"keywords": [
"ansi",
"styles",
"color",
"colour",
"colors",
"terminal",
"console",
"cli",
"string",
"tty",
"escape",
"formatting",
"rgb",
"256",
"shell",
"xterm",
"log",
"logging",
"command-line",
"text"
],
"license": "MIT",
"name": "ansi-styles",
"repository": {
"type": "git",
"url": "git+https://github.com/chalk/ansi-styles.git"
},
"scripts": {
"screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor",
"test": "xo && ava && tsd"
},
"version": "4.3.0"
}

152
api/node_modules/ansi-styles/readme.md generated vendored Normal file
View File

@@ -0,0 +1,152 @@
# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles)
> [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal
You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings.
<img src="screenshot.svg" width="900">
## Install
```
$ npm install ansi-styles
```
## Usage
```js
const style = require('ansi-styles');
console.log(`${style.green.open}Hello world!${style.green.close}`);
// Color conversion between 16/256/truecolor
// NOTE: If conversion goes to 16 colors or 256 colors, the original color
// may be degraded to fit that color palette. This means terminals
// that do not support 16 million colors will best-match the
// original color.
console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close);
console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close);
console.log(style.color.ansi16m.hex('#abcdef') + 'Hello world!' + style.color.close);
```
## API
Each style has an `open` and `close` property.
## Styles
### Modifiers
- `reset`
- `bold`
- `dim`
- `italic` *(Not widely supported)*
- `underline`
- `inverse`
- `hidden`
- `strikethrough` *(Not widely supported)*
### Colors
- `black`
- `red`
- `green`
- `yellow`
- `blue`
- `magenta`
- `cyan`
- `white`
- `blackBright` (alias: `gray`, `grey`)
- `redBright`
- `greenBright`
- `yellowBright`
- `blueBright`
- `magentaBright`
- `cyanBright`
- `whiteBright`
### Background colors
- `bgBlack`
- `bgRed`
- `bgGreen`
- `bgYellow`
- `bgBlue`
- `bgMagenta`
- `bgCyan`
- `bgWhite`
- `bgBlackBright` (alias: `bgGray`, `bgGrey`)
- `bgRedBright`
- `bgGreenBright`
- `bgYellowBright`
- `bgBlueBright`
- `bgMagentaBright`
- `bgCyanBright`
- `bgWhiteBright`
## Advanced usage
By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module.
- `style.modifier`
- `style.color`
- `style.bgColor`
###### Example
```js
console.log(style.color.green.open);
```
Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `style.codes`, which returns a `Map` with the open codes as keys and close codes as values.
###### Example
```js
console.log(style.codes.get(36));
//=> 39
```
## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728)
`ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors.
The following color spaces from `color-convert` are supported:
- `rgb`
- `hex`
- `keyword`
- `hsl`
- `hsv`
- `hwb`
- `ansi`
- `ansi256`
To use these, call the associated conversion function with the intended output, for example:
```js
style.color.ansi.rgb(100, 200, 15); // RGB to 16 color ansi foreground code
style.bgColor.ansi.rgb(100, 200, 15); // RGB to 16 color ansi background code
style.color.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code
style.bgColor.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code
style.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground code
style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code
```
## Related
- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal
## Maintainers
- [Sindre Sorhus](https://github.com/sindresorhus)
- [Josh Junon](https://github.com/qix-)
## For enterprise
Available as part of the Tidelift Subscription.
The maintainers of `ansi-styles` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-ansi-styles?utm_source=npm-ansi-styles&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)

21
api/node_modules/array-flatten/LICENSE generated vendored Normal file
View File

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

43
api/node_modules/array-flatten/README.md generated vendored Normal file
View File

@@ -0,0 +1,43 @@
# Array Flatten
[![NPM version][npm-image]][npm-url]
[![NPM downloads][downloads-image]][downloads-url]
[![Build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
> Flatten an array of nested arrays into a single flat array. Accepts an optional depth.
## Installation
```
npm install array-flatten --save
```
## Usage
```javascript
var flatten = require('array-flatten')
flatten([1, [2, [3, [4, [5], 6], 7], 8], 9])
//=> [1, 2, 3, 4, 5, 6, 7, 8, 9]
flatten([1, [2, [3, [4, [5], 6], 7], 8], 9], 2)
//=> [1, 2, 3, [4, [5], 6], 7, 8, 9]
(function () {
flatten(arguments) //=> [1, 2, 3]
})(1, [2, 3])
```
## License
MIT
[npm-image]: https://img.shields.io/npm/v/array-flatten.svg?style=flat
[npm-url]: https://npmjs.org/package/array-flatten
[downloads-image]: https://img.shields.io/npm/dm/array-flatten.svg?style=flat
[downloads-url]: https://npmjs.org/package/array-flatten
[travis-image]: https://img.shields.io/travis/blakeembrey/array-flatten.svg?style=flat
[travis-url]: https://travis-ci.org/blakeembrey/array-flatten
[coveralls-image]: https://img.shields.io/coveralls/blakeembrey/array-flatten.svg?style=flat
[coveralls-url]: https://coveralls.io/r/blakeembrey/array-flatten?branch=master

64
api/node_modules/array-flatten/array-flatten.js generated vendored Normal file
View File

@@ -0,0 +1,64 @@
'use strict'
/**
* Expose `arrayFlatten`.
*/
module.exports = arrayFlatten
/**
* Recursive flatten function with depth.
*
* @param {Array} array
* @param {Array} result
* @param {Number} depth
* @return {Array}
*/
function flattenWithDepth (array, result, depth) {
for (var i = 0; i < array.length; i++) {
var value = array[i]
if (depth > 0 && Array.isArray(value)) {
flattenWithDepth(value, result, depth - 1)
} else {
result.push(value)
}
}
return result
}
/**
* Recursive flatten function. Omitting depth is slightly faster.
*
* @param {Array} array
* @param {Array} result
* @return {Array}
*/
function flattenForever (array, result) {
for (var i = 0; i < array.length; i++) {
var value = array[i]
if (Array.isArray(value)) {
flattenForever(value, result)
} else {
result.push(value)
}
}
return result
}
/**
* Flatten an array, with the ability to define a depth.
*
* @param {Array} array
* @param {Number} depth
* @return {Array}
*/
function arrayFlatten (array, depth) {
if (depth == null) {
return flattenForever(array, [])
}
return flattenWithDepth(array, [], depth)
}

64
api/node_modules/array-flatten/package.json generated vendored Normal file
View File

@@ -0,0 +1,64 @@
{
"_from": "array-flatten@1.1.1",
"_id": "array-flatten@1.1.1",
"_inBundle": false,
"_integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==",
"_location": "/array-flatten",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "array-flatten@1.1.1",
"name": "array-flatten",
"escapedName": "array-flatten",
"rawSpec": "1.1.1",
"saveSpec": null,
"fetchSpec": "1.1.1"
},
"_requiredBy": [
"/express"
],
"_resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
"_shasum": "9a5f699051b1e7073328f2a008968b64ea2955d2",
"_spec": "array-flatten@1.1.1",
"_where": "/home/hub/5g_drone_ROS2/api/node_modules/express",
"author": {
"name": "Blake Embrey",
"email": "hello@blakeembrey.com",
"url": "http://blakeembrey.me"
},
"bugs": {
"url": "https://github.com/blakeembrey/array-flatten/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Flatten an array of nested arrays into a single flat array",
"devDependencies": {
"istanbul": "^0.3.13",
"mocha": "^2.2.4",
"pre-commit": "^1.0.7",
"standard": "^3.7.3"
},
"files": [
"array-flatten.js",
"LICENSE"
],
"homepage": "https://github.com/blakeembrey/array-flatten",
"keywords": [
"array",
"flatten",
"arguments",
"depth"
],
"license": "MIT",
"main": "array-flatten.js",
"name": "array-flatten",
"repository": {
"type": "git",
"url": "git://github.com/blakeembrey/array-flatten.git"
},
"scripts": {
"test": "istanbul cover _mocha -- -R spec"
},
"version": "1.1.1"
}

348
api/node_modules/async/CHANGELOG.md generated vendored Normal file
View File

@@ -0,0 +1,348 @@
# v3.2.4
- Fix a bug in `priorityQueue` where it didn't wait for the result. (#1725)
- Fix a bug where `unshiftAsync` was included in `priorityQueue`. (#1790)
# v3.2.3
- Fix bugs in comment parsing in `autoInject`. (#1767, #1780)
# v3.2.2
- Fix potential prototype pollution exploit
# v3.2.1
- Use `queueMicrotask` if available to the environment (#1761)
- Minor perf improvement in `priorityQueue` (#1727)
- More examples in documentation (#1726)
- Various doc fixes (#1708, #1712, #1717, #1740, #1739, #1749, #1756)
- Improved test coverage (#1754)
# v3.2.0
- Fix a bug in Safari related to overwriting `func.name`
- Remove built-in browserify configuration (#1653)
- Varios doc fixes (#1688, #1703, #1704)
# v3.1.1
- Allow redefining `name` property on wrapped functions.
# v3.1.0
- Added `q.pushAsync` and `q.unshiftAsync`, analagous to `q.push` and `q.unshift`, except they always do not accept a callback, and reject if processing the task errors. (#1659)
- Promises returned from `q.push` and `q.unshift` when a callback is not passed now resolve even if an error ocurred. (#1659)
- Fixed a parsing bug in `autoInject` with complicated function bodies (#1663)
- Added ES6+ configuration for Browserify bundlers (#1653)
- Various doc fixes (#1664, #1658, #1665, #1652)
# v3.0.1
## Bug fixes
- Fixed a regression where arrays passed to `queue` and `cargo` would be completely flattened. (#1645)
- Clarified Async's browser support (#1643)
# v3.0.0
The `async`/`await` release!
There are a lot of new features and subtle breaking changes in this major version, but the biggest feature is that most Async methods return a Promise if you omit the callback, meaning you can `await` them from within an `async` function.
```js
const results = await async.mapLimit(urls, 5, async url => {
const resp = await fetch(url)
return resp.body
})
```
## Breaking Changes
- Most Async methods return a Promise when the final callback is omitted, making them `await`-able! (#1572)
- We are now making heavy use of ES2015 features, this means we have dropped out-of-the-box support for Node 4 and earlier, and many old versions of browsers. (#1541, #1553)
- In `queue`, `priorityQueue`, `cargo` and `cargoQueue`, the "event"-style methods, like `q.drain` and `q.saturated` are now methods that register a callback, rather than properties you assign a callback to. They are now of the form `q.drain(callback)`. If you do not pass a callback a Promise will be returned for the next occurrence of the event, making them `await`-able, e.g. `await q.drain()`. (#1586, #1641)
- Calling `callback(false)` will cancel an async method, preventing further iteration and callback calls. This is useful for preventing memory leaks when you break out of an async flow by calling an outer callback. (#1064, #1542)
- `during` and `doDuring` have been removed, and instead `whilst`, `doWhilst`, `until` and `doUntil` now have asynchronous `test` functions. (#850, #1557)
- `limits` of less than 1 now cause an error to be thrown in queues and collection methods. (#1249, #1552)
- `memoize` no longer memoizes errors (#1465, #1466)
- `applyEach`/`applyEachSeries` have a simpler interface, to make them more easily type-able. It always returns a function that takes in a single callback argument. If that callback is omitted, a promise is returned, making it awaitable. (#1228, #1640)
## New Features
- Async generators are now supported in all the Collection methods. (#1560)
- Added `cargoQueue`, a queue with both `concurrency` and `payload` size parameters. (#1567)
- Queue objects returned from `queue` now have a `Symbol.iterator` method, meaning they can be iterated over to inspect the current list of items in the queue. (#1459, #1556)
- A ESM-flavored `async.mjs` is included in the `async` package. This is described in the `package.json` `"module"` field, meaning it should be automatically used by Webpack and other compatible bundlers.
## Bug fixes
- Better handle arbitrary error objects in `asyncify` (#1568, #1569)
## Other
- Removed Lodash as a dependency (#1283, #1528)
- Miscellaneous docs fixes (#1393, #1501, #1540, #1543, #1558, #1563, #1564, #1579, #1581)
- Miscellaneous test fixes (#1538)
-------
# v2.6.1
- Updated lodash to prevent `npm audit` warnings. (#1532, #1533)
- Made `async-es` more optimized for webpack users (#1517)
- Fixed a stack overflow with large collections and a synchronous iterator (#1514)
- Various small fixes/chores (#1505, #1511, #1527, #1530)
# v2.6.0
- Added missing aliases for many methods. Previously, you could not (e.g.) `require('async/find')` or use `async.anyLimit`. (#1483)
- Improved `queue` performance. (#1448, #1454)
- Add missing sourcemap (#1452, #1453)
- Various doc updates (#1448, #1471, #1483)
# v2.5.0
- Added `concatLimit`, the `Limit` equivalent of [`concat`](https://caolan.github.io/async/docs.html#concat) ([#1426](https://github.com/caolan/async/issues/1426), [#1430](https://github.com/caolan/async/pull/1430))
- `concat` improvements: it now preserves order, handles falsy values and the `iteratee` callback takes a variable number of arguments ([#1437](https://github.com/caolan/async/issues/1437), [#1436](https://github.com/caolan/async/pull/1436))
- Fixed an issue in `queue` where there was a size discrepancy between `workersList().length` and `running()` ([#1428](https://github.com/caolan/async/issues/1428), [#1429](https://github.com/caolan/async/pull/1429))
- Various doc fixes ([#1422](https://github.com/caolan/async/issues/1422), [#1424](https://github.com/caolan/async/pull/1424))
# v2.4.1
- Fixed a bug preventing functions wrapped with `timeout()` from being re-used. ([#1418](https://github.com/caolan/async/issues/1418), [#1419](https://github.com/caolan/async/issues/1419))
# v2.4.0
- Added `tryEach`, for running async functions in parallel, where you only expect one to succeed. ([#1365](https://github.com/caolan/async/issues/1365), [#687](https://github.com/caolan/async/issues/687))
- Improved performance, most notably in `parallel` and `waterfall` ([#1395](https://github.com/caolan/async/issues/1395))
- Added `queue.remove()`, for removing items in a `queue` ([#1397](https://github.com/caolan/async/issues/1397), [#1391](https://github.com/caolan/async/issues/1391))
- Fixed using `eval`, preventing Async from running in pages with Content Security Policy ([#1404](https://github.com/caolan/async/issues/1404), [#1403](https://github.com/caolan/async/issues/1403))
- Fixed errors thrown in an `asyncify`ed function's callback being caught by the underlying Promise ([#1408](https://github.com/caolan/async/issues/1408))
- Fixed timing of `queue.empty()` ([#1367](https://github.com/caolan/async/issues/1367))
- Various doc fixes ([#1314](https://github.com/caolan/async/issues/1314), [#1394](https://github.com/caolan/async/issues/1394), [#1412](https://github.com/caolan/async/issues/1412))
# v2.3.0
- Added support for ES2017 `async` functions. Wherever you can pass a Node-style/CPS function that uses a callback, you can also pass an `async` function. Previously, you had to wrap `async` functions with `asyncify`. The caveat is that it will only work if `async` functions are supported natively in your environment, transpiled implementations can't be detected. ([#1386](https://github.com/caolan/async/issues/1386), [#1390](https://github.com/caolan/async/issues/1390))
- Small doc fix ([#1392](https://github.com/caolan/async/issues/1392))
# v2.2.0
- Added `groupBy`, and the `Series`/`Limit` equivalents, analogous to [`_.groupBy`](http://lodash.com/docs#groupBy) ([#1364](https://github.com/caolan/async/issues/1364))
- Fixed `transform` bug when `callback` was not passed ([#1381](https://github.com/caolan/async/issues/1381))
- Added note about `reflect` to `parallel` docs ([#1385](https://github.com/caolan/async/issues/1385))
# v2.1.5
- Fix `auto` bug when function names collided with Array.prototype ([#1358](https://github.com/caolan/async/issues/1358))
- Improve some error messages ([#1349](https://github.com/caolan/async/issues/1349))
- Avoid stack overflow case in queue
- Fixed an issue in `some`, `every` and `find` where processing would continue after the result was determined.
- Cleanup implementations of `some`, `every` and `find`
# v2.1.3
- Make bundle size smaller
- Create optimized hotpath for `filter` in array case.
# v2.1.2
- Fixed a stackoverflow bug with `detect`, `some`, `every` on large inputs ([#1293](https://github.com/caolan/async/issues/1293)).
# v2.1.0
- `retry` and `retryable` now support an optional `errorFilter` function that determines if the `task` should retry on the error ([#1256](https://github.com/caolan/async/issues/1256), [#1261](https://github.com/caolan/async/issues/1261))
- Optimized array iteration in `race`, `cargo`, `queue`, and `priorityQueue` ([#1253](https://github.com/caolan/async/issues/1253))
- Added alias documentation to doc site ([#1251](https://github.com/caolan/async/issues/1251), [#1254](https://github.com/caolan/async/issues/1254))
- Added [BootStrap scrollspy](http://getbootstrap.com/javascript/#scrollspy) to docs to highlight in the sidebar the current method being viewed ([#1289](https://github.com/caolan/async/issues/1289), [#1300](https://github.com/caolan/async/issues/1300))
- Various minor doc fixes ([#1263](https://github.com/caolan/async/issues/1263), [#1264](https://github.com/caolan/async/issues/1264), [#1271](https://github.com/caolan/async/issues/1271), [#1278](https://github.com/caolan/async/issues/1278), [#1280](https://github.com/caolan/async/issues/1280), [#1282](https://github.com/caolan/async/issues/1282), [#1302](https://github.com/caolan/async/issues/1302))
# v2.0.1
- Significantly optimized all iteration based collection methods such as `each`, `map`, `filter`, etc ([#1245](https://github.com/caolan/async/issues/1245), [#1246](https://github.com/caolan/async/issues/1246), [#1247](https://github.com/caolan/async/issues/1247)).
# v2.0.0
Lots of changes here!
First and foremost, we have a slick new [site for docs](https://caolan.github.io/async/). Special thanks to [**@hargasinski**](https://github.com/hargasinski) for his work converting our old docs to `jsdoc` format and implementing the new website. Also huge ups to [**@ivanseidel**](https://github.com/ivanseidel) for designing our new logo. It was a long process for both of these tasks, but I think these changes turned out extraordinary well.
The biggest feature is modularization. You can now `require("async/series")` to only require the `series` function. Every Async library function is available this way. You still can `require("async")` to require the entire library, like you could do before.
We also provide Async as a collection of ES2015 modules. You can now `import {each} from 'async-es'` or `import waterfall from 'async-es/waterfall'`. If you are using only a few Async functions, and are using a ES bundler such as Rollup, this can significantly lower your build size.
Major thanks to [**@Kikobeats**](github.com/Kikobeats), [**@aearly**](github.com/aearly) and [**@megawac**](github.com/megawac) for doing the majority of the modularization work, as well as [**@jdalton**](github.com/jdalton) and [**@Rich-Harris**](github.com/Rich-Harris) for advisory work on the general modularization strategy.
Another one of the general themes of the 2.0 release is standardization of what an "async" function is. We are now more strictly following the node-style continuation passing style. That is, an async function is a function that:
1. Takes a variable number of arguments
2. The last argument is always a callback
3. The callback can accept any number of arguments
4. The first argument passed to the callback will be treated as an error result, if the argument is truthy
5. Any number of result arguments can be passed after the "error" argument
6. The callback is called once and exactly once, either on the same tick or later tick of the JavaScript event loop.
There were several cases where Async accepted some functions that did not strictly have these properties, most notably `auto`, `every`, `some`, `filter`, `reject` and `detect`.
Another theme is performance. We have eliminated internal deferrals in all cases where they make sense. For example, in `waterfall` and `auto`, there was a `setImmediate` between each task -- these deferrals have been removed. A `setImmediate` call can add up to 1ms of delay. This might not seem like a lot, but it can add up if you are using many Async functions in the course of processing a HTTP request, for example. Nearly all asynchronous functions that do I/O already have some sort of deferral built in, so the extra deferral is unnecessary. The trade-off of this change is removing our built-in stack-overflow defense. Many synchronous callback calls in series can quickly overflow the JS call stack. If you do have a function that is sometimes synchronous (calling its callback on the same tick), and are running into stack overflows, wrap it with `async.ensureAsync()`.
Another big performance win has been re-implementing `queue`, `cargo`, and `priorityQueue` with [doubly linked lists](https://en.wikipedia.org/wiki/Doubly_linked_list) instead of arrays. This has lead to queues being an order of [magnitude faster on large sets of tasks](https://github.com/caolan/async/pull/1205).
## New Features
- Async is now modularized. Individual functions can be `require()`d from the main package. (`require('async/auto')`) ([#984](https://github.com/caolan/async/issues/984), [#996](https://github.com/caolan/async/issues/996))
- Async is also available as a collection of ES2015 modules in the new `async-es` package. (`import {forEachSeries} from 'async-es'`) ([#984](https://github.com/caolan/async/issues/984), [#996](https://github.com/caolan/async/issues/996))
- Added `race`, analogous to `Promise.race()`. It will run an array of async tasks in parallel and will call its callback with the result of the first task to respond. ([#568](https://github.com/caolan/async/issues/568), [#1038](https://github.com/caolan/async/issues/1038))
- Collection methods now accept ES2015 iterators. Maps, Sets, and anything that implements the iterator spec can now be passed directly to `each`, `map`, `parallel`, etc.. ([#579](https://github.com/caolan/async/issues/579), [#839](https://github.com/caolan/async/issues/839), [#1074](https://github.com/caolan/async/issues/1074))
- Added `mapValues`, for mapping over the properties of an object and returning an object with the same keys. ([#1157](https://github.com/caolan/async/issues/1157), [#1177](https://github.com/caolan/async/issues/1177))
- Added `timeout`, a wrapper for an async function that will make the task time-out after the specified time. ([#1007](https://github.com/caolan/async/issues/1007), [#1027](https://github.com/caolan/async/issues/1027))
- Added `reflect` and `reflectAll`, analagous to [`Promise.reflect()`](http://bluebirdjs.com/docs/api/reflect.html), a wrapper for async tasks that always succeeds, by gathering results and errors into an object. ([#942](https://github.com/caolan/async/issues/942), [#1012](https://github.com/caolan/async/issues/1012), [#1095](https://github.com/caolan/async/issues/1095))
- `constant` supports dynamic arguments -- it will now always use its last argument as the callback. ([#1016](https://github.com/caolan/async/issues/1016), [#1052](https://github.com/caolan/async/issues/1052))
- `setImmediate` and `nextTick` now support arguments to partially apply to the deferred function, like the node-native versions do. ([#940](https://github.com/caolan/async/issues/940), [#1053](https://github.com/caolan/async/issues/1053))
- `auto` now supports resolving cyclic dependencies using [Kahn's algorithm](https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm) ([#1140](https://github.com/caolan/async/issues/1140)).
- Added `autoInject`, a relative of `auto` that automatically spreads a task's dependencies as arguments to the task function. ([#608](https://github.com/caolan/async/issues/608), [#1055](https://github.com/caolan/async/issues/1055), [#1099](https://github.com/caolan/async/issues/1099), [#1100](https://github.com/caolan/async/issues/1100))
- You can now limit the concurrency of `auto` tasks. ([#635](https://github.com/caolan/async/issues/635), [#637](https://github.com/caolan/async/issues/637))
- Added `retryable`, a relative of `retry` that wraps an async function, making it retry when called. ([#1058](https://github.com/caolan/async/issues/1058))
- `retry` now supports specifying a function that determines the next time interval, useful for exponential backoff, logging and other retry strategies. ([#1161](https://github.com/caolan/async/issues/1161))
- `retry` will now pass all of the arguments the task function was resolved with to the callback ([#1231](https://github.com/caolan/async/issues/1231)).
- Added `q.unsaturated` -- callback called when a `queue`'s number of running workers falls below a threshold. ([#868](https://github.com/caolan/async/issues/868), [#1030](https://github.com/caolan/async/issues/1030), [#1033](https://github.com/caolan/async/issues/1033), [#1034](https://github.com/caolan/async/issues/1034))
- Added `q.error` -- a callback called whenever a `queue` task calls its callback with an error. ([#1170](https://github.com/caolan/async/issues/1170))
- `applyEach` and `applyEachSeries` now pass results to the final callback. ([#1088](https://github.com/caolan/async/issues/1088))
## Breaking changes
- Calling a callback more than once is considered an error, and an error will be thrown. This had an explicit breaking change in `waterfall`. If you were relying on this behavior, you should more accurately represent your control flow as an event emitter or stream. ([#814](https://github.com/caolan/async/issues/814), [#815](https://github.com/caolan/async/issues/815), [#1048](https://github.com/caolan/async/issues/1048), [#1050](https://github.com/caolan/async/issues/1050))
- `auto` task functions now always take the callback as the last argument. If a task has dependencies, the `results` object will be passed as the first argument. To migrate old task functions, wrap them with [`_.flip`](https://lodash.com/docs#flip) ([#1036](https://github.com/caolan/async/issues/1036), [#1042](https://github.com/caolan/async/issues/1042))
- Internal `setImmediate` calls have been refactored away. This may make existing flows vulnerable to stack overflows if you use many synchronous functions in series. Use `ensureAsync` to work around this. ([#696](https://github.com/caolan/async/issues/696), [#704](https://github.com/caolan/async/issues/704), [#1049](https://github.com/caolan/async/issues/1049), [#1050](https://github.com/caolan/async/issues/1050))
- `map` used to return an object when iterating over an object. `map` now always returns an array, like in other libraries. The previous object behavior has been split out into `mapValues`. ([#1157](https://github.com/caolan/async/issues/1157), [#1177](https://github.com/caolan/async/issues/1177))
- `filter`, `reject`, `some`, `every`, `detect` and their families like `{METHOD}Series` and `{METHOD}Limit` now expect an error as the first callback argument, rather than just a simple boolean. Pass `null` as the first argument, or use `fs.access` instead of `fs.exists`. ([#118](https://github.com/caolan/async/issues/118), [#774](https://github.com/caolan/async/issues/774), [#1028](https://github.com/caolan/async/issues/1028), [#1041](https://github.com/caolan/async/issues/1041))
- `{METHOD}` and `{METHOD}Series` are now implemented in terms of `{METHOD}Limit`. This is a major internal simplification, and is not expected to cause many problems, but it does subtly affect how functions execute internally. ([#778](https://github.com/caolan/async/issues/778), [#847](https://github.com/caolan/async/issues/847))
- `retry`'s callback is now optional. Previously, omitting the callback would partially apply the function, meaning it could be passed directly as a task to `series` or `auto`. The partially applied "control-flow" behavior has been separated out into `retryable`. ([#1054](https://github.com/caolan/async/issues/1054), [#1058](https://github.com/caolan/async/issues/1058))
- The test function for `whilst`, `until`, and `during` used to be passed non-error args from the iteratee function's callback, but this led to weirdness where the first call of the test function would be passed no args. We have made it so the test function is never passed extra arguments, and only the `doWhilst`, `doUntil`, and `doDuring` functions pass iteratee callback arguments to the test function ([#1217](https://github.com/caolan/async/issues/1217), [#1224](https://github.com/caolan/async/issues/1224))
- The `q.tasks` array has been renamed `q._tasks` and is now implemented as a doubly linked list (DLL). Any code that used to interact with this array will need to be updated to either use the provided helpers or support DLLs ([#1205](https://github.com/caolan/async/issues/1205)).
- The timing of the `q.saturated()` callback in a `queue` has been modified to better reflect when tasks pushed to the queue will start queueing. ([#724](https://github.com/caolan/async/issues/724), [#1078](https://github.com/caolan/async/issues/1078))
- Removed `iterator` method in favour of [ES2015 iterator protocol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators ) which natively supports arrays ([#1237](https://github.com/caolan/async/issues/1237))
- Dropped support for Component, Jam, SPM, and Volo ([#1175](https://github.com/caolan/async/issues/1175), #[#176](https://github.com/caolan/async/issues/176))
## Bug Fixes
- Improved handling of no dependency cases in `auto` & `autoInject` ([#1147](https://github.com/caolan/async/issues/1147)).
- Fixed a bug where the callback generated by `asyncify` with `Promises` could resolve twice ([#1197](https://github.com/caolan/async/issues/1197)).
- Fixed several documented optional callbacks not actually being optional ([#1223](https://github.com/caolan/async/issues/1223)).
## Other
- Added `someSeries` and `everySeries` for symmetry, as well as a complete set of `any`/`anyLimit`/`anySeries` and `all`/`/allLmit`/`allSeries` aliases.
- Added `find` as an alias for `detect. (as well as `findLimit` and `findSeries`).
- Various doc fixes ([#1005](https://github.com/caolan/async/issues/1005), [#1008](https://github.com/caolan/async/issues/1008), [#1010](https://github.com/caolan/async/issues/1010), [#1015](https://github.com/caolan/async/issues/1015), [#1021](https://github.com/caolan/async/issues/1021), [#1037](https://github.com/caolan/async/issues/1037), [#1039](https://github.com/caolan/async/issues/1039), [#1051](https://github.com/caolan/async/issues/1051), [#1102](https://github.com/caolan/async/issues/1102), [#1107](https://github.com/caolan/async/issues/1107), [#1121](https://github.com/caolan/async/issues/1121), [#1123](https://github.com/caolan/async/issues/1123), [#1129](https://github.com/caolan/async/issues/1129), [#1135](https://github.com/caolan/async/issues/1135), [#1138](https://github.com/caolan/async/issues/1138), [#1141](https://github.com/caolan/async/issues/1141), [#1153](https://github.com/caolan/async/issues/1153), [#1216](https://github.com/caolan/async/issues/1216), [#1217](https://github.com/caolan/async/issues/1217), [#1232](https://github.com/caolan/async/issues/1232), [#1233](https://github.com/caolan/async/issues/1233), [#1236](https://github.com/caolan/async/issues/1236), [#1238](https://github.com/caolan/async/issues/1238))
Thank you [**@aearly**](github.com/aearly) and [**@megawac**](github.com/megawac) for taking the lead on version 2 of async.
------------------------------------------
# v1.5.2
- Allow using `"constructor"` as an argument in `memoize` ([#998](https://github.com/caolan/async/issues/998))
- Give a better error messsage when `auto` dependency checking fails ([#994](https://github.com/caolan/async/issues/994))
- Various doc updates ([#936](https://github.com/caolan/async/issues/936), [#956](https://github.com/caolan/async/issues/956), [#979](https://github.com/caolan/async/issues/979), [#1002](https://github.com/caolan/async/issues/1002))
# v1.5.1
- Fix issue with `pause` in `queue` with concurrency enabled ([#946](https://github.com/caolan/async/issues/946))
- `while` and `until` now pass the final result to callback ([#963](https://github.com/caolan/async/issues/963))
- `auto` will properly handle concurrency when there is no callback ([#966](https://github.com/caolan/async/issues/966))
- `auto` will no. properly stop execution when an error occurs ([#988](https://github.com/caolan/async/issues/988), [#993](https://github.com/caolan/async/issues/993))
- Various doc fixes ([#971](https://github.com/caolan/async/issues/971), [#980](https://github.com/caolan/async/issues/980))
# v1.5.0
- Added `transform`, analogous to [`_.transform`](http://lodash.com/docs#transform) ([#892](https://github.com/caolan/async/issues/892))
- `map` now returns an object when an object is passed in, rather than array with non-numeric keys. `map` will begin always returning an array with numeric indexes in the next major release. ([#873](https://github.com/caolan/async/issues/873))
- `auto` now accepts an optional `concurrency` argument to limit the number o. running tasks ([#637](https://github.com/caolan/async/issues/637))
- Added `queue#workersList()`, to retrieve the lis. of currently running tasks. ([#891](https://github.com/caolan/async/issues/891))
- Various code simplifications ([#896](https://github.com/caolan/async/issues/896), [#904](https://github.com/caolan/async/issues/904))
- Various doc fixes :scroll: ([#890](https://github.com/caolan/async/issues/890), [#894](https://github.com/caolan/async/issues/894), [#903](https://github.com/caolan/async/issues/903), [#905](https://github.com/caolan/async/issues/905), [#912](https://github.com/caolan/async/issues/912))
# v1.4.2
- Ensure coverage files don't get published on npm ([#879](https://github.com/caolan/async/issues/879))
# v1.4.1
- Add in overlooked `detectLimit` method ([#866](https://github.com/caolan/async/issues/866))
- Removed unnecessary files from npm releases ([#861](https://github.com/caolan/async/issues/861))
- Removed usage of a reserved word to prevent :boom: in older environments ([#870](https://github.com/caolan/async/issues/870))
# v1.4.0
- `asyncify` now supports promises ([#840](https://github.com/caolan/async/issues/840))
- Added `Limit` versions of `filter` and `reject` ([#836](https://github.com/caolan/async/issues/836))
- Add `Limit` versions of `detect`, `some` and `every` ([#828](https://github.com/caolan/async/issues/828), [#829](https://github.com/caolan/async/issues/829))
- `some`, `every` and `detect` now short circuit early ([#828](https://github.com/caolan/async/issues/828), [#829](https://github.com/caolan/async/issues/829))
- Improve detection of the global object ([#804](https://github.com/caolan/async/issues/804)), enabling use in WebWorkers
- `whilst` now called with arguments from iterator ([#823](https://github.com/caolan/async/issues/823))
- `during` now gets called with arguments from iterator ([#824](https://github.com/caolan/async/issues/824))
- Code simplifications and optimizations aplenty ([diff](https://github.com/caolan/async/compare/v1.3.0...v1.4.0))
# v1.3.0
New Features:
- Added `constant`
- Added `asyncify`/`wrapSync` for making sync functions work with callbacks. ([#671](https://github.com/caolan/async/issues/671), [#806](https://github.com/caolan/async/issues/806))
- Added `during` and `doDuring`, which are like `whilst` with an async truth test. ([#800](https://github.com/caolan/async/issues/800))
- `retry` now accepts an `interval` parameter to specify a delay between retries. ([#793](https://github.com/caolan/async/issues/793))
- `async` should work better in Web Workers due to better `root` detection ([#804](https://github.com/caolan/async/issues/804))
- Callbacks are now optional in `whilst`, `doWhilst`, `until`, and `doUntil` ([#642](https://github.com/caolan/async/issues/642))
- Various internal updates ([#786](https://github.com/caolan/async/issues/786), [#801](https://github.com/caolan/async/issues/801), [#802](https://github.com/caolan/async/issues/802), [#803](https://github.com/caolan/async/issues/803))
- Various doc fixes ([#790](https://github.com/caolan/async/issues/790), [#794](https://github.com/caolan/async/issues/794))
Bug Fixes:
- `cargo` now exposes the `payload` size, and `cargo.payload` can be changed on the fly after the `cargo` is created. ([#740](https://github.com/caolan/async/issues/740), [#744](https://github.com/caolan/async/issues/744), [#783](https://github.com/caolan/async/issues/783))
# v1.2.1
Bug Fix:
- Small regression with synchronous iterator behavior in `eachSeries` with a 1-element array. Before 1.1.0, `eachSeries`'s callback was called on the same tick, which this patch restores. In 2.0.0, it will be called on the next tick. ([#782](https://github.com/caolan/async/issues/782))
# v1.2.0
New Features:
- Added `timesLimit` ([#743](https://github.com/caolan/async/issues/743))
- `concurrency` can be changed after initialization in `queue` by setting `q.concurrency`. The new concurrency will be reflected the next time a task is processed. ([#747](https://github.com/caolan/async/issues/747), [#772](https://github.com/caolan/async/issues/772))
Bug Fixes:
- Fixed a regression in `each` and family with empty arrays that have additional properties. ([#775](https://github.com/caolan/async/issues/775), [#777](https://github.com/caolan/async/issues/777))
# v1.1.1
Bug Fix:
- Small regression with synchronous iterator behavior in `eachSeries` with a 1-element array. Before 1.1.0, `eachSeries`'s callback was called on the same tick, which this patch restores. In 2.0.0, it will be called on the next tick. ([#782](https://github.com/caolan/async/issues/782))
# v1.1.0
New Features:
- `cargo` now supports all of the same methods and event callbacks as `queue`.
- Added `ensureAsync` - A wrapper that ensures an async function calls its callback on a later tick. ([#769](https://github.com/caolan/async/issues/769))
- Optimized `map`, `eachOf`, and `waterfall` families of functions
- Passing a `null` or `undefined` array to `map`, `each`, `parallel` and families will be treated as an empty array ([#667](https://github.com/caolan/async/issues/667)).
- The callback is now optional for the composed results of `compose` and `seq`. ([#618](https://github.com/caolan/async/issues/618))
- Reduced file size by 4kb, (minified version by 1kb)
- Added code coverage through `nyc` and `coveralls` ([#768](https://github.com/caolan/async/issues/768))
Bug Fixes:
- `forever` will no longer stack overflow with a synchronous iterator ([#622](https://github.com/caolan/async/issues/622))
- `eachLimit` and other limit functions will stop iterating once an error occurs ([#754](https://github.com/caolan/async/issues/754))
- Always pass `null` in callbacks when there is no error ([#439](https://github.com/caolan/async/issues/439))
- Ensure proper conditions when calling `drain()` after pushing an empty data set to a queue ([#668](https://github.com/caolan/async/issues/668))
- `each` and family will properly handle an empty array ([#578](https://github.com/caolan/async/issues/578))
- `eachSeries` and family will finish if the underlying array is modified during execution ([#557](https://github.com/caolan/async/issues/557))
- `queue` will throw if a non-function is passed to `q.push()` ([#593](https://github.com/caolan/async/issues/593))
- Doc fixes ([#629](https://github.com/caolan/async/issues/629), [#766](https://github.com/caolan/async/issues/766))
# v1.0.0
No known breaking changes, we are simply complying with semver from here on out.
Changes:
- Start using a changelog!
- Add `forEachOf` for iterating over Objects (or to iterate Arrays with indexes available) ([#168](https://github.com/caolan/async/issues/168) [#704](https://github.com/caolan/async/issues/704) [#321](https://github.com/caolan/async/issues/321))
- Detect deadlocks in `auto` ([#663](https://github.com/caolan/async/issues/663))
- Better support for require.js ([#527](https://github.com/caolan/async/issues/527))
- Throw if queue created with concurrency `0` ([#714](https://github.com/caolan/async/issues/714))
- Fix unneeded iteration in `queue.resume()` ([#758](https://github.com/caolan/async/issues/758))
- Guard against timer mocking overriding `setImmediate` ([#609](https://github.com/caolan/async/issues/609) [#611](https://github.com/caolan/async/issues/611))
- Miscellaneous doc fixes ([#542](https://github.com/caolan/async/issues/542) [#596](https://github.com/caolan/async/issues/596) [#615](https://github.com/caolan/async/issues/615) [#628](https://github.com/caolan/async/issues/628) [#631](https://github.com/caolan/async/issues/631) [#690](https://github.com/caolan/async/issues/690) [#729](https://github.com/caolan/async/issues/729))
- Use single noop function internally ([#546](https://github.com/caolan/async/issues/546))
- Optimize internal `_each`, `_map` and `_keys` functions.

19
api/node_modules/async/LICENSE generated vendored Normal file
View File

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

59
api/node_modules/async/README.md generated vendored Normal file
View File

@@ -0,0 +1,59 @@
![Async Logo](https://raw.githubusercontent.com/caolan/async/master/logo/async-logo_readme.jpg)
![Github Actions CI status](https://github.com/caolan/async/actions/workflows/ci.yml/badge.svg)
[![NPM version](https://img.shields.io/npm/v/async.svg)](https://www.npmjs.com/package/async)
[![Coverage Status](https://coveralls.io/repos/caolan/async/badge.svg?branch=master)](https://coveralls.io/r/caolan/async?branch=master)
[![Join the chat at https://gitter.im/caolan/async](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/caolan/async?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/async/badge?style=rounded)](https://www.jsdelivr.com/package/npm/async)
<!--
|Linux|Windows|MacOS|
|-|-|-|
|[![Linux Build Status](https://dev.azure.com/caolanmcmahon/async/_apis/build/status/caolan.async?branchName=master&jobName=Linux&configuration=Linux%20node_10_x)](https://dev.azure.com/caolanmcmahon/async/_build/latest?definitionId=1&branchName=master) | [![Windows Build Status](https://dev.azure.com/caolanmcmahon/async/_apis/build/status/caolan.async?branchName=master&jobName=Windows&configuration=Windows%20node_10_x)](https://dev.azure.com/caolanmcmahon/async/_build/latest?definitionId=1&branchName=master) | [![MacOS Build Status](https://dev.azure.com/caolanmcmahon/async/_apis/build/status/caolan.async?branchName=master&jobName=OSX&configuration=OSX%20node_10_x)](https://dev.azure.com/caolanmcmahon/async/_build/latest?definitionId=1&branchName=master)| -->
Async is a utility module which provides straight-forward, powerful functions for working with [asynchronous JavaScript](http://caolan.github.io/async/v3/global.html). Although originally designed for use with [Node.js](https://nodejs.org/) and installable via `npm i async`, it can also be used directly in the browser. A ESM/MJS version is included in the main `async` package that should automatically be used with compatible bundlers such as Webpack and Rollup.
A pure ESM version of Async is available as [`async-es`](https://www.npmjs.com/package/async-es).
For Documentation, visit <https://caolan.github.io/async/>
*For Async v1.5.x documentation, go [HERE](https://github.com/caolan/async/blob/v1.5.2/README.md)*
```javascript
// for use with Node-style callbacks...
var async = require("async");
var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"};
var configs = {};
async.forEachOf(obj, (value, key, callback) => {
fs.readFile(__dirname + value, "utf8", (err, data) => {
if (err) return callback(err);
try {
configs[key] = JSON.parse(data);
} catch (e) {
return callback(e);
}
callback();
});
}, err => {
if (err) console.error(err.message);
// configs is now a map of JSON data
doSomethingWith(configs);
});
```
```javascript
var async = require("async");
// ...or ES2017 async functions
async.mapLimit(urls, 5, async function(url) {
const response = await fetch(url)
return response.body
}, (err, results) => {
if (err) throw err
// results is now an array of the response bodies
console.log(results)
})
```

119
api/node_modules/async/all.js generated vendored Normal file
View File

@@ -0,0 +1,119 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createTester = require('./internal/createTester.js');
var _createTester2 = _interopRequireDefault(_createTester);
var _eachOf = require('./eachOf.js');
var _eachOf2 = _interopRequireDefault(_eachOf);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Returns `true` if every element in `coll` satisfies an async test. If any
* iteratee call returns `false`, the main `callback` is immediately called.
*
* @name every
* @static
* @memberOf module:Collections
* @method
* @alias all
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - An async truth test to apply to each item
* in the collection in parallel.
* The iteratee must complete with a boolean result value.
* Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished. Result will be either `true` or `false`
* depending on the values of the async tests. Invoked with (err, result).
* @returns {Promise} a promise, if no callback provided
* @example
*
* // dir1 is a directory that contains file1.txt, file2.txt
* // dir2 is a directory that contains file3.txt, file4.txt
* // dir3 is a directory that contains file5.txt
* // dir4 does not exist
*
* const fileList = ['dir1/file1.txt','dir2/file3.txt','dir3/file5.txt'];
* const withMissingFileList = ['file1.txt','file2.txt','file4.txt'];
*
* // asynchronous function that checks if a file exists
* function fileExists(file, callback) {
* fs.access(file, fs.constants.F_OK, (err) => {
* callback(null, !err);
* });
* }
*
* // Using callbacks
* async.every(fileList, fileExists, function(err, result) {
* console.log(result);
* // true
* // result is true since every file exists
* });
*
* async.every(withMissingFileList, fileExists, function(err, result) {
* console.log(result);
* // false
* // result is false since NOT every file exists
* });
*
* // Using Promises
* async.every(fileList, fileExists)
* .then( result => {
* console.log(result);
* // true
* // result is true since every file exists
* }).catch( err => {
* console.log(err);
* });
*
* async.every(withMissingFileList, fileExists)
* .then( result => {
* console.log(result);
* // false
* // result is false since NOT every file exists
* }).catch( err => {
* console.log(err);
* });
*
* // Using async/await
* async () => {
* try {
* let result = await async.every(fileList, fileExists);
* console.log(result);
* // true
* // result is true since every file exists
* }
* catch (err) {
* console.log(err);
* }
* }
*
* async () => {
* try {
* let result = await async.every(withMissingFileList, fileExists);
* console.log(result);
* // false
* // result is false since NOT every file exists
* }
* catch (err) {
* console.log(err);
* }
* }
*
*/
function every(coll, iteratee, callback) {
return (0, _createTester2.default)(bool => !bool, res => !res)(_eachOf2.default, coll, iteratee, callback);
}
exports.default = (0, _awaitify2.default)(every, 3);
module.exports = exports['default'];

46
api/node_modules/async/allLimit.js generated vendored Normal file
View File

@@ -0,0 +1,46 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createTester = require('./internal/createTester.js');
var _createTester2 = _interopRequireDefault(_createTester);
var _eachOfLimit = require('./internal/eachOfLimit.js');
var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time.
*
* @name everyLimit
* @static
* @memberOf module:Collections
* @method
* @see [async.every]{@link module:Collections.every}
* @alias allLimit
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {AsyncFunction} iteratee - An async truth test to apply to each item
* in the collection in parallel.
* The iteratee must complete with a boolean result value.
* Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished. Result will be either `true` or `false`
* depending on the values of the async tests. Invoked with (err, result).
* @returns {Promise} a promise, if no callback provided
*/
function everyLimit(coll, limit, iteratee, callback) {
return (0, _createTester2.default)(bool => !bool, res => !res)((0, _eachOfLimit2.default)(limit), coll, iteratee, callback);
}
exports.default = (0, _awaitify2.default)(everyLimit, 4);
module.exports = exports['default'];

45
api/node_modules/async/allSeries.js generated vendored Normal file
View File

@@ -0,0 +1,45 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createTester = require('./internal/createTester.js');
var _createTester2 = _interopRequireDefault(_createTester);
var _eachOfSeries = require('./eachOfSeries.js');
var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time.
*
* @name everySeries
* @static
* @memberOf module:Collections
* @method
* @see [async.every]{@link module:Collections.every}
* @alias allSeries
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - An async truth test to apply to each item
* in the collection in series.
* The iteratee must complete with a boolean result value.
* Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished. Result will be either `true` or `false`
* depending on the values of the async tests. Invoked with (err, result).
* @returns {Promise} a promise, if no callback provided
*/
function everySeries(coll, iteratee, callback) {
return (0, _createTester2.default)(bool => !bool, res => !res)(_eachOfSeries2.default, coll, iteratee, callback);
}
exports.default = (0, _awaitify2.default)(everySeries, 3);
module.exports = exports['default'];

122
api/node_modules/async/any.js generated vendored Normal file
View File

@@ -0,0 +1,122 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createTester = require('./internal/createTester.js');
var _createTester2 = _interopRequireDefault(_createTester);
var _eachOf = require('./eachOf.js');
var _eachOf2 = _interopRequireDefault(_eachOf);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Returns `true` if at least one element in the `coll` satisfies an async test.
* If any iteratee call returns `true`, the main `callback` is immediately
* called.
*
* @name some
* @static
* @memberOf module:Collections
* @method
* @alias any
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - An async truth test to apply to each item
* in the collections in parallel.
* The iteratee should complete with a boolean `result` value.
* Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called as soon as any
* iteratee returns `true`, or after all the iteratee functions have finished.
* Result will be either `true` or `false` depending on the values of the async
* tests. Invoked with (err, result).
* @returns {Promise} a promise, if no callback provided
* @example
*
* // dir1 is a directory that contains file1.txt, file2.txt
* // dir2 is a directory that contains file3.txt, file4.txt
* // dir3 is a directory that contains file5.txt
* // dir4 does not exist
*
* // asynchronous function that checks if a file exists
* function fileExists(file, callback) {
* fs.access(file, fs.constants.F_OK, (err) => {
* callback(null, !err);
* });
* }
*
* // Using callbacks
* async.some(['dir1/missing.txt','dir2/missing.txt','dir3/file5.txt'], fileExists,
* function(err, result) {
* console.log(result);
* // true
* // result is true since some file in the list exists
* }
*);
*
* async.some(['dir1/missing.txt','dir2/missing.txt','dir4/missing.txt'], fileExists,
* function(err, result) {
* console.log(result);
* // false
* // result is false since none of the files exists
* }
*);
*
* // Using Promises
* async.some(['dir1/missing.txt','dir2/missing.txt','dir3/file5.txt'], fileExists)
* .then( result => {
* console.log(result);
* // true
* // result is true since some file in the list exists
* }).catch( err => {
* console.log(err);
* });
*
* async.some(['dir1/missing.txt','dir2/missing.txt','dir4/missing.txt'], fileExists)
* .then( result => {
* console.log(result);
* // false
* // result is false since none of the files exists
* }).catch( err => {
* console.log(err);
* });
*
* // Using async/await
* async () => {
* try {
* let result = await async.some(['dir1/missing.txt','dir2/missing.txt','dir3/file5.txt'], fileExists);
* console.log(result);
* // true
* // result is true since some file in the list exists
* }
* catch (err) {
* console.log(err);
* }
* }
*
* async () => {
* try {
* let result = await async.some(['dir1/missing.txt','dir2/missing.txt','dir4/missing.txt'], fileExists);
* console.log(result);
* // false
* // result is false since none of the files exists
* }
* catch (err) {
* console.log(err);
* }
* }
*
*/
function some(coll, iteratee, callback) {
return (0, _createTester2.default)(Boolean, res => res)(_eachOf2.default, coll, iteratee, callback);
}
exports.default = (0, _awaitify2.default)(some, 3);
module.exports = exports['default'];

47
api/node_modules/async/anyLimit.js generated vendored Normal file
View File

@@ -0,0 +1,47 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createTester = require('./internal/createTester.js');
var _createTester2 = _interopRequireDefault(_createTester);
var _eachOfLimit = require('./internal/eachOfLimit.js');
var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`some`]{@link module:Collections.some} but runs a maximum of `limit` async operations at a time.
*
* @name someLimit
* @static
* @memberOf module:Collections
* @method
* @see [async.some]{@link module:Collections.some}
* @alias anyLimit
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {AsyncFunction} iteratee - An async truth test to apply to each item
* in the collections in parallel.
* The iteratee should complete with a boolean `result` value.
* Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called as soon as any
* iteratee returns `true`, or after all the iteratee functions have finished.
* Result will be either `true` or `false` depending on the values of the async
* tests. Invoked with (err, result).
* @returns {Promise} a promise, if no callback provided
*/
function someLimit(coll, limit, iteratee, callback) {
return (0, _createTester2.default)(Boolean, res => res)((0, _eachOfLimit2.default)(limit), coll, iteratee, callback);
}
exports.default = (0, _awaitify2.default)(someLimit, 4);
module.exports = exports['default'];

46
api/node_modules/async/anySeries.js generated vendored Normal file
View File

@@ -0,0 +1,46 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createTester = require('./internal/createTester.js');
var _createTester2 = _interopRequireDefault(_createTester);
var _eachOfSeries = require('./eachOfSeries.js');
var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`some`]{@link module:Collections.some} but runs only a single async operation at a time.
*
* @name someSeries
* @static
* @memberOf module:Collections
* @method
* @see [async.some]{@link module:Collections.some}
* @alias anySeries
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - An async truth test to apply to each item
* in the collections in series.
* The iteratee should complete with a boolean `result` value.
* Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called as soon as any
* iteratee returns `true`, or after all the iteratee functions have finished.
* Result will be either `true` or `false` depending on the values of the async
* tests. Invoked with (err, result).
* @returns {Promise} a promise, if no callback provided
*/
function someSeries(coll, iteratee, callback) {
return (0, _createTester2.default)(Boolean, res => res)(_eachOfSeries2.default, coll, iteratee, callback);
}
exports.default = (0, _awaitify2.default)(someSeries, 3);
module.exports = exports['default'];

55
api/node_modules/async/apply.js generated vendored Normal file
View File

@@ -0,0 +1,55 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function (fn, ...args) {
return (...callArgs) => fn(...args, ...callArgs);
};
module.exports = exports["default"]; /**
* Creates a continuation function with some arguments already applied.
*
* Useful as a shorthand when combined with other control flow functions. Any
* arguments passed to the returned function are added to the arguments
* originally passed to apply.
*
* @name apply
* @static
* @memberOf module:Utils
* @method
* @category Util
* @param {Function} fn - The function you want to eventually apply all
* arguments to. Invokes with (arguments...).
* @param {...*} arguments... - Any number of arguments to automatically apply
* when the continuation is called.
* @returns {Function} the partially-applied function
* @example
*
* // using apply
* async.parallel([
* async.apply(fs.writeFile, 'testfile1', 'test1'),
* async.apply(fs.writeFile, 'testfile2', 'test2')
* ]);
*
*
* // the same process without using apply
* async.parallel([
* function(callback) {
* fs.writeFile('testfile1', 'test1', callback);
* },
* function(callback) {
* fs.writeFile('testfile2', 'test2', callback);
* }
* ]);
*
* // It's possible to pass any number of additional arguments when calling the
* // continuation:
*
* node> var fn = async.apply(sys.puts, 'one');
* node> fn('two', 'three');
* one
* two
* three
*/

57
api/node_modules/async/applyEach.js generated vendored Normal file
View File

@@ -0,0 +1,57 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _applyEach = require('./internal/applyEach.js');
var _applyEach2 = _interopRequireDefault(_applyEach);
var _map = require('./map.js');
var _map2 = _interopRequireDefault(_map);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Applies the provided arguments to each function in the array, calling
* `callback` after all functions have completed. If you only provide the first
* argument, `fns`, then it will return a function which lets you pass in the
* arguments as if it were a single function call. If more arguments are
* provided, `callback` is required while `args` is still optional. The results
* for each of the applied async functions are passed to the final callback
* as an array.
*
* @name applyEach
* @static
* @memberOf module:ControlFlow
* @method
* @category Control Flow
* @param {Array|Iterable|AsyncIterable|Object} fns - A collection of {@link AsyncFunction}s
* to all call with the same arguments
* @param {...*} [args] - any number of separate arguments to pass to the
* function.
* @param {Function} [callback] - the final argument should be the callback,
* called when all functions have completed processing.
* @returns {AsyncFunction} - Returns a function that takes no args other than
* an optional callback, that is the result of applying the `args` to each
* of the functions.
* @example
*
* const appliedFn = async.applyEach([enableSearch, updateSchema], 'bucket')
*
* appliedFn((err, results) => {
* // results[0] is the results for `enableSearch`
* // results[1] is the results for `updateSchema`
* });
*
* // partial application example:
* async.each(
* buckets,
* async (bucket) => async.applyEach([enableSearch, updateSchema], bucket)(),
* callback
* );
*/
exports.default = (0, _applyEach2.default)(_map2.default);
module.exports = exports['default'];

37
api/node_modules/async/applyEachSeries.js generated vendored Normal file
View File

@@ -0,0 +1,37 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _applyEach = require('./internal/applyEach.js');
var _applyEach2 = _interopRequireDefault(_applyEach);
var _mapSeries = require('./mapSeries.js');
var _mapSeries2 = _interopRequireDefault(_mapSeries);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`applyEach`]{@link module:ControlFlow.applyEach} but runs only a single async operation at a time.
*
* @name applyEachSeries
* @static
* @memberOf module:ControlFlow
* @method
* @see [async.applyEach]{@link module:ControlFlow.applyEach}
* @category Control Flow
* @param {Array|Iterable|AsyncIterable|Object} fns - A collection of {@link AsyncFunction}s to all
* call with the same arguments
* @param {...*} [args] - any number of separate arguments to pass to the
* function.
* @param {Function} [callback] - the final argument should be the callback,
* called when all functions have completed processing.
* @returns {AsyncFunction} - A function, that when called, is the result of
* appling the `args` to the list of functions. It takes no args, other than
* a callback.
*/
exports.default = (0, _applyEach2.default)(_mapSeries2.default);
module.exports = exports['default'];

118
api/node_modules/async/asyncify.js generated vendored Normal file
View File

@@ -0,0 +1,118 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = asyncify;
var _initialParams = require('./internal/initialParams.js');
var _initialParams2 = _interopRequireDefault(_initialParams);
var _setImmediate = require('./internal/setImmediate.js');
var _setImmediate2 = _interopRequireDefault(_setImmediate);
var _wrapAsync = require('./internal/wrapAsync.js');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Take a sync function and make it async, passing its return value to a
* callback. This is useful for plugging sync functions into a waterfall,
* series, or other async functions. Any arguments passed to the generated
* function will be passed to the wrapped function (except for the final
* callback argument). Errors thrown will be passed to the callback.
*
* If the function passed to `asyncify` returns a Promise, that promises's
* resolved/rejected state will be used to call the callback, rather than simply
* the synchronous return value.
*
* This also means you can asyncify ES2017 `async` functions.
*
* @name asyncify
* @static
* @memberOf module:Utils
* @method
* @alias wrapSync
* @category Util
* @param {Function} func - The synchronous function, or Promise-returning
* function to convert to an {@link AsyncFunction}.
* @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be
* invoked with `(args..., callback)`.
* @example
*
* // passing a regular synchronous function
* async.waterfall([
* async.apply(fs.readFile, filename, "utf8"),
* async.asyncify(JSON.parse),
* function (data, next) {
* // data is the result of parsing the text.
* // If there was a parsing error, it would have been caught.
* }
* ], callback);
*
* // passing a function returning a promise
* async.waterfall([
* async.apply(fs.readFile, filename, "utf8"),
* async.asyncify(function (contents) {
* return db.model.create(contents);
* }),
* function (model, next) {
* // `model` is the instantiated model object.
* // If there was an error, this function would be skipped.
* }
* ], callback);
*
* // es2017 example, though `asyncify` is not needed if your JS environment
* // supports async functions out of the box
* var q = async.queue(async.asyncify(async function(file) {
* var intermediateStep = await processFile(file);
* return await somePromise(intermediateStep)
* }));
*
* q.push(files);
*/
function asyncify(func) {
if ((0, _wrapAsync.isAsync)(func)) {
return function (...args /*, callback*/) {
const callback = args.pop();
const promise = func.apply(this, args);
return handlePromise(promise, callback);
};
}
return (0, _initialParams2.default)(function (args, callback) {
var result;
try {
result = func.apply(this, args);
} catch (e) {
return callback(e);
}
// if result is Promise object
if (result && typeof result.then === 'function') {
return handlePromise(result, callback);
} else {
callback(null, result);
}
});
}
function handlePromise(promise, callback) {
return promise.then(value => {
invokeCallback(callback, null, value);
}, err => {
invokeCallback(callback, err && err.message ? err : new Error(err));
});
}
function invokeCallback(callback, error, value) {
try {
callback(error, value);
} catch (err) {
(0, _setImmediate2.default)(e => {
throw e;
}, err);
}
}
module.exports = exports['default'];

333
api/node_modules/async/auto.js generated vendored Normal file
View File

@@ -0,0 +1,333 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = auto;
var _once = require('./internal/once.js');
var _once2 = _interopRequireDefault(_once);
var _onlyOnce = require('./internal/onlyOnce.js');
var _onlyOnce2 = _interopRequireDefault(_onlyOnce);
var _wrapAsync = require('./internal/wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
var _promiseCallback = require('./internal/promiseCallback.js');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Determines the best order for running the {@link AsyncFunction}s in `tasks`, based on
* their requirements. Each function can optionally depend on other functions
* being completed first, and each function is run as soon as its requirements
* are satisfied.
*
* If any of the {@link AsyncFunction}s pass an error to their callback, the `auto` sequence
* will stop. Further tasks will not execute (so any other functions depending
* on it will not run), and the main `callback` is immediately called with the
* error.
*
* {@link AsyncFunction}s also receive an object containing the results of functions which
* have completed so far as the first argument, if they have dependencies. If a
* task function has no dependencies, it will only be passed a callback.
*
* @name auto
* @static
* @memberOf module:ControlFlow
* @method
* @category Control Flow
* @param {Object} tasks - An object. Each of its properties is either a
* function or an array of requirements, with the {@link AsyncFunction} itself the last item
* in the array. The object's key of a property serves as the name of the task
* defined by that property, i.e. can be used when specifying requirements for
* other tasks. The function receives one or two arguments:
* * a `results` object, containing the results of the previously executed
* functions, only passed if the task has any dependencies,
* * a `callback(err, result)` function, which must be called when finished,
* passing an `error` (which can be `null`) and the result of the function's
* execution.
* @param {number} [concurrency=Infinity] - An optional `integer` for
* determining the maximum number of tasks that can be run in parallel. By
* default, as many as possible.
* @param {Function} [callback] - An optional callback which is called when all
* the tasks have been completed. It receives the `err` argument if any `tasks`
* pass an error to their callback. Results are always returned; however, if an
* error occurs, no further `tasks` will be performed, and the results object
* will only contain partial results. Invoked with (err, results).
* @returns {Promise} a promise, if a callback is not passed
* @example
*
* //Using Callbacks
* async.auto({
* get_data: function(callback) {
* // async code to get some data
* callback(null, 'data', 'converted to array');
* },
* make_folder: function(callback) {
* // async code to create a directory to store a file in
* // this is run at the same time as getting the data
* callback(null, 'folder');
* },
* write_file: ['get_data', 'make_folder', function(results, callback) {
* // once there is some data and the directory exists,
* // write the data to a file in the directory
* callback(null, 'filename');
* }],
* email_link: ['write_file', function(results, callback) {
* // once the file is written let's email a link to it...
* callback(null, {'file':results.write_file, 'email':'user@example.com'});
* }]
* }, function(err, results) {
* if (err) {
* console.log('err = ', err);
* }
* console.log('results = ', results);
* // results = {
* // get_data: ['data', 'converted to array']
* // make_folder; 'folder',
* // write_file: 'filename'
* // email_link: { file: 'filename', email: 'user@example.com' }
* // }
* });
*
* //Using Promises
* async.auto({
* get_data: function(callback) {
* console.log('in get_data');
* // async code to get some data
* callback(null, 'data', 'converted to array');
* },
* make_folder: function(callback) {
* console.log('in make_folder');
* // async code to create a directory to store a file in
* // this is run at the same time as getting the data
* callback(null, 'folder');
* },
* write_file: ['get_data', 'make_folder', function(results, callback) {
* // once there is some data and the directory exists,
* // write the data to a file in the directory
* callback(null, 'filename');
* }],
* email_link: ['write_file', function(results, callback) {
* // once the file is written let's email a link to it...
* callback(null, {'file':results.write_file, 'email':'user@example.com'});
* }]
* }).then(results => {
* console.log('results = ', results);
* // results = {
* // get_data: ['data', 'converted to array']
* // make_folder; 'folder',
* // write_file: 'filename'
* // email_link: { file: 'filename', email: 'user@example.com' }
* // }
* }).catch(err => {
* console.log('err = ', err);
* });
*
* //Using async/await
* async () => {
* try {
* let results = await async.auto({
* get_data: function(callback) {
* // async code to get some data
* callback(null, 'data', 'converted to array');
* },
* make_folder: function(callback) {
* // async code to create a directory to store a file in
* // this is run at the same time as getting the data
* callback(null, 'folder');
* },
* write_file: ['get_data', 'make_folder', function(results, callback) {
* // once there is some data and the directory exists,
* // write the data to a file in the directory
* callback(null, 'filename');
* }],
* email_link: ['write_file', function(results, callback) {
* // once the file is written let's email a link to it...
* callback(null, {'file':results.write_file, 'email':'user@example.com'});
* }]
* });
* console.log('results = ', results);
* // results = {
* // get_data: ['data', 'converted to array']
* // make_folder; 'folder',
* // write_file: 'filename'
* // email_link: { file: 'filename', email: 'user@example.com' }
* // }
* }
* catch (err) {
* console.log(err);
* }
* }
*
*/
function auto(tasks, concurrency, callback) {
if (typeof concurrency !== 'number') {
// concurrency is optional, shift the args.
callback = concurrency;
concurrency = null;
}
callback = (0, _once2.default)(callback || (0, _promiseCallback.promiseCallback)());
var numTasks = Object.keys(tasks).length;
if (!numTasks) {
return callback(null);
}
if (!concurrency) {
concurrency = numTasks;
}
var results = {};
var runningTasks = 0;
var canceled = false;
var hasError = false;
var listeners = Object.create(null);
var readyTasks = [];
// for cycle detection:
var readyToCheck = []; // tasks that have been identified as reachable
// without the possibility of returning to an ancestor task
var uncheckedDependencies = {};
Object.keys(tasks).forEach(key => {
var task = tasks[key];
if (!Array.isArray(task)) {
// no dependencies
enqueueTask(key, [task]);
readyToCheck.push(key);
return;
}
var dependencies = task.slice(0, task.length - 1);
var remainingDependencies = dependencies.length;
if (remainingDependencies === 0) {
enqueueTask(key, task);
readyToCheck.push(key);
return;
}
uncheckedDependencies[key] = remainingDependencies;
dependencies.forEach(dependencyName => {
if (!tasks[dependencyName]) {
throw new Error('async.auto task `' + key + '` has a non-existent dependency `' + dependencyName + '` in ' + dependencies.join(', '));
}
addListener(dependencyName, () => {
remainingDependencies--;
if (remainingDependencies === 0) {
enqueueTask(key, task);
}
});
});
});
checkForDeadlocks();
processQueue();
function enqueueTask(key, task) {
readyTasks.push(() => runTask(key, task));
}
function processQueue() {
if (canceled) return;
if (readyTasks.length === 0 && runningTasks === 0) {
return callback(null, results);
}
while (readyTasks.length && runningTasks < concurrency) {
var run = readyTasks.shift();
run();
}
}
function addListener(taskName, fn) {
var taskListeners = listeners[taskName];
if (!taskListeners) {
taskListeners = listeners[taskName] = [];
}
taskListeners.push(fn);
}
function taskComplete(taskName) {
var taskListeners = listeners[taskName] || [];
taskListeners.forEach(fn => fn());
processQueue();
}
function runTask(key, task) {
if (hasError) return;
var taskCallback = (0, _onlyOnce2.default)((err, ...result) => {
runningTasks--;
if (err === false) {
canceled = true;
return;
}
if (result.length < 2) {
[result] = result;
}
if (err) {
var safeResults = {};
Object.keys(results).forEach(rkey => {
safeResults[rkey] = results[rkey];
});
safeResults[key] = result;
hasError = true;
listeners = Object.create(null);
if (canceled) return;
callback(err, safeResults);
} else {
results[key] = result;
taskComplete(key);
}
});
runningTasks++;
var taskFn = (0, _wrapAsync2.default)(task[task.length - 1]);
if (task.length > 1) {
taskFn(results, taskCallback);
} else {
taskFn(taskCallback);
}
}
function checkForDeadlocks() {
// Kahn's algorithm
// https://en.wikipedia.org/wiki/Topological_sorting#Kahn.27s_algorithm
// http://connalle.blogspot.com/2013/10/topological-sortingkahn-algorithm.html
var currentTask;
var counter = 0;
while (readyToCheck.length) {
currentTask = readyToCheck.pop();
counter++;
getDependents(currentTask).forEach(dependent => {
if (--uncheckedDependencies[dependent] === 0) {
readyToCheck.push(dependent);
}
});
}
if (counter !== numTasks) {
throw new Error('async.auto cannot execute tasks due to a recursive dependency');
}
}
function getDependents(taskName) {
var result = [];
Object.keys(tasks).forEach(key => {
const task = tasks[key];
if (Array.isArray(task) && task.indexOf(taskName) >= 0) {
result.push(key);
}
});
return result;
}
return callback[_promiseCallback.PROMISE_SYMBOL];
}
module.exports = exports['default'];

182
api/node_modules/async/autoInject.js generated vendored Normal file
View File

@@ -0,0 +1,182 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = autoInject;
var _auto = require('./auto.js');
var _auto2 = _interopRequireDefault(_auto);
var _wrapAsync = require('./internal/wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var FN_ARGS = /^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/;
var ARROW_FN_ARGS = /^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/;
var FN_ARG_SPLIT = /,/;
var FN_ARG = /(=.+)?(\s*)$/;
function stripComments(string) {
let stripped = '';
let index = 0;
let endBlockComment = string.indexOf('*/');
while (index < string.length) {
if (string[index] === '/' && string[index + 1] === '/') {
// inline comment
let endIndex = string.indexOf('\n', index);
index = endIndex === -1 ? string.length : endIndex;
} else if (endBlockComment !== -1 && string[index] === '/' && string[index + 1] === '*') {
// block comment
let endIndex = string.indexOf('*/', index);
if (endIndex !== -1) {
index = endIndex + 2;
endBlockComment = string.indexOf('*/', index);
} else {
stripped += string[index];
index++;
}
} else {
stripped += string[index];
index++;
}
}
return stripped;
}
function parseParams(func) {
const src = stripComments(func.toString());
let match = src.match(FN_ARGS);
if (!match) {
match = src.match(ARROW_FN_ARGS);
}
if (!match) throw new Error('could not parse args in autoInject\nSource:\n' + src);
let [, args] = match;
return args.replace(/\s/g, '').split(FN_ARG_SPLIT).map(arg => arg.replace(FN_ARG, '').trim());
}
/**
* A dependency-injected version of the [async.auto]{@link module:ControlFlow.auto} function. Dependent
* tasks are specified as parameters to the function, after the usual callback
* parameter, with the parameter names matching the names of the tasks it
* depends on. This can provide even more readable task graphs which can be
* easier to maintain.
*
* If a final callback is specified, the task results are similarly injected,
* specified as named parameters after the initial error parameter.
*
* The autoInject function is purely syntactic sugar and its semantics are
* otherwise equivalent to [async.auto]{@link module:ControlFlow.auto}.
*
* @name autoInject
* @static
* @memberOf module:ControlFlow
* @method
* @see [async.auto]{@link module:ControlFlow.auto}
* @category Control Flow
* @param {Object} tasks - An object, each of whose properties is an {@link AsyncFunction} of
* the form 'func([dependencies...], callback). The object's key of a property
* serves as the name of the task defined by that property, i.e. can be used
* when specifying requirements for other tasks.
* * The `callback` parameter is a `callback(err, result)` which must be called
* when finished, passing an `error` (which can be `null`) and the result of
* the function's execution. The remaining parameters name other tasks on
* which the task is dependent, and the results from those tasks are the
* arguments of those parameters.
* @param {Function} [callback] - An optional callback which is called when all
* the tasks have been completed. It receives the `err` argument if any `tasks`
* pass an error to their callback, and a `results` object with any completed
* task results, similar to `auto`.
* @returns {Promise} a promise, if no callback is passed
* @example
*
* // The example from `auto` can be rewritten as follows:
* async.autoInject({
* get_data: function(callback) {
* // async code to get some data
* callback(null, 'data', 'converted to array');
* },
* make_folder: function(callback) {
* // async code to create a directory to store a file in
* // this is run at the same time as getting the data
* callback(null, 'folder');
* },
* write_file: function(get_data, make_folder, callback) {
* // once there is some data and the directory exists,
* // write the data to a file in the directory
* callback(null, 'filename');
* },
* email_link: function(write_file, callback) {
* // once the file is written let's email a link to it...
* // write_file contains the filename returned by write_file.
* callback(null, {'file':write_file, 'email':'user@example.com'});
* }
* }, function(err, results) {
* console.log('err = ', err);
* console.log('email_link = ', results.email_link);
* });
*
* // If you are using a JS minifier that mangles parameter names, `autoInject`
* // will not work with plain functions, since the parameter names will be
* // collapsed to a single letter identifier. To work around this, you can
* // explicitly specify the names of the parameters your task function needs
* // in an array, similar to Angular.js dependency injection.
*
* // This still has an advantage over plain `auto`, since the results a task
* // depends on are still spread into arguments.
* async.autoInject({
* //...
* write_file: ['get_data', 'make_folder', function(get_data, make_folder, callback) {
* callback(null, 'filename');
* }],
* email_link: ['write_file', function(write_file, callback) {
* callback(null, {'file':write_file, 'email':'user@example.com'});
* }]
* //...
* }, function(err, results) {
* console.log('err = ', err);
* console.log('email_link = ', results.email_link);
* });
*/
function autoInject(tasks, callback) {
var newTasks = {};
Object.keys(tasks).forEach(key => {
var taskFn = tasks[key];
var params;
var fnIsAsync = (0, _wrapAsync.isAsync)(taskFn);
var hasNoDeps = !fnIsAsync && taskFn.length === 1 || fnIsAsync && taskFn.length === 0;
if (Array.isArray(taskFn)) {
params = [...taskFn];
taskFn = params.pop();
newTasks[key] = params.concat(params.length > 0 ? newTask : taskFn);
} else if (hasNoDeps) {
// no dependencies, use the function as-is
newTasks[key] = taskFn;
} else {
params = parseParams(taskFn);
if (taskFn.length === 0 && !fnIsAsync && params.length === 0) {
throw new Error("autoInject task functions require explicit parameters.");
}
// remove callback param
if (!fnIsAsync) params.pop();
newTasks[key] = params.concat(newTask);
}
function newTask(results, taskCb) {
var newArgs = params.map(name => results[name]);
newArgs.push(taskCb);
(0, _wrapAsync2.default)(taskFn)(...newArgs);
}
});
return (0, _auto2.default)(newTasks, callback);
}
module.exports = exports['default'];

17
api/node_modules/async/bower.json generated vendored Normal file
View File

@@ -0,0 +1,17 @@
{
"name": "async",
"main": "dist/async.js",
"ignore": [
"bower_components",
"lib",
"test",
"node_modules",
"perf",
"support",
"**/.*",
"*.config.js",
"*.json",
"index.js",
"Makefile"
]
}

63
api/node_modules/async/cargo.js generated vendored Normal file
View File

@@ -0,0 +1,63 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = cargo;
var _queue = require('./internal/queue.js');
var _queue2 = _interopRequireDefault(_queue);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Creates a `cargo` object with the specified payload. Tasks added to the
* cargo will be processed altogether (up to the `payload` limit). If the
* `worker` is in progress, the task is queued until it becomes available. Once
* the `worker` has completed some tasks, each callback of those tasks is
* called. Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966)
* for how `cargo` and `queue` work.
*
* While [`queue`]{@link module:ControlFlow.queue} passes only one task to one of a group of workers
* at a time, cargo passes an array of tasks to a single worker, repeating
* when the worker is finished.
*
* @name cargo
* @static
* @memberOf module:ControlFlow
* @method
* @see [async.queue]{@link module:ControlFlow.queue}
* @category Control Flow
* @param {AsyncFunction} worker - An asynchronous function for processing an array
* of queued tasks. Invoked with `(tasks, callback)`.
* @param {number} [payload=Infinity] - An optional `integer` for determining
* how many tasks should be processed per round; if omitted, the default is
* unlimited.
* @returns {module:ControlFlow.QueueObject} A cargo object to manage the tasks. Callbacks can
* attached as certain properties to listen for specific events during the
* lifecycle of the cargo and inner queue.
* @example
*
* // create a cargo object with payload 2
* var cargo = async.cargo(function(tasks, callback) {
* for (var i=0; i<tasks.length; i++) {
* console.log('hello ' + tasks[i].name);
* }
* callback();
* }, 2);
*
* // add some items
* cargo.push({name: 'foo'}, function(err) {
* console.log('finished processing foo');
* });
* cargo.push({name: 'bar'}, function(err) {
* console.log('finished processing bar');
* });
* await cargo.push({name: 'baz'});
* console.log('finished processing baz');
*/
function cargo(worker, payload) {
return (0, _queue2.default)(worker, 1, payload);
}
module.exports = exports['default'];

71
api/node_modules/async/cargoQueue.js generated vendored Normal file
View File

@@ -0,0 +1,71 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = cargo;
var _queue = require('./internal/queue.js');
var _queue2 = _interopRequireDefault(_queue);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Creates a `cargoQueue` object with the specified payload. Tasks added to the
* cargoQueue will be processed together (up to the `payload` limit) in `concurrency` parallel workers.
* If the all `workers` are in progress, the task is queued until one becomes available. Once
* a `worker` has completed some tasks, each callback of those tasks is
* called. Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966)
* for how `cargo` and `queue` work.
*
* While [`queue`]{@link module:ControlFlow.queue} passes only one task to one of a group of workers
* at a time, and [`cargo`]{@link module:ControlFlow.cargo} passes an array of tasks to a single worker,
* the cargoQueue passes an array of tasks to multiple parallel workers.
*
* @name cargoQueue
* @static
* @memberOf module:ControlFlow
* @method
* @see [async.queue]{@link module:ControlFlow.queue}
* @see [async.cargo]{@link module:ControlFLow.cargo}
* @category Control Flow
* @param {AsyncFunction} worker - An asynchronous function for processing an array
* of queued tasks. Invoked with `(tasks, callback)`.
* @param {number} [concurrency=1] - An `integer` for determining how many
* `worker` functions should be run in parallel. If omitted, the concurrency
* defaults to `1`. If the concurrency is `0`, an error is thrown.
* @param {number} [payload=Infinity] - An optional `integer` for determining
* how many tasks should be processed per round; if omitted, the default is
* unlimited.
* @returns {module:ControlFlow.QueueObject} A cargoQueue object to manage the tasks. Callbacks can
* attached as certain properties to listen for specific events during the
* lifecycle of the cargoQueue and inner queue.
* @example
*
* // create a cargoQueue object with payload 2 and concurrency 2
* var cargoQueue = async.cargoQueue(function(tasks, callback) {
* for (var i=0; i<tasks.length; i++) {
* console.log('hello ' + tasks[i].name);
* }
* callback();
* }, 2, 2);
*
* // add some items
* cargoQueue.push({name: 'foo'}, function(err) {
* console.log('finished processing foo');
* });
* cargoQueue.push({name: 'bar'}, function(err) {
* console.log('finished processing bar');
* });
* cargoQueue.push({name: 'baz'}, function(err) {
* console.log('finished processing baz');
* });
* cargoQueue.push({name: 'boo'}, function(err) {
* console.log('finished processing boo');
* });
*/
function cargo(worker, concurrency, payload) {
return (0, _queue2.default)(worker, concurrency, payload);
}
module.exports = exports['default'];

55
api/node_modules/async/compose.js generated vendored Normal file
View File

@@ -0,0 +1,55 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = compose;
var _seq = require('./seq.js');
var _seq2 = _interopRequireDefault(_seq);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Creates a function which is a composition of the passed asynchronous
* functions. Each function consumes the return value of the function that
* follows. Composing functions `f()`, `g()`, and `h()` would produce the result
* of `f(g(h()))`, only this version uses callbacks to obtain the return values.
*
* If the last argument to the composed function is not a function, a promise
* is returned when you call it.
*
* Each function is executed with the `this` binding of the composed function.
*
* @name compose
* @static
* @memberOf module:ControlFlow
* @method
* @category Control Flow
* @param {...AsyncFunction} functions - the asynchronous functions to compose
* @returns {Function} an asynchronous function that is the composed
* asynchronous `functions`
* @example
*
* function add1(n, callback) {
* setTimeout(function () {
* callback(null, n + 1);
* }, 10);
* }
*
* function mul3(n, callback) {
* setTimeout(function () {
* callback(null, n * 3);
* }, 10);
* }
*
* var add1mul3 = async.compose(mul3, add1);
* add1mul3(4, function (err, result) {
* // result now equals 15
* });
*/
function compose(...args) {
return (0, _seq2.default)(...args.reverse());
}
module.exports = exports['default'];

115
api/node_modules/async/concat.js generated vendored Normal file
View File

@@ -0,0 +1,115 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _concatLimit = require('./concatLimit.js');
var _concatLimit2 = _interopRequireDefault(_concatLimit);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Applies `iteratee` to each item in `coll`, concatenating the results. Returns
* the concatenated list. The `iteratee`s are called in parallel, and the
* results are concatenated as they return. The results array will be returned in
* the original order of `coll` passed to the `iteratee` function.
*
* @name concat
* @static
* @memberOf module:Collections
* @method
* @category Collection
* @alias flatMap
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - A function to apply to each item in `coll`,
* which should use an array as its result. Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished, or an error occurs. Results is an array
* containing the concatenated results of the `iteratee` function. Invoked with
* (err, results).
* @returns A Promise, if no callback is passed
* @example
*
* // dir1 is a directory that contains file1.txt, file2.txt
* // dir2 is a directory that contains file3.txt, file4.txt
* // dir3 is a directory that contains file5.txt
* // dir4 does not exist
*
* let directoryList = ['dir1','dir2','dir3'];
* let withMissingDirectoryList = ['dir1','dir2','dir3', 'dir4'];
*
* // Using callbacks
* async.concat(directoryList, fs.readdir, function(err, results) {
* if (err) {
* console.log(err);
* } else {
* console.log(results);
* // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ]
* }
* });
*
* // Error Handling
* async.concat(withMissingDirectoryList, fs.readdir, function(err, results) {
* if (err) {
* console.log(err);
* // [ Error: ENOENT: no such file or directory ]
* // since dir4 does not exist
* } else {
* console.log(results);
* }
* });
*
* // Using Promises
* async.concat(directoryList, fs.readdir)
* .then(results => {
* console.log(results);
* // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ]
* }).catch(err => {
* console.log(err);
* });
*
* // Error Handling
* async.concat(withMissingDirectoryList, fs.readdir)
* .then(results => {
* console.log(results);
* }).catch(err => {
* console.log(err);
* // [ Error: ENOENT: no such file or directory ]
* // since dir4 does not exist
* });
*
* // Using async/await
* async () => {
* try {
* let results = await async.concat(directoryList, fs.readdir);
* console.log(results);
* // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ]
* } catch (err) {
* console.log(err);
* }
* }
*
* // Error Handling
* async () => {
* try {
* let results = await async.concat(withMissingDirectoryList, fs.readdir);
* console.log(results);
* } catch (err) {
* console.log(err);
* // [ Error: ENOENT: no such file or directory ]
* // since dir4 does not exist
* }
* }
*
*/
function concat(coll, iteratee, callback) {
return (0, _concatLimit2.default)(coll, Infinity, iteratee, callback);
}
exports.default = (0, _awaitify2.default)(concat, 3);
module.exports = exports['default'];

60
api/node_modules/async/concatLimit.js generated vendored Normal file
View File

@@ -0,0 +1,60 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _wrapAsync = require('./internal/wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
var _mapLimit = require('./mapLimit.js');
var _mapLimit2 = _interopRequireDefault(_mapLimit);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`concat`]{@link module:Collections.concat} but runs a maximum of `limit` async operations at a time.
*
* @name concatLimit
* @static
* @memberOf module:Collections
* @method
* @see [async.concat]{@link module:Collections.concat}
* @category Collection
* @alias flatMapLimit
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {AsyncFunction} iteratee - A function to apply to each item in `coll`,
* which should use an array as its result. Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished, or an error occurs. Results is an array
* containing the concatenated results of the `iteratee` function. Invoked with
* (err, results).
* @returns A Promise, if no callback is passed
*/
function concatLimit(coll, limit, iteratee, callback) {
var _iteratee = (0, _wrapAsync2.default)(iteratee);
return (0, _mapLimit2.default)(coll, limit, (val, iterCb) => {
_iteratee(val, (err, ...args) => {
if (err) return iterCb(err);
return iterCb(err, args);
});
}, (err, mapResults) => {
var result = [];
for (var i = 0; i < mapResults.length; i++) {
if (mapResults[i]) {
result = result.concat(...mapResults[i]);
}
}
return callback(err, result);
});
}
exports.default = (0, _awaitify2.default)(concatLimit, 4);
module.exports = exports['default'];

41
api/node_modules/async/concatSeries.js generated vendored Normal file
View File

@@ -0,0 +1,41 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _concatLimit = require('./concatLimit.js');
var _concatLimit2 = _interopRequireDefault(_concatLimit);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`concat`]{@link module:Collections.concat} but runs only a single async operation at a time.
*
* @name concatSeries
* @static
* @memberOf module:Collections
* @method
* @see [async.concat]{@link module:Collections.concat}
* @category Collection
* @alias flatMapSeries
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - A function to apply to each item in `coll`.
* The iteratee should complete with an array an array of results.
* Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished, or an error occurs. Results is an array
* containing the concatenated results of the `iteratee` function. Invoked with
* (err, results).
* @returns A Promise, if no callback is passed
*/
function concatSeries(coll, iteratee, callback) {
return (0, _concatLimit2.default)(coll, 1, iteratee, callback);
}
exports.default = (0, _awaitify2.default)(concatSeries, 3);
module.exports = exports['default'];

55
api/node_modules/async/constant.js generated vendored Normal file
View File

@@ -0,0 +1,55 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function (...args) {
return function (...ignoredArgs /*, callback*/) {
var callback = ignoredArgs.pop();
return callback(null, ...args);
};
};
module.exports = exports["default"]; /**
* Returns a function that when called, calls-back with the values provided.
* Useful as the first function in a [`waterfall`]{@link module:ControlFlow.waterfall}, or for plugging values in to
* [`auto`]{@link module:ControlFlow.auto}.
*
* @name constant
* @static
* @memberOf module:Utils
* @method
* @category Util
* @param {...*} arguments... - Any number of arguments to automatically invoke
* callback with.
* @returns {AsyncFunction} Returns a function that when invoked, automatically
* invokes the callback with the previous given arguments.
* @example
*
* async.waterfall([
* async.constant(42),
* function (value, next) {
* // value === 42
* },
* //...
* ], callback);
*
* async.waterfall([
* async.constant(filename, "utf8"),
* fs.readFile,
* function (fileData, next) {
* //...
* }
* //...
* ], callback);
*
* async.auto({
* hostname: async.constant("https://server.net/"),
* port: findFreePort,
* launchServer: ["hostname", "port", function (options, cb) {
* startServer(options, cb);
* }],
* //...
* }, callback);
*/

96
api/node_modules/async/detect.js generated vendored Normal file
View File

@@ -0,0 +1,96 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createTester = require('./internal/createTester.js');
var _createTester2 = _interopRequireDefault(_createTester);
var _eachOf = require('./eachOf.js');
var _eachOf2 = _interopRequireDefault(_eachOf);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Returns the first value in `coll` that passes an async truth test. The
* `iteratee` is applied in parallel, meaning the first iteratee to return
* `true` will fire the detect `callback` with that result. That means the
* result might not be the first item in the original `coll` (in terms of order)
* that passes the test.
* If order within the original `coll` is important, then look at
* [`detectSeries`]{@link module:Collections.detectSeries}.
*
* @name detect
* @static
* @memberOf module:Collections
* @method
* @alias find
* @category Collections
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
* The iteratee must complete with a boolean value as its result.
* Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called as soon as any
* iteratee returns `true`, or after all the `iteratee` functions have finished.
* Result will be the first item in the array that passes the truth test
* (iteratee) or the value `undefined` if none passed. Invoked with
* (err, result).
* @returns {Promise} a promise, if a callback is omitted
* @example
*
* // dir1 is a directory that contains file1.txt, file2.txt
* // dir2 is a directory that contains file3.txt, file4.txt
* // dir3 is a directory that contains file5.txt
*
* // asynchronous function that checks if a file exists
* function fileExists(file, callback) {
* fs.access(file, fs.constants.F_OK, (err) => {
* callback(null, !err);
* });
* }
*
* async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists,
* function(err, result) {
* console.log(result);
* // dir1/file1.txt
* // result now equals the first file in the list that exists
* }
*);
*
* // Using Promises
* async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists)
* .then(result => {
* console.log(result);
* // dir1/file1.txt
* // result now equals the first file in the list that exists
* }).catch(err => {
* console.log(err);
* });
*
* // Using async/await
* async () => {
* try {
* let result = await async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists);
* console.log(result);
* // dir1/file1.txt
* // result now equals the file in the list that exists
* }
* catch (err) {
* console.log(err);
* }
* }
*
*/
function detect(coll, iteratee, callback) {
return (0, _createTester2.default)(bool => bool, (res, item) => item)(_eachOf2.default, coll, iteratee, callback);
}
exports.default = (0, _awaitify2.default)(detect, 3);
module.exports = exports['default'];

48
api/node_modules/async/detectLimit.js generated vendored Normal file
View File

@@ -0,0 +1,48 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createTester = require('./internal/createTester.js');
var _createTester2 = _interopRequireDefault(_createTester);
var _eachOfLimit = require('./internal/eachOfLimit.js');
var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a
* time.
*
* @name detectLimit
* @static
* @memberOf module:Collections
* @method
* @see [async.detect]{@link module:Collections.detect}
* @alias findLimit
* @category Collections
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
* The iteratee must complete with a boolean value as its result.
* Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called as soon as any
* iteratee returns `true`, or after all the `iteratee` functions have finished.
* Result will be the first item in the array that passes the truth test
* (iteratee) or the value `undefined` if none passed. Invoked with
* (err, result).
* @returns {Promise} a promise, if a callback is omitted
*/
function detectLimit(coll, limit, iteratee, callback) {
return (0, _createTester2.default)(bool => bool, (res, item) => item)((0, _eachOfLimit2.default)(limit), coll, iteratee, callback);
}
exports.default = (0, _awaitify2.default)(detectLimit, 4);
module.exports = exports['default'];

47
api/node_modules/async/detectSeries.js generated vendored Normal file
View File

@@ -0,0 +1,47 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createTester = require('./internal/createTester.js');
var _createTester2 = _interopRequireDefault(_createTester);
var _eachOfLimit = require('./internal/eachOfLimit.js');
var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`detect`]{@link module:Collections.detect} but runs only a single async operation at a time.
*
* @name detectSeries
* @static
* @memberOf module:Collections
* @method
* @see [async.detect]{@link module:Collections.detect}
* @alias findSeries
* @category Collections
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
* The iteratee must complete with a boolean value as its result.
* Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called as soon as any
* iteratee returns `true`, or after all the `iteratee` functions have finished.
* Result will be the first item in the array that passes the truth test
* (iteratee) or the value `undefined` if none passed. Invoked with
* (err, result).
* @returns {Promise} a promise, if a callback is omitted
*/
function detectSeries(coll, iteratee, callback) {
return (0, _createTester2.default)(bool => bool, (res, item) => item)((0, _eachOfLimit2.default)(1), coll, iteratee, callback);
}
exports.default = (0, _awaitify2.default)(detectSeries, 3);
module.exports = exports['default'];

43
api/node_modules/async/dir.js generated vendored Normal file
View File

@@ -0,0 +1,43 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _consoleFunc = require('./internal/consoleFunc.js');
var _consoleFunc2 = _interopRequireDefault(_consoleFunc);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Logs the result of an [`async` function]{@link AsyncFunction} to the
* `console` using `console.dir` to display the properties of the resulting object.
* Only works in Node.js or in browsers that support `console.dir` and
* `console.error` (such as FF and Chrome).
* If multiple arguments are returned from the async function,
* `console.dir` is called on each argument in order.
*
* @name dir
* @static
* @memberOf module:Utils
* @method
* @category Util
* @param {AsyncFunction} function - The function you want to eventually apply
* all arguments to.
* @param {...*} arguments... - Any number of arguments to apply to the function.
* @example
*
* // in a module
* var hello = function(name, callback) {
* setTimeout(function() {
* callback(null, {hello: name});
* }, 1000);
* };
*
* // in the node repl
* node> async.dir(hello, 'world');
* {hello: 'world'}
*/
exports.default = (0, _consoleFunc2.default)('dir');
module.exports = exports['default'];

6059
api/node_modules/async/dist/async.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

1
api/node_modules/async/dist/async.min.js generated vendored Normal file

File diff suppressed because one or more lines are too long

5947
api/node_modules/async/dist/async.mjs generated vendored Normal file

File diff suppressed because it is too large Load Diff

68
api/node_modules/async/doDuring.js generated vendored Normal file
View File

@@ -0,0 +1,68 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _onlyOnce = require('./internal/onlyOnce.js');
var _onlyOnce2 = _interopRequireDefault(_onlyOnce);
var _wrapAsync = require('./internal/wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The post-check version of [`whilst`]{@link module:ControlFlow.whilst}. To reflect the difference in
* the order of operations, the arguments `test` and `iteratee` are switched.
*
* `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.
*
* @name doWhilst
* @static
* @memberOf module:ControlFlow
* @method
* @see [async.whilst]{@link module:ControlFlow.whilst}
* @category Control Flow
* @param {AsyncFunction} iteratee - A function which is called each time `test`
* passes. Invoked with (callback).
* @param {AsyncFunction} test - asynchronous truth test to perform after each
* execution of `iteratee`. Invoked with (...args, callback), where `...args` are the
* non-error args from the previous callback of `iteratee`.
* @param {Function} [callback] - A callback which is called after the test
* function has failed and repeated execution of `iteratee` has stopped.
* `callback` will be passed an error and any arguments passed to the final
* `iteratee`'s callback. Invoked with (err, [results]);
* @returns {Promise} a promise, if no callback is passed
*/
function doWhilst(iteratee, test, callback) {
callback = (0, _onlyOnce2.default)(callback);
var _fn = (0, _wrapAsync2.default)(iteratee);
var _test = (0, _wrapAsync2.default)(test);
var results;
function next(err, ...args) {
if (err) return callback(err);
if (err === false) return;
results = args;
_test(...args, check);
}
function check(err, truth) {
if (err) return callback(err);
if (err === false) return;
if (!truth) return callback(null, ...results);
_fn(next);
}
return check(null, true);
}
exports.default = (0, _awaitify2.default)(doWhilst, 3);
module.exports = exports['default'];

46
api/node_modules/async/doUntil.js generated vendored Normal file
View File

@@ -0,0 +1,46 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = doUntil;
var _doWhilst = require('./doWhilst.js');
var _doWhilst2 = _interopRequireDefault(_doWhilst);
var _wrapAsync = require('./internal/wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Like ['doWhilst']{@link module:ControlFlow.doWhilst}, except the `test` is inverted. Note the
* argument ordering differs from `until`.
*
* @name doUntil
* @static
* @memberOf module:ControlFlow
* @method
* @see [async.doWhilst]{@link module:ControlFlow.doWhilst}
* @category Control Flow
* @param {AsyncFunction} iteratee - An async function which is called each time
* `test` fails. Invoked with (callback).
* @param {AsyncFunction} test - asynchronous truth test to perform after each
* execution of `iteratee`. Invoked with (...args, callback), where `...args` are the
* non-error args from the previous callback of `iteratee`
* @param {Function} [callback] - A callback which is called after the test
* function has passed and repeated execution of `iteratee` has stopped. `callback`
* will be passed an error and any arguments passed to the final `iteratee`'s
* callback. Invoked with (err, [results]);
* @returns {Promise} a promise, if no callback is passed
*/
function doUntil(iteratee, test, callback) {
const _test = (0, _wrapAsync2.default)(test);
return (0, _doWhilst2.default)(iteratee, (...args) => {
const cb = args.pop();
_test(...args, (err, truth) => cb(err, !truth));
}, callback);
}
module.exports = exports['default'];

68
api/node_modules/async/doWhilst.js generated vendored Normal file
View File

@@ -0,0 +1,68 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _onlyOnce = require('./internal/onlyOnce.js');
var _onlyOnce2 = _interopRequireDefault(_onlyOnce);
var _wrapAsync = require('./internal/wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The post-check version of [`whilst`]{@link module:ControlFlow.whilst}. To reflect the difference in
* the order of operations, the arguments `test` and `iteratee` are switched.
*
* `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.
*
* @name doWhilst
* @static
* @memberOf module:ControlFlow
* @method
* @see [async.whilst]{@link module:ControlFlow.whilst}
* @category Control Flow
* @param {AsyncFunction} iteratee - A function which is called each time `test`
* passes. Invoked with (callback).
* @param {AsyncFunction} test - asynchronous truth test to perform after each
* execution of `iteratee`. Invoked with (...args, callback), where `...args` are the
* non-error args from the previous callback of `iteratee`.
* @param {Function} [callback] - A callback which is called after the test
* function has failed and repeated execution of `iteratee` has stopped.
* `callback` will be passed an error and any arguments passed to the final
* `iteratee`'s callback. Invoked with (err, [results]);
* @returns {Promise} a promise, if no callback is passed
*/
function doWhilst(iteratee, test, callback) {
callback = (0, _onlyOnce2.default)(callback);
var _fn = (0, _wrapAsync2.default)(iteratee);
var _test = (0, _wrapAsync2.default)(test);
var results;
function next(err, ...args) {
if (err) return callback(err);
if (err === false) return;
results = args;
_test(...args, check);
}
function check(err, truth) {
if (err) return callback(err);
if (err === false) return;
if (!truth) return callback(null, ...results);
_fn(next);
}
return check(null, true);
}
exports.default = (0, _awaitify2.default)(doWhilst, 3);
module.exports = exports['default'];

78
api/node_modules/async/during.js generated vendored Normal file
View File

@@ -0,0 +1,78 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _onlyOnce = require('./internal/onlyOnce.js');
var _onlyOnce2 = _interopRequireDefault(_onlyOnce);
var _wrapAsync = require('./internal/wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Repeatedly call `iteratee`, while `test` returns `true`. Calls `callback` when
* stopped, or an error occurs.
*
* @name whilst
* @static
* @memberOf module:ControlFlow
* @method
* @category Control Flow
* @param {AsyncFunction} test - asynchronous truth test to perform before each
* execution of `iteratee`. Invoked with ().
* @param {AsyncFunction} iteratee - An async function which is called each time
* `test` passes. Invoked with (callback).
* @param {Function} [callback] - A callback which is called after the test
* function has failed and repeated execution of `iteratee` has stopped. `callback`
* will be passed an error and any arguments passed to the final `iteratee`'s
* callback. Invoked with (err, [results]);
* @returns {Promise} a promise, if no callback is passed
* @example
*
* var count = 0;
* async.whilst(
* function test(cb) { cb(null, count < 5); },
* function iter(callback) {
* count++;
* setTimeout(function() {
* callback(null, count);
* }, 1000);
* },
* function (err, n) {
* // 5 seconds have passed, n = 5
* }
* );
*/
function whilst(test, iteratee, callback) {
callback = (0, _onlyOnce2.default)(callback);
var _fn = (0, _wrapAsync2.default)(iteratee);
var _test = (0, _wrapAsync2.default)(test);
var results = [];
function next(err, ...rest) {
if (err) return callback(err);
results = rest;
if (err === false) return;
_test(check);
}
function check(err, truth) {
if (err) return callback(err);
if (err === false) return;
if (!truth) return callback(null, ...results);
_fn(next);
}
return _test(check);
}
exports.default = (0, _awaitify2.default)(whilst, 3);
module.exports = exports['default'];

129
api/node_modules/async/each.js generated vendored Normal file
View File

@@ -0,0 +1,129 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _eachOf = require('./eachOf.js');
var _eachOf2 = _interopRequireDefault(_eachOf);
var _withoutIndex = require('./internal/withoutIndex.js');
var _withoutIndex2 = _interopRequireDefault(_withoutIndex);
var _wrapAsync = require('./internal/wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Applies the function `iteratee` to each item in `coll`, in parallel.
* The `iteratee` is called with an item from the list, and a callback for when
* it has finished. If the `iteratee` passes an error to its `callback`, the
* main `callback` (for the `each` function) is immediately called with the
* error.
*
* Note, that since this function applies `iteratee` to each item in parallel,
* there is no guarantee that the iteratee functions will complete in order.
*
* @name each
* @static
* @memberOf module:Collections
* @method
* @alias forEach
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - An async function to apply to
* each item in `coll`. Invoked with (item, callback).
* The array index is not passed to the iteratee.
* If you need the index, use `eachOf`.
* @param {Function} [callback] - A callback which is called when all
* `iteratee` functions have finished, or an error occurs. Invoked with (err).
* @returns {Promise} a promise, if a callback is omitted
* @example
*
* // dir1 is a directory that contains file1.txt, file2.txt
* // dir2 is a directory that contains file3.txt, file4.txt
* // dir3 is a directory that contains file5.txt
* // dir4 does not exist
*
* const fileList = [ 'dir1/file2.txt', 'dir2/file3.txt', 'dir/file5.txt'];
* const withMissingFileList = ['dir1/file1.txt', 'dir4/file2.txt'];
*
* // asynchronous function that deletes a file
* const deleteFile = function(file, callback) {
* fs.unlink(file, callback);
* };
*
* // Using callbacks
* async.each(fileList, deleteFile, function(err) {
* if( err ) {
* console.log(err);
* } else {
* console.log('All files have been deleted successfully');
* }
* });
*
* // Error Handling
* async.each(withMissingFileList, deleteFile, function(err){
* console.log(err);
* // [ Error: ENOENT: no such file or directory ]
* // since dir4/file2.txt does not exist
* // dir1/file1.txt could have been deleted
* });
*
* // Using Promises
* async.each(fileList, deleteFile)
* .then( () => {
* console.log('All files have been deleted successfully');
* }).catch( err => {
* console.log(err);
* });
*
* // Error Handling
* async.each(fileList, deleteFile)
* .then( () => {
* console.log('All files have been deleted successfully');
* }).catch( err => {
* console.log(err);
* // [ Error: ENOENT: no such file or directory ]
* // since dir4/file2.txt does not exist
* // dir1/file1.txt could have been deleted
* });
*
* // Using async/await
* async () => {
* try {
* await async.each(files, deleteFile);
* }
* catch (err) {
* console.log(err);
* }
* }
*
* // Error Handling
* async () => {
* try {
* await async.each(withMissingFileList, deleteFile);
* }
* catch (err) {
* console.log(err);
* // [ Error: ENOENT: no such file or directory ]
* // since dir4/file2.txt does not exist
* // dir1/file1.txt could have been deleted
* }
* }
*
*/
function eachLimit(coll, iteratee, callback) {
return (0, _eachOf2.default)(coll, (0, _withoutIndex2.default)((0, _wrapAsync2.default)(iteratee)), callback);
}
exports.default = (0, _awaitify2.default)(eachLimit, 3);
module.exports = exports['default'];

50
api/node_modules/async/eachLimit.js generated vendored Normal file
View File

@@ -0,0 +1,50 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _eachOfLimit = require('./internal/eachOfLimit.js');
var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
var _withoutIndex = require('./internal/withoutIndex.js');
var _withoutIndex2 = _interopRequireDefault(_withoutIndex);
var _wrapAsync = require('./internal/wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time.
*
* @name eachLimit
* @static
* @memberOf module:Collections
* @method
* @see [async.each]{@link module:Collections.each}
* @alias forEachLimit
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {AsyncFunction} iteratee - An async function to apply to each item in
* `coll`.
* The array index is not passed to the iteratee.
* If you need the index, use `eachOfLimit`.
* Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called when all
* `iteratee` functions have finished, or an error occurs. Invoked with (err).
* @returns {Promise} a promise, if a callback is omitted
*/
function eachLimit(coll, limit, iteratee, callback) {
return (0, _eachOfLimit2.default)(limit)(coll, (0, _withoutIndex2.default)((0, _wrapAsync2.default)(iteratee)), callback);
}
exports.default = (0, _awaitify2.default)(eachLimit, 4);
module.exports = exports['default'];

185
api/node_modules/async/eachOf.js generated vendored Normal file
View File

@@ -0,0 +1,185 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _isArrayLike = require('./internal/isArrayLike.js');
var _isArrayLike2 = _interopRequireDefault(_isArrayLike);
var _breakLoop = require('./internal/breakLoop.js');
var _breakLoop2 = _interopRequireDefault(_breakLoop);
var _eachOfLimit = require('./eachOfLimit.js');
var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
var _once = require('./internal/once.js');
var _once2 = _interopRequireDefault(_once);
var _onlyOnce = require('./internal/onlyOnce.js');
var _onlyOnce2 = _interopRequireDefault(_onlyOnce);
var _wrapAsync = require('./internal/wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// eachOf implementation optimized for array-likes
function eachOfArrayLike(coll, iteratee, callback) {
callback = (0, _once2.default)(callback);
var index = 0,
completed = 0,
{ length } = coll,
canceled = false;
if (length === 0) {
callback(null);
}
function iteratorCallback(err, value) {
if (err === false) {
canceled = true;
}
if (canceled === true) return;
if (err) {
callback(err);
} else if (++completed === length || value === _breakLoop2.default) {
callback(null);
}
}
for (; index < length; index++) {
iteratee(coll[index], index, (0, _onlyOnce2.default)(iteratorCallback));
}
}
// a generic version of eachOf which can handle array, object, and iterator cases.
function eachOfGeneric(coll, iteratee, callback) {
return (0, _eachOfLimit2.default)(coll, Infinity, iteratee, callback);
}
/**
* Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument
* to the iteratee.
*
* @name eachOf
* @static
* @memberOf module:Collections
* @method
* @alias forEachOf
* @category Collection
* @see [async.each]{@link module:Collections.each}
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - A function to apply to each
* item in `coll`.
* The `key` is the item's key, or index in the case of an array.
* Invoked with (item, key, callback).
* @param {Function} [callback] - A callback which is called when all
* `iteratee` functions have finished, or an error occurs. Invoked with (err).
* @returns {Promise} a promise, if a callback is omitted
* @example
*
* // dev.json is a file containing a valid json object config for dev environment
* // dev.json is a file containing a valid json object config for test environment
* // prod.json is a file containing a valid json object config for prod environment
* // invalid.json is a file with a malformed json object
*
* let configs = {}; //global variable
* let validConfigFileMap = {dev: 'dev.json', test: 'test.json', prod: 'prod.json'};
* let invalidConfigFileMap = {dev: 'dev.json', test: 'test.json', invalid: 'invalid.json'};
*
* // asynchronous function that reads a json file and parses the contents as json object
* function parseFile(file, key, callback) {
* fs.readFile(file, "utf8", function(err, data) {
* if (err) return calback(err);
* try {
* configs[key] = JSON.parse(data);
* } catch (e) {
* return callback(e);
* }
* callback();
* });
* }
*
* // Using callbacks
* async.forEachOf(validConfigFileMap, parseFile, function (err) {
* if (err) {
* console.error(err);
* } else {
* console.log(configs);
* // configs is now a map of JSON data, e.g.
* // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json}
* }
* });
*
* //Error handing
* async.forEachOf(invalidConfigFileMap, parseFile, function (err) {
* if (err) {
* console.error(err);
* // JSON parse error exception
* } else {
* console.log(configs);
* }
* });
*
* // Using Promises
* async.forEachOf(validConfigFileMap, parseFile)
* .then( () => {
* console.log(configs);
* // configs is now a map of JSON data, e.g.
* // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json}
* }).catch( err => {
* console.error(err);
* });
*
* //Error handing
* async.forEachOf(invalidConfigFileMap, parseFile)
* .then( () => {
* console.log(configs);
* }).catch( err => {
* console.error(err);
* // JSON parse error exception
* });
*
* // Using async/await
* async () => {
* try {
* let result = await async.forEachOf(validConfigFileMap, parseFile);
* console.log(configs);
* // configs is now a map of JSON data, e.g.
* // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json}
* }
* catch (err) {
* console.log(err);
* }
* }
*
* //Error handing
* async () => {
* try {
* let result = await async.forEachOf(invalidConfigFileMap, parseFile);
* console.log(configs);
* }
* catch (err) {
* console.log(err);
* // JSON parse error exception
* }
* }
*
*/
function eachOf(coll, iteratee, callback) {
var eachOfImplementation = (0, _isArrayLike2.default)(coll) ? eachOfArrayLike : eachOfGeneric;
return eachOfImplementation(coll, (0, _wrapAsync2.default)(iteratee), callback);
}
exports.default = (0, _awaitify2.default)(eachOf, 3);
module.exports = exports['default'];

47
api/node_modules/async/eachOfLimit.js generated vendored Normal file
View File

@@ -0,0 +1,47 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _eachOfLimit2 = require('./internal/eachOfLimit.js');
var _eachOfLimit3 = _interopRequireDefault(_eachOfLimit2);
var _wrapAsync = require('./internal/wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a
* time.
*
* @name eachOfLimit
* @static
* @memberOf module:Collections
* @method
* @see [async.eachOf]{@link module:Collections.eachOf}
* @alias forEachOfLimit
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {AsyncFunction} iteratee - An async function to apply to each
* item in `coll`. The `key` is the item's key, or index in the case of an
* array.
* Invoked with (item, key, callback).
* @param {Function} [callback] - A callback which is called when all
* `iteratee` functions have finished, or an error occurs. Invoked with (err).
* @returns {Promise} a promise, if a callback is omitted
*/
function eachOfLimit(coll, limit, iteratee, callback) {
return (0, _eachOfLimit3.default)(limit)(coll, (0, _wrapAsync2.default)(iteratee), callback);
}
exports.default = (0, _awaitify2.default)(eachOfLimit, 4);
module.exports = exports['default'];

39
api/node_modules/async/eachOfSeries.js generated vendored Normal file
View File

@@ -0,0 +1,39 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _eachOfLimit = require('./eachOfLimit.js');
var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time.
*
* @name eachOfSeries
* @static
* @memberOf module:Collections
* @method
* @see [async.eachOf]{@link module:Collections.eachOf}
* @alias forEachOfSeries
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - An async function to apply to each item in
* `coll`.
* Invoked with (item, key, callback).
* @param {Function} [callback] - A callback which is called when all `iteratee`
* functions have finished, or an error occurs. Invoked with (err).
* @returns {Promise} a promise, if a callback is omitted
*/
function eachOfSeries(coll, iteratee, callback) {
return (0, _eachOfLimit2.default)(coll, 1, iteratee, callback);
}
exports.default = (0, _awaitify2.default)(eachOfSeries, 3);
module.exports = exports['default'];

44
api/node_modules/async/eachSeries.js generated vendored Normal file
View File

@@ -0,0 +1,44 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _eachLimit = require('./eachLimit.js');
var _eachLimit2 = _interopRequireDefault(_eachLimit);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time.
*
* Note, that unlike [`each`]{@link module:Collections.each}, this function applies iteratee to each item
* in series and therefore the iteratee functions will complete in order.
* @name eachSeries
* @static
* @memberOf module:Collections
* @method
* @see [async.each]{@link module:Collections.each}
* @alias forEachSeries
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - An async function to apply to each
* item in `coll`.
* The array index is not passed to the iteratee.
* If you need the index, use `eachOfSeries`.
* Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called when all
* `iteratee` functions have finished, or an error occurs. Invoked with (err).
* @returns {Promise} a promise, if a callback is omitted
*/
function eachSeries(coll, iteratee, callback) {
return (0, _eachLimit2.default)(coll, 1, iteratee, callback);
}
exports.default = (0, _awaitify2.default)(eachSeries, 3);
module.exports = exports['default'];

67
api/node_modules/async/ensureAsync.js generated vendored Normal file
View File

@@ -0,0 +1,67 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = ensureAsync;
var _setImmediate = require('./internal/setImmediate.js');
var _setImmediate2 = _interopRequireDefault(_setImmediate);
var _wrapAsync = require('./internal/wrapAsync.js');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Wrap an async function and ensure it calls its callback on a later tick of
* the event loop. If the function already calls its callback on a next tick,
* no extra deferral is added. This is useful for preventing stack overflows
* (`RangeError: Maximum call stack size exceeded`) and generally keeping
* [Zalgo](http://blog.izs.me/post/59142742143/designing-apis-for-asynchrony)
* contained. ES2017 `async` functions are returned as-is -- they are immune
* to Zalgo's corrupting influences, as they always resolve on a later tick.
*
* @name ensureAsync
* @static
* @memberOf module:Utils
* @method
* @category Util
* @param {AsyncFunction} fn - an async function, one that expects a node-style
* callback as its last argument.
* @returns {AsyncFunction} Returns a wrapped function with the exact same call
* signature as the function passed in.
* @example
*
* function sometimesAsync(arg, callback) {
* if (cache[arg]) {
* return callback(null, cache[arg]); // this would be synchronous!!
* } else {
* doSomeIO(arg, callback); // this IO would be asynchronous
* }
* }
*
* // this has a risk of stack overflows if many results are cached in a row
* async.mapSeries(args, sometimesAsync, done);
*
* // this will defer sometimesAsync's callback if necessary,
* // preventing stack overflows
* async.mapSeries(args, async.ensureAsync(sometimesAsync), done);
*/
function ensureAsync(fn) {
if ((0, _wrapAsync.isAsync)(fn)) return fn;
return function (...args /*, callback*/) {
var callback = args.pop();
var sync = true;
args.push((...innerArgs) => {
if (sync) {
(0, _setImmediate2.default)(() => callback(...innerArgs));
} else {
callback(...innerArgs);
}
});
fn.apply(this, args);
sync = false;
};
}
module.exports = exports['default'];

119
api/node_modules/async/every.js generated vendored Normal file
View File

@@ -0,0 +1,119 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createTester = require('./internal/createTester.js');
var _createTester2 = _interopRequireDefault(_createTester);
var _eachOf = require('./eachOf.js');
var _eachOf2 = _interopRequireDefault(_eachOf);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Returns `true` if every element in `coll` satisfies an async test. If any
* iteratee call returns `false`, the main `callback` is immediately called.
*
* @name every
* @static
* @memberOf module:Collections
* @method
* @alias all
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - An async truth test to apply to each item
* in the collection in parallel.
* The iteratee must complete with a boolean result value.
* Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished. Result will be either `true` or `false`
* depending on the values of the async tests. Invoked with (err, result).
* @returns {Promise} a promise, if no callback provided
* @example
*
* // dir1 is a directory that contains file1.txt, file2.txt
* // dir2 is a directory that contains file3.txt, file4.txt
* // dir3 is a directory that contains file5.txt
* // dir4 does not exist
*
* const fileList = ['dir1/file1.txt','dir2/file3.txt','dir3/file5.txt'];
* const withMissingFileList = ['file1.txt','file2.txt','file4.txt'];
*
* // asynchronous function that checks if a file exists
* function fileExists(file, callback) {
* fs.access(file, fs.constants.F_OK, (err) => {
* callback(null, !err);
* });
* }
*
* // Using callbacks
* async.every(fileList, fileExists, function(err, result) {
* console.log(result);
* // true
* // result is true since every file exists
* });
*
* async.every(withMissingFileList, fileExists, function(err, result) {
* console.log(result);
* // false
* // result is false since NOT every file exists
* });
*
* // Using Promises
* async.every(fileList, fileExists)
* .then( result => {
* console.log(result);
* // true
* // result is true since every file exists
* }).catch( err => {
* console.log(err);
* });
*
* async.every(withMissingFileList, fileExists)
* .then( result => {
* console.log(result);
* // false
* // result is false since NOT every file exists
* }).catch( err => {
* console.log(err);
* });
*
* // Using async/await
* async () => {
* try {
* let result = await async.every(fileList, fileExists);
* console.log(result);
* // true
* // result is true since every file exists
* }
* catch (err) {
* console.log(err);
* }
* }
*
* async () => {
* try {
* let result = await async.every(withMissingFileList, fileExists);
* console.log(result);
* // false
* // result is false since NOT every file exists
* }
* catch (err) {
* console.log(err);
* }
* }
*
*/
function every(coll, iteratee, callback) {
return (0, _createTester2.default)(bool => !bool, res => !res)(_eachOf2.default, coll, iteratee, callback);
}
exports.default = (0, _awaitify2.default)(every, 3);
module.exports = exports['default'];

46
api/node_modules/async/everyLimit.js generated vendored Normal file
View File

@@ -0,0 +1,46 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createTester = require('./internal/createTester.js');
var _createTester2 = _interopRequireDefault(_createTester);
var _eachOfLimit = require('./internal/eachOfLimit.js');
var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time.
*
* @name everyLimit
* @static
* @memberOf module:Collections
* @method
* @see [async.every]{@link module:Collections.every}
* @alias allLimit
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {AsyncFunction} iteratee - An async truth test to apply to each item
* in the collection in parallel.
* The iteratee must complete with a boolean result value.
* Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished. Result will be either `true` or `false`
* depending on the values of the async tests. Invoked with (err, result).
* @returns {Promise} a promise, if no callback provided
*/
function everyLimit(coll, limit, iteratee, callback) {
return (0, _createTester2.default)(bool => !bool, res => !res)((0, _eachOfLimit2.default)(limit), coll, iteratee, callback);
}
exports.default = (0, _awaitify2.default)(everyLimit, 4);
module.exports = exports['default'];

45
api/node_modules/async/everySeries.js generated vendored Normal file
View File

@@ -0,0 +1,45 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createTester = require('./internal/createTester.js');
var _createTester2 = _interopRequireDefault(_createTester);
var _eachOfSeries = require('./eachOfSeries.js');
var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time.
*
* @name everySeries
* @static
* @memberOf module:Collections
* @method
* @see [async.every]{@link module:Collections.every}
* @alias allSeries
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - An async truth test to apply to each item
* in the collection in series.
* The iteratee must complete with a boolean result value.
* Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished. Result will be either `true` or `false`
* depending on the values of the async tests. Invoked with (err, result).
* @returns {Promise} a promise, if no callback provided
*/
function everySeries(coll, iteratee, callback) {
return (0, _createTester2.default)(bool => !bool, res => !res)(_eachOfSeries2.default, coll, iteratee, callback);
}
exports.default = (0, _awaitify2.default)(everySeries, 3);
module.exports = exports['default'];

93
api/node_modules/async/filter.js generated vendored Normal file
View File

@@ -0,0 +1,93 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _filter2 = require('./internal/filter.js');
var _filter3 = _interopRequireDefault(_filter2);
var _eachOf = require('./eachOf.js');
var _eachOf2 = _interopRequireDefault(_eachOf);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Returns a new array of all the values in `coll` which pass an async truth
* test. This operation is performed in parallel, but the results array will be
* in the same order as the original.
*
* @name filter
* @static
* @memberOf module:Collections
* @method
* @alias select
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {Function} iteratee - A truth test to apply to each item in `coll`.
* The `iteratee` is passed a `callback(err, truthValue)`, which must be called
* with a boolean argument once it has completed. Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished. Invoked with (err, results).
* @returns {Promise} a promise, if no callback provided
* @example
*
* // dir1 is a directory that contains file1.txt, file2.txt
* // dir2 is a directory that contains file3.txt, file4.txt
* // dir3 is a directory that contains file5.txt
*
* const files = ['dir1/file1.txt','dir2/file3.txt','dir3/file6.txt'];
*
* // asynchronous function that checks if a file exists
* function fileExists(file, callback) {
* fs.access(file, fs.constants.F_OK, (err) => {
* callback(null, !err);
* });
* }
*
* // Using callbacks
* async.filter(files, fileExists, function(err, results) {
* if(err) {
* console.log(err);
* } else {
* console.log(results);
* // [ 'dir1/file1.txt', 'dir2/file3.txt' ]
* // results is now an array of the existing files
* }
* });
*
* // Using Promises
* async.filter(files, fileExists)
* .then(results => {
* console.log(results);
* // [ 'dir1/file1.txt', 'dir2/file3.txt' ]
* // results is now an array of the existing files
* }).catch(err => {
* console.log(err);
* });
*
* // Using async/await
* async () => {
* try {
* let results = await async.filter(files, fileExists);
* console.log(results);
* // [ 'dir1/file1.txt', 'dir2/file3.txt' ]
* // results is now an array of the existing files
* }
* catch (err) {
* console.log(err);
* }
* }
*
*/
function filter(coll, iteratee, callback) {
return (0, _filter3.default)(_eachOf2.default, coll, iteratee, callback);
}
exports.default = (0, _awaitify2.default)(filter, 3);
module.exports = exports['default'];

45
api/node_modules/async/filterLimit.js generated vendored Normal file
View File

@@ -0,0 +1,45 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _filter2 = require('./internal/filter.js');
var _filter3 = _interopRequireDefault(_filter2);
var _eachOfLimit = require('./internal/eachOfLimit.js');
var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`filter`]{@link module:Collections.filter} but runs a maximum of `limit` async operations at a
* time.
*
* @name filterLimit
* @static
* @memberOf module:Collections
* @method
* @see [async.filter]{@link module:Collections.filter}
* @alias selectLimit
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {Function} iteratee - A truth test to apply to each item in `coll`.
* The `iteratee` is passed a `callback(err, truthValue)`, which must be called
* with a boolean argument once it has completed. Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished. Invoked with (err, results).
* @returns {Promise} a promise, if no callback provided
*/
function filterLimit(coll, limit, iteratee, callback) {
return (0, _filter3.default)((0, _eachOfLimit2.default)(limit), coll, iteratee, callback);
}
exports.default = (0, _awaitify2.default)(filterLimit, 4);
module.exports = exports['default'];

43
api/node_modules/async/filterSeries.js generated vendored Normal file
View File

@@ -0,0 +1,43 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _filter2 = require('./internal/filter.js');
var _filter3 = _interopRequireDefault(_filter2);
var _eachOfSeries = require('./eachOfSeries.js');
var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`filter`]{@link module:Collections.filter} but runs only a single async operation at a time.
*
* @name filterSeries
* @static
* @memberOf module:Collections
* @method
* @see [async.filter]{@link module:Collections.filter}
* @alias selectSeries
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {Function} iteratee - A truth test to apply to each item in `coll`.
* The `iteratee` is passed a `callback(err, truthValue)`, which must be called
* with a boolean argument once it has completed. Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished. Invoked with (err, results)
* @returns {Promise} a promise, if no callback provided
*/
function filterSeries(coll, iteratee, callback) {
return (0, _filter3.default)(_eachOfSeries2.default, coll, iteratee, callback);
}
exports.default = (0, _awaitify2.default)(filterSeries, 3);
module.exports = exports['default'];

96
api/node_modules/async/find.js generated vendored Normal file
View File

@@ -0,0 +1,96 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createTester = require('./internal/createTester.js');
var _createTester2 = _interopRequireDefault(_createTester);
var _eachOf = require('./eachOf.js');
var _eachOf2 = _interopRequireDefault(_eachOf);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Returns the first value in `coll` that passes an async truth test. The
* `iteratee` is applied in parallel, meaning the first iteratee to return
* `true` will fire the detect `callback` with that result. That means the
* result might not be the first item in the original `coll` (in terms of order)
* that passes the test.
* If order within the original `coll` is important, then look at
* [`detectSeries`]{@link module:Collections.detectSeries}.
*
* @name detect
* @static
* @memberOf module:Collections
* @method
* @alias find
* @category Collections
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
* The iteratee must complete with a boolean value as its result.
* Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called as soon as any
* iteratee returns `true`, or after all the `iteratee` functions have finished.
* Result will be the first item in the array that passes the truth test
* (iteratee) or the value `undefined` if none passed. Invoked with
* (err, result).
* @returns {Promise} a promise, if a callback is omitted
* @example
*
* // dir1 is a directory that contains file1.txt, file2.txt
* // dir2 is a directory that contains file3.txt, file4.txt
* // dir3 is a directory that contains file5.txt
*
* // asynchronous function that checks if a file exists
* function fileExists(file, callback) {
* fs.access(file, fs.constants.F_OK, (err) => {
* callback(null, !err);
* });
* }
*
* async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists,
* function(err, result) {
* console.log(result);
* // dir1/file1.txt
* // result now equals the first file in the list that exists
* }
*);
*
* // Using Promises
* async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists)
* .then(result => {
* console.log(result);
* // dir1/file1.txt
* // result now equals the first file in the list that exists
* }).catch(err => {
* console.log(err);
* });
*
* // Using async/await
* async () => {
* try {
* let result = await async.detect(['file3.txt','file2.txt','dir1/file1.txt'], fileExists);
* console.log(result);
* // dir1/file1.txt
* // result now equals the file in the list that exists
* }
* catch (err) {
* console.log(err);
* }
* }
*
*/
function detect(coll, iteratee, callback) {
return (0, _createTester2.default)(bool => bool, (res, item) => item)(_eachOf2.default, coll, iteratee, callback);
}
exports.default = (0, _awaitify2.default)(detect, 3);
module.exports = exports['default'];

48
api/node_modules/async/findLimit.js generated vendored Normal file
View File

@@ -0,0 +1,48 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createTester = require('./internal/createTester.js');
var _createTester2 = _interopRequireDefault(_createTester);
var _eachOfLimit = require('./internal/eachOfLimit.js');
var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a
* time.
*
* @name detectLimit
* @static
* @memberOf module:Collections
* @method
* @see [async.detect]{@link module:Collections.detect}
* @alias findLimit
* @category Collections
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
* The iteratee must complete with a boolean value as its result.
* Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called as soon as any
* iteratee returns `true`, or after all the `iteratee` functions have finished.
* Result will be the first item in the array that passes the truth test
* (iteratee) or the value `undefined` if none passed. Invoked with
* (err, result).
* @returns {Promise} a promise, if a callback is omitted
*/
function detectLimit(coll, limit, iteratee, callback) {
return (0, _createTester2.default)(bool => bool, (res, item) => item)((0, _eachOfLimit2.default)(limit), coll, iteratee, callback);
}
exports.default = (0, _awaitify2.default)(detectLimit, 4);
module.exports = exports['default'];

47
api/node_modules/async/findSeries.js generated vendored Normal file
View File

@@ -0,0 +1,47 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createTester = require('./internal/createTester.js');
var _createTester2 = _interopRequireDefault(_createTester);
var _eachOfLimit = require('./internal/eachOfLimit.js');
var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`detect`]{@link module:Collections.detect} but runs only a single async operation at a time.
*
* @name detectSeries
* @static
* @memberOf module:Collections
* @method
* @see [async.detect]{@link module:Collections.detect}
* @alias findSeries
* @category Collections
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
* The iteratee must complete with a boolean value as its result.
* Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called as soon as any
* iteratee returns `true`, or after all the `iteratee` functions have finished.
* Result will be the first item in the array that passes the truth test
* (iteratee) or the value `undefined` if none passed. Invoked with
* (err, result).
* @returns {Promise} a promise, if a callback is omitted
*/
function detectSeries(coll, iteratee, callback) {
return (0, _createTester2.default)(bool => bool, (res, item) => item)((0, _eachOfLimit2.default)(1), coll, iteratee, callback);
}
exports.default = (0, _awaitify2.default)(detectSeries, 3);
module.exports = exports['default'];

115
api/node_modules/async/flatMap.js generated vendored Normal file
View File

@@ -0,0 +1,115 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _concatLimit = require('./concatLimit.js');
var _concatLimit2 = _interopRequireDefault(_concatLimit);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Applies `iteratee` to each item in `coll`, concatenating the results. Returns
* the concatenated list. The `iteratee`s are called in parallel, and the
* results are concatenated as they return. The results array will be returned in
* the original order of `coll` passed to the `iteratee` function.
*
* @name concat
* @static
* @memberOf module:Collections
* @method
* @category Collection
* @alias flatMap
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - A function to apply to each item in `coll`,
* which should use an array as its result. Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished, or an error occurs. Results is an array
* containing the concatenated results of the `iteratee` function. Invoked with
* (err, results).
* @returns A Promise, if no callback is passed
* @example
*
* // dir1 is a directory that contains file1.txt, file2.txt
* // dir2 is a directory that contains file3.txt, file4.txt
* // dir3 is a directory that contains file5.txt
* // dir4 does not exist
*
* let directoryList = ['dir1','dir2','dir3'];
* let withMissingDirectoryList = ['dir1','dir2','dir3', 'dir4'];
*
* // Using callbacks
* async.concat(directoryList, fs.readdir, function(err, results) {
* if (err) {
* console.log(err);
* } else {
* console.log(results);
* // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ]
* }
* });
*
* // Error Handling
* async.concat(withMissingDirectoryList, fs.readdir, function(err, results) {
* if (err) {
* console.log(err);
* // [ Error: ENOENT: no such file or directory ]
* // since dir4 does not exist
* } else {
* console.log(results);
* }
* });
*
* // Using Promises
* async.concat(directoryList, fs.readdir)
* .then(results => {
* console.log(results);
* // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ]
* }).catch(err => {
* console.log(err);
* });
*
* // Error Handling
* async.concat(withMissingDirectoryList, fs.readdir)
* .then(results => {
* console.log(results);
* }).catch(err => {
* console.log(err);
* // [ Error: ENOENT: no such file or directory ]
* // since dir4 does not exist
* });
*
* // Using async/await
* async () => {
* try {
* let results = await async.concat(directoryList, fs.readdir);
* console.log(results);
* // [ 'file1.txt', 'file2.txt', 'file3.txt', 'file4.txt', file5.txt ]
* } catch (err) {
* console.log(err);
* }
* }
*
* // Error Handling
* async () => {
* try {
* let results = await async.concat(withMissingDirectoryList, fs.readdir);
* console.log(results);
* } catch (err) {
* console.log(err);
* // [ Error: ENOENT: no such file or directory ]
* // since dir4 does not exist
* }
* }
*
*/
function concat(coll, iteratee, callback) {
return (0, _concatLimit2.default)(coll, Infinity, iteratee, callback);
}
exports.default = (0, _awaitify2.default)(concat, 3);
module.exports = exports['default'];

60
api/node_modules/async/flatMapLimit.js generated vendored Normal file
View File

@@ -0,0 +1,60 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _wrapAsync = require('./internal/wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
var _mapLimit = require('./mapLimit.js');
var _mapLimit2 = _interopRequireDefault(_mapLimit);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`concat`]{@link module:Collections.concat} but runs a maximum of `limit` async operations at a time.
*
* @name concatLimit
* @static
* @memberOf module:Collections
* @method
* @see [async.concat]{@link module:Collections.concat}
* @category Collection
* @alias flatMapLimit
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {AsyncFunction} iteratee - A function to apply to each item in `coll`,
* which should use an array as its result. Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished, or an error occurs. Results is an array
* containing the concatenated results of the `iteratee` function. Invoked with
* (err, results).
* @returns A Promise, if no callback is passed
*/
function concatLimit(coll, limit, iteratee, callback) {
var _iteratee = (0, _wrapAsync2.default)(iteratee);
return (0, _mapLimit2.default)(coll, limit, (val, iterCb) => {
_iteratee(val, (err, ...args) => {
if (err) return iterCb(err);
return iterCb(err, args);
});
}, (err, mapResults) => {
var result = [];
for (var i = 0; i < mapResults.length; i++) {
if (mapResults[i]) {
result = result.concat(...mapResults[i]);
}
}
return callback(err, result);
});
}
exports.default = (0, _awaitify2.default)(concatLimit, 4);
module.exports = exports['default'];

41
api/node_modules/async/flatMapSeries.js generated vendored Normal file
View File

@@ -0,0 +1,41 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _concatLimit = require('./concatLimit.js');
var _concatLimit2 = _interopRequireDefault(_concatLimit);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`concat`]{@link module:Collections.concat} but runs only a single async operation at a time.
*
* @name concatSeries
* @static
* @memberOf module:Collections
* @method
* @see [async.concat]{@link module:Collections.concat}
* @category Collection
* @alias flatMapSeries
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - A function to apply to each item in `coll`.
* The iteratee should complete with an array an array of results.
* Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished, or an error occurs. Results is an array
* containing the concatenated results of the `iteratee` function. Invoked with
* (err, results).
* @returns A Promise, if no callback is passed
*/
function concatSeries(coll, iteratee, callback) {
return (0, _concatLimit2.default)(coll, 1, iteratee, callback);
}
exports.default = (0, _awaitify2.default)(concatSeries, 3);
module.exports = exports['default'];

153
api/node_modules/async/foldl.js generated vendored Normal file
View File

@@ -0,0 +1,153 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _eachOfSeries = require('./eachOfSeries.js');
var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries);
var _once = require('./internal/once.js');
var _once2 = _interopRequireDefault(_once);
var _wrapAsync = require('./internal/wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Reduces `coll` into a single value using an async `iteratee` to return each
* successive step. `memo` is the initial state of the reduction. This function
* only operates in series.
*
* For performance reasons, it may make sense to split a call to this function
* into a parallel map, and then use the normal `Array.prototype.reduce` on the
* results. This function is for situations where each step in the reduction
* needs to be async; if you can get the data before reducing it, then it's
* probably a good idea to do so.
*
* @name reduce
* @static
* @memberOf module:Collections
* @method
* @alias inject
* @alias foldl
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {*} memo - The initial state of the reduction.
* @param {AsyncFunction} iteratee - A function applied to each item in the
* array to produce the next step in the reduction.
* The `iteratee` should complete with the next state of the reduction.
* If the iteratee completes with an error, the reduction is stopped and the
* main `callback` is immediately called with the error.
* Invoked with (memo, item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished. Result is the reduced value. Invoked with
* (err, result).
* @returns {Promise} a promise, if no callback is passed
* @example
*
* // file1.txt is a file that is 1000 bytes in size
* // file2.txt is a file that is 2000 bytes in size
* // file3.txt is a file that is 3000 bytes in size
* // file4.txt does not exist
*
* const fileList = ['file1.txt','file2.txt','file3.txt'];
* const withMissingFileList = ['file1.txt','file2.txt','file3.txt', 'file4.txt'];
*
* // asynchronous function that computes the file size in bytes
* // file size is added to the memoized value, then returned
* function getFileSizeInBytes(memo, file, callback) {
* fs.stat(file, function(err, stat) {
* if (err) {
* return callback(err);
* }
* callback(null, memo + stat.size);
* });
* }
*
* // Using callbacks
* async.reduce(fileList, 0, getFileSizeInBytes, function(err, result) {
* if (err) {
* console.log(err);
* } else {
* console.log(result);
* // 6000
* // which is the sum of the file sizes of the three files
* }
* });
*
* // Error Handling
* async.reduce(withMissingFileList, 0, getFileSizeInBytes, function(err, result) {
* if (err) {
* console.log(err);
* // [ Error: ENOENT: no such file or directory ]
* } else {
* console.log(result);
* }
* });
*
* // Using Promises
* async.reduce(fileList, 0, getFileSizeInBytes)
* .then( result => {
* console.log(result);
* // 6000
* // which is the sum of the file sizes of the three files
* }).catch( err => {
* console.log(err);
* });
*
* // Error Handling
* async.reduce(withMissingFileList, 0, getFileSizeInBytes)
* .then( result => {
* console.log(result);
* }).catch( err => {
* console.log(err);
* // [ Error: ENOENT: no such file or directory ]
* });
*
* // Using async/await
* async () => {
* try {
* let result = await async.reduce(fileList, 0, getFileSizeInBytes);
* console.log(result);
* // 6000
* // which is the sum of the file sizes of the three files
* }
* catch (err) {
* console.log(err);
* }
* }
*
* // Error Handling
* async () => {
* try {
* let result = await async.reduce(withMissingFileList, 0, getFileSizeInBytes);
* console.log(result);
* }
* catch (err) {
* console.log(err);
* // [ Error: ENOENT: no such file or directory ]
* }
* }
*
*/
function reduce(coll, memo, iteratee, callback) {
callback = (0, _once2.default)(callback);
var _iteratee = (0, _wrapAsync2.default)(iteratee);
return (0, _eachOfSeries2.default)(coll, (x, i, iterCb) => {
_iteratee(memo, x, (err, v) => {
memo = v;
iterCb(err);
});
}, err => callback(err, memo));
}
exports.default = (0, _awaitify2.default)(reduce, 4);
module.exports = exports['default'];

41
api/node_modules/async/foldr.js generated vendored Normal file
View File

@@ -0,0 +1,41 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = reduceRight;
var _reduce = require('./reduce.js');
var _reduce2 = _interopRequireDefault(_reduce);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Same as [`reduce`]{@link module:Collections.reduce}, only operates on `array` in reverse order.
*
* @name reduceRight
* @static
* @memberOf module:Collections
* @method
* @see [async.reduce]{@link module:Collections.reduce}
* @alias foldr
* @category Collection
* @param {Array} array - A collection to iterate over.
* @param {*} memo - The initial state of the reduction.
* @param {AsyncFunction} iteratee - A function applied to each item in the
* array to produce the next step in the reduction.
* The `iteratee` should complete with the next state of the reduction.
* If the iteratee completes with an error, the reduction is stopped and the
* main `callback` is immediately called with the error.
* Invoked with (memo, item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished. Result is the reduced value. Invoked with
* (err, result).
* @returns {Promise} a promise, if no callback is passed
*/
function reduceRight(array, memo, iteratee, callback) {
var reversed = [...array].reverse();
return (0, _reduce2.default)(reversed, memo, iteratee, callback);
}
module.exports = exports['default'];

129
api/node_modules/async/forEach.js generated vendored Normal file
View File

@@ -0,0 +1,129 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _eachOf = require('./eachOf.js');
var _eachOf2 = _interopRequireDefault(_eachOf);
var _withoutIndex = require('./internal/withoutIndex.js');
var _withoutIndex2 = _interopRequireDefault(_withoutIndex);
var _wrapAsync = require('./internal/wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Applies the function `iteratee` to each item in `coll`, in parallel.
* The `iteratee` is called with an item from the list, and a callback for when
* it has finished. If the `iteratee` passes an error to its `callback`, the
* main `callback` (for the `each` function) is immediately called with the
* error.
*
* Note, that since this function applies `iteratee` to each item in parallel,
* there is no guarantee that the iteratee functions will complete in order.
*
* @name each
* @static
* @memberOf module:Collections
* @method
* @alias forEach
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - An async function to apply to
* each item in `coll`. Invoked with (item, callback).
* The array index is not passed to the iteratee.
* If you need the index, use `eachOf`.
* @param {Function} [callback] - A callback which is called when all
* `iteratee` functions have finished, or an error occurs. Invoked with (err).
* @returns {Promise} a promise, if a callback is omitted
* @example
*
* // dir1 is a directory that contains file1.txt, file2.txt
* // dir2 is a directory that contains file3.txt, file4.txt
* // dir3 is a directory that contains file5.txt
* // dir4 does not exist
*
* const fileList = [ 'dir1/file2.txt', 'dir2/file3.txt', 'dir/file5.txt'];
* const withMissingFileList = ['dir1/file1.txt', 'dir4/file2.txt'];
*
* // asynchronous function that deletes a file
* const deleteFile = function(file, callback) {
* fs.unlink(file, callback);
* };
*
* // Using callbacks
* async.each(fileList, deleteFile, function(err) {
* if( err ) {
* console.log(err);
* } else {
* console.log('All files have been deleted successfully');
* }
* });
*
* // Error Handling
* async.each(withMissingFileList, deleteFile, function(err){
* console.log(err);
* // [ Error: ENOENT: no such file or directory ]
* // since dir4/file2.txt does not exist
* // dir1/file1.txt could have been deleted
* });
*
* // Using Promises
* async.each(fileList, deleteFile)
* .then( () => {
* console.log('All files have been deleted successfully');
* }).catch( err => {
* console.log(err);
* });
*
* // Error Handling
* async.each(fileList, deleteFile)
* .then( () => {
* console.log('All files have been deleted successfully');
* }).catch( err => {
* console.log(err);
* // [ Error: ENOENT: no such file or directory ]
* // since dir4/file2.txt does not exist
* // dir1/file1.txt could have been deleted
* });
*
* // Using async/await
* async () => {
* try {
* await async.each(files, deleteFile);
* }
* catch (err) {
* console.log(err);
* }
* }
*
* // Error Handling
* async () => {
* try {
* await async.each(withMissingFileList, deleteFile);
* }
* catch (err) {
* console.log(err);
* // [ Error: ENOENT: no such file or directory ]
* // since dir4/file2.txt does not exist
* // dir1/file1.txt could have been deleted
* }
* }
*
*/
function eachLimit(coll, iteratee, callback) {
return (0, _eachOf2.default)(coll, (0, _withoutIndex2.default)((0, _wrapAsync2.default)(iteratee)), callback);
}
exports.default = (0, _awaitify2.default)(eachLimit, 3);
module.exports = exports['default'];

50
api/node_modules/async/forEachLimit.js generated vendored Normal file
View File

@@ -0,0 +1,50 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _eachOfLimit = require('./internal/eachOfLimit.js');
var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
var _withoutIndex = require('./internal/withoutIndex.js');
var _withoutIndex2 = _interopRequireDefault(_withoutIndex);
var _wrapAsync = require('./internal/wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time.
*
* @name eachLimit
* @static
* @memberOf module:Collections
* @method
* @see [async.each]{@link module:Collections.each}
* @alias forEachLimit
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {AsyncFunction} iteratee - An async function to apply to each item in
* `coll`.
* The array index is not passed to the iteratee.
* If you need the index, use `eachOfLimit`.
* Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called when all
* `iteratee` functions have finished, or an error occurs. Invoked with (err).
* @returns {Promise} a promise, if a callback is omitted
*/
function eachLimit(coll, limit, iteratee, callback) {
return (0, _eachOfLimit2.default)(limit)(coll, (0, _withoutIndex2.default)((0, _wrapAsync2.default)(iteratee)), callback);
}
exports.default = (0, _awaitify2.default)(eachLimit, 4);
module.exports = exports['default'];

185
api/node_modules/async/forEachOf.js generated vendored Normal file
View File

@@ -0,0 +1,185 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _isArrayLike = require('./internal/isArrayLike.js');
var _isArrayLike2 = _interopRequireDefault(_isArrayLike);
var _breakLoop = require('./internal/breakLoop.js');
var _breakLoop2 = _interopRequireDefault(_breakLoop);
var _eachOfLimit = require('./eachOfLimit.js');
var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
var _once = require('./internal/once.js');
var _once2 = _interopRequireDefault(_once);
var _onlyOnce = require('./internal/onlyOnce.js');
var _onlyOnce2 = _interopRequireDefault(_onlyOnce);
var _wrapAsync = require('./internal/wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// eachOf implementation optimized for array-likes
function eachOfArrayLike(coll, iteratee, callback) {
callback = (0, _once2.default)(callback);
var index = 0,
completed = 0,
{ length } = coll,
canceled = false;
if (length === 0) {
callback(null);
}
function iteratorCallback(err, value) {
if (err === false) {
canceled = true;
}
if (canceled === true) return;
if (err) {
callback(err);
} else if (++completed === length || value === _breakLoop2.default) {
callback(null);
}
}
for (; index < length; index++) {
iteratee(coll[index], index, (0, _onlyOnce2.default)(iteratorCallback));
}
}
// a generic version of eachOf which can handle array, object, and iterator cases.
function eachOfGeneric(coll, iteratee, callback) {
return (0, _eachOfLimit2.default)(coll, Infinity, iteratee, callback);
}
/**
* Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument
* to the iteratee.
*
* @name eachOf
* @static
* @memberOf module:Collections
* @method
* @alias forEachOf
* @category Collection
* @see [async.each]{@link module:Collections.each}
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - A function to apply to each
* item in `coll`.
* The `key` is the item's key, or index in the case of an array.
* Invoked with (item, key, callback).
* @param {Function} [callback] - A callback which is called when all
* `iteratee` functions have finished, or an error occurs. Invoked with (err).
* @returns {Promise} a promise, if a callback is omitted
* @example
*
* // dev.json is a file containing a valid json object config for dev environment
* // dev.json is a file containing a valid json object config for test environment
* // prod.json is a file containing a valid json object config for prod environment
* // invalid.json is a file with a malformed json object
*
* let configs = {}; //global variable
* let validConfigFileMap = {dev: 'dev.json', test: 'test.json', prod: 'prod.json'};
* let invalidConfigFileMap = {dev: 'dev.json', test: 'test.json', invalid: 'invalid.json'};
*
* // asynchronous function that reads a json file and parses the contents as json object
* function parseFile(file, key, callback) {
* fs.readFile(file, "utf8", function(err, data) {
* if (err) return calback(err);
* try {
* configs[key] = JSON.parse(data);
* } catch (e) {
* return callback(e);
* }
* callback();
* });
* }
*
* // Using callbacks
* async.forEachOf(validConfigFileMap, parseFile, function (err) {
* if (err) {
* console.error(err);
* } else {
* console.log(configs);
* // configs is now a map of JSON data, e.g.
* // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json}
* }
* });
*
* //Error handing
* async.forEachOf(invalidConfigFileMap, parseFile, function (err) {
* if (err) {
* console.error(err);
* // JSON parse error exception
* } else {
* console.log(configs);
* }
* });
*
* // Using Promises
* async.forEachOf(validConfigFileMap, parseFile)
* .then( () => {
* console.log(configs);
* // configs is now a map of JSON data, e.g.
* // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json}
* }).catch( err => {
* console.error(err);
* });
*
* //Error handing
* async.forEachOf(invalidConfigFileMap, parseFile)
* .then( () => {
* console.log(configs);
* }).catch( err => {
* console.error(err);
* // JSON parse error exception
* });
*
* // Using async/await
* async () => {
* try {
* let result = await async.forEachOf(validConfigFileMap, parseFile);
* console.log(configs);
* // configs is now a map of JSON data, e.g.
* // { dev: //parsed dev.json, test: //parsed test.json, prod: //parsed prod.json}
* }
* catch (err) {
* console.log(err);
* }
* }
*
* //Error handing
* async () => {
* try {
* let result = await async.forEachOf(invalidConfigFileMap, parseFile);
* console.log(configs);
* }
* catch (err) {
* console.log(err);
* // JSON parse error exception
* }
* }
*
*/
function eachOf(coll, iteratee, callback) {
var eachOfImplementation = (0, _isArrayLike2.default)(coll) ? eachOfArrayLike : eachOfGeneric;
return eachOfImplementation(coll, (0, _wrapAsync2.default)(iteratee), callback);
}
exports.default = (0, _awaitify2.default)(eachOf, 3);
module.exports = exports['default'];

47
api/node_modules/async/forEachOfLimit.js generated vendored Normal file
View File

@@ -0,0 +1,47 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _eachOfLimit2 = require('./internal/eachOfLimit.js');
var _eachOfLimit3 = _interopRequireDefault(_eachOfLimit2);
var _wrapAsync = require('./internal/wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a
* time.
*
* @name eachOfLimit
* @static
* @memberOf module:Collections
* @method
* @see [async.eachOf]{@link module:Collections.eachOf}
* @alias forEachOfLimit
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {AsyncFunction} iteratee - An async function to apply to each
* item in `coll`. The `key` is the item's key, or index in the case of an
* array.
* Invoked with (item, key, callback).
* @param {Function} [callback] - A callback which is called when all
* `iteratee` functions have finished, or an error occurs. Invoked with (err).
* @returns {Promise} a promise, if a callback is omitted
*/
function eachOfLimit(coll, limit, iteratee, callback) {
return (0, _eachOfLimit3.default)(limit)(coll, (0, _wrapAsync2.default)(iteratee), callback);
}
exports.default = (0, _awaitify2.default)(eachOfLimit, 4);
module.exports = exports['default'];

39
api/node_modules/async/forEachOfSeries.js generated vendored Normal file
View File

@@ -0,0 +1,39 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _eachOfLimit = require('./eachOfLimit.js');
var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time.
*
* @name eachOfSeries
* @static
* @memberOf module:Collections
* @method
* @see [async.eachOf]{@link module:Collections.eachOf}
* @alias forEachOfSeries
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - An async function to apply to each item in
* `coll`.
* Invoked with (item, key, callback).
* @param {Function} [callback] - A callback which is called when all `iteratee`
* functions have finished, or an error occurs. Invoked with (err).
* @returns {Promise} a promise, if a callback is omitted
*/
function eachOfSeries(coll, iteratee, callback) {
return (0, _eachOfLimit2.default)(coll, 1, iteratee, callback);
}
exports.default = (0, _awaitify2.default)(eachOfSeries, 3);
module.exports = exports['default'];

44
api/node_modules/async/forEachSeries.js generated vendored Normal file
View File

@@ -0,0 +1,44 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _eachLimit = require('./eachLimit.js');
var _eachLimit2 = _interopRequireDefault(_eachLimit);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time.
*
* Note, that unlike [`each`]{@link module:Collections.each}, this function applies iteratee to each item
* in series and therefore the iteratee functions will complete in order.
* @name eachSeries
* @static
* @memberOf module:Collections
* @method
* @see [async.each]{@link module:Collections.each}
* @alias forEachSeries
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - An async function to apply to each
* item in `coll`.
* The array index is not passed to the iteratee.
* If you need the index, use `eachOfSeries`.
* Invoked with (item, callback).
* @param {Function} [callback] - A callback which is called when all
* `iteratee` functions have finished, or an error occurs. Invoked with (err).
* @returns {Promise} a promise, if a callback is omitted
*/
function eachSeries(coll, iteratee, callback) {
return (0, _eachLimit2.default)(coll, 1, iteratee, callback);
}
exports.default = (0, _awaitify2.default)(eachSeries, 3);
module.exports = exports['default'];

68
api/node_modules/async/forever.js generated vendored Normal file
View File

@@ -0,0 +1,68 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _onlyOnce = require('./internal/onlyOnce.js');
var _onlyOnce2 = _interopRequireDefault(_onlyOnce);
var _ensureAsync = require('./ensureAsync.js');
var _ensureAsync2 = _interopRequireDefault(_ensureAsync);
var _wrapAsync = require('./internal/wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Calls the asynchronous function `fn` with a callback parameter that allows it
* to call itself again, in series, indefinitely.
* If an error is passed to the callback then `errback` is called with the
* error, and execution stops, otherwise it will never be called.
*
* @name forever
* @static
* @memberOf module:ControlFlow
* @method
* @category Control Flow
* @param {AsyncFunction} fn - an async function to call repeatedly.
* Invoked with (next).
* @param {Function} [errback] - when `fn` passes an error to it's callback,
* this function will be called, and execution stops. Invoked with (err).
* @returns {Promise} a promise that rejects if an error occurs and an errback
* is not passed
* @example
*
* async.forever(
* function(next) {
* // next is suitable for passing to things that need a callback(err [, whatever]);
* // it will result in this function being called again.
* },
* function(err) {
* // if next is called with a value in its first parameter, it will appear
* // in here as 'err', and execution will stop.
* }
* );
*/
function forever(fn, errback) {
var done = (0, _onlyOnce2.default)(errback);
var task = (0, _wrapAsync2.default)((0, _ensureAsync2.default)(fn));
function next(err) {
if (err) return done(err);
if (err === false) return;
task(next);
}
return next();
}
exports.default = (0, _awaitify2.default)(forever, 2);
module.exports = exports['default'];

108
api/node_modules/async/groupBy.js generated vendored Normal file
View File

@@ -0,0 +1,108 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = groupBy;
var _groupByLimit = require('./groupByLimit.js');
var _groupByLimit2 = _interopRequireDefault(_groupByLimit);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Returns a new object, where each value corresponds to an array of items, from
* `coll`, that returned the corresponding key. That is, the keys of the object
* correspond to the values passed to the `iteratee` callback.
*
* Note: Since this function applies the `iteratee` to each item in parallel,
* there is no guarantee that the `iteratee` functions will complete in order.
* However, the values for each key in the `result` will be in the same order as
* the original `coll`. For Objects, the values will roughly be in the order of
* the original Objects' keys (but this can vary across JavaScript engines).
*
* @name groupBy
* @static
* @memberOf module:Collections
* @method
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - An async function to apply to each item in
* `coll`.
* The iteratee should complete with a `key` to group the value under.
* Invoked with (value, callback).
* @param {Function} [callback] - A callback which is called when all `iteratee`
* functions have finished, or an error occurs. Result is an `Object` whoses
* properties are arrays of values which returned the corresponding key.
* @returns {Promise} a promise, if no callback is passed
* @example
*
* // dir1 is a directory that contains file1.txt, file2.txt
* // dir2 is a directory that contains file3.txt, file4.txt
* // dir3 is a directory that contains file5.txt
* // dir4 does not exist
*
* const files = ['dir1/file1.txt','dir2','dir4']
*
* // asynchronous function that detects file type as none, file, or directory
* function detectFile(file, callback) {
* fs.stat(file, function(err, stat) {
* if (err) {
* return callback(null, 'none');
* }
* callback(null, stat.isDirectory() ? 'directory' : 'file');
* });
* }
*
* //Using callbacks
* async.groupBy(files, detectFile, function(err, result) {
* if(err) {
* console.log(err);
* } else {
* console.log(result);
* // {
* // file: [ 'dir1/file1.txt' ],
* // none: [ 'dir4' ],
* // directory: [ 'dir2']
* // }
* // result is object containing the files grouped by type
* }
* });
*
* // Using Promises
* async.groupBy(files, detectFile)
* .then( result => {
* console.log(result);
* // {
* // file: [ 'dir1/file1.txt' ],
* // none: [ 'dir4' ],
* // directory: [ 'dir2']
* // }
* // result is object containing the files grouped by type
* }).catch( err => {
* console.log(err);
* });
*
* // Using async/await
* async () => {
* try {
* let result = await async.groupBy(files, detectFile);
* console.log(result);
* // {
* // file: [ 'dir1/file1.txt' ],
* // none: [ 'dir4' ],
* // directory: [ 'dir2']
* // }
* // result is object containing the files grouped by type
* }
* catch (err) {
* console.log(err);
* }
* }
*
*/
function groupBy(coll, iteratee, callback) {
return (0, _groupByLimit2.default)(coll, Infinity, iteratee, callback);
}
module.exports = exports['default'];

71
api/node_modules/async/groupByLimit.js generated vendored Normal file
View File

@@ -0,0 +1,71 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _mapLimit = require('./mapLimit.js');
var _mapLimit2 = _interopRequireDefault(_mapLimit);
var _wrapAsync = require('./internal/wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`groupBy`]{@link module:Collections.groupBy} but runs a maximum of `limit` async operations at a time.
*
* @name groupByLimit
* @static
* @memberOf module:Collections
* @method
* @see [async.groupBy]{@link module:Collections.groupBy}
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {number} limit - The maximum number of async operations at a time.
* @param {AsyncFunction} iteratee - An async function to apply to each item in
* `coll`.
* The iteratee should complete with a `key` to group the value under.
* Invoked with (value, callback).
* @param {Function} [callback] - A callback which is called when all `iteratee`
* functions have finished, or an error occurs. Result is an `Object` whoses
* properties are arrays of values which returned the corresponding key.
* @returns {Promise} a promise, if no callback is passed
*/
function groupByLimit(coll, limit, iteratee, callback) {
var _iteratee = (0, _wrapAsync2.default)(iteratee);
return (0, _mapLimit2.default)(coll, limit, (val, iterCb) => {
_iteratee(val, (err, key) => {
if (err) return iterCb(err);
return iterCb(err, { key, val });
});
}, (err, mapResults) => {
var result = {};
// from MDN, handle object having an `hasOwnProperty` prop
var { hasOwnProperty } = Object.prototype;
for (var i = 0; i < mapResults.length; i++) {
if (mapResults[i]) {
var { key } = mapResults[i];
var { val } = mapResults[i];
if (hasOwnProperty.call(result, key)) {
result[key].push(val);
} else {
result[key] = [val];
}
}
}
return callback(err, result);
});
}
exports.default = (0, _awaitify2.default)(groupByLimit, 4);
module.exports = exports['default'];

36
api/node_modules/async/groupBySeries.js generated vendored Normal file
View File

@@ -0,0 +1,36 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = groupBySeries;
var _groupByLimit = require('./groupByLimit.js');
var _groupByLimit2 = _interopRequireDefault(_groupByLimit);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [`groupBy`]{@link module:Collections.groupBy} but runs only a single async operation at a time.
*
* @name groupBySeries
* @static
* @memberOf module:Collections
* @method
* @see [async.groupBy]{@link module:Collections.groupBy}
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {AsyncFunction} iteratee - An async function to apply to each item in
* `coll`.
* The iteratee should complete with a `key` to group the value under.
* Invoked with (value, callback).
* @param {Function} [callback] - A callback which is called when all `iteratee`
* functions have finished, or an error occurs. Result is an `Object` whose
* properties are arrays of values which returned the corresponding key.
* @returns {Promise} a promise, if no callback is passed
*/
function groupBySeries(coll, iteratee, callback) {
return (0, _groupByLimit2.default)(coll, 1, iteratee, callback);
}
module.exports = exports['default'];

588
api/node_modules/async/index.js generated vendored Normal file
View File

@@ -0,0 +1,588 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.doDuring = exports.during = exports.wrapSync = undefined;
exports.selectSeries = exports.selectLimit = exports.select = exports.foldr = exports.foldl = exports.inject = exports.forEachOfLimit = exports.forEachOfSeries = exports.forEachOf = exports.forEachLimit = exports.forEachSeries = exports.forEach = exports.flatMapSeries = exports.flatMapLimit = exports.flatMap = exports.findSeries = exports.findLimit = exports.find = exports.anySeries = exports.anyLimit = exports.any = exports.allSeries = exports.allLimit = exports.all = exports.whilst = exports.waterfall = exports.until = exports.unmemoize = exports.tryEach = exports.transform = exports.timesSeries = exports.timesLimit = exports.times = exports.timeout = exports.sortBy = exports.someSeries = exports.someLimit = exports.some = exports.setImmediate = exports.series = exports.seq = exports.retryable = exports.retry = exports.rejectSeries = exports.rejectLimit = exports.reject = exports.reflectAll = exports.reflect = exports.reduceRight = exports.reduce = exports.race = exports.queue = exports.priorityQueue = exports.parallelLimit = exports.parallel = exports.nextTick = exports.memoize = exports.mapValuesSeries = exports.mapValuesLimit = exports.mapValues = exports.mapSeries = exports.mapLimit = exports.map = exports.log = exports.groupBySeries = exports.groupByLimit = exports.groupBy = exports.forever = exports.filterSeries = exports.filterLimit = exports.filter = exports.everySeries = exports.everyLimit = exports.every = exports.ensureAsync = exports.eachSeries = exports.eachOfSeries = exports.eachOfLimit = exports.eachOf = exports.eachLimit = exports.each = exports.doWhilst = exports.doUntil = exports.dir = exports.detectSeries = exports.detectLimit = exports.detect = exports.constant = exports.concatSeries = exports.concatLimit = exports.concat = exports.compose = exports.cargoQueue = exports.cargo = exports.autoInject = exports.auto = exports.asyncify = exports.applyEachSeries = exports.applyEach = exports.apply = undefined;
var _apply = require('./apply');
var _apply2 = _interopRequireDefault(_apply);
var _applyEach = require('./applyEach');
var _applyEach2 = _interopRequireDefault(_applyEach);
var _applyEachSeries = require('./applyEachSeries');
var _applyEachSeries2 = _interopRequireDefault(_applyEachSeries);
var _asyncify = require('./asyncify');
var _asyncify2 = _interopRequireDefault(_asyncify);
var _auto = require('./auto');
var _auto2 = _interopRequireDefault(_auto);
var _autoInject = require('./autoInject');
var _autoInject2 = _interopRequireDefault(_autoInject);
var _cargo = require('./cargo');
var _cargo2 = _interopRequireDefault(_cargo);
var _cargoQueue = require('./cargoQueue');
var _cargoQueue2 = _interopRequireDefault(_cargoQueue);
var _compose = require('./compose');
var _compose2 = _interopRequireDefault(_compose);
var _concat = require('./concat');
var _concat2 = _interopRequireDefault(_concat);
var _concatLimit = require('./concatLimit');
var _concatLimit2 = _interopRequireDefault(_concatLimit);
var _concatSeries = require('./concatSeries');
var _concatSeries2 = _interopRequireDefault(_concatSeries);
var _constant = require('./constant');
var _constant2 = _interopRequireDefault(_constant);
var _detect = require('./detect');
var _detect2 = _interopRequireDefault(_detect);
var _detectLimit = require('./detectLimit');
var _detectLimit2 = _interopRequireDefault(_detectLimit);
var _detectSeries = require('./detectSeries');
var _detectSeries2 = _interopRequireDefault(_detectSeries);
var _dir = require('./dir');
var _dir2 = _interopRequireDefault(_dir);
var _doUntil = require('./doUntil');
var _doUntil2 = _interopRequireDefault(_doUntil);
var _doWhilst = require('./doWhilst');
var _doWhilst2 = _interopRequireDefault(_doWhilst);
var _each = require('./each');
var _each2 = _interopRequireDefault(_each);
var _eachLimit = require('./eachLimit');
var _eachLimit2 = _interopRequireDefault(_eachLimit);
var _eachOf = require('./eachOf');
var _eachOf2 = _interopRequireDefault(_eachOf);
var _eachOfLimit = require('./eachOfLimit');
var _eachOfLimit2 = _interopRequireDefault(_eachOfLimit);
var _eachOfSeries = require('./eachOfSeries');
var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries);
var _eachSeries = require('./eachSeries');
var _eachSeries2 = _interopRequireDefault(_eachSeries);
var _ensureAsync = require('./ensureAsync');
var _ensureAsync2 = _interopRequireDefault(_ensureAsync);
var _every = require('./every');
var _every2 = _interopRequireDefault(_every);
var _everyLimit = require('./everyLimit');
var _everyLimit2 = _interopRequireDefault(_everyLimit);
var _everySeries = require('./everySeries');
var _everySeries2 = _interopRequireDefault(_everySeries);
var _filter = require('./filter');
var _filter2 = _interopRequireDefault(_filter);
var _filterLimit = require('./filterLimit');
var _filterLimit2 = _interopRequireDefault(_filterLimit);
var _filterSeries = require('./filterSeries');
var _filterSeries2 = _interopRequireDefault(_filterSeries);
var _forever = require('./forever');
var _forever2 = _interopRequireDefault(_forever);
var _groupBy = require('./groupBy');
var _groupBy2 = _interopRequireDefault(_groupBy);
var _groupByLimit = require('./groupByLimit');
var _groupByLimit2 = _interopRequireDefault(_groupByLimit);
var _groupBySeries = require('./groupBySeries');
var _groupBySeries2 = _interopRequireDefault(_groupBySeries);
var _log = require('./log');
var _log2 = _interopRequireDefault(_log);
var _map = require('./map');
var _map2 = _interopRequireDefault(_map);
var _mapLimit = require('./mapLimit');
var _mapLimit2 = _interopRequireDefault(_mapLimit);
var _mapSeries = require('./mapSeries');
var _mapSeries2 = _interopRequireDefault(_mapSeries);
var _mapValues = require('./mapValues');
var _mapValues2 = _interopRequireDefault(_mapValues);
var _mapValuesLimit = require('./mapValuesLimit');
var _mapValuesLimit2 = _interopRequireDefault(_mapValuesLimit);
var _mapValuesSeries = require('./mapValuesSeries');
var _mapValuesSeries2 = _interopRequireDefault(_mapValuesSeries);
var _memoize = require('./memoize');
var _memoize2 = _interopRequireDefault(_memoize);
var _nextTick = require('./nextTick');
var _nextTick2 = _interopRequireDefault(_nextTick);
var _parallel = require('./parallel');
var _parallel2 = _interopRequireDefault(_parallel);
var _parallelLimit = require('./parallelLimit');
var _parallelLimit2 = _interopRequireDefault(_parallelLimit);
var _priorityQueue = require('./priorityQueue');
var _priorityQueue2 = _interopRequireDefault(_priorityQueue);
var _queue = require('./queue');
var _queue2 = _interopRequireDefault(_queue);
var _race = require('./race');
var _race2 = _interopRequireDefault(_race);
var _reduce = require('./reduce');
var _reduce2 = _interopRequireDefault(_reduce);
var _reduceRight = require('./reduceRight');
var _reduceRight2 = _interopRequireDefault(_reduceRight);
var _reflect = require('./reflect');
var _reflect2 = _interopRequireDefault(_reflect);
var _reflectAll = require('./reflectAll');
var _reflectAll2 = _interopRequireDefault(_reflectAll);
var _reject = require('./reject');
var _reject2 = _interopRequireDefault(_reject);
var _rejectLimit = require('./rejectLimit');
var _rejectLimit2 = _interopRequireDefault(_rejectLimit);
var _rejectSeries = require('./rejectSeries');
var _rejectSeries2 = _interopRequireDefault(_rejectSeries);
var _retry = require('./retry');
var _retry2 = _interopRequireDefault(_retry);
var _retryable = require('./retryable');
var _retryable2 = _interopRequireDefault(_retryable);
var _seq = require('./seq');
var _seq2 = _interopRequireDefault(_seq);
var _series = require('./series');
var _series2 = _interopRequireDefault(_series);
var _setImmediate = require('./setImmediate');
var _setImmediate2 = _interopRequireDefault(_setImmediate);
var _some = require('./some');
var _some2 = _interopRequireDefault(_some);
var _someLimit = require('./someLimit');
var _someLimit2 = _interopRequireDefault(_someLimit);
var _someSeries = require('./someSeries');
var _someSeries2 = _interopRequireDefault(_someSeries);
var _sortBy = require('./sortBy');
var _sortBy2 = _interopRequireDefault(_sortBy);
var _timeout = require('./timeout');
var _timeout2 = _interopRequireDefault(_timeout);
var _times = require('./times');
var _times2 = _interopRequireDefault(_times);
var _timesLimit = require('./timesLimit');
var _timesLimit2 = _interopRequireDefault(_timesLimit);
var _timesSeries = require('./timesSeries');
var _timesSeries2 = _interopRequireDefault(_timesSeries);
var _transform = require('./transform');
var _transform2 = _interopRequireDefault(_transform);
var _tryEach = require('./tryEach');
var _tryEach2 = _interopRequireDefault(_tryEach);
var _unmemoize = require('./unmemoize');
var _unmemoize2 = _interopRequireDefault(_unmemoize);
var _until = require('./until');
var _until2 = _interopRequireDefault(_until);
var _waterfall = require('./waterfall');
var _waterfall2 = _interopRequireDefault(_waterfall);
var _whilst = require('./whilst');
var _whilst2 = _interopRequireDefault(_whilst);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* An "async function" in the context of Async is an asynchronous function with
* a variable number of parameters, with the final parameter being a callback.
* (`function (arg1, arg2, ..., callback) {}`)
* The final callback is of the form `callback(err, results...)`, which must be
* called once the function is completed. The callback should be called with a
* Error as its first argument to signal that an error occurred.
* Otherwise, if no error occurred, it should be called with `null` as the first
* argument, and any additional `result` arguments that may apply, to signal
* successful completion.
* The callback must be called exactly once, ideally on a later tick of the
* JavaScript event loop.
*
* This type of function is also referred to as a "Node-style async function",
* or a "continuation passing-style function" (CPS). Most of the methods of this
* library are themselves CPS/Node-style async functions, or functions that
* return CPS/Node-style async functions.
*
* Wherever we accept a Node-style async function, we also directly accept an
* [ES2017 `async` function]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function}.
* In this case, the `async` function will not be passed a final callback
* argument, and any thrown error will be used as the `err` argument of the
* implicit callback, and the return value will be used as the `result` value.
* (i.e. a `rejected` of the returned Promise becomes the `err` callback
* argument, and a `resolved` value becomes the `result`.)
*
* Note, due to JavaScript limitations, we can only detect native `async`
* functions and not transpilied implementations.
* Your environment must have `async`/`await` support for this to work.
* (e.g. Node > v7.6, or a recent version of a modern browser).
* If you are using `async` functions through a transpiler (e.g. Babel), you
* must still wrap the function with [asyncify]{@link module:Utils.asyncify},
* because the `async function` will be compiled to an ordinary function that
* returns a promise.
*
* @typedef {Function} AsyncFunction
* @static
*/
/**
* Async is a utility module which provides straight-forward, powerful functions
* for working with asynchronous JavaScript. Although originally designed for
* use with [Node.js](http://nodejs.org) and installable via
* `npm install --save async`, it can also be used directly in the browser.
* @module async
* @see AsyncFunction
*/
/**
* A collection of `async` functions for manipulating collections, such as
* arrays and objects.
* @module Collections
*/
/**
* A collection of `async` functions for controlling the flow through a script.
* @module ControlFlow
*/
/**
* A collection of `async` utility functions.
* @module Utils
*/
exports.default = {
apply: _apply2.default,
applyEach: _applyEach2.default,
applyEachSeries: _applyEachSeries2.default,
asyncify: _asyncify2.default,
auto: _auto2.default,
autoInject: _autoInject2.default,
cargo: _cargo2.default,
cargoQueue: _cargoQueue2.default,
compose: _compose2.default,
concat: _concat2.default,
concatLimit: _concatLimit2.default,
concatSeries: _concatSeries2.default,
constant: _constant2.default,
detect: _detect2.default,
detectLimit: _detectLimit2.default,
detectSeries: _detectSeries2.default,
dir: _dir2.default,
doUntil: _doUntil2.default,
doWhilst: _doWhilst2.default,
each: _each2.default,
eachLimit: _eachLimit2.default,
eachOf: _eachOf2.default,
eachOfLimit: _eachOfLimit2.default,
eachOfSeries: _eachOfSeries2.default,
eachSeries: _eachSeries2.default,
ensureAsync: _ensureAsync2.default,
every: _every2.default,
everyLimit: _everyLimit2.default,
everySeries: _everySeries2.default,
filter: _filter2.default,
filterLimit: _filterLimit2.default,
filterSeries: _filterSeries2.default,
forever: _forever2.default,
groupBy: _groupBy2.default,
groupByLimit: _groupByLimit2.default,
groupBySeries: _groupBySeries2.default,
log: _log2.default,
map: _map2.default,
mapLimit: _mapLimit2.default,
mapSeries: _mapSeries2.default,
mapValues: _mapValues2.default,
mapValuesLimit: _mapValuesLimit2.default,
mapValuesSeries: _mapValuesSeries2.default,
memoize: _memoize2.default,
nextTick: _nextTick2.default,
parallel: _parallel2.default,
parallelLimit: _parallelLimit2.default,
priorityQueue: _priorityQueue2.default,
queue: _queue2.default,
race: _race2.default,
reduce: _reduce2.default,
reduceRight: _reduceRight2.default,
reflect: _reflect2.default,
reflectAll: _reflectAll2.default,
reject: _reject2.default,
rejectLimit: _rejectLimit2.default,
rejectSeries: _rejectSeries2.default,
retry: _retry2.default,
retryable: _retryable2.default,
seq: _seq2.default,
series: _series2.default,
setImmediate: _setImmediate2.default,
some: _some2.default,
someLimit: _someLimit2.default,
someSeries: _someSeries2.default,
sortBy: _sortBy2.default,
timeout: _timeout2.default,
times: _times2.default,
timesLimit: _timesLimit2.default,
timesSeries: _timesSeries2.default,
transform: _transform2.default,
tryEach: _tryEach2.default,
unmemoize: _unmemoize2.default,
until: _until2.default,
waterfall: _waterfall2.default,
whilst: _whilst2.default,
// aliases
all: _every2.default,
allLimit: _everyLimit2.default,
allSeries: _everySeries2.default,
any: _some2.default,
anyLimit: _someLimit2.default,
anySeries: _someSeries2.default,
find: _detect2.default,
findLimit: _detectLimit2.default,
findSeries: _detectSeries2.default,
flatMap: _concat2.default,
flatMapLimit: _concatLimit2.default,
flatMapSeries: _concatSeries2.default,
forEach: _each2.default,
forEachSeries: _eachSeries2.default,
forEachLimit: _eachLimit2.default,
forEachOf: _eachOf2.default,
forEachOfSeries: _eachOfSeries2.default,
forEachOfLimit: _eachOfLimit2.default,
inject: _reduce2.default,
foldl: _reduce2.default,
foldr: _reduceRight2.default,
select: _filter2.default,
selectLimit: _filterLimit2.default,
selectSeries: _filterSeries2.default,
wrapSync: _asyncify2.default,
during: _whilst2.default,
doDuring: _doWhilst2.default
};
exports.apply = _apply2.default;
exports.applyEach = _applyEach2.default;
exports.applyEachSeries = _applyEachSeries2.default;
exports.asyncify = _asyncify2.default;
exports.auto = _auto2.default;
exports.autoInject = _autoInject2.default;
exports.cargo = _cargo2.default;
exports.cargoQueue = _cargoQueue2.default;
exports.compose = _compose2.default;
exports.concat = _concat2.default;
exports.concatLimit = _concatLimit2.default;
exports.concatSeries = _concatSeries2.default;
exports.constant = _constant2.default;
exports.detect = _detect2.default;
exports.detectLimit = _detectLimit2.default;
exports.detectSeries = _detectSeries2.default;
exports.dir = _dir2.default;
exports.doUntil = _doUntil2.default;
exports.doWhilst = _doWhilst2.default;
exports.each = _each2.default;
exports.eachLimit = _eachLimit2.default;
exports.eachOf = _eachOf2.default;
exports.eachOfLimit = _eachOfLimit2.default;
exports.eachOfSeries = _eachOfSeries2.default;
exports.eachSeries = _eachSeries2.default;
exports.ensureAsync = _ensureAsync2.default;
exports.every = _every2.default;
exports.everyLimit = _everyLimit2.default;
exports.everySeries = _everySeries2.default;
exports.filter = _filter2.default;
exports.filterLimit = _filterLimit2.default;
exports.filterSeries = _filterSeries2.default;
exports.forever = _forever2.default;
exports.groupBy = _groupBy2.default;
exports.groupByLimit = _groupByLimit2.default;
exports.groupBySeries = _groupBySeries2.default;
exports.log = _log2.default;
exports.map = _map2.default;
exports.mapLimit = _mapLimit2.default;
exports.mapSeries = _mapSeries2.default;
exports.mapValues = _mapValues2.default;
exports.mapValuesLimit = _mapValuesLimit2.default;
exports.mapValuesSeries = _mapValuesSeries2.default;
exports.memoize = _memoize2.default;
exports.nextTick = _nextTick2.default;
exports.parallel = _parallel2.default;
exports.parallelLimit = _parallelLimit2.default;
exports.priorityQueue = _priorityQueue2.default;
exports.queue = _queue2.default;
exports.race = _race2.default;
exports.reduce = _reduce2.default;
exports.reduceRight = _reduceRight2.default;
exports.reflect = _reflect2.default;
exports.reflectAll = _reflectAll2.default;
exports.reject = _reject2.default;
exports.rejectLimit = _rejectLimit2.default;
exports.rejectSeries = _rejectSeries2.default;
exports.retry = _retry2.default;
exports.retryable = _retryable2.default;
exports.seq = _seq2.default;
exports.series = _series2.default;
exports.setImmediate = _setImmediate2.default;
exports.some = _some2.default;
exports.someLimit = _someLimit2.default;
exports.someSeries = _someSeries2.default;
exports.sortBy = _sortBy2.default;
exports.timeout = _timeout2.default;
exports.times = _times2.default;
exports.timesLimit = _timesLimit2.default;
exports.timesSeries = _timesSeries2.default;
exports.transform = _transform2.default;
exports.tryEach = _tryEach2.default;
exports.unmemoize = _unmemoize2.default;
exports.until = _until2.default;
exports.waterfall = _waterfall2.default;
exports.whilst = _whilst2.default;
exports.all = _every2.default;
exports.allLimit = _everyLimit2.default;
exports.allSeries = _everySeries2.default;
exports.any = _some2.default;
exports.anyLimit = _someLimit2.default;
exports.anySeries = _someSeries2.default;
exports.find = _detect2.default;
exports.findLimit = _detectLimit2.default;
exports.findSeries = _detectSeries2.default;
exports.flatMap = _concat2.default;
exports.flatMapLimit = _concatLimit2.default;
exports.flatMapSeries = _concatSeries2.default;
exports.forEach = _each2.default;
exports.forEachSeries = _eachSeries2.default;
exports.forEachLimit = _eachLimit2.default;
exports.forEachOf = _eachOf2.default;
exports.forEachOfSeries = _eachOfSeries2.default;
exports.forEachOfLimit = _eachOfLimit2.default;
exports.inject = _reduce2.default;
exports.foldl = _reduce2.default;
exports.foldr = _reduceRight2.default;
exports.select = _filter2.default;
exports.selectLimit = _filterLimit2.default;
exports.selectSeries = _filterSeries2.default;
exports.wrapSync = _asyncify2.default;
exports.during = _whilst2.default;
exports.doDuring = _doWhilst2.default;

153
api/node_modules/async/inject.js generated vendored Normal file
View File

@@ -0,0 +1,153 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _eachOfSeries = require('./eachOfSeries.js');
var _eachOfSeries2 = _interopRequireDefault(_eachOfSeries);
var _once = require('./internal/once.js');
var _once2 = _interopRequireDefault(_once);
var _wrapAsync = require('./internal/wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
var _awaitify = require('./internal/awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Reduces `coll` into a single value using an async `iteratee` to return each
* successive step. `memo` is the initial state of the reduction. This function
* only operates in series.
*
* For performance reasons, it may make sense to split a call to this function
* into a parallel map, and then use the normal `Array.prototype.reduce` on the
* results. This function is for situations where each step in the reduction
* needs to be async; if you can get the data before reducing it, then it's
* probably a good idea to do so.
*
* @name reduce
* @static
* @memberOf module:Collections
* @method
* @alias inject
* @alias foldl
* @category Collection
* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.
* @param {*} memo - The initial state of the reduction.
* @param {AsyncFunction} iteratee - A function applied to each item in the
* array to produce the next step in the reduction.
* The `iteratee` should complete with the next state of the reduction.
* If the iteratee completes with an error, the reduction is stopped and the
* main `callback` is immediately called with the error.
* Invoked with (memo, item, callback).
* @param {Function} [callback] - A callback which is called after all the
* `iteratee` functions have finished. Result is the reduced value. Invoked with
* (err, result).
* @returns {Promise} a promise, if no callback is passed
* @example
*
* // file1.txt is a file that is 1000 bytes in size
* // file2.txt is a file that is 2000 bytes in size
* // file3.txt is a file that is 3000 bytes in size
* // file4.txt does not exist
*
* const fileList = ['file1.txt','file2.txt','file3.txt'];
* const withMissingFileList = ['file1.txt','file2.txt','file3.txt', 'file4.txt'];
*
* // asynchronous function that computes the file size in bytes
* // file size is added to the memoized value, then returned
* function getFileSizeInBytes(memo, file, callback) {
* fs.stat(file, function(err, stat) {
* if (err) {
* return callback(err);
* }
* callback(null, memo + stat.size);
* });
* }
*
* // Using callbacks
* async.reduce(fileList, 0, getFileSizeInBytes, function(err, result) {
* if (err) {
* console.log(err);
* } else {
* console.log(result);
* // 6000
* // which is the sum of the file sizes of the three files
* }
* });
*
* // Error Handling
* async.reduce(withMissingFileList, 0, getFileSizeInBytes, function(err, result) {
* if (err) {
* console.log(err);
* // [ Error: ENOENT: no such file or directory ]
* } else {
* console.log(result);
* }
* });
*
* // Using Promises
* async.reduce(fileList, 0, getFileSizeInBytes)
* .then( result => {
* console.log(result);
* // 6000
* // which is the sum of the file sizes of the three files
* }).catch( err => {
* console.log(err);
* });
*
* // Error Handling
* async.reduce(withMissingFileList, 0, getFileSizeInBytes)
* .then( result => {
* console.log(result);
* }).catch( err => {
* console.log(err);
* // [ Error: ENOENT: no such file or directory ]
* });
*
* // Using async/await
* async () => {
* try {
* let result = await async.reduce(fileList, 0, getFileSizeInBytes);
* console.log(result);
* // 6000
* // which is the sum of the file sizes of the three files
* }
* catch (err) {
* console.log(err);
* }
* }
*
* // Error Handling
* async () => {
* try {
* let result = await async.reduce(withMissingFileList, 0, getFileSizeInBytes);
* console.log(result);
* }
* catch (err) {
* console.log(err);
* // [ Error: ENOENT: no such file or directory ]
* }
* }
*
*/
function reduce(coll, memo, iteratee, callback) {
callback = (0, _once2.default)(callback);
var _iteratee = (0, _wrapAsync2.default)(iteratee);
return (0, _eachOfSeries2.default)(coll, (x, i, iterCb) => {
_iteratee(memo, x, (err, v) => {
memo = v;
iterCb(err);
});
}, err => callback(err, memo));
}
exports.default = (0, _awaitify2.default)(reduce, 4);
module.exports = exports['default'];

92
api/node_modules/async/internal/DoublyLinkedList.js generated vendored Normal file
View File

@@ -0,0 +1,92 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
// Simple doubly linked list (https://en.wikipedia.org/wiki/Doubly_linked_list) implementation
// used for queues. This implementation assumes that the node provided by the user can be modified
// to adjust the next and last properties. We implement only the minimal functionality
// for queue support.
class DLL {
constructor() {
this.head = this.tail = null;
this.length = 0;
}
removeLink(node) {
if (node.prev) node.prev.next = node.next;else this.head = node.next;
if (node.next) node.next.prev = node.prev;else this.tail = node.prev;
node.prev = node.next = null;
this.length -= 1;
return node;
}
empty() {
while (this.head) this.shift();
return this;
}
insertAfter(node, newNode) {
newNode.prev = node;
newNode.next = node.next;
if (node.next) node.next.prev = newNode;else this.tail = newNode;
node.next = newNode;
this.length += 1;
}
insertBefore(node, newNode) {
newNode.prev = node.prev;
newNode.next = node;
if (node.prev) node.prev.next = newNode;else this.head = newNode;
node.prev = newNode;
this.length += 1;
}
unshift(node) {
if (this.head) this.insertBefore(this.head, node);else setInitial(this, node);
}
push(node) {
if (this.tail) this.insertAfter(this.tail, node);else setInitial(this, node);
}
shift() {
return this.head && this.removeLink(this.head);
}
pop() {
return this.tail && this.removeLink(this.tail);
}
toArray() {
return [...this];
}
*[Symbol.iterator]() {
var cur = this.head;
while (cur) {
yield cur.data;
cur = cur.next;
}
}
remove(testFn) {
var curr = this.head;
while (curr) {
var { next } = curr;
if (testFn(curr)) {
this.removeLink(curr);
}
curr = next;
}
return this;
}
}
exports.default = DLL;
function setInitial(dll, node) {
dll.length = 1;
dll.head = dll.tail = node;
}
module.exports = exports["default"];

120
api/node_modules/async/internal/Heap.js generated vendored Normal file
View File

@@ -0,0 +1,120 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
// Binary min-heap implementation used for priority queue.
// Implementation is stable, i.e. push time is considered for equal priorities
class Heap {
constructor() {
this.heap = [];
this.pushCount = Number.MIN_SAFE_INTEGER;
}
get length() {
return this.heap.length;
}
empty() {
this.heap = [];
return this;
}
percUp(index) {
let p;
while (index > 0 && smaller(this.heap[index], this.heap[p = parent(index)])) {
let t = this.heap[index];
this.heap[index] = this.heap[p];
this.heap[p] = t;
index = p;
}
}
percDown(index) {
let l;
while ((l = leftChi(index)) < this.heap.length) {
if (l + 1 < this.heap.length && smaller(this.heap[l + 1], this.heap[l])) {
l = l + 1;
}
if (smaller(this.heap[index], this.heap[l])) {
break;
}
let t = this.heap[index];
this.heap[index] = this.heap[l];
this.heap[l] = t;
index = l;
}
}
push(node) {
node.pushCount = ++this.pushCount;
this.heap.push(node);
this.percUp(this.heap.length - 1);
}
unshift(node) {
return this.heap.push(node);
}
shift() {
let [top] = this.heap;
this.heap[0] = this.heap[this.heap.length - 1];
this.heap.pop();
this.percDown(0);
return top;
}
toArray() {
return [...this];
}
*[Symbol.iterator]() {
for (let i = 0; i < this.heap.length; i++) {
yield this.heap[i].data;
}
}
remove(testFn) {
let j = 0;
for (let i = 0; i < this.heap.length; i++) {
if (!testFn(this.heap[i])) {
this.heap[j] = this.heap[i];
j++;
}
}
this.heap.splice(j);
for (let i = parent(this.heap.length - 1); i >= 0; i--) {
this.percDown(i);
}
return this;
}
}
exports.default = Heap;
function leftChi(i) {
return (i << 1) + 1;
}
function parent(i) {
return (i + 1 >> 1) - 1;
}
function smaller(x, y) {
if (x.priority !== y.priority) {
return x.priority < y.priority;
} else {
return x.pushCount < y.pushCount;
}
}
module.exports = exports["default"];

29
api/node_modules/async/internal/applyEach.js generated vendored Normal file
View File

@@ -0,0 +1,29 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function (eachfn) {
return function applyEach(fns, ...callArgs) {
const go = (0, _awaitify2.default)(function (callback) {
var that = this;
return eachfn(fns, (fn, cb) => {
(0, _wrapAsync2.default)(fn).apply(that, callArgs.concat(cb));
}, callback);
});
return go;
};
};
var _wrapAsync = require('./wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
var _awaitify = require('./awaitify.js');
var _awaitify2 = _interopRequireDefault(_awaitify);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
module.exports = exports['default'];

75
api/node_modules/async/internal/asyncEachOfLimit.js generated vendored Normal file
View File

@@ -0,0 +1,75 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = asyncEachOfLimit;
var _breakLoop = require('./breakLoop.js');
var _breakLoop2 = _interopRequireDefault(_breakLoop);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// for async generators
function asyncEachOfLimit(generator, limit, iteratee, callback) {
let done = false;
let canceled = false;
let awaiting = false;
let running = 0;
let idx = 0;
function replenish() {
//console.log('replenish')
if (running >= limit || awaiting || done) return;
//console.log('replenish awaiting')
awaiting = true;
generator.next().then(({ value, done: iterDone }) => {
//console.log('got value', value)
if (canceled || done) return;
awaiting = false;
if (iterDone) {
done = true;
if (running <= 0) {
//console.log('done nextCb')
callback(null);
}
return;
}
running++;
iteratee(value, idx, iterateeCallback);
idx++;
replenish();
}).catch(handleError);
}
function iterateeCallback(err, result) {
//console.log('iterateeCallback')
running -= 1;
if (canceled) return;
if (err) return handleError(err);
if (err === false) {
done = true;
canceled = true;
return;
}
if (result === _breakLoop2.default || done && running <= 0) {
done = true;
//console.log('done iterCb')
return callback(null);
}
replenish();
}
function handleError(err) {
if (canceled) return;
awaiting = false;
done = true;
callback(err);
}
replenish();
}
module.exports = exports['default'];

27
api/node_modules/async/internal/awaitify.js generated vendored Normal file
View File

@@ -0,0 +1,27 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = awaitify;
// conditionally promisify a function.
// only return a promise if a callback is omitted
function awaitify(asyncFn, arity = asyncFn.length) {
if (!arity) throw new Error('arity is undefined');
function awaitable(...args) {
if (typeof args[arity - 1] === 'function') {
return asyncFn.apply(this, args);
}
return new Promise((resolve, reject) => {
args[arity - 1] = (err, ...cbArgs) => {
if (err) return reject(err);
resolve(cbArgs.length > 1 ? cbArgs : cbArgs[0]);
};
asyncFn.apply(this, args);
});
}
return awaitable;
}
module.exports = exports['default'];

10
api/node_modules/async/internal/breakLoop.js generated vendored Normal file
View File

@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
// A temporary value used to identify if the loop should be broken.
// See #1064, #1293
const breakLoop = {};
exports.default = breakLoop;
module.exports = exports["default"];

31
api/node_modules/async/internal/consoleFunc.js generated vendored Normal file
View File

@@ -0,0 +1,31 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = consoleFunc;
var _wrapAsync = require('./wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function consoleFunc(name) {
return (fn, ...args) => (0, _wrapAsync2.default)(fn)(...args, (err, ...resultArgs) => {
/* istanbul ignore else */
if (typeof console === 'object') {
/* istanbul ignore else */
if (err) {
/* istanbul ignore else */
if (console.error) {
console.error(err);
}
} else if (console[name]) {
/* istanbul ignore else */
resultArgs.forEach(x => console[name](x));
}
}
});
}
module.exports = exports['default'];

40
api/node_modules/async/internal/createTester.js generated vendored Normal file
View File

@@ -0,0 +1,40 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _createTester;
var _breakLoop = require('./breakLoop.js');
var _breakLoop2 = _interopRequireDefault(_breakLoop);
var _wrapAsync = require('./wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _createTester(check, getResult) {
return (eachfn, arr, _iteratee, cb) => {
var testPassed = false;
var testResult;
const iteratee = (0, _wrapAsync2.default)(_iteratee);
eachfn(arr, (value, _, callback) => {
iteratee(value, (err, result) => {
if (err || err === false) return callback(err);
if (check(result) && !testResult) {
testPassed = true;
testResult = getResult(true, value);
return callback(null, _breakLoop2.default);
}
callback();
});
}, err => {
if (err) return cb(err);
cb(null, testPassed ? testResult : getResult(false));
});
};
}
module.exports = exports['default'];

90
api/node_modules/async/internal/eachOfLimit.js generated vendored Normal file
View File

@@ -0,0 +1,90 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _once = require('./once.js');
var _once2 = _interopRequireDefault(_once);
var _iterator = require('./iterator.js');
var _iterator2 = _interopRequireDefault(_iterator);
var _onlyOnce = require('./onlyOnce.js');
var _onlyOnce2 = _interopRequireDefault(_onlyOnce);
var _wrapAsync = require('./wrapAsync.js');
var _asyncEachOfLimit = require('./asyncEachOfLimit.js');
var _asyncEachOfLimit2 = _interopRequireDefault(_asyncEachOfLimit);
var _breakLoop = require('./breakLoop.js');
var _breakLoop2 = _interopRequireDefault(_breakLoop);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = limit => {
return (obj, iteratee, callback) => {
callback = (0, _once2.default)(callback);
if (limit <= 0) {
throw new RangeError('concurrency limit cannot be less than 1');
}
if (!obj) {
return callback(null);
}
if ((0, _wrapAsync.isAsyncGenerator)(obj)) {
return (0, _asyncEachOfLimit2.default)(obj, limit, iteratee, callback);
}
if ((0, _wrapAsync.isAsyncIterable)(obj)) {
return (0, _asyncEachOfLimit2.default)(obj[Symbol.asyncIterator](), limit, iteratee, callback);
}
var nextElem = (0, _iterator2.default)(obj);
var done = false;
var canceled = false;
var running = 0;
var looping = false;
function iterateeCallback(err, value) {
if (canceled) return;
running -= 1;
if (err) {
done = true;
callback(err);
} else if (err === false) {
done = true;
canceled = true;
} else if (value === _breakLoop2.default || done && running <= 0) {
done = true;
return callback(null);
} else if (!looping) {
replenish();
}
}
function replenish() {
looping = true;
while (running < limit && !done) {
var elem = nextElem();
if (elem === null) {
done = true;
if (running <= 0) {
callback(null);
}
return;
}
running += 1;
iteratee(elem.value, elem.key, (0, _onlyOnce2.default)(iterateeCallback));
}
looping = false;
}
replenish();
};
};
module.exports = exports['default'];

55
api/node_modules/async/internal/filter.js generated vendored Normal file
View File

@@ -0,0 +1,55 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _filter;
var _isArrayLike = require('./isArrayLike.js');
var _isArrayLike2 = _interopRequireDefault(_isArrayLike);
var _wrapAsync = require('./wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function filterArray(eachfn, arr, iteratee, callback) {
var truthValues = new Array(arr.length);
eachfn(arr, (x, index, iterCb) => {
iteratee(x, (err, v) => {
truthValues[index] = !!v;
iterCb(err);
});
}, err => {
if (err) return callback(err);
var results = [];
for (var i = 0; i < arr.length; i++) {
if (truthValues[i]) results.push(arr[i]);
}
callback(null, results);
});
}
function filterGeneric(eachfn, coll, iteratee, callback) {
var results = [];
eachfn(coll, (x, index, iterCb) => {
iteratee(x, (err, v) => {
if (err) return iterCb(err);
if (v) {
results.push({ index, value: x });
}
iterCb(err);
});
}, err => {
if (err) return callback(err);
callback(null, results.sort((a, b) => a.index - b.index).map(v => v.value));
});
}
function _filter(eachfn, coll, iteratee, callback) {
var filter = (0, _isArrayLike2.default)(coll) ? filterArray : filterGeneric;
return filter(eachfn, coll, (0, _wrapAsync2.default)(iteratee), callback);
}
module.exports = exports['default'];

11
api/node_modules/async/internal/getIterator.js generated vendored Normal file
View File

@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function (coll) {
return coll[Symbol.iterator] && coll[Symbol.iterator]();
};
module.exports = exports["default"];

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