├── .gitignore
├── LICENSE
├── README.md
├── package-lock.json
├── package.json
├── src
├── bot.ts
├── declarations
│ └── @youtwitface
│ │ └── escape-html
│ │ └── index.d.ts
├── env.ts
├── handlers
│ ├── bot
│ │ ├── connect.ts
│ │ ├── index.ts
│ │ └── integrations.ts
│ └── server
│ │ ├── index.ts
│ │ └── webhook.ts
├── index.ts
├── models
│ ├── hook.ts
│ ├── state.ts
│ └── token.ts
└── server.ts
└── tsconfig.json
/.gitignore:
--------------------------------------------------------------------------------
1 | .env
2 | build/
3 | node_modules/
4 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU AFFERO GENERAL PUBLIC LICENSE
2 | Version 3, 19 November 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU Affero General Public License is a free, copyleft license for
11 | software and other kinds of works, specifically designed to ensure
12 | cooperation with the community in the case of network server software.
13 |
14 | The licenses for most software and other practical works are designed
15 | to take away your freedom to share and change the works. By contrast,
16 | our General Public Licenses are intended to guarantee your freedom to
17 | share and change all versions of a program--to make sure it remains free
18 | software for all its users.
19 |
20 | When we speak of free software, we are referring to freedom, not
21 | price. Our General Public Licenses are designed to make sure that you
22 | have the freedom to distribute copies of free software (and charge for
23 | them if you wish), that you receive source code or can get it if you
24 | want it, that you can change the software or use pieces of it in new
25 | free programs, and that you know you can do these things.
26 |
27 | Developers that use our General Public Licenses protect your rights
28 | with two steps: (1) assert copyright on the software, and (2) offer
29 | you this License which gives you legal permission to copy, distribute
30 | and/or modify the software.
31 |
32 | A secondary benefit of defending all users' freedom is that
33 | improvements made in alternate versions of the program, if they
34 | receive widespread use, become available for other developers to
35 | incorporate. Many developers of free software are heartened and
36 | encouraged by the resulting cooperation. However, in the case of
37 | software used on network servers, this result may fail to come about.
38 | The GNU General Public License permits making a modified version and
39 | letting the public access it on a server without ever releasing its
40 | source code to the public.
41 |
42 | The GNU Affero General Public License is designed specifically to
43 | ensure that, in such cases, the modified source code becomes available
44 | to the community. It requires the operator of a network server to
45 | provide the source code of the modified version running there to the
46 | users of that server. Therefore, public use of a modified version, on
47 | a publicly accessible server, gives the public access to the source
48 | code of the modified version.
49 |
50 | An older license, called the Affero General Public License and
51 | published by Affero, was designed to accomplish similar goals. This is
52 | a different license, not a version of the Affero GPL, but Affero has
53 | released a new version of the Affero GPL which permits relicensing under
54 | this license.
55 |
56 | The precise terms and conditions for copying, distribution and
57 | modification follow.
58 |
59 | TERMS AND CONDITIONS
60 |
61 | 0. Definitions.
62 |
63 | "This License" refers to version 3 of the GNU Affero General Public License.
64 |
65 | "Copyright" also means copyright-like laws that apply to other kinds of
66 | works, such as semiconductor masks.
67 |
68 | "The Program" refers to any copyrightable work licensed under this
69 | License. Each licensee is addressed as "you". "Licensees" and
70 | "recipients" may be individuals or organizations.
71 |
72 | To "modify" a work means to copy from or adapt all or part of the work
73 | in a fashion requiring copyright permission, other than the making of an
74 | exact copy. The resulting work is called a "modified version" of the
75 | earlier work or a work "based on" the earlier work.
76 |
77 | A "covered work" means either the unmodified Program or a work based
78 | on the Program.
79 |
80 | To "propagate" a work means to do anything with it that, without
81 | permission, would make you directly or secondarily liable for
82 | infringement under applicable copyright law, except executing it on a
83 | computer or modifying a private copy. Propagation includes copying,
84 | distribution (with or without modification), making available to the
85 | public, and in some countries other activities as well.
86 |
87 | To "convey" a work means any kind of propagation that enables other
88 | parties to make or receive copies. Mere interaction with a user through
89 | a computer network, with no transfer of a copy, is not conveying.
90 |
91 | An interactive user interface displays "Appropriate Legal Notices"
92 | to the extent that it includes a convenient and prominently visible
93 | feature that (1) displays an appropriate copyright notice, and (2)
94 | tells the user that there is no warranty for the work (except to the
95 | extent that warranties are provided), that licensees may convey the
96 | work under this License, and how to view a copy of this License. If
97 | the interface presents a list of user commands or options, such as a
98 | menu, a prominent item in the list meets this criterion.
99 |
100 | 1. Source Code.
101 |
102 | The "source code" for a work means the preferred form of the work
103 | for making modifications to it. "Object code" means any non-source
104 | form of a work.
105 |
106 | A "Standard Interface" means an interface that either is an official
107 | standard defined by a recognized standards body, or, in the case of
108 | interfaces specified for a particular programming language, one that
109 | is widely used among developers working in that language.
110 |
111 | The "System Libraries" of an executable work include anything, other
112 | than the work as a whole, that (a) is included in the normal form of
113 | packaging a Major Component, but which is not part of that Major
114 | Component, and (b) serves only to enable use of the work with that
115 | Major Component, or to implement a Standard Interface for which an
116 | implementation is available to the public in source code form. A
117 | "Major Component", in this context, means a major essential component
118 | (kernel, window system, and so on) of the specific operating system
119 | (if any) on which the executable work runs, or a compiler used to
120 | produce the work, or an object code interpreter used to run it.
121 |
122 | The "Corresponding Source" for a work in object code form means all
123 | the source code needed to generate, install, and (for an executable
124 | work) run the object code and to modify the work, including scripts to
125 | control those activities. However, it does not include the work's
126 | System Libraries, or general-purpose tools or generally available free
127 | programs which are used unmodified in performing those activities but
128 | which are not part of the work. For example, Corresponding Source
129 | includes interface definition files associated with source files for
130 | the work, and the source code for shared libraries and dynamically
131 | linked subprograms that the work is specifically designed to require,
132 | such as by intimate data communication or control flow between those
133 | subprograms and other parts of the work.
134 |
135 | The Corresponding Source need not include anything that users
136 | can regenerate automatically from other parts of the Corresponding
137 | Source.
138 |
139 | The Corresponding Source for a work in source code form is that
140 | same work.
141 |
142 | 2. Basic Permissions.
143 |
144 | All rights granted under this License are granted for the term of
145 | copyright on the Program, and are irrevocable provided the stated
146 | conditions are met. This License explicitly affirms your unlimited
147 | permission to run the unmodified Program. The output from running a
148 | covered work is covered by this License only if the output, given its
149 | content, constitutes a covered work. This License acknowledges your
150 | rights of fair use or other equivalent, as provided by copyright law.
151 |
152 | You may make, run and propagate covered works that you do not
153 | convey, without conditions so long as your license otherwise remains
154 | in force. You may convey covered works to others for the sole purpose
155 | of having them make modifications exclusively for you, or provide you
156 | with facilities for running those works, provided that you comply with
157 | the terms of this License in conveying all material for which you do
158 | not control copyright. Those thus making or running the covered works
159 | for you must do so exclusively on your behalf, under your direction
160 | and control, on terms that prohibit them from making any copies of
161 | your copyrighted material outside their relationship with you.
162 |
163 | Conveying under any other circumstances is permitted solely under
164 | the conditions stated below. Sublicensing is not allowed; section 10
165 | makes it unnecessary.
166 |
167 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
168 |
169 | No covered work shall be deemed part of an effective technological
170 | measure under any applicable law fulfilling obligations under article
171 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
172 | similar laws prohibiting or restricting circumvention of such
173 | measures.
174 |
175 | When you convey a covered work, you waive any legal power to forbid
176 | circumvention of technological measures to the extent such circumvention
177 | is effected by exercising rights under this License with respect to
178 | the covered work, and you disclaim any intention to limit operation or
179 | modification of the work as a means of enforcing, against the work's
180 | users, your or third parties' legal rights to forbid circumvention of
181 | technological measures.
182 |
183 | 4. Conveying Verbatim Copies.
184 |
185 | You may convey verbatim copies of the Program's source code as you
186 | receive it, in any medium, provided that you conspicuously and
187 | appropriately publish on each copy an appropriate copyright notice;
188 | keep intact all notices stating that this License and any
189 | non-permissive terms added in accord with section 7 apply to the code;
190 | keep intact all notices of the absence of any warranty; and give all
191 | recipients a copy of this License along with the Program.
192 |
193 | You may charge any price or no price for each copy that you convey,
194 | and you may offer support or warranty protection for a fee.
195 |
196 | 5. Conveying Modified Source Versions.
197 |
198 | You may convey a work based on the Program, or the modifications to
199 | produce it from the Program, in the form of source code under the
200 | terms of section 4, provided that you also meet all of these conditions:
201 |
202 | a) The work must carry prominent notices stating that you modified
203 | it, and giving a relevant date.
204 |
205 | b) The work must carry prominent notices stating that it is
206 | released under this License and any conditions added under section
207 | 7. This requirement modifies the requirement in section 4 to
208 | "keep intact all notices".
209 |
210 | c) You must license the entire work, as a whole, under this
211 | License to anyone who comes into possession of a copy. This
212 | License will therefore apply, along with any applicable section 7
213 | additional terms, to the whole of the work, and all its parts,
214 | regardless of how they are packaged. This License gives no
215 | permission to license the work in any other way, but it does not
216 | invalidate such permission if you have separately received it.
217 |
218 | d) If the work has interactive user interfaces, each must display
219 | Appropriate Legal Notices; however, if the Program has interactive
220 | interfaces that do not display Appropriate Legal Notices, your
221 | work need not make them do so.
222 |
223 | A compilation of a covered work with other separate and independent
224 | works, which are not by their nature extensions of the covered work,
225 | and which are not combined with it such as to form a larger program,
226 | in or on a volume of a storage or distribution medium, is called an
227 | "aggregate" if the compilation and its resulting copyright are not
228 | used to limit the access or legal rights of the compilation's users
229 | beyond what the individual works permit. Inclusion of a covered work
230 | in an aggregate does not cause this License to apply to the other
231 | parts of the aggregate.
232 |
233 | 6. Conveying Non-Source Forms.
234 |
235 | You may convey a covered work in object code form under the terms
236 | of sections 4 and 5, provided that you also convey the
237 | machine-readable Corresponding Source under the terms of this License,
238 | in one of these ways:
239 |
240 | a) Convey the object code in, or embodied in, a physical product
241 | (including a physical distribution medium), accompanied by the
242 | Corresponding Source fixed on a durable physical medium
243 | customarily used for software interchange.
244 |
245 | b) Convey the object code in, or embodied in, a physical product
246 | (including a physical distribution medium), accompanied by a
247 | written offer, valid for at least three years and valid for as
248 | long as you offer spare parts or customer support for that product
249 | model, to give anyone who possesses the object code either (1) a
250 | copy of the Corresponding Source for all the software in the
251 | product that is covered by this License, on a durable physical
252 | medium customarily used for software interchange, for a price no
253 | more than your reasonable cost of physically performing this
254 | conveying of source, or (2) access to copy the
255 | Corresponding Source from a network server at no charge.
256 |
257 | c) Convey individual copies of the object code with a copy of the
258 | written offer to provide the Corresponding Source. This
259 | alternative is allowed only occasionally and noncommercially, and
260 | only if you received the object code with such an offer, in accord
261 | with subsection 6b.
262 |
263 | d) Convey the object code by offering access from a designated
264 | place (gratis or for a charge), and offer equivalent access to the
265 | Corresponding Source in the same way through the same place at no
266 | further charge. You need not require recipients to copy the
267 | Corresponding Source along with the object code. If the place to
268 | copy the object code is a network server, the Corresponding Source
269 | may be on a different server (operated by you or a third party)
270 | that supports equivalent copying facilities, provided you maintain
271 | clear directions next to the object code saying where to find the
272 | Corresponding Source. Regardless of what server hosts the
273 | Corresponding Source, you remain obligated to ensure that it is
274 | available for as long as needed to satisfy these requirements.
275 |
276 | e) Convey the object code using peer-to-peer transmission, provided
277 | you inform other peers where the object code and Corresponding
278 | Source of the work are being offered to the general public at no
279 | charge under subsection 6d.
280 |
281 | A separable portion of the object code, whose source code is excluded
282 | from the Corresponding Source as a System Library, need not be
283 | included in conveying the object code work.
284 |
285 | A "User Product" is either (1) a "consumer product", which means any
286 | tangible personal property which is normally used for personal, family,
287 | or household purposes, or (2) anything designed or sold for incorporation
288 | into a dwelling. In determining whether a product is a consumer product,
289 | doubtful cases shall be resolved in favor of coverage. For a particular
290 | product received by a particular user, "normally used" refers to a
291 | typical or common use of that class of product, regardless of the status
292 | of the particular user or of the way in which the particular user
293 | actually uses, or expects or is expected to use, the product. A product
294 | is a consumer product regardless of whether the product has substantial
295 | commercial, industrial or non-consumer uses, unless such uses represent
296 | the only significant mode of use of the product.
297 |
298 | "Installation Information" for a User Product means any methods,
299 | procedures, authorization keys, or other information required to install
300 | and execute modified versions of a covered work in that User Product from
301 | a modified version of its Corresponding Source. The information must
302 | suffice to ensure that the continued functioning of the modified object
303 | code is in no case prevented or interfered with solely because
304 | modification has been made.
305 |
306 | If you convey an object code work under this section in, or with, or
307 | specifically for use in, a User Product, and the conveying occurs as
308 | part of a transaction in which the right of possession and use of the
309 | User Product is transferred to the recipient in perpetuity or for a
310 | fixed term (regardless of how the transaction is characterized), the
311 | Corresponding Source conveyed under this section must be accompanied
312 | by the Installation Information. But this requirement does not apply
313 | if neither you nor any third party retains the ability to install
314 | modified object code on the User Product (for example, the work has
315 | been installed in ROM).
316 |
317 | The requirement to provide Installation Information does not include a
318 | requirement to continue to provide support service, warranty, or updates
319 | for a work that has been modified or installed by the recipient, or for
320 | the User Product in which it has been modified or installed. Access to a
321 | network may be denied when the modification itself materially and
322 | adversely affects the operation of the network or violates the rules and
323 | protocols for communication across the network.
324 |
325 | Corresponding Source conveyed, and Installation Information provided,
326 | in accord with this section must be in a format that is publicly
327 | documented (and with an implementation available to the public in
328 | source code form), and must require no special password or key for
329 | unpacking, reading or copying.
330 |
331 | 7. Additional Terms.
332 |
333 | "Additional permissions" are terms that supplement the terms of this
334 | License by making exceptions from one or more of its conditions.
335 | Additional permissions that are applicable to the entire Program shall
336 | be treated as though they were included in this License, to the extent
337 | that they are valid under applicable law. If additional permissions
338 | apply only to part of the Program, that part may be used separately
339 | under those permissions, but the entire Program remains governed by
340 | this License without regard to the additional permissions.
341 |
342 | When you convey a copy of a covered work, you may at your option
343 | remove any additional permissions from that copy, or from any part of
344 | it. (Additional permissions may be written to require their own
345 | removal in certain cases when you modify the work.) You may place
346 | additional permissions on material, added by you to a covered work,
347 | for which you have or can give appropriate copyright permission.
348 |
349 | Notwithstanding any other provision of this License, for material you
350 | add to a covered work, you may (if authorized by the copyright holders of
351 | that material) supplement the terms of this License with terms:
352 |
353 | a) Disclaiming warranty or limiting liability differently from the
354 | terms of sections 15 and 16 of this License; or
355 |
356 | b) Requiring preservation of specified reasonable legal notices or
357 | author attributions in that material or in the Appropriate Legal
358 | Notices displayed by works containing it; or
359 |
360 | c) Prohibiting misrepresentation of the origin of that material, or
361 | requiring that modified versions of such material be marked in
362 | reasonable ways as different from the original version; or
363 |
364 | d) Limiting the use for publicity purposes of names of licensors or
365 | authors of the material; or
366 |
367 | e) Declining to grant rights under trademark law for use of some
368 | trade names, trademarks, or service marks; or
369 |
370 | f) Requiring indemnification of licensors and authors of that
371 | material by anyone who conveys the material (or modified versions of
372 | it) with contractual assumptions of liability to the recipient, for
373 | any liability that these contractual assumptions directly impose on
374 | those licensors and authors.
375 |
376 | All other non-permissive additional terms are considered "further
377 | restrictions" within the meaning of section 10. If the Program as you
378 | received it, or any part of it, contains a notice stating that it is
379 | governed by this License along with a term that is a further
380 | restriction, you may remove that term. If a license document contains
381 | a further restriction but permits relicensing or conveying under this
382 | License, you may add to a covered work material governed by the terms
383 | of that license document, provided that the further restriction does
384 | not survive such relicensing or conveying.
385 |
386 | If you add terms to a covered work in accord with this section, you
387 | must place, in the relevant source files, a statement of the
388 | additional terms that apply to those files, or a notice indicating
389 | where to find the applicable terms.
390 |
391 | Additional terms, permissive or non-permissive, may be stated in the
392 | form of a separately written license, or stated as exceptions;
393 | the above requirements apply either way.
394 |
395 | 8. Termination.
396 |
397 | You may not propagate or modify a covered work except as expressly
398 | provided under this License. Any attempt otherwise to propagate or
399 | modify it is void, and will automatically terminate your rights under
400 | this License (including any patent licenses granted under the third
401 | paragraph of section 11).
402 |
403 | However, if you cease all violation of this License, then your
404 | license from a particular copyright holder is reinstated (a)
405 | provisionally, unless and until the copyright holder explicitly and
406 | finally terminates your license, and (b) permanently, if the copyright
407 | holder fails to notify you of the violation by some reasonable means
408 | prior to 60 days after the cessation.
409 |
410 | Moreover, your license from a particular copyright holder is
411 | reinstated permanently if the copyright holder notifies you of the
412 | violation by some reasonable means, this is the first time you have
413 | received notice of violation of this License (for any work) from that
414 | copyright holder, and you cure the violation prior to 30 days after
415 | your receipt of the notice.
416 |
417 | Termination of your rights under this section does not terminate the
418 | licenses of parties who have received copies or rights from you under
419 | this License. If your rights have been terminated and not permanently
420 | reinstated, you do not qualify to receive new licenses for the same
421 | material under section 10.
422 |
423 | 9. Acceptance Not Required for Having Copies.
424 |
425 | You are not required to accept this License in order to receive or
426 | run a copy of the Program. Ancillary propagation of a covered work
427 | occurring solely as a consequence of using peer-to-peer transmission
428 | to receive a copy likewise does not require acceptance. However,
429 | nothing other than this License grants you permission to propagate or
430 | modify any covered work. These actions infringe copyright if you do
431 | not accept this License. Therefore, by modifying or propagating a
432 | covered work, you indicate your acceptance of this License to do so.
433 |
434 | 10. Automatic Licensing of Downstream Recipients.
435 |
436 | Each time you convey a covered work, the recipient automatically
437 | receives a license from the original licensors, to run, modify and
438 | propagate that work, subject to this License. You are not responsible
439 | for enforcing compliance by third parties with this License.
440 |
441 | An "entity transaction" is a transaction transferring control of an
442 | organization, or substantially all assets of one, or subdividing an
443 | organization, or merging organizations. If propagation of a covered
444 | work results from an entity transaction, each party to that
445 | transaction who receives a copy of the work also receives whatever
446 | licenses to the work the party's predecessor in interest had or could
447 | give under the previous paragraph, plus a right to possession of the
448 | Corresponding Source of the work from the predecessor in interest, if
449 | the predecessor has it or can get it with reasonable efforts.
450 |
451 | You may not impose any further restrictions on the exercise of the
452 | rights granted or affirmed under this License. For example, you may
453 | not impose a license fee, royalty, or other charge for exercise of
454 | rights granted under this License, and you may not initiate litigation
455 | (including a cross-claim or counterclaim in a lawsuit) alleging that
456 | any patent claim is infringed by making, using, selling, offering for
457 | sale, or importing the Program or any portion of it.
458 |
459 | 11. Patents.
460 |
461 | A "contributor" is a copyright holder who authorizes use under this
462 | License of the Program or a work on which the Program is based. The
463 | work thus licensed is called the contributor's "contributor version".
464 |
465 | A contributor's "essential patent claims" are all patent claims
466 | owned or controlled by the contributor, whether already acquired or
467 | hereafter acquired, that would be infringed by some manner, permitted
468 | by this License, of making, using, or selling its contributor version,
469 | but do not include claims that would be infringed only as a
470 | consequence of further modification of the contributor version. For
471 | purposes of this definition, "control" includes the right to grant
472 | patent sublicenses in a manner consistent with the requirements of
473 | this License.
474 |
475 | Each contributor grants you a non-exclusive, worldwide, royalty-free
476 | patent license under the contributor's essential patent claims, to
477 | make, use, sell, offer for sale, import and otherwise run, modify and
478 | propagate the contents of its contributor version.
479 |
480 | In the following three paragraphs, a "patent license" is any express
481 | agreement or commitment, however denominated, not to enforce a patent
482 | (such as an express permission to practice a patent or covenant not to
483 | sue for patent infringement). To "grant" such a patent license to a
484 | party means to make such an agreement or commitment not to enforce a
485 | patent against the party.
486 |
487 | If you convey a covered work, knowingly relying on a patent license,
488 | and the Corresponding Source of the work is not available for anyone
489 | to copy, free of charge and under the terms of this License, through a
490 | publicly available network server or other readily accessible means,
491 | then you must either (1) cause the Corresponding Source to be so
492 | available, or (2) arrange to deprive yourself of the benefit of the
493 | patent license for this particular work, or (3) arrange, in a manner
494 | consistent with the requirements of this License, to extend the patent
495 | license to downstream recipients. "Knowingly relying" means you have
496 | actual knowledge that, but for the patent license, your conveying the
497 | covered work in a country, or your recipient's use of the covered work
498 | in a country, would infringe one or more identifiable patents in that
499 | country that you have reason to believe are valid.
500 |
501 | If, pursuant to or in connection with a single transaction or
502 | arrangement, you convey, or propagate by procuring conveyance of, a
503 | covered work, and grant a patent license to some of the parties
504 | receiving the covered work authorizing them to use, propagate, modify
505 | or convey a specific copy of the covered work, then the patent license
506 | you grant is automatically extended to all recipients of the covered
507 | work and works based on it.
508 |
509 | A patent license is "discriminatory" if it does not include within
510 | the scope of its coverage, prohibits the exercise of, or is
511 | conditioned on the non-exercise of one or more of the rights that are
512 | specifically granted under this License. You may not convey a covered
513 | work if you are a party to an arrangement with a third party that is
514 | in the business of distributing software, under which you make payment
515 | to the third party based on the extent of your activity of conveying
516 | the work, and under which the third party grants, to any of the
517 | parties who would receive the covered work from you, a discriminatory
518 | patent license (a) in connection with copies of the covered work
519 | conveyed by you (or copies made from those copies), or (b) primarily
520 | for and in connection with specific products or compilations that
521 | contain the covered work, unless you entered into that arrangement,
522 | or that patent license was granted, prior to 28 March 2007.
523 |
524 | Nothing in this License shall be construed as excluding or limiting
525 | any implied license or other defenses to infringement that may
526 | otherwise be available to you under applicable patent law.
527 |
528 | 12. No Surrender of Others' Freedom.
529 |
530 | If conditions are imposed on you (whether by court order, agreement or
531 | otherwise) that contradict the conditions of this License, they do not
532 | excuse you from the conditions of this License. If you cannot convey a
533 | covered work so as to satisfy simultaneously your obligations under this
534 | License and any other pertinent obligations, then as a consequence you may
535 | not convey it at all. For example, if you agree to terms that obligate you
536 | to collect a royalty for further conveying from those to whom you convey
537 | the Program, the only way you could satisfy both those terms and this
538 | License would be to refrain entirely from conveying the Program.
539 |
540 | 13. Remote Network Interaction; Use with the GNU General Public License.
541 |
542 | Notwithstanding any other provision of this License, if you modify the
543 | Program, your modified version must prominently offer all users
544 | interacting with it remotely through a computer network (if your version
545 | supports such interaction) an opportunity to receive the Corresponding
546 | Source of your version by providing access to the Corresponding Source
547 | from a network server at no charge, through some standard or customary
548 | means of facilitating copying of software. This Corresponding Source
549 | shall include the Corresponding Source for any work covered by version 3
550 | of the GNU General Public License that is incorporated pursuant to the
551 | following paragraph.
552 |
553 | Notwithstanding any other provision of this License, you have
554 | permission to link or combine any covered work with a work licensed
555 | under version 3 of the GNU General Public License into a single
556 | combined work, and to convey the resulting work. The terms of this
557 | License will continue to apply to the part which is the covered work,
558 | but the work with which it is combined will remain governed by version
559 | 3 of the GNU General Public License.
560 |
561 | 14. Revised Versions of this License.
562 |
563 | The Free Software Foundation may publish revised and/or new versions of
564 | the GNU Affero General Public License from time to time. Such new versions
565 | will be similar in spirit to the present version, but may differ in detail to
566 | address new problems or concerns.
567 |
568 | Each version is given a distinguishing version number. If the
569 | Program specifies that a certain numbered version of the GNU Affero General
570 | Public License "or any later version" applies to it, you have the
571 | option of following the terms and conditions either of that numbered
572 | version or of any later version published by the Free Software
573 | Foundation. If the Program does not specify a version number of the
574 | GNU Affero General Public License, you may choose any version ever published
575 | by the Free Software Foundation.
576 |
577 | If the Program specifies that a proxy can decide which future
578 | versions of the GNU Affero General Public License can be used, that proxy's
579 | public statement of acceptance of a version permanently authorizes you
580 | to choose that version for the Program.
581 |
582 | Later license versions may give you additional or different
583 | permissions. However, no additional obligations are imposed on any
584 | author or copyright holder as a result of your choosing to follow a
585 | later version.
586 |
587 | 15. Disclaimer of Warranty.
588 |
589 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
590 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
591 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
592 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
593 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
594 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
595 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
596 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
597 |
598 | 16. Limitation of Liability.
599 |
600 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
601 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
602 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
603 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
604 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
605 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
606 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
607 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
608 | SUCH DAMAGES.
609 |
610 | 17. Interpretation of Sections 15 and 16.
611 |
612 | If the disclaimer of warranty and limitation of liability provided
613 | above cannot be given local legal effect according to their terms,
614 | reviewing courts shall apply local law that most closely approximates
615 | an absolute waiver of all civil liability in connection with the
616 | Program, unless a warranty or assumption of liability accompanies a
617 | copy of the Program in return for a fee.
618 |
619 | END OF TERMS AND CONDITIONS
620 |
621 | How to Apply These Terms to Your New Programs
622 |
623 | If you develop a new program, and you want it to be of the greatest
624 | possible use to the public, the best way to achieve this is to make it
625 | free software which everyone can redistribute and change under these terms.
626 |
627 | To do so, attach the following notices to the program. It is safest
628 | to attach them to the start of each source file to most effectively
629 | state the exclusion of warranty; and each file should have at least
630 | the "copyright" line and a pointer to where the full notice is found.
631 |
632 |
633 | Copyright (C)
634 |
635 | This program is free software: you can redistribute it and/or modify
636 | it under the terms of the GNU Affero General Public License as published
637 | by the Free Software Foundation, either version 3 of the License, or
638 | (at your option) any later version.
639 |
640 | This program is distributed in the hope that it will be useful,
641 | but WITHOUT ANY WARRANTY; without even the implied warranty of
642 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
643 | GNU Affero General Public License for more details.
644 |
645 | You should have received a copy of the GNU Affero General Public License
646 | along with this program. If not, see .
647 |
648 | Also add information on how to contact you by electronic and paper mail.
649 |
650 | If your software can interact with users remotely through a computer
651 | network, you should also make sure that it provides a way for users to
652 | get its source. For example, if your program is a web application, its
653 | interface could display a "Source" link that leads users to an archive
654 | of the code. There are many ways you could offer source, and different
655 | solutions will be better for different programs; see section 13 for the
656 | specific requirements.
657 |
658 | You should also get your employer (if you work as a programmer) or school,
659 | if any, to sign a "copyright disclaimer" for the program, if necessary.
660 | For more information on this, and how to apply and follow the GNU AGPL, see
661 | .
662 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # GibHugBot
2 |
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "gibhugbot",
3 | "version": "1.0.0",
4 | "lockfileVersion": 2,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "gibhugbot",
9 | "version": "1.0.0",
10 | "license": "AGPL-3.0",
11 | "dependencies": {
12 | "@grammyjs/runner": "^1.0.2",
13 | "@grammyjs/transformer-throttler": "^1.0.1",
14 | "@youtwitface/escape-html": "^1.1.3",
15 | "dotenv": "^10.0.0",
16 | "envalid": "^7.2.1",
17 | "express": "^4.17.1",
18 | "grammy": "^1.3.4",
19 | "mongoose": "^6.0.11",
20 | "nanoid": "^3.1.30",
21 | "node-fetch": "^2.6.5"
22 | },
23 | "devDependencies": {
24 | "@types/express": "^4.17.13",
25 | "@types/node": "^16.11.1",
26 | "@types/node-fetch": "^2.5.12",
27 | "ts-node": "^10.3.0",
28 | "typescript": "^4.4.4"
29 | }
30 | },
31 | "node_modules/@cspotcode/source-map-consumer": {
32 | "version": "0.8.0",
33 | "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz",
34 | "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==",
35 | "dev": true,
36 | "engines": {
37 | "node": ">= 12"
38 | }
39 | },
40 | "node_modules/@cspotcode/source-map-support": {
41 | "version": "0.7.0",
42 | "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz",
43 | "integrity": "sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==",
44 | "dev": true,
45 | "dependencies": {
46 | "@cspotcode/source-map-consumer": "0.8.0"
47 | },
48 | "engines": {
49 | "node": ">=12"
50 | }
51 | },
52 | "node_modules/@grammyjs/runner": {
53 | "version": "1.0.2",
54 | "resolved": "https://registry.npmjs.org/@grammyjs/runner/-/runner-1.0.2.tgz",
55 | "integrity": "sha512-3aNnLshAsm9PynIjICYzFZKviS+XLsxkPrY8/LEnhm1fKHm9pp0k2sALH21v/ATZPQ6EyPLDDJ29Wv/wbhjE5A==",
56 | "dependencies": {
57 | "abort-controller": "^3.0.0"
58 | },
59 | "engines": {
60 | "node": ">=12.20.0 || >=14.13.1"
61 | }
62 | },
63 | "node_modules/@grammyjs/transformer-throttler": {
64 | "version": "1.0.1",
65 | "resolved": "https://registry.npmjs.org/@grammyjs/transformer-throttler/-/transformer-throttler-1.0.1.tgz",
66 | "integrity": "sha512-zDAwRRzlzPx6ZwrzbAwmi1dnduKOd3TNV71HxV9AqM7MDqG4tzzkKSBENlOCAN5aNBTrIL3eYIanfUZXFvJ5nA==",
67 | "dependencies": {
68 | "bottleneck": "^2.0.0"
69 | },
70 | "engines": {
71 | "node": "^12.20.0 || >=14.13.1"
72 | },
73 | "peerDependencies": {
74 | "grammy": "^1.0.0"
75 | }
76 | },
77 | "node_modules/@grammyjs/types": {
78 | "version": "2.2.6",
79 | "resolved": "https://registry.npmjs.org/@grammyjs/types/-/types-2.2.6.tgz",
80 | "integrity": "sha512-O16e0WxwOLWUGvvtH+FgwSxKvg414dcMAjQAYrotVAVF2P5qOU+NHqbbY/sgVdDKs/uqimhjt/z8IGVeGZYocw=="
81 | },
82 | "node_modules/@tsconfig/node10": {
83 | "version": "1.0.8",
84 | "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz",
85 | "integrity": "sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==",
86 | "dev": true
87 | },
88 | "node_modules/@tsconfig/node12": {
89 | "version": "1.0.9",
90 | "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.9.tgz",
91 | "integrity": "sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==",
92 | "dev": true
93 | },
94 | "node_modules/@tsconfig/node14": {
95 | "version": "1.0.1",
96 | "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.1.tgz",
97 | "integrity": "sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==",
98 | "dev": true
99 | },
100 | "node_modules/@tsconfig/node16": {
101 | "version": "1.0.2",
102 | "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz",
103 | "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==",
104 | "dev": true
105 | },
106 | "node_modules/@types/body-parser": {
107 | "version": "1.19.1",
108 | "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.1.tgz",
109 | "integrity": "sha512-a6bTJ21vFOGIkwM0kzh9Yr89ziVxq4vYH2fQ6N8AeipEzai/cFK6aGMArIkUeIdRIgpwQa+2bXiLuUJCpSf2Cg==",
110 | "dev": true,
111 | "dependencies": {
112 | "@types/connect": "*",
113 | "@types/node": "*"
114 | }
115 | },
116 | "node_modules/@types/connect": {
117 | "version": "3.4.35",
118 | "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz",
119 | "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==",
120 | "dev": true,
121 | "dependencies": {
122 | "@types/node": "*"
123 | }
124 | },
125 | "node_modules/@types/express": {
126 | "version": "4.17.13",
127 | "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.13.tgz",
128 | "integrity": "sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA==",
129 | "dev": true,
130 | "dependencies": {
131 | "@types/body-parser": "*",
132 | "@types/express-serve-static-core": "^4.17.18",
133 | "@types/qs": "*",
134 | "@types/serve-static": "*"
135 | }
136 | },
137 | "node_modules/@types/express-serve-static-core": {
138 | "version": "4.17.24",
139 | "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.24.tgz",
140 | "integrity": "sha512-3UJuW+Qxhzwjq3xhwXm2onQcFHn76frIYVbTu+kn24LFxI+dEhdfISDFovPB8VpEgW8oQCTpRuCe+0zJxB7NEA==",
141 | "dev": true,
142 | "dependencies": {
143 | "@types/node": "*",
144 | "@types/qs": "*",
145 | "@types/range-parser": "*"
146 | }
147 | },
148 | "node_modules/@types/mime": {
149 | "version": "1.3.2",
150 | "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz",
151 | "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==",
152 | "dev": true
153 | },
154 | "node_modules/@types/node": {
155 | "version": "16.11.1",
156 | "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.1.tgz",
157 | "integrity": "sha512-PYGcJHL9mwl1Ek3PLiYgyEKtwTMmkMw4vbiyz/ps3pfdRYLVv+SN7qHVAImrjdAXxgluDEw6Ph4lyv+m9UpRmA=="
158 | },
159 | "node_modules/@types/node-fetch": {
160 | "version": "2.5.12",
161 | "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.12.tgz",
162 | "integrity": "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==",
163 | "dev": true,
164 | "dependencies": {
165 | "@types/node": "*",
166 | "form-data": "^3.0.0"
167 | }
168 | },
169 | "node_modules/@types/qs": {
170 | "version": "6.9.7",
171 | "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz",
172 | "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==",
173 | "dev": true
174 | },
175 | "node_modules/@types/range-parser": {
176 | "version": "1.2.4",
177 | "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz",
178 | "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==",
179 | "dev": true
180 | },
181 | "node_modules/@types/serve-static": {
182 | "version": "1.13.10",
183 | "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.10.tgz",
184 | "integrity": "sha512-nCkHGI4w7ZgAdNkrEu0bv+4xNV/XDqW+DydknebMOQwkpDGx8G+HTlj7R7ABI8i8nKxVw0wtKPi1D+lPOkh4YQ==",
185 | "dev": true,
186 | "dependencies": {
187 | "@types/mime": "^1",
188 | "@types/node": "*"
189 | }
190 | },
191 | "node_modules/@types/webidl-conversions": {
192 | "version": "6.1.1",
193 | "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz",
194 | "integrity": "sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q=="
195 | },
196 | "node_modules/@types/whatwg-url": {
197 | "version": "8.2.1",
198 | "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.1.tgz",
199 | "integrity": "sha512-2YubE1sjj5ifxievI5Ge1sckb9k/Er66HyR2c+3+I6VDUUg1TLPdYYTEbQ+DjRkS4nTxMJhgWfSfMRD2sl2EYQ==",
200 | "dependencies": {
201 | "@types/node": "*",
202 | "@types/webidl-conversions": "*"
203 | }
204 | },
205 | "node_modules/@youtwitface/escape-html": {
206 | "version": "1.1.3",
207 | "resolved": "https://registry.npmjs.org/@youtwitface/escape-html/-/escape-html-1.1.3.tgz",
208 | "integrity": "sha512-ZTE6NDvovm1S9jtzITZJvTiq4At09bDQjH4M/MNiZJq78LehIltGodCBZA5RROIE3bkQGJa9EwN37d5qgSFCfg=="
209 | },
210 | "node_modules/abort-controller": {
211 | "version": "3.0.0",
212 | "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
213 | "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
214 | "dependencies": {
215 | "event-target-shim": "^5.0.0"
216 | },
217 | "engines": {
218 | "node": ">=6.5"
219 | }
220 | },
221 | "node_modules/accepts": {
222 | "version": "1.3.7",
223 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
224 | "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
225 | "dependencies": {
226 | "mime-types": "~2.1.24",
227 | "negotiator": "0.6.2"
228 | },
229 | "engines": {
230 | "node": ">= 0.6"
231 | }
232 | },
233 | "node_modules/acorn": {
234 | "version": "8.4.1",
235 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.4.1.tgz",
236 | "integrity": "sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA==",
237 | "dev": true,
238 | "bin": {
239 | "acorn": "bin/acorn"
240 | },
241 | "engines": {
242 | "node": ">=0.4.0"
243 | }
244 | },
245 | "node_modules/acorn-walk": {
246 | "version": "8.1.1",
247 | "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.1.1.tgz",
248 | "integrity": "sha512-FbJdceMlPHEAWJOILDk1fXD8lnTlEIWFkqtfk+MvmL5q/qlHfN7GEHcsFZWt/Tea9jRNPWUZG4G976nqAAmU9w==",
249 | "dev": true,
250 | "engines": {
251 | "node": ">=0.4.0"
252 | }
253 | },
254 | "node_modules/arg": {
255 | "version": "4.1.3",
256 | "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
257 | "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
258 | "dev": true
259 | },
260 | "node_modules/array-flatten": {
261 | "version": "1.1.1",
262 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
263 | "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
264 | },
265 | "node_modules/asynckit": {
266 | "version": "0.4.0",
267 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
268 | "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
269 | "dev": true
270 | },
271 | "node_modules/base64-js": {
272 | "version": "1.5.1",
273 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
274 | "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
275 | "funding": [
276 | {
277 | "type": "github",
278 | "url": "https://github.com/sponsors/feross"
279 | },
280 | {
281 | "type": "patreon",
282 | "url": "https://www.patreon.com/feross"
283 | },
284 | {
285 | "type": "consulting",
286 | "url": "https://feross.org/support"
287 | }
288 | ]
289 | },
290 | "node_modules/body-parser": {
291 | "version": "1.19.0",
292 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz",
293 | "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==",
294 | "dependencies": {
295 | "bytes": "3.1.0",
296 | "content-type": "~1.0.4",
297 | "debug": "2.6.9",
298 | "depd": "~1.1.2",
299 | "http-errors": "1.7.2",
300 | "iconv-lite": "0.4.24",
301 | "on-finished": "~2.3.0",
302 | "qs": "6.7.0",
303 | "raw-body": "2.4.0",
304 | "type-is": "~1.6.17"
305 | },
306 | "engines": {
307 | "node": ">= 0.8"
308 | }
309 | },
310 | "node_modules/body-parser/node_modules/debug": {
311 | "version": "2.6.9",
312 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
313 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
314 | "dependencies": {
315 | "ms": "2.0.0"
316 | }
317 | },
318 | "node_modules/body-parser/node_modules/ms": {
319 | "version": "2.0.0",
320 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
321 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
322 | },
323 | "node_modules/bottleneck": {
324 | "version": "2.19.5",
325 | "resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz",
326 | "integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw=="
327 | },
328 | "node_modules/bson": {
329 | "version": "4.5.3",
330 | "resolved": "https://registry.npmjs.org/bson/-/bson-4.5.3.tgz",
331 | "integrity": "sha512-qVX7LX79Mtj7B3NPLzCfBiCP6RAsjiV8N63DjlaVVpZW+PFoDTxQ4SeDbSpcqgE6mXksM5CAwZnXxxxn/XwC0g==",
332 | "dependencies": {
333 | "buffer": "^5.6.0"
334 | },
335 | "engines": {
336 | "node": ">=6.9.0"
337 | }
338 | },
339 | "node_modules/buffer": {
340 | "version": "5.7.1",
341 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
342 | "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
343 | "funding": [
344 | {
345 | "type": "github",
346 | "url": "https://github.com/sponsors/feross"
347 | },
348 | {
349 | "type": "patreon",
350 | "url": "https://www.patreon.com/feross"
351 | },
352 | {
353 | "type": "consulting",
354 | "url": "https://feross.org/support"
355 | }
356 | ],
357 | "dependencies": {
358 | "base64-js": "^1.3.1",
359 | "ieee754": "^1.1.13"
360 | }
361 | },
362 | "node_modules/bytes": {
363 | "version": "3.1.0",
364 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz",
365 | "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==",
366 | "engines": {
367 | "node": ">= 0.8"
368 | }
369 | },
370 | "node_modules/combined-stream": {
371 | "version": "1.0.8",
372 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
373 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
374 | "dev": true,
375 | "dependencies": {
376 | "delayed-stream": "~1.0.0"
377 | },
378 | "engines": {
379 | "node": ">= 0.8"
380 | }
381 | },
382 | "node_modules/content-disposition": {
383 | "version": "0.5.3",
384 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz",
385 | "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==",
386 | "dependencies": {
387 | "safe-buffer": "5.1.2"
388 | },
389 | "engines": {
390 | "node": ">= 0.6"
391 | }
392 | },
393 | "node_modules/content-type": {
394 | "version": "1.0.4",
395 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
396 | "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==",
397 | "engines": {
398 | "node": ">= 0.6"
399 | }
400 | },
401 | "node_modules/cookie": {
402 | "version": "0.4.0",
403 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz",
404 | "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==",
405 | "engines": {
406 | "node": ">= 0.6"
407 | }
408 | },
409 | "node_modules/cookie-signature": {
410 | "version": "1.0.6",
411 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
412 | "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
413 | },
414 | "node_modules/create-require": {
415 | "version": "1.1.1",
416 | "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
417 | "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
418 | "dev": true
419 | },
420 | "node_modules/debug": {
421 | "version": "4.3.2",
422 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
423 | "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
424 | "dependencies": {
425 | "ms": "2.1.2"
426 | },
427 | "engines": {
428 | "node": ">=6.0"
429 | },
430 | "peerDependenciesMeta": {
431 | "supports-color": {
432 | "optional": true
433 | }
434 | }
435 | },
436 | "node_modules/delayed-stream": {
437 | "version": "1.0.0",
438 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
439 | "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
440 | "dev": true,
441 | "engines": {
442 | "node": ">=0.4.0"
443 | }
444 | },
445 | "node_modules/denque": {
446 | "version": "2.0.1",
447 | "resolved": "https://registry.npmjs.org/denque/-/denque-2.0.1.tgz",
448 | "integrity": "sha512-tfiWc6BQLXNLpNiR5iGd0Ocu3P3VpxfzFiqubLgMfhfOw9WyvgJBd46CClNn9k3qfbjvT//0cf7AlYRX/OslMQ==",
449 | "engines": {
450 | "node": ">=0.10"
451 | }
452 | },
453 | "node_modules/depd": {
454 | "version": "1.1.2",
455 | "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
456 | "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=",
457 | "engines": {
458 | "node": ">= 0.6"
459 | }
460 | },
461 | "node_modules/destroy": {
462 | "version": "1.0.4",
463 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
464 | "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
465 | },
466 | "node_modules/diff": {
467 | "version": "4.0.2",
468 | "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
469 | "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
470 | "dev": true,
471 | "engines": {
472 | "node": ">=0.3.1"
473 | }
474 | },
475 | "node_modules/dotenv": {
476 | "version": "10.0.0",
477 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz",
478 | "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==",
479 | "engines": {
480 | "node": ">=10"
481 | }
482 | },
483 | "node_modules/ee-first": {
484 | "version": "1.1.1",
485 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
486 | "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
487 | },
488 | "node_modules/encodeurl": {
489 | "version": "1.0.2",
490 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
491 | "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=",
492 | "engines": {
493 | "node": ">= 0.8"
494 | }
495 | },
496 | "node_modules/envalid": {
497 | "version": "7.2.1",
498 | "resolved": "https://registry.npmjs.org/envalid/-/envalid-7.2.1.tgz",
499 | "integrity": "sha512-NU0ty82LSvHF+Uio9cLNKhrDyivFv7GSvhOu91WbtOOyNKRzXWeDZaopldXJkGBAZ5UuquqXp6VBUXuTfXrUrw==",
500 | "dependencies": {
501 | "tslib": "2.3.1"
502 | },
503 | "engines": {
504 | "node": ">=8.12"
505 | }
506 | },
507 | "node_modules/escape-html": {
508 | "version": "1.0.3",
509 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
510 | "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
511 | },
512 | "node_modules/etag": {
513 | "version": "1.8.1",
514 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
515 | "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=",
516 | "engines": {
517 | "node": ">= 0.6"
518 | }
519 | },
520 | "node_modules/event-target-shim": {
521 | "version": "5.0.1",
522 | "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
523 | "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
524 | "engines": {
525 | "node": ">=6"
526 | }
527 | },
528 | "node_modules/express": {
529 | "version": "4.17.1",
530 | "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz",
531 | "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==",
532 | "dependencies": {
533 | "accepts": "~1.3.7",
534 | "array-flatten": "1.1.1",
535 | "body-parser": "1.19.0",
536 | "content-disposition": "0.5.3",
537 | "content-type": "~1.0.4",
538 | "cookie": "0.4.0",
539 | "cookie-signature": "1.0.6",
540 | "debug": "2.6.9",
541 | "depd": "~1.1.2",
542 | "encodeurl": "~1.0.2",
543 | "escape-html": "~1.0.3",
544 | "etag": "~1.8.1",
545 | "finalhandler": "~1.1.2",
546 | "fresh": "0.5.2",
547 | "merge-descriptors": "1.0.1",
548 | "methods": "~1.1.2",
549 | "on-finished": "~2.3.0",
550 | "parseurl": "~1.3.3",
551 | "path-to-regexp": "0.1.7",
552 | "proxy-addr": "~2.0.5",
553 | "qs": "6.7.0",
554 | "range-parser": "~1.2.1",
555 | "safe-buffer": "5.1.2",
556 | "send": "0.17.1",
557 | "serve-static": "1.14.1",
558 | "setprototypeof": "1.1.1",
559 | "statuses": "~1.5.0",
560 | "type-is": "~1.6.18",
561 | "utils-merge": "1.0.1",
562 | "vary": "~1.1.2"
563 | },
564 | "engines": {
565 | "node": ">= 0.10.0"
566 | }
567 | },
568 | "node_modules/express/node_modules/debug": {
569 | "version": "2.6.9",
570 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
571 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
572 | "dependencies": {
573 | "ms": "2.0.0"
574 | }
575 | },
576 | "node_modules/express/node_modules/ms": {
577 | "version": "2.0.0",
578 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
579 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
580 | },
581 | "node_modules/finalhandler": {
582 | "version": "1.1.2",
583 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
584 | "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==",
585 | "dependencies": {
586 | "debug": "2.6.9",
587 | "encodeurl": "~1.0.2",
588 | "escape-html": "~1.0.3",
589 | "on-finished": "~2.3.0",
590 | "parseurl": "~1.3.3",
591 | "statuses": "~1.5.0",
592 | "unpipe": "~1.0.0"
593 | },
594 | "engines": {
595 | "node": ">= 0.8"
596 | }
597 | },
598 | "node_modules/finalhandler/node_modules/debug": {
599 | "version": "2.6.9",
600 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
601 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
602 | "dependencies": {
603 | "ms": "2.0.0"
604 | }
605 | },
606 | "node_modules/finalhandler/node_modules/ms": {
607 | "version": "2.0.0",
608 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
609 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
610 | },
611 | "node_modules/form-data": {
612 | "version": "3.0.1",
613 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz",
614 | "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
615 | "dev": true,
616 | "dependencies": {
617 | "asynckit": "^0.4.0",
618 | "combined-stream": "^1.0.8",
619 | "mime-types": "^2.1.12"
620 | },
621 | "engines": {
622 | "node": ">= 6"
623 | }
624 | },
625 | "node_modules/forwarded": {
626 | "version": "0.2.0",
627 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
628 | "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
629 | "engines": {
630 | "node": ">= 0.6"
631 | }
632 | },
633 | "node_modules/fresh": {
634 | "version": "0.5.2",
635 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
636 | "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=",
637 | "engines": {
638 | "node": ">= 0.6"
639 | }
640 | },
641 | "node_modules/grammy": {
642 | "version": "1.3.4",
643 | "resolved": "https://registry.npmjs.org/grammy/-/grammy-1.3.4.tgz",
644 | "integrity": "sha512-1GbTvmxf0f0BGaS0HSRnG1RGImkdUzcHnQ1D5MVcW9X5nF9hGQlOVlHr+08XfAW8zAKHlRNhT9C6uffmuvYqTg==",
645 | "dependencies": {
646 | "@grammyjs/types": "^2.2.6",
647 | "abort-controller": "^3.0.0",
648 | "debug": "^4.3.2",
649 | "node-fetch": "^2.6.5"
650 | },
651 | "engines": {
652 | "node": "^12.20.0 || >=14.13.1"
653 | }
654 | },
655 | "node_modules/http-errors": {
656 | "version": "1.7.2",
657 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz",
658 | "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==",
659 | "dependencies": {
660 | "depd": "~1.1.2",
661 | "inherits": "2.0.3",
662 | "setprototypeof": "1.1.1",
663 | "statuses": ">= 1.5.0 < 2",
664 | "toidentifier": "1.0.0"
665 | },
666 | "engines": {
667 | "node": ">= 0.6"
668 | }
669 | },
670 | "node_modules/iconv-lite": {
671 | "version": "0.4.24",
672 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
673 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
674 | "dependencies": {
675 | "safer-buffer": ">= 2.1.2 < 3"
676 | },
677 | "engines": {
678 | "node": ">=0.10.0"
679 | }
680 | },
681 | "node_modules/ieee754": {
682 | "version": "1.2.1",
683 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
684 | "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
685 | "funding": [
686 | {
687 | "type": "github",
688 | "url": "https://github.com/sponsors/feross"
689 | },
690 | {
691 | "type": "patreon",
692 | "url": "https://www.patreon.com/feross"
693 | },
694 | {
695 | "type": "consulting",
696 | "url": "https://feross.org/support"
697 | }
698 | ]
699 | },
700 | "node_modules/inherits": {
701 | "version": "2.0.3",
702 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
703 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
704 | },
705 | "node_modules/ipaddr.js": {
706 | "version": "1.9.1",
707 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
708 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
709 | "engines": {
710 | "node": ">= 0.10"
711 | }
712 | },
713 | "node_modules/kareem": {
714 | "version": "2.3.2",
715 | "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.2.tgz",
716 | "integrity": "sha512-STHz9P7X2L4Kwn72fA4rGyqyXdmrMSdxqHx9IXon/FXluXieaFA6KJ2upcHAHxQPQ0LeM/OjLrhFxifHewOALQ=="
717 | },
718 | "node_modules/make-error": {
719 | "version": "1.3.6",
720 | "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
721 | "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
722 | "dev": true
723 | },
724 | "node_modules/media-typer": {
725 | "version": "0.3.0",
726 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
727 | "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=",
728 | "engines": {
729 | "node": ">= 0.6"
730 | }
731 | },
732 | "node_modules/memory-pager": {
733 | "version": "1.5.0",
734 | "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz",
735 | "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==",
736 | "optional": true
737 | },
738 | "node_modules/merge-descriptors": {
739 | "version": "1.0.1",
740 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
741 | "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
742 | },
743 | "node_modules/methods": {
744 | "version": "1.1.2",
745 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
746 | "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=",
747 | "engines": {
748 | "node": ">= 0.6"
749 | }
750 | },
751 | "node_modules/mime": {
752 | "version": "1.6.0",
753 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
754 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
755 | "bin": {
756 | "mime": "cli.js"
757 | },
758 | "engines": {
759 | "node": ">=4"
760 | }
761 | },
762 | "node_modules/mime-db": {
763 | "version": "1.49.0",
764 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz",
765 | "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA==",
766 | "engines": {
767 | "node": ">= 0.6"
768 | }
769 | },
770 | "node_modules/mime-types": {
771 | "version": "2.1.32",
772 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz",
773 | "integrity": "sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A==",
774 | "dependencies": {
775 | "mime-db": "1.49.0"
776 | },
777 | "engines": {
778 | "node": ">= 0.6"
779 | }
780 | },
781 | "node_modules/mongodb": {
782 | "version": "4.1.2",
783 | "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.1.2.tgz",
784 | "integrity": "sha512-pHCKDoOy1h6mVurziJmXmTMPatYWOx8pbnyFgSgshja9Y36Q+caHUzTDY6rrIy9HCSrjnbXmx3pCtvNZHmR8xg==",
785 | "dependencies": {
786 | "bson": "^4.5.2",
787 | "denque": "^2.0.1",
788 | "mongodb-connection-string-url": "^2.0.0"
789 | },
790 | "engines": {
791 | "node": ">=12.9.0"
792 | },
793 | "optionalDependencies": {
794 | "saslprep": "^1.0.3"
795 | }
796 | },
797 | "node_modules/mongodb-connection-string-url": {
798 | "version": "2.1.0",
799 | "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.1.0.tgz",
800 | "integrity": "sha512-Qf9Zw7KGiRljWvMrrUFDdVqo46KIEiDuCzvEN97rh/PcKzk2bd6n9KuzEwBwW9xo5glwx69y1mI6s+jFUD/aIQ==",
801 | "dependencies": {
802 | "@types/whatwg-url": "^8.2.1",
803 | "whatwg-url": "^9.1.0"
804 | }
805 | },
806 | "node_modules/mongoose": {
807 | "version": "6.0.11",
808 | "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.0.11.tgz",
809 | "integrity": "sha512-ESLnGIZB15xpqAbtjL/wcx+NEmzewlNuST/Dp/md4eqirVGTuEeN+IhS4qr3D5GFhnQAGdadpGlTfrWj5Ggykw==",
810 | "dependencies": {
811 | "bson": "^4.2.2",
812 | "kareem": "2.3.2",
813 | "mongodb": "4.1.2",
814 | "mpath": "0.8.4",
815 | "mquery": "4.0.0",
816 | "ms": "2.1.2",
817 | "regexp-clone": "1.0.0",
818 | "sift": "13.5.2",
819 | "sliced": "1.0.1"
820 | },
821 | "engines": {
822 | "node": ">=12.0.0"
823 | },
824 | "funding": {
825 | "type": "opencollective",
826 | "url": "https://opencollective.com/mongoose"
827 | }
828 | },
829 | "node_modules/mpath": {
830 | "version": "0.8.4",
831 | "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.8.4.tgz",
832 | "integrity": "sha512-DTxNZomBcTWlrMW76jy1wvV37X/cNNxPW1y2Jzd4DZkAaC5ZGsm8bfGfNOthcDuRJujXLqiuS6o3Tpy0JEoh7g==",
833 | "engines": {
834 | "node": ">=4.0.0"
835 | }
836 | },
837 | "node_modules/mquery": {
838 | "version": "4.0.0",
839 | "resolved": "https://registry.npmjs.org/mquery/-/mquery-4.0.0.tgz",
840 | "integrity": "sha512-nGjm89lHja+T/b8cybAby6H0YgA4qYC/lx6UlwvHGqvTq8bDaNeCwl1sY8uRELrNbVWJzIihxVd+vphGGn1vBw==",
841 | "dependencies": {
842 | "debug": "4.x",
843 | "regexp-clone": "^1.0.0",
844 | "sliced": "1.0.1"
845 | },
846 | "engines": {
847 | "node": ">=12.0.0"
848 | }
849 | },
850 | "node_modules/ms": {
851 | "version": "2.1.2",
852 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
853 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
854 | },
855 | "node_modules/nanoid": {
856 | "version": "3.1.30",
857 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.30.tgz",
858 | "integrity": "sha512-zJpuPDwOv8D2zq2WRoMe1HsfZthVewpel9CAvTfc/2mBD1uUT/agc5f7GHGWXlYkFvi1mVxe4IjvP2HNrop7nQ==",
859 | "bin": {
860 | "nanoid": "bin/nanoid.cjs"
861 | },
862 | "engines": {
863 | "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
864 | }
865 | },
866 | "node_modules/negotiator": {
867 | "version": "0.6.2",
868 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
869 | "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==",
870 | "engines": {
871 | "node": ">= 0.6"
872 | }
873 | },
874 | "node_modules/node-fetch": {
875 | "version": "2.6.5",
876 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.5.tgz",
877 | "integrity": "sha512-mmlIVHJEu5rnIxgEgez6b9GgWXbkZj5YZ7fx+2r94a2E+Uirsp6HsPTPlomfdHtpt/B0cdKviwkoaM6pyvUOpQ==",
878 | "dependencies": {
879 | "whatwg-url": "^5.0.0"
880 | },
881 | "engines": {
882 | "node": "4.x || >=6.0.0"
883 | }
884 | },
885 | "node_modules/node-fetch/node_modules/tr46": {
886 | "version": "0.0.3",
887 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
888 | "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
889 | },
890 | "node_modules/node-fetch/node_modules/webidl-conversions": {
891 | "version": "3.0.1",
892 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
893 | "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
894 | },
895 | "node_modules/node-fetch/node_modules/whatwg-url": {
896 | "version": "5.0.0",
897 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
898 | "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
899 | "dependencies": {
900 | "tr46": "~0.0.3",
901 | "webidl-conversions": "^3.0.0"
902 | }
903 | },
904 | "node_modules/on-finished": {
905 | "version": "2.3.0",
906 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
907 | "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
908 | "dependencies": {
909 | "ee-first": "1.1.1"
910 | },
911 | "engines": {
912 | "node": ">= 0.8"
913 | }
914 | },
915 | "node_modules/parseurl": {
916 | "version": "1.3.3",
917 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
918 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
919 | "engines": {
920 | "node": ">= 0.8"
921 | }
922 | },
923 | "node_modules/path-to-regexp": {
924 | "version": "0.1.7",
925 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
926 | "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
927 | },
928 | "node_modules/proxy-addr": {
929 | "version": "2.0.7",
930 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
931 | "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
932 | "dependencies": {
933 | "forwarded": "0.2.0",
934 | "ipaddr.js": "1.9.1"
935 | },
936 | "engines": {
937 | "node": ">= 0.10"
938 | }
939 | },
940 | "node_modules/punycode": {
941 | "version": "2.1.1",
942 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
943 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
944 | "engines": {
945 | "node": ">=6"
946 | }
947 | },
948 | "node_modules/qs": {
949 | "version": "6.7.0",
950 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
951 | "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==",
952 | "engines": {
953 | "node": ">=0.6"
954 | }
955 | },
956 | "node_modules/range-parser": {
957 | "version": "1.2.1",
958 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
959 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
960 | "engines": {
961 | "node": ">= 0.6"
962 | }
963 | },
964 | "node_modules/raw-body": {
965 | "version": "2.4.0",
966 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz",
967 | "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==",
968 | "dependencies": {
969 | "bytes": "3.1.0",
970 | "http-errors": "1.7.2",
971 | "iconv-lite": "0.4.24",
972 | "unpipe": "1.0.0"
973 | },
974 | "engines": {
975 | "node": ">= 0.8"
976 | }
977 | },
978 | "node_modules/regexp-clone": {
979 | "version": "1.0.0",
980 | "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz",
981 | "integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw=="
982 | },
983 | "node_modules/safe-buffer": {
984 | "version": "5.1.2",
985 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
986 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
987 | },
988 | "node_modules/safer-buffer": {
989 | "version": "2.1.2",
990 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
991 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
992 | },
993 | "node_modules/saslprep": {
994 | "version": "1.0.3",
995 | "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz",
996 | "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==",
997 | "optional": true,
998 | "dependencies": {
999 | "sparse-bitfield": "^3.0.3"
1000 | },
1001 | "engines": {
1002 | "node": ">=6"
1003 | }
1004 | },
1005 | "node_modules/send": {
1006 | "version": "0.17.1",
1007 | "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz",
1008 | "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==",
1009 | "dependencies": {
1010 | "debug": "2.6.9",
1011 | "depd": "~1.1.2",
1012 | "destroy": "~1.0.4",
1013 | "encodeurl": "~1.0.2",
1014 | "escape-html": "~1.0.3",
1015 | "etag": "~1.8.1",
1016 | "fresh": "0.5.2",
1017 | "http-errors": "~1.7.2",
1018 | "mime": "1.6.0",
1019 | "ms": "2.1.1",
1020 | "on-finished": "~2.3.0",
1021 | "range-parser": "~1.2.1",
1022 | "statuses": "~1.5.0"
1023 | },
1024 | "engines": {
1025 | "node": ">= 0.8.0"
1026 | }
1027 | },
1028 | "node_modules/send/node_modules/debug": {
1029 | "version": "2.6.9",
1030 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
1031 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
1032 | "dependencies": {
1033 | "ms": "2.0.0"
1034 | }
1035 | },
1036 | "node_modules/send/node_modules/debug/node_modules/ms": {
1037 | "version": "2.0.0",
1038 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
1039 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
1040 | },
1041 | "node_modules/send/node_modules/ms": {
1042 | "version": "2.1.1",
1043 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
1044 | "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
1045 | },
1046 | "node_modules/serve-static": {
1047 | "version": "1.14.1",
1048 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz",
1049 | "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==",
1050 | "dependencies": {
1051 | "encodeurl": "~1.0.2",
1052 | "escape-html": "~1.0.3",
1053 | "parseurl": "~1.3.3",
1054 | "send": "0.17.1"
1055 | },
1056 | "engines": {
1057 | "node": ">= 0.8.0"
1058 | }
1059 | },
1060 | "node_modules/setprototypeof": {
1061 | "version": "1.1.1",
1062 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz",
1063 | "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw=="
1064 | },
1065 | "node_modules/sift": {
1066 | "version": "13.5.2",
1067 | "resolved": "https://registry.npmjs.org/sift/-/sift-13.5.2.tgz",
1068 | "integrity": "sha512-+gxdEOMA2J+AI+fVsCqeNn7Tgx3M9ZN9jdi95939l1IJ8cZsqS8sqpJyOkic2SJk+1+98Uwryt/gL6XDaV+UZA=="
1069 | },
1070 | "node_modules/sliced": {
1071 | "version": "1.0.1",
1072 | "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz",
1073 | "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E="
1074 | },
1075 | "node_modules/sparse-bitfield": {
1076 | "version": "3.0.3",
1077 | "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
1078 | "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=",
1079 | "optional": true,
1080 | "dependencies": {
1081 | "memory-pager": "^1.0.2"
1082 | }
1083 | },
1084 | "node_modules/statuses": {
1085 | "version": "1.5.0",
1086 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
1087 | "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=",
1088 | "engines": {
1089 | "node": ">= 0.6"
1090 | }
1091 | },
1092 | "node_modules/toidentifier": {
1093 | "version": "1.0.0",
1094 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
1095 | "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==",
1096 | "engines": {
1097 | "node": ">=0.6"
1098 | }
1099 | },
1100 | "node_modules/tr46": {
1101 | "version": "2.1.0",
1102 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz",
1103 | "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==",
1104 | "dependencies": {
1105 | "punycode": "^2.1.1"
1106 | },
1107 | "engines": {
1108 | "node": ">=8"
1109 | }
1110 | },
1111 | "node_modules/ts-node": {
1112 | "version": "10.3.0",
1113 | "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.3.0.tgz",
1114 | "integrity": "sha512-RYIy3i8IgpFH45AX4fQHExrT8BxDeKTdC83QFJkNzkvt8uFB6QJ8XMyhynYiKMLxt9a7yuXaDBZNOYS3XjDcYw==",
1115 | "dev": true,
1116 | "dependencies": {
1117 | "@cspotcode/source-map-support": "0.7.0",
1118 | "@tsconfig/node10": "^1.0.7",
1119 | "@tsconfig/node12": "^1.0.7",
1120 | "@tsconfig/node14": "^1.0.0",
1121 | "@tsconfig/node16": "^1.0.2",
1122 | "acorn": "^8.4.1",
1123 | "acorn-walk": "^8.1.1",
1124 | "arg": "^4.1.0",
1125 | "create-require": "^1.1.0",
1126 | "diff": "^4.0.1",
1127 | "make-error": "^1.1.1",
1128 | "yn": "3.1.1"
1129 | },
1130 | "bin": {
1131 | "ts-node": "dist/bin.js",
1132 | "ts-node-cwd": "dist/bin-cwd.js",
1133 | "ts-node-script": "dist/bin-script.js",
1134 | "ts-node-transpile-only": "dist/bin-transpile.js",
1135 | "ts-script": "dist/bin-script-deprecated.js"
1136 | },
1137 | "peerDependencies": {
1138 | "@swc/core": ">=1.2.50",
1139 | "@swc/wasm": ">=1.2.50",
1140 | "@types/node": "*",
1141 | "typescript": ">=2.7"
1142 | },
1143 | "peerDependenciesMeta": {
1144 | "@swc/core": {
1145 | "optional": true
1146 | },
1147 | "@swc/wasm": {
1148 | "optional": true
1149 | }
1150 | }
1151 | },
1152 | "node_modules/tslib": {
1153 | "version": "2.3.1",
1154 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
1155 | "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
1156 | },
1157 | "node_modules/type-is": {
1158 | "version": "1.6.18",
1159 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
1160 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
1161 | "dependencies": {
1162 | "media-typer": "0.3.0",
1163 | "mime-types": "~2.1.24"
1164 | },
1165 | "engines": {
1166 | "node": ">= 0.6"
1167 | }
1168 | },
1169 | "node_modules/typescript": {
1170 | "version": "4.4.4",
1171 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz",
1172 | "integrity": "sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==",
1173 | "dev": true,
1174 | "bin": {
1175 | "tsc": "bin/tsc",
1176 | "tsserver": "bin/tsserver"
1177 | },
1178 | "engines": {
1179 | "node": ">=4.2.0"
1180 | }
1181 | },
1182 | "node_modules/unpipe": {
1183 | "version": "1.0.0",
1184 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
1185 | "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=",
1186 | "engines": {
1187 | "node": ">= 0.8"
1188 | }
1189 | },
1190 | "node_modules/utils-merge": {
1191 | "version": "1.0.1",
1192 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
1193 | "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=",
1194 | "engines": {
1195 | "node": ">= 0.4.0"
1196 | }
1197 | },
1198 | "node_modules/vary": {
1199 | "version": "1.1.2",
1200 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
1201 | "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=",
1202 | "engines": {
1203 | "node": ">= 0.8"
1204 | }
1205 | },
1206 | "node_modules/webidl-conversions": {
1207 | "version": "6.1.0",
1208 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz",
1209 | "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==",
1210 | "engines": {
1211 | "node": ">=10.4"
1212 | }
1213 | },
1214 | "node_modules/whatwg-url": {
1215 | "version": "9.1.0",
1216 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-9.1.0.tgz",
1217 | "integrity": "sha512-CQ0UcrPHyomtlOCot1TL77WyMIm/bCwrJ2D6AOKGwEczU9EpyoqAokfqrf/MioU9kHcMsmJZcg1egXix2KYEsA==",
1218 | "dependencies": {
1219 | "tr46": "^2.1.0",
1220 | "webidl-conversions": "^6.1.0"
1221 | },
1222 | "engines": {
1223 | "node": ">=12"
1224 | }
1225 | },
1226 | "node_modules/yn": {
1227 | "version": "3.1.1",
1228 | "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
1229 | "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
1230 | "dev": true,
1231 | "engines": {
1232 | "node": ">=6"
1233 | }
1234 | }
1235 | },
1236 | "dependencies": {
1237 | "@cspotcode/source-map-consumer": {
1238 | "version": "0.8.0",
1239 | "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz",
1240 | "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==",
1241 | "dev": true
1242 | },
1243 | "@cspotcode/source-map-support": {
1244 | "version": "0.7.0",
1245 | "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz",
1246 | "integrity": "sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==",
1247 | "dev": true,
1248 | "requires": {
1249 | "@cspotcode/source-map-consumer": "0.8.0"
1250 | }
1251 | },
1252 | "@grammyjs/runner": {
1253 | "version": "1.0.2",
1254 | "resolved": "https://registry.npmjs.org/@grammyjs/runner/-/runner-1.0.2.tgz",
1255 | "integrity": "sha512-3aNnLshAsm9PynIjICYzFZKviS+XLsxkPrY8/LEnhm1fKHm9pp0k2sALH21v/ATZPQ6EyPLDDJ29Wv/wbhjE5A==",
1256 | "requires": {
1257 | "abort-controller": "^3.0.0"
1258 | }
1259 | },
1260 | "@grammyjs/transformer-throttler": {
1261 | "version": "1.0.1",
1262 | "resolved": "https://registry.npmjs.org/@grammyjs/transformer-throttler/-/transformer-throttler-1.0.1.tgz",
1263 | "integrity": "sha512-zDAwRRzlzPx6ZwrzbAwmi1dnduKOd3TNV71HxV9AqM7MDqG4tzzkKSBENlOCAN5aNBTrIL3eYIanfUZXFvJ5nA==",
1264 | "requires": {
1265 | "bottleneck": "^2.0.0"
1266 | }
1267 | },
1268 | "@grammyjs/types": {
1269 | "version": "2.2.6",
1270 | "resolved": "https://registry.npmjs.org/@grammyjs/types/-/types-2.2.6.tgz",
1271 | "integrity": "sha512-O16e0WxwOLWUGvvtH+FgwSxKvg414dcMAjQAYrotVAVF2P5qOU+NHqbbY/sgVdDKs/uqimhjt/z8IGVeGZYocw=="
1272 | },
1273 | "@tsconfig/node10": {
1274 | "version": "1.0.8",
1275 | "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz",
1276 | "integrity": "sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==",
1277 | "dev": true
1278 | },
1279 | "@tsconfig/node12": {
1280 | "version": "1.0.9",
1281 | "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.9.tgz",
1282 | "integrity": "sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==",
1283 | "dev": true
1284 | },
1285 | "@tsconfig/node14": {
1286 | "version": "1.0.1",
1287 | "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.1.tgz",
1288 | "integrity": "sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==",
1289 | "dev": true
1290 | },
1291 | "@tsconfig/node16": {
1292 | "version": "1.0.2",
1293 | "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz",
1294 | "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==",
1295 | "dev": true
1296 | },
1297 | "@types/body-parser": {
1298 | "version": "1.19.1",
1299 | "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.1.tgz",
1300 | "integrity": "sha512-a6bTJ21vFOGIkwM0kzh9Yr89ziVxq4vYH2fQ6N8AeipEzai/cFK6aGMArIkUeIdRIgpwQa+2bXiLuUJCpSf2Cg==",
1301 | "dev": true,
1302 | "requires": {
1303 | "@types/connect": "*",
1304 | "@types/node": "*"
1305 | }
1306 | },
1307 | "@types/connect": {
1308 | "version": "3.4.35",
1309 | "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz",
1310 | "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==",
1311 | "dev": true,
1312 | "requires": {
1313 | "@types/node": "*"
1314 | }
1315 | },
1316 | "@types/express": {
1317 | "version": "4.17.13",
1318 | "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.13.tgz",
1319 | "integrity": "sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA==",
1320 | "dev": true,
1321 | "requires": {
1322 | "@types/body-parser": "*",
1323 | "@types/express-serve-static-core": "^4.17.18",
1324 | "@types/qs": "*",
1325 | "@types/serve-static": "*"
1326 | }
1327 | },
1328 | "@types/express-serve-static-core": {
1329 | "version": "4.17.24",
1330 | "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.24.tgz",
1331 | "integrity": "sha512-3UJuW+Qxhzwjq3xhwXm2onQcFHn76frIYVbTu+kn24LFxI+dEhdfISDFovPB8VpEgW8oQCTpRuCe+0zJxB7NEA==",
1332 | "dev": true,
1333 | "requires": {
1334 | "@types/node": "*",
1335 | "@types/qs": "*",
1336 | "@types/range-parser": "*"
1337 | }
1338 | },
1339 | "@types/mime": {
1340 | "version": "1.3.2",
1341 | "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz",
1342 | "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==",
1343 | "dev": true
1344 | },
1345 | "@types/node": {
1346 | "version": "16.11.1",
1347 | "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.1.tgz",
1348 | "integrity": "sha512-PYGcJHL9mwl1Ek3PLiYgyEKtwTMmkMw4vbiyz/ps3pfdRYLVv+SN7qHVAImrjdAXxgluDEw6Ph4lyv+m9UpRmA=="
1349 | },
1350 | "@types/node-fetch": {
1351 | "version": "2.5.12",
1352 | "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.12.tgz",
1353 | "integrity": "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==",
1354 | "dev": true,
1355 | "requires": {
1356 | "@types/node": "*",
1357 | "form-data": "^3.0.0"
1358 | }
1359 | },
1360 | "@types/qs": {
1361 | "version": "6.9.7",
1362 | "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz",
1363 | "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==",
1364 | "dev": true
1365 | },
1366 | "@types/range-parser": {
1367 | "version": "1.2.4",
1368 | "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz",
1369 | "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==",
1370 | "dev": true
1371 | },
1372 | "@types/serve-static": {
1373 | "version": "1.13.10",
1374 | "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.10.tgz",
1375 | "integrity": "sha512-nCkHGI4w7ZgAdNkrEu0bv+4xNV/XDqW+DydknebMOQwkpDGx8G+HTlj7R7ABI8i8nKxVw0wtKPi1D+lPOkh4YQ==",
1376 | "dev": true,
1377 | "requires": {
1378 | "@types/mime": "^1",
1379 | "@types/node": "*"
1380 | }
1381 | },
1382 | "@types/webidl-conversions": {
1383 | "version": "6.1.1",
1384 | "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz",
1385 | "integrity": "sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q=="
1386 | },
1387 | "@types/whatwg-url": {
1388 | "version": "8.2.1",
1389 | "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.1.tgz",
1390 | "integrity": "sha512-2YubE1sjj5ifxievI5Ge1sckb9k/Er66HyR2c+3+I6VDUUg1TLPdYYTEbQ+DjRkS4nTxMJhgWfSfMRD2sl2EYQ==",
1391 | "requires": {
1392 | "@types/node": "*",
1393 | "@types/webidl-conversions": "*"
1394 | }
1395 | },
1396 | "@youtwitface/escape-html": {
1397 | "version": "1.1.3",
1398 | "resolved": "https://registry.npmjs.org/@youtwitface/escape-html/-/escape-html-1.1.3.tgz",
1399 | "integrity": "sha512-ZTE6NDvovm1S9jtzITZJvTiq4At09bDQjH4M/MNiZJq78LehIltGodCBZA5RROIE3bkQGJa9EwN37d5qgSFCfg=="
1400 | },
1401 | "abort-controller": {
1402 | "version": "3.0.0",
1403 | "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
1404 | "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
1405 | "requires": {
1406 | "event-target-shim": "^5.0.0"
1407 | }
1408 | },
1409 | "accepts": {
1410 | "version": "1.3.7",
1411 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
1412 | "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
1413 | "requires": {
1414 | "mime-types": "~2.1.24",
1415 | "negotiator": "0.6.2"
1416 | }
1417 | },
1418 | "acorn": {
1419 | "version": "8.4.1",
1420 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.4.1.tgz",
1421 | "integrity": "sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA==",
1422 | "dev": true
1423 | },
1424 | "acorn-walk": {
1425 | "version": "8.1.1",
1426 | "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.1.1.tgz",
1427 | "integrity": "sha512-FbJdceMlPHEAWJOILDk1fXD8lnTlEIWFkqtfk+MvmL5q/qlHfN7GEHcsFZWt/Tea9jRNPWUZG4G976nqAAmU9w==",
1428 | "dev": true
1429 | },
1430 | "arg": {
1431 | "version": "4.1.3",
1432 | "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
1433 | "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
1434 | "dev": true
1435 | },
1436 | "array-flatten": {
1437 | "version": "1.1.1",
1438 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
1439 | "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
1440 | },
1441 | "asynckit": {
1442 | "version": "0.4.0",
1443 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
1444 | "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
1445 | "dev": true
1446 | },
1447 | "base64-js": {
1448 | "version": "1.5.1",
1449 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
1450 | "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
1451 | },
1452 | "body-parser": {
1453 | "version": "1.19.0",
1454 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz",
1455 | "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==",
1456 | "requires": {
1457 | "bytes": "3.1.0",
1458 | "content-type": "~1.0.4",
1459 | "debug": "2.6.9",
1460 | "depd": "~1.1.2",
1461 | "http-errors": "1.7.2",
1462 | "iconv-lite": "0.4.24",
1463 | "on-finished": "~2.3.0",
1464 | "qs": "6.7.0",
1465 | "raw-body": "2.4.0",
1466 | "type-is": "~1.6.17"
1467 | },
1468 | "dependencies": {
1469 | "debug": {
1470 | "version": "2.6.9",
1471 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
1472 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
1473 | "requires": {
1474 | "ms": "2.0.0"
1475 | }
1476 | },
1477 | "ms": {
1478 | "version": "2.0.0",
1479 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
1480 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
1481 | }
1482 | }
1483 | },
1484 | "bottleneck": {
1485 | "version": "2.19.5",
1486 | "resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz",
1487 | "integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw=="
1488 | },
1489 | "bson": {
1490 | "version": "4.5.3",
1491 | "resolved": "https://registry.npmjs.org/bson/-/bson-4.5.3.tgz",
1492 | "integrity": "sha512-qVX7LX79Mtj7B3NPLzCfBiCP6RAsjiV8N63DjlaVVpZW+PFoDTxQ4SeDbSpcqgE6mXksM5CAwZnXxxxn/XwC0g==",
1493 | "requires": {
1494 | "buffer": "^5.6.0"
1495 | }
1496 | },
1497 | "buffer": {
1498 | "version": "5.7.1",
1499 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
1500 | "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
1501 | "requires": {
1502 | "base64-js": "^1.3.1",
1503 | "ieee754": "^1.1.13"
1504 | }
1505 | },
1506 | "bytes": {
1507 | "version": "3.1.0",
1508 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz",
1509 | "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg=="
1510 | },
1511 | "combined-stream": {
1512 | "version": "1.0.8",
1513 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
1514 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
1515 | "dev": true,
1516 | "requires": {
1517 | "delayed-stream": "~1.0.0"
1518 | }
1519 | },
1520 | "content-disposition": {
1521 | "version": "0.5.3",
1522 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz",
1523 | "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==",
1524 | "requires": {
1525 | "safe-buffer": "5.1.2"
1526 | }
1527 | },
1528 | "content-type": {
1529 | "version": "1.0.4",
1530 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
1531 | "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
1532 | },
1533 | "cookie": {
1534 | "version": "0.4.0",
1535 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz",
1536 | "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg=="
1537 | },
1538 | "cookie-signature": {
1539 | "version": "1.0.6",
1540 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
1541 | "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
1542 | },
1543 | "create-require": {
1544 | "version": "1.1.1",
1545 | "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
1546 | "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
1547 | "dev": true
1548 | },
1549 | "debug": {
1550 | "version": "4.3.2",
1551 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
1552 | "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
1553 | "requires": {
1554 | "ms": "2.1.2"
1555 | }
1556 | },
1557 | "delayed-stream": {
1558 | "version": "1.0.0",
1559 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
1560 | "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
1561 | "dev": true
1562 | },
1563 | "denque": {
1564 | "version": "2.0.1",
1565 | "resolved": "https://registry.npmjs.org/denque/-/denque-2.0.1.tgz",
1566 | "integrity": "sha512-tfiWc6BQLXNLpNiR5iGd0Ocu3P3VpxfzFiqubLgMfhfOw9WyvgJBd46CClNn9k3qfbjvT//0cf7AlYRX/OslMQ=="
1567 | },
1568 | "depd": {
1569 | "version": "1.1.2",
1570 | "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
1571 | "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="
1572 | },
1573 | "destroy": {
1574 | "version": "1.0.4",
1575 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
1576 | "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
1577 | },
1578 | "diff": {
1579 | "version": "4.0.2",
1580 | "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
1581 | "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
1582 | "dev": true
1583 | },
1584 | "dotenv": {
1585 | "version": "10.0.0",
1586 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz",
1587 | "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q=="
1588 | },
1589 | "ee-first": {
1590 | "version": "1.1.1",
1591 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
1592 | "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
1593 | },
1594 | "encodeurl": {
1595 | "version": "1.0.2",
1596 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
1597 | "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k="
1598 | },
1599 | "envalid": {
1600 | "version": "7.2.1",
1601 | "resolved": "https://registry.npmjs.org/envalid/-/envalid-7.2.1.tgz",
1602 | "integrity": "sha512-NU0ty82LSvHF+Uio9cLNKhrDyivFv7GSvhOu91WbtOOyNKRzXWeDZaopldXJkGBAZ5UuquqXp6VBUXuTfXrUrw==",
1603 | "requires": {
1604 | "tslib": "2.3.1"
1605 | }
1606 | },
1607 | "escape-html": {
1608 | "version": "1.0.3",
1609 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
1610 | "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
1611 | },
1612 | "etag": {
1613 | "version": "1.8.1",
1614 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
1615 | "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc="
1616 | },
1617 | "event-target-shim": {
1618 | "version": "5.0.1",
1619 | "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
1620 | "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ=="
1621 | },
1622 | "express": {
1623 | "version": "4.17.1",
1624 | "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz",
1625 | "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==",
1626 | "requires": {
1627 | "accepts": "~1.3.7",
1628 | "array-flatten": "1.1.1",
1629 | "body-parser": "1.19.0",
1630 | "content-disposition": "0.5.3",
1631 | "content-type": "~1.0.4",
1632 | "cookie": "0.4.0",
1633 | "cookie-signature": "1.0.6",
1634 | "debug": "2.6.9",
1635 | "depd": "~1.1.2",
1636 | "encodeurl": "~1.0.2",
1637 | "escape-html": "~1.0.3",
1638 | "etag": "~1.8.1",
1639 | "finalhandler": "~1.1.2",
1640 | "fresh": "0.5.2",
1641 | "merge-descriptors": "1.0.1",
1642 | "methods": "~1.1.2",
1643 | "on-finished": "~2.3.0",
1644 | "parseurl": "~1.3.3",
1645 | "path-to-regexp": "0.1.7",
1646 | "proxy-addr": "~2.0.5",
1647 | "qs": "6.7.0",
1648 | "range-parser": "~1.2.1",
1649 | "safe-buffer": "5.1.2",
1650 | "send": "0.17.1",
1651 | "serve-static": "1.14.1",
1652 | "setprototypeof": "1.1.1",
1653 | "statuses": "~1.5.0",
1654 | "type-is": "~1.6.18",
1655 | "utils-merge": "1.0.1",
1656 | "vary": "~1.1.2"
1657 | },
1658 | "dependencies": {
1659 | "debug": {
1660 | "version": "2.6.9",
1661 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
1662 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
1663 | "requires": {
1664 | "ms": "2.0.0"
1665 | }
1666 | },
1667 | "ms": {
1668 | "version": "2.0.0",
1669 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
1670 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
1671 | }
1672 | }
1673 | },
1674 | "finalhandler": {
1675 | "version": "1.1.2",
1676 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
1677 | "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==",
1678 | "requires": {
1679 | "debug": "2.6.9",
1680 | "encodeurl": "~1.0.2",
1681 | "escape-html": "~1.0.3",
1682 | "on-finished": "~2.3.0",
1683 | "parseurl": "~1.3.3",
1684 | "statuses": "~1.5.0",
1685 | "unpipe": "~1.0.0"
1686 | },
1687 | "dependencies": {
1688 | "debug": {
1689 | "version": "2.6.9",
1690 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
1691 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
1692 | "requires": {
1693 | "ms": "2.0.0"
1694 | }
1695 | },
1696 | "ms": {
1697 | "version": "2.0.0",
1698 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
1699 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
1700 | }
1701 | }
1702 | },
1703 | "form-data": {
1704 | "version": "3.0.1",
1705 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz",
1706 | "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
1707 | "dev": true,
1708 | "requires": {
1709 | "asynckit": "^0.4.0",
1710 | "combined-stream": "^1.0.8",
1711 | "mime-types": "^2.1.12"
1712 | }
1713 | },
1714 | "forwarded": {
1715 | "version": "0.2.0",
1716 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
1717 | "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow=="
1718 | },
1719 | "fresh": {
1720 | "version": "0.5.2",
1721 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
1722 | "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
1723 | },
1724 | "grammy": {
1725 | "version": "1.3.4",
1726 | "resolved": "https://registry.npmjs.org/grammy/-/grammy-1.3.4.tgz",
1727 | "integrity": "sha512-1GbTvmxf0f0BGaS0HSRnG1RGImkdUzcHnQ1D5MVcW9X5nF9hGQlOVlHr+08XfAW8zAKHlRNhT9C6uffmuvYqTg==",
1728 | "requires": {
1729 | "@grammyjs/types": "^2.2.6",
1730 | "abort-controller": "^3.0.0",
1731 | "debug": "^4.3.2",
1732 | "node-fetch": "^2.6.5"
1733 | }
1734 | },
1735 | "http-errors": {
1736 | "version": "1.7.2",
1737 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz",
1738 | "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==",
1739 | "requires": {
1740 | "depd": "~1.1.2",
1741 | "inherits": "2.0.3",
1742 | "setprototypeof": "1.1.1",
1743 | "statuses": ">= 1.5.0 < 2",
1744 | "toidentifier": "1.0.0"
1745 | }
1746 | },
1747 | "iconv-lite": {
1748 | "version": "0.4.24",
1749 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
1750 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
1751 | "requires": {
1752 | "safer-buffer": ">= 2.1.2 < 3"
1753 | }
1754 | },
1755 | "ieee754": {
1756 | "version": "1.2.1",
1757 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
1758 | "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
1759 | },
1760 | "inherits": {
1761 | "version": "2.0.3",
1762 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
1763 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
1764 | },
1765 | "ipaddr.js": {
1766 | "version": "1.9.1",
1767 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
1768 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="
1769 | },
1770 | "kareem": {
1771 | "version": "2.3.2",
1772 | "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.2.tgz",
1773 | "integrity": "sha512-STHz9P7X2L4Kwn72fA4rGyqyXdmrMSdxqHx9IXon/FXluXieaFA6KJ2upcHAHxQPQ0LeM/OjLrhFxifHewOALQ=="
1774 | },
1775 | "make-error": {
1776 | "version": "1.3.6",
1777 | "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
1778 | "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
1779 | "dev": true
1780 | },
1781 | "media-typer": {
1782 | "version": "0.3.0",
1783 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
1784 | "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
1785 | },
1786 | "memory-pager": {
1787 | "version": "1.5.0",
1788 | "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz",
1789 | "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==",
1790 | "optional": true
1791 | },
1792 | "merge-descriptors": {
1793 | "version": "1.0.1",
1794 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
1795 | "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
1796 | },
1797 | "methods": {
1798 | "version": "1.1.2",
1799 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
1800 | "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4="
1801 | },
1802 | "mime": {
1803 | "version": "1.6.0",
1804 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
1805 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="
1806 | },
1807 | "mime-db": {
1808 | "version": "1.49.0",
1809 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz",
1810 | "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA=="
1811 | },
1812 | "mime-types": {
1813 | "version": "2.1.32",
1814 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz",
1815 | "integrity": "sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A==",
1816 | "requires": {
1817 | "mime-db": "1.49.0"
1818 | }
1819 | },
1820 | "mongodb": {
1821 | "version": "4.1.2",
1822 | "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.1.2.tgz",
1823 | "integrity": "sha512-pHCKDoOy1h6mVurziJmXmTMPatYWOx8pbnyFgSgshja9Y36Q+caHUzTDY6rrIy9HCSrjnbXmx3pCtvNZHmR8xg==",
1824 | "requires": {
1825 | "bson": "^4.5.2",
1826 | "denque": "^2.0.1",
1827 | "mongodb-connection-string-url": "^2.0.0",
1828 | "saslprep": "^1.0.3"
1829 | }
1830 | },
1831 | "mongodb-connection-string-url": {
1832 | "version": "2.1.0",
1833 | "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.1.0.tgz",
1834 | "integrity": "sha512-Qf9Zw7KGiRljWvMrrUFDdVqo46KIEiDuCzvEN97rh/PcKzk2bd6n9KuzEwBwW9xo5glwx69y1mI6s+jFUD/aIQ==",
1835 | "requires": {
1836 | "@types/whatwg-url": "^8.2.1",
1837 | "whatwg-url": "^9.1.0"
1838 | }
1839 | },
1840 | "mongoose": {
1841 | "version": "6.0.11",
1842 | "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.0.11.tgz",
1843 | "integrity": "sha512-ESLnGIZB15xpqAbtjL/wcx+NEmzewlNuST/Dp/md4eqirVGTuEeN+IhS4qr3D5GFhnQAGdadpGlTfrWj5Ggykw==",
1844 | "requires": {
1845 | "bson": "^4.2.2",
1846 | "kareem": "2.3.2",
1847 | "mongodb": "4.1.2",
1848 | "mpath": "0.8.4",
1849 | "mquery": "4.0.0",
1850 | "ms": "2.1.2",
1851 | "regexp-clone": "1.0.0",
1852 | "sift": "13.5.2",
1853 | "sliced": "1.0.1"
1854 | }
1855 | },
1856 | "mpath": {
1857 | "version": "0.8.4",
1858 | "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.8.4.tgz",
1859 | "integrity": "sha512-DTxNZomBcTWlrMW76jy1wvV37X/cNNxPW1y2Jzd4DZkAaC5ZGsm8bfGfNOthcDuRJujXLqiuS6o3Tpy0JEoh7g=="
1860 | },
1861 | "mquery": {
1862 | "version": "4.0.0",
1863 | "resolved": "https://registry.npmjs.org/mquery/-/mquery-4.0.0.tgz",
1864 | "integrity": "sha512-nGjm89lHja+T/b8cybAby6H0YgA4qYC/lx6UlwvHGqvTq8bDaNeCwl1sY8uRELrNbVWJzIihxVd+vphGGn1vBw==",
1865 | "requires": {
1866 | "debug": "4.x",
1867 | "regexp-clone": "^1.0.0",
1868 | "sliced": "1.0.1"
1869 | }
1870 | },
1871 | "ms": {
1872 | "version": "2.1.2",
1873 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
1874 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
1875 | },
1876 | "nanoid": {
1877 | "version": "3.1.30",
1878 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.30.tgz",
1879 | "integrity": "sha512-zJpuPDwOv8D2zq2WRoMe1HsfZthVewpel9CAvTfc/2mBD1uUT/agc5f7GHGWXlYkFvi1mVxe4IjvP2HNrop7nQ=="
1880 | },
1881 | "negotiator": {
1882 | "version": "0.6.2",
1883 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
1884 | "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw=="
1885 | },
1886 | "node-fetch": {
1887 | "version": "2.6.5",
1888 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.5.tgz",
1889 | "integrity": "sha512-mmlIVHJEu5rnIxgEgez6b9GgWXbkZj5YZ7fx+2r94a2E+Uirsp6HsPTPlomfdHtpt/B0cdKviwkoaM6pyvUOpQ==",
1890 | "requires": {
1891 | "whatwg-url": "^5.0.0"
1892 | },
1893 | "dependencies": {
1894 | "tr46": {
1895 | "version": "0.0.3",
1896 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
1897 | "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
1898 | },
1899 | "webidl-conversions": {
1900 | "version": "3.0.1",
1901 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
1902 | "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
1903 | },
1904 | "whatwg-url": {
1905 | "version": "5.0.0",
1906 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
1907 | "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
1908 | "requires": {
1909 | "tr46": "~0.0.3",
1910 | "webidl-conversions": "^3.0.0"
1911 | }
1912 | }
1913 | }
1914 | },
1915 | "on-finished": {
1916 | "version": "2.3.0",
1917 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
1918 | "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
1919 | "requires": {
1920 | "ee-first": "1.1.1"
1921 | }
1922 | },
1923 | "parseurl": {
1924 | "version": "1.3.3",
1925 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
1926 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="
1927 | },
1928 | "path-to-regexp": {
1929 | "version": "0.1.7",
1930 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
1931 | "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
1932 | },
1933 | "proxy-addr": {
1934 | "version": "2.0.7",
1935 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
1936 | "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
1937 | "requires": {
1938 | "forwarded": "0.2.0",
1939 | "ipaddr.js": "1.9.1"
1940 | }
1941 | },
1942 | "punycode": {
1943 | "version": "2.1.1",
1944 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
1945 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
1946 | },
1947 | "qs": {
1948 | "version": "6.7.0",
1949 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
1950 | "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ=="
1951 | },
1952 | "range-parser": {
1953 | "version": "1.2.1",
1954 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
1955 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="
1956 | },
1957 | "raw-body": {
1958 | "version": "2.4.0",
1959 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz",
1960 | "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==",
1961 | "requires": {
1962 | "bytes": "3.1.0",
1963 | "http-errors": "1.7.2",
1964 | "iconv-lite": "0.4.24",
1965 | "unpipe": "1.0.0"
1966 | }
1967 | },
1968 | "regexp-clone": {
1969 | "version": "1.0.0",
1970 | "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz",
1971 | "integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw=="
1972 | },
1973 | "safe-buffer": {
1974 | "version": "5.1.2",
1975 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
1976 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
1977 | },
1978 | "safer-buffer": {
1979 | "version": "2.1.2",
1980 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
1981 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
1982 | },
1983 | "saslprep": {
1984 | "version": "1.0.3",
1985 | "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz",
1986 | "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==",
1987 | "optional": true,
1988 | "requires": {
1989 | "sparse-bitfield": "^3.0.3"
1990 | }
1991 | },
1992 | "send": {
1993 | "version": "0.17.1",
1994 | "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz",
1995 | "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==",
1996 | "requires": {
1997 | "debug": "2.6.9",
1998 | "depd": "~1.1.2",
1999 | "destroy": "~1.0.4",
2000 | "encodeurl": "~1.0.2",
2001 | "escape-html": "~1.0.3",
2002 | "etag": "~1.8.1",
2003 | "fresh": "0.5.2",
2004 | "http-errors": "~1.7.2",
2005 | "mime": "1.6.0",
2006 | "ms": "2.1.1",
2007 | "on-finished": "~2.3.0",
2008 | "range-parser": "~1.2.1",
2009 | "statuses": "~1.5.0"
2010 | },
2011 | "dependencies": {
2012 | "debug": {
2013 | "version": "2.6.9",
2014 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
2015 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
2016 | "requires": {
2017 | "ms": "2.0.0"
2018 | },
2019 | "dependencies": {
2020 | "ms": {
2021 | "version": "2.0.0",
2022 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
2023 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
2024 | }
2025 | }
2026 | },
2027 | "ms": {
2028 | "version": "2.1.1",
2029 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
2030 | "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
2031 | }
2032 | }
2033 | },
2034 | "serve-static": {
2035 | "version": "1.14.1",
2036 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz",
2037 | "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==",
2038 | "requires": {
2039 | "encodeurl": "~1.0.2",
2040 | "escape-html": "~1.0.3",
2041 | "parseurl": "~1.3.3",
2042 | "send": "0.17.1"
2043 | }
2044 | },
2045 | "setprototypeof": {
2046 | "version": "1.1.1",
2047 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz",
2048 | "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw=="
2049 | },
2050 | "sift": {
2051 | "version": "13.5.2",
2052 | "resolved": "https://registry.npmjs.org/sift/-/sift-13.5.2.tgz",
2053 | "integrity": "sha512-+gxdEOMA2J+AI+fVsCqeNn7Tgx3M9ZN9jdi95939l1IJ8cZsqS8sqpJyOkic2SJk+1+98Uwryt/gL6XDaV+UZA=="
2054 | },
2055 | "sliced": {
2056 | "version": "1.0.1",
2057 | "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz",
2058 | "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E="
2059 | },
2060 | "sparse-bitfield": {
2061 | "version": "3.0.3",
2062 | "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
2063 | "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=",
2064 | "optional": true,
2065 | "requires": {
2066 | "memory-pager": "^1.0.2"
2067 | }
2068 | },
2069 | "statuses": {
2070 | "version": "1.5.0",
2071 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
2072 | "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow="
2073 | },
2074 | "toidentifier": {
2075 | "version": "1.0.0",
2076 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
2077 | "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw=="
2078 | },
2079 | "tr46": {
2080 | "version": "2.1.0",
2081 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz",
2082 | "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==",
2083 | "requires": {
2084 | "punycode": "^2.1.1"
2085 | }
2086 | },
2087 | "ts-node": {
2088 | "version": "10.3.0",
2089 | "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.3.0.tgz",
2090 | "integrity": "sha512-RYIy3i8IgpFH45AX4fQHExrT8BxDeKTdC83QFJkNzkvt8uFB6QJ8XMyhynYiKMLxt9a7yuXaDBZNOYS3XjDcYw==",
2091 | "dev": true,
2092 | "requires": {
2093 | "@cspotcode/source-map-support": "0.7.0",
2094 | "@tsconfig/node10": "^1.0.7",
2095 | "@tsconfig/node12": "^1.0.7",
2096 | "@tsconfig/node14": "^1.0.0",
2097 | "@tsconfig/node16": "^1.0.2",
2098 | "acorn": "^8.4.1",
2099 | "acorn-walk": "^8.1.1",
2100 | "arg": "^4.1.0",
2101 | "create-require": "^1.1.0",
2102 | "diff": "^4.0.1",
2103 | "make-error": "^1.1.1",
2104 | "yn": "3.1.1"
2105 | }
2106 | },
2107 | "tslib": {
2108 | "version": "2.3.1",
2109 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
2110 | "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
2111 | },
2112 | "type-is": {
2113 | "version": "1.6.18",
2114 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
2115 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
2116 | "requires": {
2117 | "media-typer": "0.3.0",
2118 | "mime-types": "~2.1.24"
2119 | }
2120 | },
2121 | "typescript": {
2122 | "version": "4.4.4",
2123 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz",
2124 | "integrity": "sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==",
2125 | "dev": true
2126 | },
2127 | "unpipe": {
2128 | "version": "1.0.0",
2129 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
2130 | "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
2131 | },
2132 | "utils-merge": {
2133 | "version": "1.0.1",
2134 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
2135 | "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
2136 | },
2137 | "vary": {
2138 | "version": "1.1.2",
2139 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
2140 | "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
2141 | },
2142 | "webidl-conversions": {
2143 | "version": "6.1.0",
2144 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz",
2145 | "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w=="
2146 | },
2147 | "whatwg-url": {
2148 | "version": "9.1.0",
2149 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-9.1.0.tgz",
2150 | "integrity": "sha512-CQ0UcrPHyomtlOCot1TL77WyMIm/bCwrJ2D6AOKGwEczU9EpyoqAokfqrf/MioU9kHcMsmJZcg1egXix2KYEsA==",
2151 | "requires": {
2152 | "tr46": "^2.1.0",
2153 | "webidl-conversions": "^6.1.0"
2154 | }
2155 | },
2156 | "yn": {
2157 | "version": "3.1.1",
2158 | "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
2159 | "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
2160 | "dev": true
2161 | }
2162 | }
2163 | }
2164 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "gibhugbot",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "start": "node build/index.js",
8 | "dev": "ts-node src/index.ts",
9 | "build": "tsc",
10 | "test": "tsc --noEmit",
11 | "lint": "eslint src/"
12 | },
13 | "repository": {
14 | "type": "git",
15 | "url": "git+https://github.com/AndrewLaneX/gibhugbot.git"
16 | },
17 | "author": "Andrew Lane",
18 | "license": "AGPL-3.0",
19 | "bugs": {
20 | "url": "https://github.com/AndrewLaneX/gibhugbot/issues"
21 | },
22 | "homepage": "https://github.com/AndrewLaneX/gibhugbot#readme",
23 | "dependencies": {
24 | "@grammyjs/runner": "^1.0.2",
25 | "@grammyjs/transformer-throttler": "^1.0.1",
26 | "@youtwitface/escape-html": "^1.1.3",
27 | "dotenv": "^10.0.0",
28 | "envalid": "^7.2.1",
29 | "express": "^4.17.1",
30 | "grammy": "^1.3.4",
31 | "mongoose": "^6.0.11",
32 | "nanoid": "^3.1.30",
33 | "node-fetch": "^2.6.5"
34 | },
35 | "devDependencies": {
36 | "@types/express": "^4.17.13",
37 | "@types/node": "^16.11.1",
38 | "@types/node-fetch": "^2.5.12",
39 | "ts-node": "^10.3.0",
40 | "typescript": "^4.4.4"
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/bot.ts:
--------------------------------------------------------------------------------
1 | import { Bot } from 'grammy';
2 | import { apiThrottler } from '@grammyjs/transformer-throttler';
3 | import env from './env';
4 | import botHandlers from './handlers/bot';
5 |
6 | const bot = new Bot(env.BOT_TOKEN);
7 |
8 | bot.catch(err => {
9 | console.error(`Error while handling update ${err.ctx.update.update_id}:`);
10 | console.error(err.error);
11 | });
12 |
13 | bot.api.config.use(apiThrottler());
14 |
15 | bot.use(botHandlers);
16 |
17 | export default bot;
18 |
--------------------------------------------------------------------------------
/src/declarations/@youtwitface/escape-html/index.d.ts:
--------------------------------------------------------------------------------
1 | declare module '@youtwitface/escape-html' {
2 | const escapeHtml: (html: string) => string;
3 | export default escapeHtml;
4 | }
5 |
--------------------------------------------------------------------------------
/src/env.ts:
--------------------------------------------------------------------------------
1 | import { cleanEnv, port, str, url } from 'envalid';
2 | import dotenv from 'dotenv';
3 |
4 | dotenv.config();
5 |
6 | export default cleanEnv(process.env, {
7 | PORT: port({ default: 8000 }),
8 | BOT_TOKEN: str(),
9 | MONGO_URI: str(),
10 |
11 | GITHUB_CLIENT_ID: str(),
12 | GITHUB_CLIENT_SECRET: str(),
13 | GITHUB_WEBHOOK_DOMAIN: url(),
14 | });
15 |
--------------------------------------------------------------------------------
/src/handlers/bot/connect.ts:
--------------------------------------------------------------------------------
1 | import { Composer, Context } from 'grammy';
2 | import { Chat } from '@grammyjs/types';
3 | import env from '../../env';
4 | import State from '../../models/state';
5 |
6 | const composer = new Composer();
7 |
8 | composer
9 | .filter(
10 | (
11 | ctx,
12 | ): ctx is Context & {
13 | chat: Chat.PrivateChat;
14 | from: object;
15 | } => ctx.chat?.type === 'private',
16 | )
17 | .command('start', async ctx => {
18 | let state = await State.findOne({
19 | user_id: ctx.from.id,
20 | });
21 |
22 | if (!state) {
23 | state = await new State({
24 | user_id: ctx.from.id,
25 | }).save();
26 | }
27 |
28 | await ctx.reply(
29 | `Open this link to connect your GitHub account.`,
30 | {
31 | parse_mode: 'HTML',
32 | disable_web_page_preview: true,
33 | },
34 | );
35 | });
36 |
37 | export default composer;
38 |
--------------------------------------------------------------------------------
/src/handlers/bot/index.ts:
--------------------------------------------------------------------------------
1 | import { Composer } from 'grammy';
2 |
3 | import connect from './connect';
4 | import integrations from './integrations';
5 |
6 | const composer = new Composer();
7 |
8 | composer.use(connect);
9 | composer.use(integrations);
10 |
11 | export default composer;
12 |
--------------------------------------------------------------------------------
/src/handlers/bot/integrations.ts:
--------------------------------------------------------------------------------
1 | import { randomBytes } from 'crypto';
2 | import { Composer, InlineKeyboard } from 'grammy';
3 | import fetch from 'node-fetch';
4 | import escapeHtml from '@youtwitface/escape-html';
5 | import env from '../../env';
6 | import Hook from '../../models/hook';
7 | import Token from '../../models/token';
8 |
9 | const base64 = (data: string) =>
10 | Buffer.from(data).toString('base64').replace(/=+$/, '');
11 |
12 | const composer = new Composer();
13 |
14 | composer.command('new', async ctx => {
15 | if (!ctx.from) {
16 | return;
17 | }
18 |
19 | const token = await Token.findOne({
20 | user_id: ctx.from.id,
21 | });
22 |
23 | if (!token) {
24 | await ctx.reply(
25 | `Please contact me to get set up: @${ctx.me.username}`,
26 | { parse_mode: 'HTML' },
27 | );
28 | return;
29 | }
30 |
31 | const request = await fetch(
32 | 'https://api.github.com/user/repos?affiliation=owner,organization_member&sort=updated&per_page=5',
33 | {
34 | headers: {
35 | Accept: 'application/vnd.github.v3+json',
36 | Authorization: `token ${token.access_token}`,
37 | },
38 | },
39 | );
40 | const response = (await request.json()) as any[];
41 |
42 | const keyboard = response
43 | .reduce(
44 | (keyboard, repo) =>
45 | keyboard
46 | .text(
47 | repo.full_name,
48 | `repo:${ctx.from.id}:${repo.full_name}`,
49 | )
50 | .row(),
51 | new InlineKeyboard(),
52 | )
53 | .switchInlineCurrent('Search', 'search ');
54 |
55 | await ctx.reply('Choose a repo:', {
56 | reply_markup: keyboard,
57 | });
58 | });
59 |
60 | composer.inlineQuery(/^search (.+)/i, async ctx => {
61 | const query = ctx.match![1];
62 |
63 | // TODO:
64 |
65 | await ctx.answerInlineQuery([]);
66 | });
67 |
68 | composer.callbackQuery(/^repo:(\d+):(.+)$/, async ctx => {
69 | const [, userId, repo] = ctx.match!;
70 |
71 | if (ctx.from.id !== Number(userId)) {
72 | await ctx.answerCallbackQuery({ text: "This isn't for you" });
73 | return;
74 | }
75 |
76 | const token = await Token.findOne({
77 | user_id: ctx.from.id,
78 | });
79 |
80 | if (!token) {
81 | await ctx.answerCallbackQuery({
82 | text: 'You need to connect your GitHub account first.',
83 | });
84 | return;
85 | }
86 |
87 | const secret = randomBytes(20).toString('hex');
88 |
89 | const request = await fetch(`https://api.github.com/repos/${repo}/hooks`, {
90 | method: 'POST',
91 | headers: {
92 | Accept: 'application/vnd.github.v3+json',
93 | Authorization: `token ${token.access_token}`,
94 | },
95 | body: JSON.stringify({
96 | name: 'web',
97 | events: ['push', 'issues', 'issue_comment', 'pull_request'],
98 | config: {
99 | url: `${env.GITHUB_WEBHOOK_DOMAIN}/github/webhook/${base64(
100 | repo,
101 | )}`,
102 | content_type: 'json',
103 | secret,
104 | },
105 | }),
106 | });
107 | const response = await request.json();
108 |
109 | await new Hook({
110 | chat_id: ctx.chat?.id,
111 | hook_id: response.id,
112 | secret,
113 | }).save();
114 |
115 | await ctx.answerCallbackQuery();
116 |
117 | const mention = ctx.from.username
118 | ? `@${ctx.from.username}`
119 | : `${escapeHtml(
120 | ctx.from.first_name,
121 | )}`;
122 | await ctx.editMessageText(
123 | `${mention} has connected ${repo} to this chat.`,
124 | { parse_mode: 'HTML' },
125 | );
126 | });
127 |
128 | export default composer;
129 |
--------------------------------------------------------------------------------
/src/handlers/server/index.ts:
--------------------------------------------------------------------------------
1 | import { Router, raw } from 'express';
2 | import State from '../../models/state';
3 | import fetch from 'node-fetch';
4 | import env from '../../env';
5 | import Token from '../../models/token';
6 | import bot from '../../bot';
7 | import { createHmac, timingSafeEqual } from 'crypto';
8 | import Hook from '../../models/hook';
9 | import { handleWebhook } from './webhook';
10 |
11 | const base64Decode = (data: string) =>
12 | Buffer.from(
13 | data.padEnd(Math.ceil(data.length / 4) * 4),
14 | 'base64',
15 | ).toString();
16 |
17 | const router = Router();
18 |
19 | router.get('/github/callback', async (req, res) => {
20 | if (
21 | typeof req.query.code !== 'string' ||
22 | typeof req.query.state !== 'string'
23 | ) {
24 | return res.status(400).end('Missing code or state');
25 | }
26 |
27 | const state = await State.findOne({
28 | state: req.query.state,
29 | });
30 |
31 | if (!state) {
32 | return res.status(400).end('Invalid state');
33 | }
34 |
35 | const request = await fetch('https://github.com/login/oauth/access_token', {
36 | method: 'POST',
37 | headers: {
38 | 'Content-Type': 'application/json',
39 | Accept: 'application/json',
40 | },
41 | body: JSON.stringify({
42 | client_id: env.GITHUB_CLIENT_ID,
43 | client_secret: env.GITHUB_CLIENT_SECRET,
44 | code: req.query.code,
45 | }),
46 | });
47 | const response = await request.json();
48 |
49 | if (response.error) {
50 | return res.status(400).end(response.error_description);
51 | }
52 |
53 | const scopes = response.scope.split(',');
54 | if (!scopes.includes('admin:repo_hook') || !scopes.includes('repo')) {
55 | return res.status(401).end('Missing scope');
56 | }
57 |
58 | const token = await Token.findOneAndUpdate(
59 | { user_id: state.user_id },
60 | {
61 | token_type: response.token_type,
62 | access_token: response.access_token,
63 | },
64 | { upsert: true, new: true },
65 | );
66 |
67 | await state.delete();
68 |
69 | const userRequest = await fetch('https://api.github.com/user', {
70 | headers: {
71 | Authorization: `token ${token.access_token}`,
72 | },
73 | });
74 | const user = await userRequest.json();
75 |
76 | await bot.api.sendMessage(token.user_id, `You logged in as ${user.login}!`);
77 | res.redirect(`https://t.me/${bot.botInfo.username}`);
78 | });
79 |
80 | router.post(
81 | '/github/webhook/:repo',
82 | raw({ type: 'application/json' }),
83 | async (req, res) => {
84 | const githubHookId = req.header('X-GitHub-Hook-ID');
85 | if (!githubHookId) {
86 | return res.status(400).end('Invalid hook ID');
87 | }
88 |
89 | const hook = await Hook.findOne({
90 | hook_id: Number(githubHookId),
91 | });
92 |
93 | if (!hook) {
94 | return res.status(404).end('Hook not found');
95 | }
96 |
97 | const signature = req.header('X-Hub-Signature-256') || '';
98 | const hash =
99 | 'sha256=' +
100 | createHmac('sha256', hook.secret).update(req.body).digest('hex');
101 |
102 | if (!timingSafeEqual(Buffer.from(hash), Buffer.from(signature))) {
103 | return res.status(400).end('Invalid signature');
104 | }
105 |
106 | const event = req.header('X-GitHub-Event');
107 | if (!event) {
108 | return res.status(400).end('Invalid event');
109 | }
110 |
111 | const body = JSON.parse(req.body);
112 | await handleWebhook(req, res, event, body, hook);
113 | },
114 | );
115 |
116 | export default router;
117 |
--------------------------------------------------------------------------------
/src/handlers/server/webhook.ts:
--------------------------------------------------------------------------------
1 | import escapeHtml from '@youtwitface/escape-html';
2 | import { Request, Response } from 'express';
3 | import bot from '../../bot';
4 | import { IHook } from '../../models/hook';
5 |
6 | export const handleWebhook = async (
7 | req: Request<{ repo: string }>,
8 | res: Response,
9 | event: string,
10 | body: any,
11 | hook: IHook,
12 | ) => {
13 | switch (event) {
14 | case 'push': {
15 | if (body.commits.length > 0) {
16 | const message = `🔨 ${
17 | body.commits.length
18 | } new commit${body.commits.length === 1 ? '' : 's'} to ${
19 | body.repository.name
20 | }:${body.ref.split('/')[2]}:\n\n${body.commits
21 | .map(
22 | (commit: any) =>
23 | `${commit.id.slice(
24 | 0,
25 | 8,
26 | )}: ${escapeHtml(
27 | commit.message,
28 | )} by ${escapeHtml(commit.author.name)}`,
29 | )
30 | .join('\n')}`;
31 |
32 | await bot.api.sendMessage(hook.chat_id, message, {
33 | parse_mode: 'HTML',
34 | disable_web_page_preview: true,
35 | });
36 | }
37 |
38 | res.status(200).end('ok');
39 | break;
40 | }
41 |
42 | case 'issues': {
43 | if (body.action === 'opened') {
44 | const message = `🐛 New issue ${body.repository.name}#${body.issue.number} ${escapeHtml(
47 | body.issue.title,
48 | )}\nby @${
49 | body.issue.user.login
50 | }\n\n${
51 | body.issue.body
52 | ? escapeHtml(body.issue.body)
53 | : 'No description provided.'
54 | }`;
55 |
56 | await bot.api.sendMessage(hook.chat_id, message, {
57 | parse_mode: 'HTML',
58 | disable_web_page_preview: true,
59 | });
60 |
61 | res.status(200).end('ok');
62 | } else {
63 | res.status(200).end(`Unhandled issue action: ${body.action}`);
64 | }
65 |
66 | break;
67 | }
68 |
69 | case 'issue_comment': {
70 | if (body.action === 'created') {
71 | const message = `💬 New comment on ${body.repository.name}#${body.issue.number} ${escapeHtml(
74 | body.issue.title,
75 | )}\nby @${
76 | body.comment.user.login
77 | }\n\n${escapeHtml(body.comment.body ?? '')}`;
78 |
79 | await bot.api.sendMessage(hook.chat_id, message, {
80 | parse_mode: 'HTML',
81 | disable_web_page_preview: true,
82 | });
83 |
84 | res.status(200).end('ok');
85 | } else {
86 | res.status(200).end(
87 | `Unhandled issue comment action: ${body.action}`,
88 | );
89 | }
90 |
91 | break;
92 | }
93 |
94 | case 'pull_request': {
95 | if (body.action === 'opened') {
96 | // 🔌 New pull request test#2 Update test (https://github.com/AndrewLaneX/test/pull/2)
97 | const message = `🔌 New pull request ${body.repository.name}#${
100 | body.pull_request.number
101 | } ${escapeHtml(body.pull_request.title)}\nby @${body.pull_request.user.login}\n\n${
104 | body.pull_request.body
105 | ? escapeHtml(body.pull_request.body)
106 | : 'No description provided.'
107 | }`;
108 |
109 | await bot.api.sendMessage(hook.chat_id, message, {
110 | parse_mode: 'HTML',
111 | disable_web_page_preview: true,
112 | });
113 | res.status(200).end('ok');
114 | } else {
115 | res.status(200).end(
116 | `Unhandled pull request action: ${body.action}`,
117 | );
118 | }
119 |
120 | break;
121 | }
122 |
123 | default:
124 | res.status(200).end(`Unhandled event: ${event}`);
125 | break;
126 | }
127 | };
128 |
--------------------------------------------------------------------------------
/src/index.ts:
--------------------------------------------------------------------------------
1 | import dotenv from 'dotenv';
2 | import mongoose from 'mongoose';
3 | import { run } from '@grammyjs/runner';
4 | import env from './env';
5 | import server from './server';
6 | import bot from './bot';
7 |
8 | dotenv.config();
9 |
10 | server.listen(env.PORT, () => {
11 | console.log('Server listening on port', env.PORT);
12 |
13 | mongoose.connect(env.MONGO_URI).then(() => {
14 | console.log('Connected to MongoDB');
15 |
16 | run(bot);
17 | console.log('Bot started');
18 | });
19 | });
20 |
--------------------------------------------------------------------------------
/src/models/hook.ts:
--------------------------------------------------------------------------------
1 | import { Document, Schema, model } from 'mongoose';
2 |
3 | export interface IHook extends Document {
4 | chat_id: number;
5 | hook_id: number;
6 | secret: string;
7 | }
8 |
9 | const hookSchema = new Schema(
10 | {
11 | chat_id: {
12 | type: Number,
13 | required: true,
14 | },
15 | hook_id: {
16 | type: Number,
17 | unique: true,
18 | required: true,
19 | },
20 | secret: {
21 | type: String,
22 | required: true,
23 | },
24 | },
25 | { timestamps: true },
26 | );
27 |
28 | const Hook = model('Hook', hookSchema);
29 | export default Hook;
30 |
--------------------------------------------------------------------------------
/src/models/state.ts:
--------------------------------------------------------------------------------
1 | import { Document, Schema, model } from 'mongoose';
2 | import { nanoid } from 'nanoid';
3 |
4 | export interface IState extends Document {
5 | user_id: number;
6 | state: string;
7 | }
8 |
9 | const stateSchema = new Schema(
10 | {
11 | user_id: {
12 | type: Number,
13 | unique: true,
14 | required: true,
15 | },
16 | state: {
17 | type: String,
18 | unique: true,
19 | required: true,
20 | default: () => nanoid(),
21 | },
22 | },
23 | { timestamps: true },
24 | );
25 |
26 | const State = model('State', stateSchema);
27 | export default State;
28 |
--------------------------------------------------------------------------------
/src/models/token.ts:
--------------------------------------------------------------------------------
1 | import { Document, Schema, model } from 'mongoose';
2 |
3 | export interface IToken extends Document {
4 | user_id: number;
5 | token_type: string;
6 | access_token: string;
7 | }
8 |
9 | const tokenSchema = new Schema(
10 | {
11 | user_id: {
12 | type: Number,
13 | unique: true,
14 | required: true,
15 | },
16 | token_type: {
17 | type: String,
18 | required: true,
19 | },
20 | access_token: {
21 | type: String,
22 | unique: true,
23 | required: true,
24 | },
25 | },
26 | { timestamps: true },
27 | );
28 |
29 | const Token = model('Token', tokenSchema);
30 | export default Token;
31 |
--------------------------------------------------------------------------------
/src/server.ts:
--------------------------------------------------------------------------------
1 | import express from 'express';
2 | import serverHandlers from './handlers/server';
3 |
4 | const server = express();
5 |
6 | server.use(serverHandlers);
7 |
8 | export default server;
9 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "module": "CommonJS",
4 | "strict": true,
5 | "target": "ES2021",
6 | "esModuleInterop": true,
7 | "outDir": "build/",
8 | "skipLibCheck": true,
9 | "typeRoots": ["src/declarations/", "node_modules/@types/"],
10 | "types": ["@youtwitface/escape-html"]
11 | },
12 | "include": ["src/"]
13 | }
14 |
--------------------------------------------------------------------------------