From 846d92e5e560c2bf92e8ddba6b86495209e12d05 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 14 Feb 2019 09:17:18 -0800 Subject: [PATCH 0001/2583] Initial commit --- LICENSE | 661 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 661 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..0ad25db4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. -- 2.40.1 From 8ece275d22f9f8edfce5ee3b1a867bea7363f4b9 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 14 Feb 2019 09:17:18 -0800 Subject: [PATCH 0002/2583] Initial commit --- LICENSE | 661 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 661 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..0ad25db4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. -- 2.40.1 From 4130074c118e13212b5fd8cb628cccfe6f771c41 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 14 Feb 2019 09:36:53 -0800 Subject: [PATCH 0003/2583] Adding README. --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 00000000..524d5c70 --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# Rust Reddit Fediverse (to be renamed later) + +We have a twitter alternative (mastodon), a facebook alternative (friendica), so let's build a reddit alternative in the fediverse. + +## Goals / TODOs + +- Come up with a name / codename. +- Must have communities. +- Must have threaded comments. +- Should the comments / votes be static, or feel like a chat, like [flowchat?](https://flow-chat.com). +- How does voting work? Should we go back to the old way of showing up and downvote counts? Or just a score? +- Should it allow bots? +- Decide on tech to be used: I prefer Actix, Diesel for the back end, inferno, typescript and bootstrap for the front end. +- How do we do the activitypub stuff? +- -- 2.40.1 From dfbcb228c0ac1cf81fdc76c87269221da6d54263 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 14 Feb 2019 09:36:53 -0800 Subject: [PATCH 0004/2583] Adding README. --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 00000000..524d5c70 --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# Rust Reddit Fediverse (to be renamed later) + +We have a twitter alternative (mastodon), a facebook alternative (friendica), so let's build a reddit alternative in the fediverse. + +## Goals / TODOs + +- Come up with a name / codename. +- Must have communities. +- Must have threaded comments. +- Should the comments / votes be static, or feel like a chat, like [flowchat?](https://flow-chat.com). +- How does voting work? Should we go back to the old way of showing up and downvote counts? Or just a score? +- Should it allow bots? +- Decide on tech to be used: I prefer Actix, Diesel for the back end, inferno, typescript and bootstrap for the front end. +- How do we do the activitypub stuff? +- -- 2.40.1 From b8d6fb45cd67098f447e2dd924eb9ffd261f73b9 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 14 Feb 2019 17:42:04 -0800 Subject: [PATCH 0005/2583] adding matrix chatroom --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 524d5c70..77403e8b 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ We have a twitter alternative (mastodon), a facebook alternative (friendica), so let's build a reddit alternative in the fediverse. +[Matrix Chatroom](https://riot.im/app/#/room/#rust-reddit-fediverse:matrix.org) + ## Goals / TODOs - Come up with a name / codename. @@ -12,4 +14,3 @@ We have a twitter alternative (mastodon), a facebook alternative (friendica), so - Should it allow bots? - Decide on tech to be used: I prefer Actix, Diesel for the back end, inferno, typescript and bootstrap for the front end. - How do we do the activitypub stuff? -- -- 2.40.1 From 21f9625a246b6937a946cda4e8595d5cd4b2ca0f Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 14 Feb 2019 17:42:04 -0800 Subject: [PATCH 0006/2583] adding matrix chatroom --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 524d5c70..77403e8b 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ We have a twitter alternative (mastodon), a facebook alternative (friendica), so let's build a reddit alternative in the fediverse. +[Matrix Chatroom](https://riot.im/app/#/room/#rust-reddit-fediverse:matrix.org) + ## Goals / TODOs - Come up with a name / codename. @@ -12,4 +14,3 @@ We have a twitter alternative (mastodon), a facebook alternative (friendica), so - Should it allow bots? - Decide on tech to be used: I prefer Actix, Diesel for the back end, inferno, typescript and bootstrap for the front end. - How do we do the activitypub stuff? -- -- 2.40.1 From 4fa3614682b39338ec536b423bbb0f9caaa03118 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Fri, 15 Feb 2019 10:27:37 -0800 Subject: [PATCH 0007/2583] Some additions --- README.md | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 77403e8b..02023596 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,25 @@ We have a twitter alternative (mastodon), a facebook alternative (friendica), so [Matrix Chatroom](https://riot.im/app/#/room/#rust-reddit-fediverse:matrix.org) -## Goals / TODOs +## TODOs + +- Use the [activitypub crate.](https://docs.rs/activitypub/0.1.4/activitypub/) +- https://docs.rs/activitypub/0.1.4/activitypub/ +- [Activitypub vocab.](https://www.w3.org/TR/activitystreams-vocabulary/) +- Create a markdown doc of actions, matching up to things in that vocab. + +## Goals - Come up with a name / codename. - Must have communities. - Must have threaded comments. -- Should the comments / votes be static, or feel like a chat, like [flowchat?](https://flow-chat.com). +- Must be federated: liking and following communities across instances. + +## Questions + - How does voting work? Should we go back to the old way of showing up and downvote counts? Or just a score? +- Decide on tech to be used + - Backend: Actix, Diesel. + - Frontend: inferno, typescript and bootstrap for now. - Should it allow bots? -- Decide on tech to be used: I prefer Actix, Diesel for the back end, inferno, typescript and bootstrap for the front end. -- How do we do the activitypub stuff? +- Should the comments / votes be static, or feel like a chat, like [flowchat?](https://flow-chat.com). -- 2.40.1 From cc499e2f58e62f30299ab5f5bdb88832ca486847 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Fri, 15 Feb 2019 10:27:37 -0800 Subject: [PATCH 0008/2583] Some additions --- README.md | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 77403e8b..02023596 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,25 @@ We have a twitter alternative (mastodon), a facebook alternative (friendica), so [Matrix Chatroom](https://riot.im/app/#/room/#rust-reddit-fediverse:matrix.org) -## Goals / TODOs +## TODOs + +- Use the [activitypub crate.](https://docs.rs/activitypub/0.1.4/activitypub/) +- https://docs.rs/activitypub/0.1.4/activitypub/ +- [Activitypub vocab.](https://www.w3.org/TR/activitystreams-vocabulary/) +- Create a markdown doc of actions, matching up to things in that vocab. + +## Goals - Come up with a name / codename. - Must have communities. - Must have threaded comments. -- Should the comments / votes be static, or feel like a chat, like [flowchat?](https://flow-chat.com). +- Must be federated: liking and following communities across instances. + +## Questions + - How does voting work? Should we go back to the old way of showing up and downvote counts? Or just a score? +- Decide on tech to be used + - Backend: Actix, Diesel. + - Frontend: inferno, typescript and bootstrap for now. - Should it allow bots? -- Decide on tech to be used: I prefer Actix, Diesel for the back end, inferno, typescript and bootstrap for the front end. -- How do we do the activitypub stuff? +- Should the comments / votes be static, or feel like a chat, like [flowchat?](https://flow-chat.com). -- 2.40.1 From f7bed3505b2814bc9af0f00be770cac8ca909f64 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Mon, 25 Feb 2019 12:46:07 -0800 Subject: [PATCH 0009/2583] Initial outline of activitypub API --- API.md | 314 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 314 insertions(+) create mode 100644 API.md diff --git a/API.md b/API.md new file mode 100644 index 00000000..5c0658d7 --- /dev/null +++ b/API.md @@ -0,0 +1,314 @@ +# API + +- Start with the [reddit API](https://www.reddit.com/dev/api), and find [Activitypub vocab](https://www.w3.org/TR/activitystreams-vocabulary/) to match it. + + + +- [Actors](#actors) + * [User / [Person](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person)](#user--personhttpswwww3orgtractivitystreams-vocabulary%23dfn-person) + * [Community / [Group](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-group)](#community--grouphttpswwww3orgtractivitystreams-vocabulary%23dfn-group) +- [Objects](#objects) + * [Post / [Page](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-page)](#post--pagehttpswwww3orgtractivitystreams-vocabulary%23dfn-page) + * [Post Listings / [Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage)](#post-listings--ordered-collectionpagehttpswwww3orgtractivitystreams-vocabulary%23dfn-orderedcollectionpage) + * [Comment / [Note](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-note)](#comment--notehttpswwww3orgtractivitystreams-vocabulary%23dfn-note) + * [Comment Listings / [Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage)](#comment-listings--ordered-collectionpagehttpswwww3orgtractivitystreams-vocabulary%23dfn-orderedcollectionpage) + * [Deleted thing / [Tombstone](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tombstone)](#deleted-thing--tombstonehttpswwww3orgtractivitystreams-vocabulary%23dfn-tombstone) +- [Actions](#actions) + * [Comments](#comments) + + [Create](#create) + + [Delete](#delete) + + [Update](#update) + + [Read](#read) + + [Like](#like) + + [Dislike](#dislike) + * [Posts](#posts) + + [Create](#create-1) + + [Delete](#delete-1) + + [Update](#update-1) + + [Read](#read-1) + * [Communities](#communities) + + [Create](#create-2) + + [Delete](#delete-2) + + [Update](#update-2) + + [Join](#join) + + [Leave](#leave) + + + +; +## Actors + +### User / [Person](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Person", + "id": "https://rust-reddit-fediverse/api/v1/user/sally_smith", + "name": "Sally Smith", // Their chosen alias + "icon"?: { + "type": "Image", + "name": "User icon", + "url": "https://rust-reddit-fediverse/api/v1/user/sally_smith/icon.png", + "width": 32, + "height": 32 + }, + "startTime": "2014-12-31T23:00:00-08:00", + "summary"?: "This is sally's profile." +} +``` + +### Community / [Group](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-group) + +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Group", + "id": "https://rust-reddit-fediverse/api/v1/community/today_i_learned", + "name": "today_i_learned" + "attributedTo": [ // The moderators + "http://joe.example.org", + ], + "startTime": "2014-12-31T23:00:00-08:00", + "summary"?: "The group's tagline", + "attachment: [{}] // TBD, these would be where strong types for custom styles, and images would work. +} +``` + +## Objects + +### Post / [Page](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-page) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Page", + "id": "https://rust-reddit-fediverse/api/v1/post/1", + "name": "The title of a post, maybe a link to imgur", + "url": "https://news.blah.com" + "attributedTo": "http://joe.example.org", // The poster + "startTime": "2014-12-31T23:00:00-08:00", + +} +``` + +### Post Listings / [Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage) + +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Page 1 of Sally's front page", + "type": "OrderedCollectionPage", + "id": "https://rust-reddit-fediverse/api/v1/posts?type={all, best, front}&sort={}&page=1, + "partOf": "http://example.org/foo", + "orderedItems": [Posts] +} +``` + +### Comment / [Note](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-note) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Note", + "id": "https://rust-reddit-fediverse/api/v1/comment/1", + "name": "A note", + "content": "Looks like it is going to rain today. Bring an umbrella!" + "attributedTo": "http://sally.example.org", + "inReplyTo": "comment or post id", + "startTime": "2014-12-31T23:00:00-08:00", + "updated"?: "2014-12-12T12:12:12Z" + "replies" // TODO, not sure if these objects should embed all replies in them or not. +} +``` +### Comment Listings / [Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage) + +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Page 1 of comments for", + "type": "OrderedCollectionPage", + "id": "https://rust-reddit-fediverse/api/v1/comments?type={all,user,community,post,parent_comment}&id=1&page=1, + "partOf": "http://example.org/foo", + "orderedItems": [Comments] +} +``` +### Deleted thing / [Tombstone](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tombstone) +``` +{ + "type": "Tombstone", + "formerType": "Note / Post", + "id": note / post_id, + "deleted": "2016-03-17T00:00:00Z" +} +``` +## Actions + +### Comments + +#### [Create](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-create) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally created a note", + "type": "Create", + "actor": id, + "object": comment_id, or post_id +} +``` + +#### [Delete](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-delete) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally deleted a note", + "type": "Delete", + "actor": id, + "object": comment_id, or post_id +} +``` +#### [Update](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-update) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally created a note", + "type": "Create", + "actor": id, + "object": comment_id, or post_id + "content": "New comment", + "updated": "New Date" +} +``` +#### [Read](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-read) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally read a comment", + "type": "Read", + "actor": user_id + "object": comment_id +} +``` + +#### [Like](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-like) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally liked a comment", + "type": "Like", + "actor": user_id + "object": comment_id + // TODO different types of reactions, or no? +} +``` +#### [Dislike](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-dislike) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally disliked a comment", + "type": "Dislike", + "actor": user_id + "object": comment_id + // TODO different types of reactions, or no? +} +``` + +### Posts + +#### [Create](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-create) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally created a post", + "type": "Create", + "actor": id, + "object": post_id +} +``` +#### [Delete](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-delete) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally deleted a post", + "type": "Delete", + "actor": id, + "object": comment_id, or post_id +} +``` + +#### [Update](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-update) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally created a post", + "type": "Create", + "actor": id, + "object": comment_id, or post_id + TODO fields. +} +``` +#### [Read](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-read) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally read a post", + "type": "Read", + "actor": user_id + "object": post_id +} +``` + +### Communities +#### [Create](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-create) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally created a community", + "type": "Create", + "actor": id, + "object": community_id +} +``` +#### [Delete](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-delete) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally deleted a community", + "type": "Delete", + "actor": id, + "object": community_id +} +``` + +#### [Update](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-update) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally created a community", + "type": "Create", + "actor": id, + "object": community_id + TODO fields. +} +``` + +#### [Join](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-join) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally joined a community", + "type": "Join", + "actor": user_id, + "object": community_id +} +``` + +#### [Leave](https://www.w3.org/TR/activitystreams-vocabulary#dfn-leave) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally left a community", + "type": "Leave", + "actor": user_id, + "object": community_id +} +``` + +TODO - Moderator actions -- 2.40.1 From 0269f93c136795d27e603d02b0e7168d4e7e2e1b Mon Sep 17 00:00:00 2001 From: Dessalines Date: Mon, 25 Feb 2019 12:46:07 -0800 Subject: [PATCH 0010/2583] Initial outline of activitypub API --- API.md | 314 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 314 insertions(+) create mode 100644 API.md diff --git a/API.md b/API.md new file mode 100644 index 00000000..5c0658d7 --- /dev/null +++ b/API.md @@ -0,0 +1,314 @@ +# API + +- Start with the [reddit API](https://www.reddit.com/dev/api), and find [Activitypub vocab](https://www.w3.org/TR/activitystreams-vocabulary/) to match it. + + + +- [Actors](#actors) + * [User / [Person](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person)](#user--personhttpswwww3orgtractivitystreams-vocabulary%23dfn-person) + * [Community / [Group](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-group)](#community--grouphttpswwww3orgtractivitystreams-vocabulary%23dfn-group) +- [Objects](#objects) + * [Post / [Page](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-page)](#post--pagehttpswwww3orgtractivitystreams-vocabulary%23dfn-page) + * [Post Listings / [Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage)](#post-listings--ordered-collectionpagehttpswwww3orgtractivitystreams-vocabulary%23dfn-orderedcollectionpage) + * [Comment / [Note](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-note)](#comment--notehttpswwww3orgtractivitystreams-vocabulary%23dfn-note) + * [Comment Listings / [Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage)](#comment-listings--ordered-collectionpagehttpswwww3orgtractivitystreams-vocabulary%23dfn-orderedcollectionpage) + * [Deleted thing / [Tombstone](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tombstone)](#deleted-thing--tombstonehttpswwww3orgtractivitystreams-vocabulary%23dfn-tombstone) +- [Actions](#actions) + * [Comments](#comments) + + [Create](#create) + + [Delete](#delete) + + [Update](#update) + + [Read](#read) + + [Like](#like) + + [Dislike](#dislike) + * [Posts](#posts) + + [Create](#create-1) + + [Delete](#delete-1) + + [Update](#update-1) + + [Read](#read-1) + * [Communities](#communities) + + [Create](#create-2) + + [Delete](#delete-2) + + [Update](#update-2) + + [Join](#join) + + [Leave](#leave) + + + +; +## Actors + +### User / [Person](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Person", + "id": "https://rust-reddit-fediverse/api/v1/user/sally_smith", + "name": "Sally Smith", // Their chosen alias + "icon"?: { + "type": "Image", + "name": "User icon", + "url": "https://rust-reddit-fediverse/api/v1/user/sally_smith/icon.png", + "width": 32, + "height": 32 + }, + "startTime": "2014-12-31T23:00:00-08:00", + "summary"?: "This is sally's profile." +} +``` + +### Community / [Group](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-group) + +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Group", + "id": "https://rust-reddit-fediverse/api/v1/community/today_i_learned", + "name": "today_i_learned" + "attributedTo": [ // The moderators + "http://joe.example.org", + ], + "startTime": "2014-12-31T23:00:00-08:00", + "summary"?: "The group's tagline", + "attachment: [{}] // TBD, these would be where strong types for custom styles, and images would work. +} +``` + +## Objects + +### Post / [Page](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-page) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Page", + "id": "https://rust-reddit-fediverse/api/v1/post/1", + "name": "The title of a post, maybe a link to imgur", + "url": "https://news.blah.com" + "attributedTo": "http://joe.example.org", // The poster + "startTime": "2014-12-31T23:00:00-08:00", + +} +``` + +### Post Listings / [Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage) + +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Page 1 of Sally's front page", + "type": "OrderedCollectionPage", + "id": "https://rust-reddit-fediverse/api/v1/posts?type={all, best, front}&sort={}&page=1, + "partOf": "http://example.org/foo", + "orderedItems": [Posts] +} +``` + +### Comment / [Note](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-note) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Note", + "id": "https://rust-reddit-fediverse/api/v1/comment/1", + "name": "A note", + "content": "Looks like it is going to rain today. Bring an umbrella!" + "attributedTo": "http://sally.example.org", + "inReplyTo": "comment or post id", + "startTime": "2014-12-31T23:00:00-08:00", + "updated"?: "2014-12-12T12:12:12Z" + "replies" // TODO, not sure if these objects should embed all replies in them or not. +} +``` +### Comment Listings / [Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage) + +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Page 1 of comments for", + "type": "OrderedCollectionPage", + "id": "https://rust-reddit-fediverse/api/v1/comments?type={all,user,community,post,parent_comment}&id=1&page=1, + "partOf": "http://example.org/foo", + "orderedItems": [Comments] +} +``` +### Deleted thing / [Tombstone](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tombstone) +``` +{ + "type": "Tombstone", + "formerType": "Note / Post", + "id": note / post_id, + "deleted": "2016-03-17T00:00:00Z" +} +``` +## Actions + +### Comments + +#### [Create](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-create) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally created a note", + "type": "Create", + "actor": id, + "object": comment_id, or post_id +} +``` + +#### [Delete](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-delete) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally deleted a note", + "type": "Delete", + "actor": id, + "object": comment_id, or post_id +} +``` +#### [Update](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-update) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally created a note", + "type": "Create", + "actor": id, + "object": comment_id, or post_id + "content": "New comment", + "updated": "New Date" +} +``` +#### [Read](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-read) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally read a comment", + "type": "Read", + "actor": user_id + "object": comment_id +} +``` + +#### [Like](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-like) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally liked a comment", + "type": "Like", + "actor": user_id + "object": comment_id + // TODO different types of reactions, or no? +} +``` +#### [Dislike](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-dislike) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally disliked a comment", + "type": "Dislike", + "actor": user_id + "object": comment_id + // TODO different types of reactions, or no? +} +``` + +### Posts + +#### [Create](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-create) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally created a post", + "type": "Create", + "actor": id, + "object": post_id +} +``` +#### [Delete](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-delete) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally deleted a post", + "type": "Delete", + "actor": id, + "object": comment_id, or post_id +} +``` + +#### [Update](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-update) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally created a post", + "type": "Create", + "actor": id, + "object": comment_id, or post_id + TODO fields. +} +``` +#### [Read](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-read) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally read a post", + "type": "Read", + "actor": user_id + "object": post_id +} +``` + +### Communities +#### [Create](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-create) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally created a community", + "type": "Create", + "actor": id, + "object": community_id +} +``` +#### [Delete](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-delete) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally deleted a community", + "type": "Delete", + "actor": id, + "object": community_id +} +``` + +#### [Update](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-update) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally created a community", + "type": "Create", + "actor": id, + "object": community_id + TODO fields. +} +``` + +#### [Join](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-join) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally joined a community", + "type": "Join", + "actor": user_id, + "object": community_id +} +``` + +#### [Leave](https://www.w3.org/TR/activitystreams-vocabulary#dfn-leave) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally left a community", + "type": "Leave", + "actor": user_id, + "object": community_id +} +``` + +TODO - Moderator actions -- 2.40.1 From 089926496f6fbff6a902fd6b9857e0b259edf3e1 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Mon, 25 Feb 2019 12:46:07 -0800 Subject: [PATCH 0011/2583] Initial outline of activitypub API --- API.md | 314 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 13 ++- 2 files changed, 322 insertions(+), 5 deletions(-) create mode 100644 API.md diff --git a/API.md b/API.md new file mode 100644 index 00000000..5c0658d7 --- /dev/null +++ b/API.md @@ -0,0 +1,314 @@ +# API + +- Start with the [reddit API](https://www.reddit.com/dev/api), and find [Activitypub vocab](https://www.w3.org/TR/activitystreams-vocabulary/) to match it. + + + +- [Actors](#actors) + * [User / [Person](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person)](#user--personhttpswwww3orgtractivitystreams-vocabulary%23dfn-person) + * [Community / [Group](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-group)](#community--grouphttpswwww3orgtractivitystreams-vocabulary%23dfn-group) +- [Objects](#objects) + * [Post / [Page](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-page)](#post--pagehttpswwww3orgtractivitystreams-vocabulary%23dfn-page) + * [Post Listings / [Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage)](#post-listings--ordered-collectionpagehttpswwww3orgtractivitystreams-vocabulary%23dfn-orderedcollectionpage) + * [Comment / [Note](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-note)](#comment--notehttpswwww3orgtractivitystreams-vocabulary%23dfn-note) + * [Comment Listings / [Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage)](#comment-listings--ordered-collectionpagehttpswwww3orgtractivitystreams-vocabulary%23dfn-orderedcollectionpage) + * [Deleted thing / [Tombstone](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tombstone)](#deleted-thing--tombstonehttpswwww3orgtractivitystreams-vocabulary%23dfn-tombstone) +- [Actions](#actions) + * [Comments](#comments) + + [Create](#create) + + [Delete](#delete) + + [Update](#update) + + [Read](#read) + + [Like](#like) + + [Dislike](#dislike) + * [Posts](#posts) + + [Create](#create-1) + + [Delete](#delete-1) + + [Update](#update-1) + + [Read](#read-1) + * [Communities](#communities) + + [Create](#create-2) + + [Delete](#delete-2) + + [Update](#update-2) + + [Join](#join) + + [Leave](#leave) + + + +; +## Actors + +### User / [Person](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Person", + "id": "https://rust-reddit-fediverse/api/v1/user/sally_smith", + "name": "Sally Smith", // Their chosen alias + "icon"?: { + "type": "Image", + "name": "User icon", + "url": "https://rust-reddit-fediverse/api/v1/user/sally_smith/icon.png", + "width": 32, + "height": 32 + }, + "startTime": "2014-12-31T23:00:00-08:00", + "summary"?: "This is sally's profile." +} +``` + +### Community / [Group](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-group) + +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Group", + "id": "https://rust-reddit-fediverse/api/v1/community/today_i_learned", + "name": "today_i_learned" + "attributedTo": [ // The moderators + "http://joe.example.org", + ], + "startTime": "2014-12-31T23:00:00-08:00", + "summary"?: "The group's tagline", + "attachment: [{}] // TBD, these would be where strong types for custom styles, and images would work. +} +``` + +## Objects + +### Post / [Page](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-page) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Page", + "id": "https://rust-reddit-fediverse/api/v1/post/1", + "name": "The title of a post, maybe a link to imgur", + "url": "https://news.blah.com" + "attributedTo": "http://joe.example.org", // The poster + "startTime": "2014-12-31T23:00:00-08:00", + +} +``` + +### Post Listings / [Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage) + +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Page 1 of Sally's front page", + "type": "OrderedCollectionPage", + "id": "https://rust-reddit-fediverse/api/v1/posts?type={all, best, front}&sort={}&page=1, + "partOf": "http://example.org/foo", + "orderedItems": [Posts] +} +``` + +### Comment / [Note](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-note) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Note", + "id": "https://rust-reddit-fediverse/api/v1/comment/1", + "name": "A note", + "content": "Looks like it is going to rain today. Bring an umbrella!" + "attributedTo": "http://sally.example.org", + "inReplyTo": "comment or post id", + "startTime": "2014-12-31T23:00:00-08:00", + "updated"?: "2014-12-12T12:12:12Z" + "replies" // TODO, not sure if these objects should embed all replies in them or not. +} +``` +### Comment Listings / [Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage) + +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Page 1 of comments for", + "type": "OrderedCollectionPage", + "id": "https://rust-reddit-fediverse/api/v1/comments?type={all,user,community,post,parent_comment}&id=1&page=1, + "partOf": "http://example.org/foo", + "orderedItems": [Comments] +} +``` +### Deleted thing / [Tombstone](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tombstone) +``` +{ + "type": "Tombstone", + "formerType": "Note / Post", + "id": note / post_id, + "deleted": "2016-03-17T00:00:00Z" +} +``` +## Actions + +### Comments + +#### [Create](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-create) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally created a note", + "type": "Create", + "actor": id, + "object": comment_id, or post_id +} +``` + +#### [Delete](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-delete) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally deleted a note", + "type": "Delete", + "actor": id, + "object": comment_id, or post_id +} +``` +#### [Update](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-update) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally created a note", + "type": "Create", + "actor": id, + "object": comment_id, or post_id + "content": "New comment", + "updated": "New Date" +} +``` +#### [Read](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-read) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally read a comment", + "type": "Read", + "actor": user_id + "object": comment_id +} +``` + +#### [Like](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-like) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally liked a comment", + "type": "Like", + "actor": user_id + "object": comment_id + // TODO different types of reactions, or no? +} +``` +#### [Dislike](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-dislike) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally disliked a comment", + "type": "Dislike", + "actor": user_id + "object": comment_id + // TODO different types of reactions, or no? +} +``` + +### Posts + +#### [Create](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-create) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally created a post", + "type": "Create", + "actor": id, + "object": post_id +} +``` +#### [Delete](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-delete) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally deleted a post", + "type": "Delete", + "actor": id, + "object": comment_id, or post_id +} +``` + +#### [Update](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-update) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally created a post", + "type": "Create", + "actor": id, + "object": comment_id, or post_id + TODO fields. +} +``` +#### [Read](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-read) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally read a post", + "type": "Read", + "actor": user_id + "object": post_id +} +``` + +### Communities +#### [Create](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-create) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally created a community", + "type": "Create", + "actor": id, + "object": community_id +} +``` +#### [Delete](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-delete) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally deleted a community", + "type": "Delete", + "actor": id, + "object": community_id +} +``` + +#### [Update](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-update) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally created a community", + "type": "Create", + "actor": id, + "object": community_id + TODO fields. +} +``` + +#### [Join](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-join) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally joined a community", + "type": "Join", + "actor": user_id, + "object": community_id +} +``` + +#### [Leave](https://www.w3.org/TR/activitystreams-vocabulary#dfn-leave) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally left a community", + "type": "Leave", + "actor": user_id, + "object": community_id +} +``` + +TODO - Moderator actions diff --git a/README.md b/README.md index 02023596..84a421eb 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,7 @@ We have a twitter alternative (mastodon), a facebook alternative (friendica), so [Matrix Chatroom](https://riot.im/app/#/room/#rust-reddit-fediverse:matrix.org) ## TODOs - -- Use the [activitypub crate.](https://docs.rs/activitypub/0.1.4/activitypub/) -- https://docs.rs/activitypub/0.1.4/activitypub/ -- [Activitypub vocab.](https://www.w3.org/TR/activitystreams-vocabulary/) -- Create a markdown doc of actions, matching up to things in that vocab. +- Create a markdown doc for ActivityPub actions: [API.md](API.md) ## Goals @@ -26,3 +22,10 @@ We have a twitter alternative (mastodon), a facebook alternative (friendica), so - Frontend: inferno, typescript and bootstrap for now. - Should it allow bots? - Should the comments / votes be static, or feel like a chat, like [flowchat?](https://flow-chat.com). + +## Resources / Potential Libraries +- Use the [activitypub crate.](https://docs.rs/activitypub/0.1.4/activitypub/) +- https://docs.rs/activitypub/0.1.4/activitypub/ +- [Activitypub vocab.](https://www.w3.org/TR/activitystreams-vocabulary/) + + -- 2.40.1 From 1c6b22c6ddbf0c75b8e4c31c693e03dbfaa7aa3c Mon Sep 17 00:00:00 2001 From: Dessalines Date: Mon, 25 Feb 2019 12:46:07 -0800 Subject: [PATCH 0012/2583] Initial outline of activitypub API --- API.md | 314 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 13 ++- 2 files changed, 322 insertions(+), 5 deletions(-) create mode 100644 API.md diff --git a/API.md b/API.md new file mode 100644 index 00000000..5c0658d7 --- /dev/null +++ b/API.md @@ -0,0 +1,314 @@ +# API + +- Start with the [reddit API](https://www.reddit.com/dev/api), and find [Activitypub vocab](https://www.w3.org/TR/activitystreams-vocabulary/) to match it. + + + +- [Actors](#actors) + * [User / [Person](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person)](#user--personhttpswwww3orgtractivitystreams-vocabulary%23dfn-person) + * [Community / [Group](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-group)](#community--grouphttpswwww3orgtractivitystreams-vocabulary%23dfn-group) +- [Objects](#objects) + * [Post / [Page](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-page)](#post--pagehttpswwww3orgtractivitystreams-vocabulary%23dfn-page) + * [Post Listings / [Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage)](#post-listings--ordered-collectionpagehttpswwww3orgtractivitystreams-vocabulary%23dfn-orderedcollectionpage) + * [Comment / [Note](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-note)](#comment--notehttpswwww3orgtractivitystreams-vocabulary%23dfn-note) + * [Comment Listings / [Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage)](#comment-listings--ordered-collectionpagehttpswwww3orgtractivitystreams-vocabulary%23dfn-orderedcollectionpage) + * [Deleted thing / [Tombstone](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tombstone)](#deleted-thing--tombstonehttpswwww3orgtractivitystreams-vocabulary%23dfn-tombstone) +- [Actions](#actions) + * [Comments](#comments) + + [Create](#create) + + [Delete](#delete) + + [Update](#update) + + [Read](#read) + + [Like](#like) + + [Dislike](#dislike) + * [Posts](#posts) + + [Create](#create-1) + + [Delete](#delete-1) + + [Update](#update-1) + + [Read](#read-1) + * [Communities](#communities) + + [Create](#create-2) + + [Delete](#delete-2) + + [Update](#update-2) + + [Join](#join) + + [Leave](#leave) + + + +; +## Actors + +### User / [Person](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Person", + "id": "https://rust-reddit-fediverse/api/v1/user/sally_smith", + "name": "Sally Smith", // Their chosen alias + "icon"?: { + "type": "Image", + "name": "User icon", + "url": "https://rust-reddit-fediverse/api/v1/user/sally_smith/icon.png", + "width": 32, + "height": 32 + }, + "startTime": "2014-12-31T23:00:00-08:00", + "summary"?: "This is sally's profile." +} +``` + +### Community / [Group](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-group) + +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Group", + "id": "https://rust-reddit-fediverse/api/v1/community/today_i_learned", + "name": "today_i_learned" + "attributedTo": [ // The moderators + "http://joe.example.org", + ], + "startTime": "2014-12-31T23:00:00-08:00", + "summary"?: "The group's tagline", + "attachment: [{}] // TBD, these would be where strong types for custom styles, and images would work. +} +``` + +## Objects + +### Post / [Page](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-page) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Page", + "id": "https://rust-reddit-fediverse/api/v1/post/1", + "name": "The title of a post, maybe a link to imgur", + "url": "https://news.blah.com" + "attributedTo": "http://joe.example.org", // The poster + "startTime": "2014-12-31T23:00:00-08:00", + +} +``` + +### Post Listings / [Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage) + +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Page 1 of Sally's front page", + "type": "OrderedCollectionPage", + "id": "https://rust-reddit-fediverse/api/v1/posts?type={all, best, front}&sort={}&page=1, + "partOf": "http://example.org/foo", + "orderedItems": [Posts] +} +``` + +### Comment / [Note](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-note) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Note", + "id": "https://rust-reddit-fediverse/api/v1/comment/1", + "name": "A note", + "content": "Looks like it is going to rain today. Bring an umbrella!" + "attributedTo": "http://sally.example.org", + "inReplyTo": "comment or post id", + "startTime": "2014-12-31T23:00:00-08:00", + "updated"?: "2014-12-12T12:12:12Z" + "replies" // TODO, not sure if these objects should embed all replies in them or not. +} +``` +### Comment Listings / [Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage) + +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Page 1 of comments for", + "type": "OrderedCollectionPage", + "id": "https://rust-reddit-fediverse/api/v1/comments?type={all,user,community,post,parent_comment}&id=1&page=1, + "partOf": "http://example.org/foo", + "orderedItems": [Comments] +} +``` +### Deleted thing / [Tombstone](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tombstone) +``` +{ + "type": "Tombstone", + "formerType": "Note / Post", + "id": note / post_id, + "deleted": "2016-03-17T00:00:00Z" +} +``` +## Actions + +### Comments + +#### [Create](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-create) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally created a note", + "type": "Create", + "actor": id, + "object": comment_id, or post_id +} +``` + +#### [Delete](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-delete) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally deleted a note", + "type": "Delete", + "actor": id, + "object": comment_id, or post_id +} +``` +#### [Update](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-update) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally created a note", + "type": "Create", + "actor": id, + "object": comment_id, or post_id + "content": "New comment", + "updated": "New Date" +} +``` +#### [Read](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-read) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally read a comment", + "type": "Read", + "actor": user_id + "object": comment_id +} +``` + +#### [Like](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-like) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally liked a comment", + "type": "Like", + "actor": user_id + "object": comment_id + // TODO different types of reactions, or no? +} +``` +#### [Dislike](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-dislike) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally disliked a comment", + "type": "Dislike", + "actor": user_id + "object": comment_id + // TODO different types of reactions, or no? +} +``` + +### Posts + +#### [Create](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-create) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally created a post", + "type": "Create", + "actor": id, + "object": post_id +} +``` +#### [Delete](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-delete) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally deleted a post", + "type": "Delete", + "actor": id, + "object": comment_id, or post_id +} +``` + +#### [Update](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-update) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally created a post", + "type": "Create", + "actor": id, + "object": comment_id, or post_id + TODO fields. +} +``` +#### [Read](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-read) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally read a post", + "type": "Read", + "actor": user_id + "object": post_id +} +``` + +### Communities +#### [Create](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-create) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally created a community", + "type": "Create", + "actor": id, + "object": community_id +} +``` +#### [Delete](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-delete) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally deleted a community", + "type": "Delete", + "actor": id, + "object": community_id +} +``` + +#### [Update](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-update) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally created a community", + "type": "Create", + "actor": id, + "object": community_id + TODO fields. +} +``` + +#### [Join](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-join) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally joined a community", + "type": "Join", + "actor": user_id, + "object": community_id +} +``` + +#### [Leave](https://www.w3.org/TR/activitystreams-vocabulary#dfn-leave) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally left a community", + "type": "Leave", + "actor": user_id, + "object": community_id +} +``` + +TODO - Moderator actions diff --git a/README.md b/README.md index 02023596..84a421eb 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,7 @@ We have a twitter alternative (mastodon), a facebook alternative (friendica), so [Matrix Chatroom](https://riot.im/app/#/room/#rust-reddit-fediverse:matrix.org) ## TODOs - -- Use the [activitypub crate.](https://docs.rs/activitypub/0.1.4/activitypub/) -- https://docs.rs/activitypub/0.1.4/activitypub/ -- [Activitypub vocab.](https://www.w3.org/TR/activitystreams-vocabulary/) -- Create a markdown doc of actions, matching up to things in that vocab. +- Create a markdown doc for ActivityPub actions: [API.md](API.md) ## Goals @@ -26,3 +22,10 @@ We have a twitter alternative (mastodon), a facebook alternative (friendica), so - Frontend: inferno, typescript and bootstrap for now. - Should it allow bots? - Should the comments / votes be static, or feel like a chat, like [flowchat?](https://flow-chat.com). + +## Resources / Potential Libraries +- Use the [activitypub crate.](https://docs.rs/activitypub/0.1.4/activitypub/) +- https://docs.rs/activitypub/0.1.4/activitypub/ +- [Activitypub vocab.](https://www.w3.org/TR/activitystreams-vocabulary/) + + -- 2.40.1 From 60067b4829b98c93c227d4f53b197905575efcf9 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Mon, 25 Feb 2019 12:54:40 -0800 Subject: [PATCH 0013/2583] Fixing TOC --- API.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/API.md b/API.md index 5c0658d7..63b7e0f0 100644 --- a/API.md +++ b/API.md @@ -5,14 +5,14 @@ - [Actors](#actors) - * [User / [Person](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person)](#user--personhttpswwww3orgtractivitystreams-vocabulary%23dfn-person) - * [Community / [Group](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-group)](#community--grouphttpswwww3orgtractivitystreams-vocabulary%23dfn-group) + * [User / Person](#user--person) + * [Community / Group](#community--group) - [Objects](#objects) - * [Post / [Page](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-page)](#post--pagehttpswwww3orgtractivitystreams-vocabulary%23dfn-page) - * [Post Listings / [Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage)](#post-listings--ordered-collectionpagehttpswwww3orgtractivitystreams-vocabulary%23dfn-orderedcollectionpage) - * [Comment / [Note](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-note)](#comment--notehttpswwww3orgtractivitystreams-vocabulary%23dfn-note) - * [Comment Listings / [Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage)](#comment-listings--ordered-collectionpagehttpswwww3orgtractivitystreams-vocabulary%23dfn-orderedcollectionpage) - * [Deleted thing / [Tombstone](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tombstone)](#deleted-thing--tombstonehttpswwww3orgtractivitystreams-vocabulary%23dfn-tombstone) + * [Post / Page](#post--page) + * [Post Listings / Ordered CollectionPage](#post-listings--ordered-collectionpage) + * [Comment / Note](#comment--note) + * [Comment Listings / Ordered CollectionPage](#comment-listings--ordered-collectionpage) + * [Deleted thing / Tombstone](#deleted-thing--tombstone) - [Actions](#actions) * [Comments](#comments) + [Create](#create) @@ -38,7 +38,7 @@ ; ## Actors -### User / [Person](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person) +### [User / Person](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person) ``` { "@context": "https://www.w3.org/ns/activitystreams", @@ -57,7 +57,7 @@ } ``` -### Community / [Group](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-group) +### [Community / Group](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-group) ``` { @@ -76,7 +76,7 @@ ## Objects -### Post / [Page](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-page) +### [Post / Page](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-page) ``` { "@context": "https://www.w3.org/ns/activitystreams", @@ -90,7 +90,7 @@ } ``` -### Post Listings / [Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage) +### [Post Listings / Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage) ``` { @@ -103,7 +103,7 @@ } ``` -### Comment / [Note](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-note) +### [Comment / Note](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-note) ``` { "@context": "https://www.w3.org/ns/activitystreams", @@ -118,7 +118,7 @@ "replies" // TODO, not sure if these objects should embed all replies in them or not. } ``` -### Comment Listings / [Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage) +### [Comment Listings / Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage) ``` { @@ -130,7 +130,7 @@ "orderedItems": [Comments] } ``` -### Deleted thing / [Tombstone](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tombstone) +### [Deleted thing / Tombstone](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tombstone) ``` { "type": "Tombstone", -- 2.40.1 From 7a9c2dde06fdbb6fbc1e3e675e0304a6d36ae16a Mon Sep 17 00:00:00 2001 From: Dessalines Date: Mon, 25 Feb 2019 12:54:40 -0800 Subject: [PATCH 0014/2583] Fixing TOC --- API.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/API.md b/API.md index 5c0658d7..63b7e0f0 100644 --- a/API.md +++ b/API.md @@ -5,14 +5,14 @@ - [Actors](#actors) - * [User / [Person](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person)](#user--personhttpswwww3orgtractivitystreams-vocabulary%23dfn-person) - * [Community / [Group](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-group)](#community--grouphttpswwww3orgtractivitystreams-vocabulary%23dfn-group) + * [User / Person](#user--person) + * [Community / Group](#community--group) - [Objects](#objects) - * [Post / [Page](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-page)](#post--pagehttpswwww3orgtractivitystreams-vocabulary%23dfn-page) - * [Post Listings / [Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage)](#post-listings--ordered-collectionpagehttpswwww3orgtractivitystreams-vocabulary%23dfn-orderedcollectionpage) - * [Comment / [Note](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-note)](#comment--notehttpswwww3orgtractivitystreams-vocabulary%23dfn-note) - * [Comment Listings / [Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage)](#comment-listings--ordered-collectionpagehttpswwww3orgtractivitystreams-vocabulary%23dfn-orderedcollectionpage) - * [Deleted thing / [Tombstone](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tombstone)](#deleted-thing--tombstonehttpswwww3orgtractivitystreams-vocabulary%23dfn-tombstone) + * [Post / Page](#post--page) + * [Post Listings / Ordered CollectionPage](#post-listings--ordered-collectionpage) + * [Comment / Note](#comment--note) + * [Comment Listings / Ordered CollectionPage](#comment-listings--ordered-collectionpage) + * [Deleted thing / Tombstone](#deleted-thing--tombstone) - [Actions](#actions) * [Comments](#comments) + [Create](#create) @@ -38,7 +38,7 @@ ; ## Actors -### User / [Person](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person) +### [User / Person](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person) ``` { "@context": "https://www.w3.org/ns/activitystreams", @@ -57,7 +57,7 @@ } ``` -### Community / [Group](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-group) +### [Community / Group](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-group) ``` { @@ -76,7 +76,7 @@ ## Objects -### Post / [Page](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-page) +### [Post / Page](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-page) ``` { "@context": "https://www.w3.org/ns/activitystreams", @@ -90,7 +90,7 @@ } ``` -### Post Listings / [Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage) +### [Post Listings / Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage) ``` { @@ -103,7 +103,7 @@ } ``` -### Comment / [Note](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-note) +### [Comment / Note](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-note) ``` { "@context": "https://www.w3.org/ns/activitystreams", @@ -118,7 +118,7 @@ "replies" // TODO, not sure if these objects should embed all replies in them or not. } ``` -### Comment Listings / [Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage) +### [Comment Listings / Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage) ``` { @@ -130,7 +130,7 @@ "orderedItems": [Comments] } ``` -### Deleted thing / [Tombstone](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tombstone) +### [Deleted thing / Tombstone](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-tombstone) ``` { "type": "Tombstone", -- 2.40.1 From a94703120fdeb9fda5e8f246808161b8f307c52e Mon Sep 17 00:00:00 2001 From: Dessalines Date: Mon, 25 Feb 2019 14:19:22 -0800 Subject: [PATCH 0015/2583] Adding some more mod actions. --- API.md | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 66 insertions(+), 5 deletions(-) diff --git a/API.md b/API.md index 63b7e0f0..1a5af669 100644 --- a/API.md +++ b/API.md @@ -32,10 +32,15 @@ + [Update](#update-2) + [Join](#join) + [Leave](#leave) + * [Moderator](#moderator) + + [Ban user from community / Block](#ban-user-from-community--block) + + [Delete Comment](#delete-comment) + + [Invite a moderator](#invite-a-moderator) + + [Accept Invitation](#accept-invitation) + + [Reject Invitation](#reject-invitation) -; ## Actors ### [User / Person](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person) @@ -110,12 +115,13 @@ "type": "Note", "id": "https://rust-reddit-fediverse/api/v1/comment/1", "name": "A note", - "content": "Looks like it is going to rain today. Bring an umbrella!" - "attributedTo": "http://sally.example.org", + "content": "Looks like it is going to rain today. Bring an umbrella @sally!" + "attributedTo": john_id, "inReplyTo": "comment or post id", "startTime": "2014-12-31T23:00:00-08:00", "updated"?: "2014-12-12T12:12:12Z" "replies" // TODO, not sure if these objects should embed all replies in them or not. + "to": [sally_id, group_id] } ``` ### [Comment Listings / Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage) @@ -211,7 +217,6 @@ ``` ### Posts - #### [Create](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-create) ``` { @@ -311,4 +316,60 @@ } ``` -TODO - Moderator actions +### Moderator +#### [Ban user from community / Block](https://www.w3.org/TR/activitystreams-vocabulary#dfn-block) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "The moderator blocked Sally from a group", + "type": "Remove", + "actor": mod_id, + "object": user_id, + "origin": group_id +} +``` + +#### [Delete Comment](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-delete) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally deleted a users comment", + "type": "Delete", + "actor": id, + "object": community_id +} +``` + +#### [Invite a moderator](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-invite) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally invited John to mod a community", + "type": "Invite", + "id": "https://rust-reddit-fediverse/api/v1/invite/1", + "actor": sally_id, + "object": group_id, + "target": john_id +} +``` +#### [Accept Invitation](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-accept) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "John Accepted an invitation to mod a community", + "type": "Accept", + "actor": john_id, + "object": invite_id +} +``` +#### [Reject Invitation](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-reject) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "John Rejected an invitation to mod a community", + "type": "Reject", + "actor": john_id, + "object": invite_id +} +``` + -- 2.40.1 From d008e5fe5505caa7deb241b0fa073d259d7aaad9 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Mon, 25 Feb 2019 14:19:22 -0800 Subject: [PATCH 0016/2583] Adding some more mod actions. --- API.md | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 66 insertions(+), 5 deletions(-) diff --git a/API.md b/API.md index 63b7e0f0..1a5af669 100644 --- a/API.md +++ b/API.md @@ -32,10 +32,15 @@ + [Update](#update-2) + [Join](#join) + [Leave](#leave) + * [Moderator](#moderator) + + [Ban user from community / Block](#ban-user-from-community--block) + + [Delete Comment](#delete-comment) + + [Invite a moderator](#invite-a-moderator) + + [Accept Invitation](#accept-invitation) + + [Reject Invitation](#reject-invitation) -; ## Actors ### [User / Person](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person) @@ -110,12 +115,13 @@ "type": "Note", "id": "https://rust-reddit-fediverse/api/v1/comment/1", "name": "A note", - "content": "Looks like it is going to rain today. Bring an umbrella!" - "attributedTo": "http://sally.example.org", + "content": "Looks like it is going to rain today. Bring an umbrella @sally!" + "attributedTo": john_id, "inReplyTo": "comment or post id", "startTime": "2014-12-31T23:00:00-08:00", "updated"?: "2014-12-12T12:12:12Z" "replies" // TODO, not sure if these objects should embed all replies in them or not. + "to": [sally_id, group_id] } ``` ### [Comment Listings / Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage) @@ -211,7 +217,6 @@ ``` ### Posts - #### [Create](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-create) ``` { @@ -311,4 +316,60 @@ } ``` -TODO - Moderator actions +### Moderator +#### [Ban user from community / Block](https://www.w3.org/TR/activitystreams-vocabulary#dfn-block) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "The moderator blocked Sally from a group", + "type": "Remove", + "actor": mod_id, + "object": user_id, + "origin": group_id +} +``` + +#### [Delete Comment](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-delete) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally deleted a users comment", + "type": "Delete", + "actor": id, + "object": community_id +} +``` + +#### [Invite a moderator](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-invite) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "Sally invited John to mod a community", + "type": "Invite", + "id": "https://rust-reddit-fediverse/api/v1/invite/1", + "actor": sally_id, + "object": group_id, + "target": john_id +} +``` +#### [Accept Invitation](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-accept) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "John Accepted an invitation to mod a community", + "type": "Accept", + "actor": john_id, + "object": invite_id +} +``` +#### [Reject Invitation](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-reject) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "summary": "John Rejected an invitation to mod a community", + "type": "Reject", + "actor": john_id, + "object": invite_id +} +``` + -- 2.40.1 From bb572f59a5974277ece00efa845f7a1546054d1b Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 27 Feb 2019 22:02:55 -0800 Subject: [PATCH 0017/2583] Starting to work on Rust Diesel Schema. #5 --- API.md | 2 +- README.md | 12 +- server/.gitignore | 2 + server/Cargo.lock | 664 ++++++++++++++++++ server/Cargo.toml | 13 + server/diesel.toml | 5 + server/migrations/.gitkeep | 0 .../down.sql | 6 + .../up.sql | 36 + .../2019-02-26-002946_create_user/down.sql | 1 + .../2019-02-26-002946_create_user/up.sql | 8 + .../down.sql | 1 + .../2019-02-27-170003_create_community/up.sql | 5 + .../down.sql | 2 + .../up.sql | 10 + server/src/actions/mod.rs | 3 + server/src/actions/user.rs | 83 +++ server/src/activitypub.rs | 7 + server/src/lib.rs | 41 ++ server/src/models.rs | 19 + server/src/schema.rs | 36 + 21 files changed, 948 insertions(+), 8 deletions(-) create mode 100644 server/.gitignore create mode 100644 server/Cargo.lock create mode 100644 server/Cargo.toml create mode 100644 server/diesel.toml create mode 100644 server/migrations/.gitkeep create mode 100644 server/migrations/00000000000000_diesel_initial_setup/down.sql create mode 100644 server/migrations/00000000000000_diesel_initial_setup/up.sql create mode 100644 server/migrations/2019-02-26-002946_create_user/down.sql create mode 100644 server/migrations/2019-02-26-002946_create_user/up.sql create mode 100644 server/migrations/2019-02-27-170003_create_community/down.sql create mode 100644 server/migrations/2019-02-27-170003_create_community/up.sql create mode 100644 server/migrations/2019-02-27-170402_create_community_user/down.sql create mode 100644 server/migrations/2019-02-27-170402_create_community_user/up.sql create mode 100644 server/src/actions/mod.rs create mode 100644 server/src/actions/user.rs create mode 100644 server/src/activitypub.rs create mode 100644 server/src/lib.rs create mode 100644 server/src/models.rs create mode 100644 server/src/schema.rs diff --git a/API.md b/API.md index 1a5af669..47c57ac4 100644 --- a/API.md +++ b/API.md @@ -49,7 +49,7 @@ "@context": "https://www.w3.org/ns/activitystreams", "type": "Person", "id": "https://rust-reddit-fediverse/api/v1/user/sally_smith", - "name": "Sally Smith", // Their chosen alias + "name": "sally_smith", // TODO can't find an activitypub vocab for alias. "icon"?: { "type": "Image", "name": "User icon", diff --git a/README.md b/README.md index 84a421eb..4802a905 100644 --- a/README.md +++ b/README.md @@ -2,20 +2,18 @@ We have a twitter alternative (mastodon), a facebook alternative (friendica), so let's build a reddit alternative in the fediverse. -[Matrix Chatroom](https://riot.im/app/#/room/#rust-reddit-fediverse:matrix.org) +[Matrix Chat: #rust-reddit-fediverse:matrix.org](https://riot.im/app/#/room/#rust-reddit-fediverse:matrix.org) + +[ActivityPub API.md](API.md) -## TODOs -- Create a markdown doc for ActivityPub actions: [API.md](API.md) ## Goals - - Come up with a name / codename. - Must have communities. - Must have threaded comments. - Must be federated: liking and following communities across instances. ## Questions - - How does voting work? Should we go back to the old way of showing up and downvote counts? Or just a score? - Decide on tech to be used - Backend: Actix, Diesel. @@ -27,5 +25,5 @@ We have a twitter alternative (mastodon), a facebook alternative (friendica), so - Use the [activitypub crate.](https://docs.rs/activitypub/0.1.4/activitypub/) - https://docs.rs/activitypub/0.1.4/activitypub/ - [Activitypub vocab.](https://www.w3.org/TR/activitystreams-vocabulary/) - - +- [Diesel to Postgres data types](https://kotiri.com/2018/01/31/postgresql-diesel-rust-types.html) +- [helpful diesel examples](http://siciarz.net/24-days-rust-diesel/) diff --git a/server/.gitignore b/server/.gitignore new file mode 100644 index 00000000..fedaa2b1 --- /dev/null +++ b/server/.gitignore @@ -0,0 +1,2 @@ +/target +.env diff --git a/server/Cargo.lock b/server/Cargo.lock new file mode 100644 index 00000000..93769d2d --- /dev/null +++ b/server/Cargo.lock @@ -0,0 +1,664 @@ +[[package]] +name = "activitypub" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "activitystreams-derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "activitystreams-traits 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "activitystreams-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "activitystreams-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.13.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "activitystreams-traits" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "activitystreams-types" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "activitystreams-derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "activitystreams-traits 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "aho-corasick" +version = "0.6.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "autocfg" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "backtrace" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "backtrace-sys" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "base64" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "bcrypt" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "blowfish 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "bitflags" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "block-cipher-trait" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "blowfish" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "byteorder" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "cc" +version = "1.0.29" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "cfg-if" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "chrono" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "cloudabi" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "diesel" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "diesel_derives 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pq-sys 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "diesel_derives" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "dotenv" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "failure" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "backtrace 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "failure_derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "fuchsia-cprng" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "generic-array" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "itoa" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "lazy_static" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "libc" +version = "0.2.49" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "memchr" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "mime" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "num-integer" +version = "0.1.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "num-traits" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "opaque-debug" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "pq-sys" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "proc-macro2" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "proc-macro2" +version = "0.4.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "quote" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "quote" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_jitter 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_os 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_chacha" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_core" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_core" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "rand_hc" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_isaac" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_jitter" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_os" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_pcg" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_xorshift" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rdrand" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "redox_syscall" +version = "0.1.51" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "regex" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "regex-syntax" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "ryu" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "serde" +version = "1.0.88" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "serde_derive" +version = "1.0.88" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "serde_json" +version = "1.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "server" +version = "0.0.1" +dependencies = [ + "activitypub 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bcrypt 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "diesel 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "dotenv 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "syn" +version = "0.13.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "syn" +version = "0.15.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "synstructure" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "thread_local" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "time" +version = "0.1.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "typenum" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "ucd-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "unicase" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "unicode-xid" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "utf8-ranges" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "vcpkg" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "version_check" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "winapi" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[metadata] +"checksum activitypub 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08018b04725f5107d4a64e850f8a44a1f8a7e72abf0ca09125e3054921d26fd9" +"checksum activitystreams-derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "48db826c588a009960d74530e7c215e21fae130f585362504dc6b6357e5ce86b" +"checksum activitystreams-traits 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "670ef03168e704b0cae242e7a5d8b40506772b339687e01a3496fc4afe2e8542" +"checksum activitystreams-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "224d1e28d043f4275139445475da8866f0a430ecfc9047c9a15fbe3c70c22b04" +"checksum aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "81ce3d38065e618af2d7b77e10c5ad9a069859b4be3c2250f674af3840d9c8a5" +"checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799" +"checksum backtrace 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "cd5a90e2b463010cd0e0ce9a11d4a9d5d58d9f41d4a6ba3dcaf9e68b466e88b4" +"checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6" +"checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" +"checksum bcrypt 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2a426ab63025c1d21e4e12a218c915fa22097b89ab7ed5765fa803101e004b27" +"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" +"checksum block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1c924d49bd09e7c06003acda26cd9742e796e34282ec6c1189404dee0c1f4774" +"checksum blowfish 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6aeb80d00f2688459b8542068abd974cfb101e7a82182414a99b5026c0d85cc3" +"checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb" +"checksum cc 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)" = "4390a3b5f4f6bce9c1d0c00128379df433e53777fdd30e92f16a529332baec4e" +"checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4" +"checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" +"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +"checksum diesel 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a2469cbcf1dfb9446e491cac4c493c2554133f87f7d041e892ac82e5cd36e863" +"checksum diesel_derives 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "62a27666098617d52c487a41f70de23d44a1dc1f3aa5877ceba2790fb1f1cab4" +"checksum dotenv 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "400b347fe65ccfbd8f545c9d9a75d04b0caf23fec49aaa838a9a05398f94c019" +"checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" +"checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" +"checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" +"checksum generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c0f28c2f5bfb5960175af447a2da7c18900693738343dc896ffbcabd9839592" +"checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" +"checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" +"checksum libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)" = "413f3dfc802c5dc91dc570b05125b6cda9855edfaa9825c9849807876376e70e" +"checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39" +"checksum mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "3e27ca21f40a310bd06d9031785f4801710d566c184a6e15bad4f1d9b65f9425" +"checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea" +"checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" +"checksum opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "93f5bb2e8e8dec81642920ccff6b61f1eb94fa3020c5a325c9851ff604152409" +"checksum pq-sys 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "6ac25eee5a0582f45a67e837e350d784e7003bd29a5f460796772061ca49ffda" +"checksum proc-macro2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1b06e2f335f48d24442b35a19df506a835fb3547bc3c06ef27340da9acf5cae7" +"checksum proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)" = "4d317f9caece796be1980837fd5cb3dfec5613ebdb04ad0956deea83ce168915" +"checksum quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9949cfe66888ffe1d53e6ec9d9f3b70714083854be20fd5e271b232a017401e8" +"checksum quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "cdd8e04bd9c52e0342b406469d494fcb033be4bdbe5c606016defbb1681411e1" +"checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" +"checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" +"checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" +"checksum rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d0e7a549d590831370895ab7ba4ea0c1b6b011d106b5ff2da6eee112615e6dc0" +"checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" +"checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" +"checksum rand_jitter 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b9ea758282efe12823e0d952ddb269d2e1897227e464919a554f2a03ef1b832" +"checksum rand_os 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b7c690732391ae0abafced5015ffb53656abfaec61b342290e5eb56b286a679d" +"checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" +"checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" +"checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" +"checksum redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)" = "423e376fffca3dfa06c9e9790a9ccd282fafb3cc6e6397d01dbf64f9bacc6b85" +"checksum regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384" +"checksum regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7" +"checksum rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "adacaae16d02b6ec37fdc7acfcddf365978de76d1983d3ee22afc260e1ca9619" +"checksum ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9e9b8cde282a9fe6a42dd4681319bfb63f121b8a8ee9439c6f4107e58a46f7" +"checksum serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)" = "9f301d728f2b94c9a7691c90f07b0b4e8a4517181d9461be94c04bddeb4bd850" +"checksum serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)" = "beed18e6f5175aef3ba670e57c60ef3b1b74d250d962a26604bff4c80e970dd4" +"checksum serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)" = "27dce848e7467aa0e2fcaf0a413641499c0b745452aaca1194d24dedde9e13c9" +"checksum syn 0.13.11 (registry+https://github.com/rust-lang/crates.io-index)" = "14f9bf6292f3a61d2c716723fdb789a41bbe104168e6f496dc6497e531ea1b9b" +"checksum syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)" = "f92e629aa1d9c827b2bb8297046c1ccffc57c99b947a680d3ccff1f136a3bee9" +"checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" +"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" +"checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" +"checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" +"checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" +"checksum unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9d3218ea14b4edcaccfa0df0a64a3792a2c32cc706f1b336e48867f9d3147f90" +"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" +"checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737" +"checksum vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "def296d3eb3b12371b2c7d0e83bfe1403e4db2d7a0bba324a12b21c4ee13143d" +"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" +"checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" +"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/server/Cargo.toml b/server/Cargo.toml new file mode 100644 index 00000000..ba497f44 --- /dev/null +++ b/server/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "server" +version = "0.0.1" +authors = ["Dessalines "] + +[dependencies] +diesel = { version = "1.4.1", features = ["postgres","chrono"] } +dotenv = "0.9.0" +bcrypt = "0.3" +activitypub = "0.1.4" +chrono = { version = "0.4", features = ["serde"] } +failure = "0.1.5" +serde_json = "*" diff --git a/server/diesel.toml b/server/diesel.toml new file mode 100644 index 00000000..92267c82 --- /dev/null +++ b/server/diesel.toml @@ -0,0 +1,5 @@ +# For documentation on how to configure this file, +# see diesel.rs/guides/configuring-diesel-cli + +[print_schema] +file = "src/schema.rs" diff --git a/server/migrations/.gitkeep b/server/migrations/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/server/migrations/00000000000000_diesel_initial_setup/down.sql b/server/migrations/00000000000000_diesel_initial_setup/down.sql new file mode 100644 index 00000000..a9f52609 --- /dev/null +++ b/server/migrations/00000000000000_diesel_initial_setup/down.sql @@ -0,0 +1,6 @@ +-- This file was automatically created by Diesel to setup helper functions +-- and other internal bookkeeping. This file is safe to edit, any future +-- changes will be added to existing projects as new migrations. + +DROP FUNCTION IF EXISTS diesel_manage_updated_at(_tbl regclass); +DROP FUNCTION IF EXISTS diesel_set_updated_at(); diff --git a/server/migrations/00000000000000_diesel_initial_setup/up.sql b/server/migrations/00000000000000_diesel_initial_setup/up.sql new file mode 100644 index 00000000..d68895b1 --- /dev/null +++ b/server/migrations/00000000000000_diesel_initial_setup/up.sql @@ -0,0 +1,36 @@ +-- This file was automatically created by Diesel to setup helper functions +-- and other internal bookkeeping. This file is safe to edit, any future +-- changes will be added to existing projects as new migrations. + + + + +-- Sets up a trigger for the given table to automatically set a column called +-- `updated_at` whenever the row is modified (unless `updated_at` was included +-- in the modified columns) +-- +-- # Example +-- +-- ```sql +-- CREATE TABLE users (id SERIAL PRIMARY KEY, updated_at TIMESTAMP NOT NULL DEFAULT NOW()); +-- +-- SELECT diesel_manage_updated_at('users'); +-- ``` +CREATE OR REPLACE FUNCTION diesel_manage_updated_at(_tbl regclass) RETURNS VOID AS $$ +BEGIN + EXECUTE format('CREATE TRIGGER set_updated_at BEFORE UPDATE ON %s + FOR EACH ROW EXECUTE PROCEDURE diesel_set_updated_at()', _tbl); +END; +$$ LANGUAGE plpgsql; + +CREATE OR REPLACE FUNCTION diesel_set_updated_at() RETURNS trigger AS $$ +BEGIN + IF ( + NEW IS DISTINCT FROM OLD AND + NEW.updated_at IS NOT DISTINCT FROM OLD.updated_at + ) THEN + NEW.updated_at := current_timestamp; + END IF; + RETURN NEW; +END; +$$ LANGUAGE plpgsql; diff --git a/server/migrations/2019-02-26-002946_create_user/down.sql b/server/migrations/2019-02-26-002946_create_user/down.sql new file mode 100644 index 00000000..606be6e1 --- /dev/null +++ b/server/migrations/2019-02-26-002946_create_user/down.sql @@ -0,0 +1 @@ +drop table user_ diff --git a/server/migrations/2019-02-26-002946_create_user/up.sql b/server/migrations/2019-02-26-002946_create_user/up.sql new file mode 100644 index 00000000..4f9984b7 --- /dev/null +++ b/server/migrations/2019-02-26-002946_create_user/up.sql @@ -0,0 +1,8 @@ +create table user_ ( + id serial primary key, + name varchar(20) not null, + password_encrypted varchar(200) not null, + email varchar(200), + icon bytea, + startTime timestamp not null default now() +) diff --git a/server/migrations/2019-02-27-170003_create_community/down.sql b/server/migrations/2019-02-27-170003_create_community/down.sql new file mode 100644 index 00000000..5e751d43 --- /dev/null +++ b/server/migrations/2019-02-27-170003_create_community/down.sql @@ -0,0 +1 @@ +drop table community diff --git a/server/migrations/2019-02-27-170003_create_community/up.sql b/server/migrations/2019-02-27-170003_create_community/up.sql new file mode 100644 index 00000000..c5eafc7b --- /dev/null +++ b/server/migrations/2019-02-27-170003_create_community/up.sql @@ -0,0 +1,5 @@ +create table community ( + id serial primary key, + name varchar(20) not null, + starttime timestamp not null default now() +) diff --git a/server/migrations/2019-02-27-170402_create_community_user/down.sql b/server/migrations/2019-02-27-170402_create_community_user/down.sql new file mode 100644 index 00000000..a1571c72 --- /dev/null +++ b/server/migrations/2019-02-27-170402_create_community_user/down.sql @@ -0,0 +1,2 @@ +drop table community_user; +-- drop type community_user_type; diff --git a/server/migrations/2019-02-27-170402_create_community_user/up.sql b/server/migrations/2019-02-27-170402_create_community_user/up.sql new file mode 100644 index 00000000..f60eea46 --- /dev/null +++ b/server/migrations/2019-02-27-170402_create_community_user/up.sql @@ -0,0 +1,10 @@ +-- No support for types yet, so just do 0,1,2 +-- create type community_user_type as enum ('creator', 'moderator', 'user'); + +create table community_user ( + id serial primary key, + fedi_user_id varchar(100) not null, + community_id int references community on update cascade on delete cascade, + community_user_type smallint not null default 2, + starttime timestamp not null default now() +) diff --git a/server/src/actions/mod.rs b/server/src/actions/mod.rs new file mode 100644 index 00000000..bc675369 --- /dev/null +++ b/server/src/actions/mod.rs @@ -0,0 +1,3 @@ +use diesel::*; +pub mod user; + diff --git a/server/src/actions/user.rs b/server/src/actions/user.rs new file mode 100644 index 00000000..2a017fd2 --- /dev/null +++ b/server/src/actions/user.rs @@ -0,0 +1,83 @@ +extern crate diesel; +use schema::user_; +use diesel::*; +use diesel::result::Error; +use schema::user_::dsl::*; +use Crud; + +#[derive(Queryable, PartialEq, Debug)] +pub struct User_ { + pub id: i32, + pub name: String, + pub password_encrypted: String, + pub email: Option, + pub icon: Option>, + pub start_time: chrono::NaiveDateTime +} + +#[derive(Insertable)] +#[table_name="user_"] +pub struct NewUser<'a> { + pub name: &'a str, + pub password_encrypted: &'a str, + pub email: Option<&'a str>, +} + +impl Crud for User_ { + fn read(conn: &PgConnection, user_id: i32) -> User_ { + user_.find(user_id) + .first::(conn) + .expect("Error in query") + } + + fn delete(conn: &PgConnection, user_id: i32) -> usize { + diesel::delete(user_.find(user_id)) + .execute(conn) + .expect("Error deleting.") + } + +// fn create(conn: &PgConnection, mut new_user: NewUser) -> Result { +} + +pub fn create(conn: &PgConnection, mut new_user: NewUser) -> Result { + new_user.password_encrypted = "here"; + // new_user.password_encrypted; + insert_into(user_) + .values(new_user) + .get_result(conn) +} + +#[cfg(test)] +mod tests { + use establish_connection; + use super::*; + #[test] + fn test_crud() { + let conn = establish_connection(); + + let new_user = NewUser { + name: "thom".into(), + password_encrypted: "nope".into(), + email: None + }; + + let inserted_user = create(&conn, new_user).unwrap(); + + let expected_user = User_ { + id: inserted_user.id, + name: "thom".into(), + password_encrypted: "here".into(), + email: None, + icon: None, + start_time: inserted_user.start_time + }; + + let read_user = User_::read(&conn, inserted_user.id); + let num_deleted = User_::delete(&conn, inserted_user.id); + + assert_eq!(expected_user, read_user); + assert_eq!(expected_user, inserted_user); + assert_eq!(1, num_deleted); + + } +} diff --git a/server/src/activitypub.rs b/server/src/activitypub.rs new file mode 100644 index 00000000..3e6c46e4 --- /dev/null +++ b/server/src/activitypub.rs @@ -0,0 +1,7 @@ +extern crate activitypub; +extern crate failure; +extern crate serde_json; + +// fn user -> Result<(), Error> { + +// } diff --git a/server/src/lib.rs b/server/src/lib.rs new file mode 100644 index 00000000..77c8ee5e --- /dev/null +++ b/server/src/lib.rs @@ -0,0 +1,41 @@ +#[macro_use] +extern crate diesel; +extern crate dotenv; + +use diesel::prelude::*; +use diesel::pg::PgConnection; +use dotenv::dotenv; +use std::env; + +pub mod schema; +pub mod models; +pub mod activitypub; +pub mod actions; + +pub fn establish_connection() -> PgConnection { + dotenv().ok(); + + let database_url = env::var("DATABASE_URL") + .expect("DATABASE_URL must be set"); + PgConnection::establish(&database_url) + .expect(&format!("Error connecting to {}", database_url)) +} + +trait Crud { + fn read(conn: &PgConnection, id: i32) -> Self; + fn delete(conn: &PgConnection, id: i32) -> usize; + // fn create(conn: &PgConnection, item: T) -> Result where Self: Sized; +} + +#[cfg(test)] +mod tests { + #[test] + fn it_works() { + assert_eq!(2 + 2, 4); + } + + #[test] + fn db_fetch() { + + } +} diff --git a/server/src/models.rs b/server/src/models.rs new file mode 100644 index 00000000..cb5eaef7 --- /dev/null +++ b/server/src/models.rs @@ -0,0 +1,19 @@ + +enum CommunityUserType { + CREATOR = 0, + MODERATOR = 1, + USER = 2 +} + +impl CommunityUserType { + fn from_u32(value: u32) -> CommunityUserType { + match value { + 0 => CommunityUserType::CREATOR, + 1 => CommunityUserType::MODERATOR, + 2 => CommunityUserType::USER, + _ => panic!("Unknown value: {}", value), + } + } +} + + diff --git a/server/src/schema.rs b/server/src/schema.rs new file mode 100644 index 00000000..a9f37009 --- /dev/null +++ b/server/src/schema.rs @@ -0,0 +1,36 @@ +table! { + community (id) { + id -> Int4, + name -> Varchar, + starttime -> Timestamp, + } +} + +table! { + community_user (id) { + id -> Int4, + fedi_user_id -> Varchar, + community_id -> Nullable, + community_user_type -> Int2, + starttime -> Timestamp, + } +} + +table! { + user_ (id) { + id -> Int4, + name -> Varchar, + password_encrypted -> Varchar, + email -> Nullable, + icon -> Nullable, + starttime -> Timestamp, + } +} + +joinable!(community_user -> community (community_id)); + +allow_tables_to_appear_in_same_query!( + community, + community_user, + user_, +); -- 2.40.1 From 92ea945619a512d9c301492f81a8a017e73654f4 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 27 Feb 2019 22:02:55 -0800 Subject: [PATCH 0018/2583] Starting to work on Rust Diesel Schema. #5 --- API.md | 2 +- README.md | 12 +- server/.gitignore | 2 + server/Cargo.lock | 664 ++++++++++++++++++ server/Cargo.toml | 13 + server/diesel.toml | 5 + server/migrations/.gitkeep | 0 .../down.sql | 6 + .../up.sql | 36 + .../2019-02-26-002946_create_user/down.sql | 1 + .../2019-02-26-002946_create_user/up.sql | 8 + .../down.sql | 1 + .../2019-02-27-170003_create_community/up.sql | 5 + .../down.sql | 2 + .../up.sql | 10 + server/src/actions/mod.rs | 3 + server/src/actions/user.rs | 83 +++ server/src/activitypub.rs | 7 + server/src/lib.rs | 41 ++ server/src/models.rs | 19 + server/src/schema.rs | 36 + 21 files changed, 948 insertions(+), 8 deletions(-) create mode 100644 server/.gitignore create mode 100644 server/Cargo.lock create mode 100644 server/Cargo.toml create mode 100644 server/diesel.toml create mode 100644 server/migrations/.gitkeep create mode 100644 server/migrations/00000000000000_diesel_initial_setup/down.sql create mode 100644 server/migrations/00000000000000_diesel_initial_setup/up.sql create mode 100644 server/migrations/2019-02-26-002946_create_user/down.sql create mode 100644 server/migrations/2019-02-26-002946_create_user/up.sql create mode 100644 server/migrations/2019-02-27-170003_create_community/down.sql create mode 100644 server/migrations/2019-02-27-170003_create_community/up.sql create mode 100644 server/migrations/2019-02-27-170402_create_community_user/down.sql create mode 100644 server/migrations/2019-02-27-170402_create_community_user/up.sql create mode 100644 server/src/actions/mod.rs create mode 100644 server/src/actions/user.rs create mode 100644 server/src/activitypub.rs create mode 100644 server/src/lib.rs create mode 100644 server/src/models.rs create mode 100644 server/src/schema.rs diff --git a/API.md b/API.md index 1a5af669..47c57ac4 100644 --- a/API.md +++ b/API.md @@ -49,7 +49,7 @@ "@context": "https://www.w3.org/ns/activitystreams", "type": "Person", "id": "https://rust-reddit-fediverse/api/v1/user/sally_smith", - "name": "Sally Smith", // Their chosen alias + "name": "sally_smith", // TODO can't find an activitypub vocab for alias. "icon"?: { "type": "Image", "name": "User icon", diff --git a/README.md b/README.md index 84a421eb..4802a905 100644 --- a/README.md +++ b/README.md @@ -2,20 +2,18 @@ We have a twitter alternative (mastodon), a facebook alternative (friendica), so let's build a reddit alternative in the fediverse. -[Matrix Chatroom](https://riot.im/app/#/room/#rust-reddit-fediverse:matrix.org) +[Matrix Chat: #rust-reddit-fediverse:matrix.org](https://riot.im/app/#/room/#rust-reddit-fediverse:matrix.org) + +[ActivityPub API.md](API.md) -## TODOs -- Create a markdown doc for ActivityPub actions: [API.md](API.md) ## Goals - - Come up with a name / codename. - Must have communities. - Must have threaded comments. - Must be federated: liking and following communities across instances. ## Questions - - How does voting work? Should we go back to the old way of showing up and downvote counts? Or just a score? - Decide on tech to be used - Backend: Actix, Diesel. @@ -27,5 +25,5 @@ We have a twitter alternative (mastodon), a facebook alternative (friendica), so - Use the [activitypub crate.](https://docs.rs/activitypub/0.1.4/activitypub/) - https://docs.rs/activitypub/0.1.4/activitypub/ - [Activitypub vocab.](https://www.w3.org/TR/activitystreams-vocabulary/) - - +- [Diesel to Postgres data types](https://kotiri.com/2018/01/31/postgresql-diesel-rust-types.html) +- [helpful diesel examples](http://siciarz.net/24-days-rust-diesel/) diff --git a/server/.gitignore b/server/.gitignore new file mode 100644 index 00000000..fedaa2b1 --- /dev/null +++ b/server/.gitignore @@ -0,0 +1,2 @@ +/target +.env diff --git a/server/Cargo.lock b/server/Cargo.lock new file mode 100644 index 00000000..93769d2d --- /dev/null +++ b/server/Cargo.lock @@ -0,0 +1,664 @@ +[[package]] +name = "activitypub" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "activitystreams-derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "activitystreams-traits 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "activitystreams-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "activitystreams-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.13.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "activitystreams-traits" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "activitystreams-types" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "activitystreams-derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "activitystreams-traits 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "aho-corasick" +version = "0.6.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "autocfg" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "backtrace" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "backtrace-sys" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "base64" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "bcrypt" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "blowfish 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "bitflags" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "block-cipher-trait" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "blowfish" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "byteorder" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "cc" +version = "1.0.29" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "cfg-if" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "chrono" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "cloudabi" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "diesel" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "diesel_derives 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pq-sys 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "diesel_derives" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "dotenv" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "failure" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "backtrace 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "failure_derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "fuchsia-cprng" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "generic-array" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "itoa" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "lazy_static" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "libc" +version = "0.2.49" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "memchr" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "mime" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "num-integer" +version = "0.1.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "num-traits" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "opaque-debug" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "pq-sys" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "proc-macro2" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "proc-macro2" +version = "0.4.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "quote" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "quote" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_jitter 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_os 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_chacha" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_core" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_core" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "rand_hc" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_isaac" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_jitter" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_os" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_pcg" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rand_xorshift" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rdrand" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "redox_syscall" +version = "0.1.51" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "regex" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "regex-syntax" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "ryu" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "serde" +version = "1.0.88" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "serde_derive" +version = "1.0.88" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "serde_json" +version = "1.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "server" +version = "0.0.1" +dependencies = [ + "activitypub 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bcrypt 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "diesel 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "dotenv 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "syn" +version = "0.13.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "syn" +version = "0.15.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "synstructure" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "thread_local" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "time" +version = "0.1.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "typenum" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "ucd-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "unicase" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "unicode-xid" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "utf8-ranges" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "vcpkg" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "version_check" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "winapi" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[metadata] +"checksum activitypub 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08018b04725f5107d4a64e850f8a44a1f8a7e72abf0ca09125e3054921d26fd9" +"checksum activitystreams-derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "48db826c588a009960d74530e7c215e21fae130f585362504dc6b6357e5ce86b" +"checksum activitystreams-traits 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "670ef03168e704b0cae242e7a5d8b40506772b339687e01a3496fc4afe2e8542" +"checksum activitystreams-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "224d1e28d043f4275139445475da8866f0a430ecfc9047c9a15fbe3c70c22b04" +"checksum aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "81ce3d38065e618af2d7b77e10c5ad9a069859b4be3c2250f674af3840d9c8a5" +"checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799" +"checksum backtrace 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "cd5a90e2b463010cd0e0ce9a11d4a9d5d58d9f41d4a6ba3dcaf9e68b466e88b4" +"checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6" +"checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" +"checksum bcrypt 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2a426ab63025c1d21e4e12a218c915fa22097b89ab7ed5765fa803101e004b27" +"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" +"checksum block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1c924d49bd09e7c06003acda26cd9742e796e34282ec6c1189404dee0c1f4774" +"checksum blowfish 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6aeb80d00f2688459b8542068abd974cfb101e7a82182414a99b5026c0d85cc3" +"checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb" +"checksum cc 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)" = "4390a3b5f4f6bce9c1d0c00128379df433e53777fdd30e92f16a529332baec4e" +"checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4" +"checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" +"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +"checksum diesel 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a2469cbcf1dfb9446e491cac4c493c2554133f87f7d041e892ac82e5cd36e863" +"checksum diesel_derives 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "62a27666098617d52c487a41f70de23d44a1dc1f3aa5877ceba2790fb1f1cab4" +"checksum dotenv 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "400b347fe65ccfbd8f545c9d9a75d04b0caf23fec49aaa838a9a05398f94c019" +"checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" +"checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" +"checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" +"checksum generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c0f28c2f5bfb5960175af447a2da7c18900693738343dc896ffbcabd9839592" +"checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" +"checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" +"checksum libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)" = "413f3dfc802c5dc91dc570b05125b6cda9855edfaa9825c9849807876376e70e" +"checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39" +"checksum mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "3e27ca21f40a310bd06d9031785f4801710d566c184a6e15bad4f1d9b65f9425" +"checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea" +"checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" +"checksum opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "93f5bb2e8e8dec81642920ccff6b61f1eb94fa3020c5a325c9851ff604152409" +"checksum pq-sys 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "6ac25eee5a0582f45a67e837e350d784e7003bd29a5f460796772061ca49ffda" +"checksum proc-macro2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1b06e2f335f48d24442b35a19df506a835fb3547bc3c06ef27340da9acf5cae7" +"checksum proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)" = "4d317f9caece796be1980837fd5cb3dfec5613ebdb04ad0956deea83ce168915" +"checksum quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9949cfe66888ffe1d53e6ec9d9f3b70714083854be20fd5e271b232a017401e8" +"checksum quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "cdd8e04bd9c52e0342b406469d494fcb033be4bdbe5c606016defbb1681411e1" +"checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" +"checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" +"checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" +"checksum rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d0e7a549d590831370895ab7ba4ea0c1b6b011d106b5ff2da6eee112615e6dc0" +"checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" +"checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" +"checksum rand_jitter 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b9ea758282efe12823e0d952ddb269d2e1897227e464919a554f2a03ef1b832" +"checksum rand_os 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b7c690732391ae0abafced5015ffb53656abfaec61b342290e5eb56b286a679d" +"checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" +"checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" +"checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" +"checksum redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)" = "423e376fffca3dfa06c9e9790a9ccd282fafb3cc6e6397d01dbf64f9bacc6b85" +"checksum regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384" +"checksum regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7" +"checksum rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "adacaae16d02b6ec37fdc7acfcddf365978de76d1983d3ee22afc260e1ca9619" +"checksum ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9e9b8cde282a9fe6a42dd4681319bfb63f121b8a8ee9439c6f4107e58a46f7" +"checksum serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)" = "9f301d728f2b94c9a7691c90f07b0b4e8a4517181d9461be94c04bddeb4bd850" +"checksum serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)" = "beed18e6f5175aef3ba670e57c60ef3b1b74d250d962a26604bff4c80e970dd4" +"checksum serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)" = "27dce848e7467aa0e2fcaf0a413641499c0b745452aaca1194d24dedde9e13c9" +"checksum syn 0.13.11 (registry+https://github.com/rust-lang/crates.io-index)" = "14f9bf6292f3a61d2c716723fdb789a41bbe104168e6f496dc6497e531ea1b9b" +"checksum syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)" = "f92e629aa1d9c827b2bb8297046c1ccffc57c99b947a680d3ccff1f136a3bee9" +"checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" +"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" +"checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" +"checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" +"checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" +"checksum unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9d3218ea14b4edcaccfa0df0a64a3792a2c32cc706f1b336e48867f9d3147f90" +"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" +"checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737" +"checksum vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "def296d3eb3b12371b2c7d0e83bfe1403e4db2d7a0bba324a12b21c4ee13143d" +"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" +"checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" +"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/server/Cargo.toml b/server/Cargo.toml new file mode 100644 index 00000000..ba497f44 --- /dev/null +++ b/server/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "server" +version = "0.0.1" +authors = ["Dessalines "] + +[dependencies] +diesel = { version = "1.4.1", features = ["postgres","chrono"] } +dotenv = "0.9.0" +bcrypt = "0.3" +activitypub = "0.1.4" +chrono = { version = "0.4", features = ["serde"] } +failure = "0.1.5" +serde_json = "*" diff --git a/server/diesel.toml b/server/diesel.toml new file mode 100644 index 00000000..92267c82 --- /dev/null +++ b/server/diesel.toml @@ -0,0 +1,5 @@ +# For documentation on how to configure this file, +# see diesel.rs/guides/configuring-diesel-cli + +[print_schema] +file = "src/schema.rs" diff --git a/server/migrations/.gitkeep b/server/migrations/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/server/migrations/00000000000000_diesel_initial_setup/down.sql b/server/migrations/00000000000000_diesel_initial_setup/down.sql new file mode 100644 index 00000000..a9f52609 --- /dev/null +++ b/server/migrations/00000000000000_diesel_initial_setup/down.sql @@ -0,0 +1,6 @@ +-- This file was automatically created by Diesel to setup helper functions +-- and other internal bookkeeping. This file is safe to edit, any future +-- changes will be added to existing projects as new migrations. + +DROP FUNCTION IF EXISTS diesel_manage_updated_at(_tbl regclass); +DROP FUNCTION IF EXISTS diesel_set_updated_at(); diff --git a/server/migrations/00000000000000_diesel_initial_setup/up.sql b/server/migrations/00000000000000_diesel_initial_setup/up.sql new file mode 100644 index 00000000..d68895b1 --- /dev/null +++ b/server/migrations/00000000000000_diesel_initial_setup/up.sql @@ -0,0 +1,36 @@ +-- This file was automatically created by Diesel to setup helper functions +-- and other internal bookkeeping. This file is safe to edit, any future +-- changes will be added to existing projects as new migrations. + + + + +-- Sets up a trigger for the given table to automatically set a column called +-- `updated_at` whenever the row is modified (unless `updated_at` was included +-- in the modified columns) +-- +-- # Example +-- +-- ```sql +-- CREATE TABLE users (id SERIAL PRIMARY KEY, updated_at TIMESTAMP NOT NULL DEFAULT NOW()); +-- +-- SELECT diesel_manage_updated_at('users'); +-- ``` +CREATE OR REPLACE FUNCTION diesel_manage_updated_at(_tbl regclass) RETURNS VOID AS $$ +BEGIN + EXECUTE format('CREATE TRIGGER set_updated_at BEFORE UPDATE ON %s + FOR EACH ROW EXECUTE PROCEDURE diesel_set_updated_at()', _tbl); +END; +$$ LANGUAGE plpgsql; + +CREATE OR REPLACE FUNCTION diesel_set_updated_at() RETURNS trigger AS $$ +BEGIN + IF ( + NEW IS DISTINCT FROM OLD AND + NEW.updated_at IS NOT DISTINCT FROM OLD.updated_at + ) THEN + NEW.updated_at := current_timestamp; + END IF; + RETURN NEW; +END; +$$ LANGUAGE plpgsql; diff --git a/server/migrations/2019-02-26-002946_create_user/down.sql b/server/migrations/2019-02-26-002946_create_user/down.sql new file mode 100644 index 00000000..606be6e1 --- /dev/null +++ b/server/migrations/2019-02-26-002946_create_user/down.sql @@ -0,0 +1 @@ +drop table user_ diff --git a/server/migrations/2019-02-26-002946_create_user/up.sql b/server/migrations/2019-02-26-002946_create_user/up.sql new file mode 100644 index 00000000..4f9984b7 --- /dev/null +++ b/server/migrations/2019-02-26-002946_create_user/up.sql @@ -0,0 +1,8 @@ +create table user_ ( + id serial primary key, + name varchar(20) not null, + password_encrypted varchar(200) not null, + email varchar(200), + icon bytea, + startTime timestamp not null default now() +) diff --git a/server/migrations/2019-02-27-170003_create_community/down.sql b/server/migrations/2019-02-27-170003_create_community/down.sql new file mode 100644 index 00000000..5e751d43 --- /dev/null +++ b/server/migrations/2019-02-27-170003_create_community/down.sql @@ -0,0 +1 @@ +drop table community diff --git a/server/migrations/2019-02-27-170003_create_community/up.sql b/server/migrations/2019-02-27-170003_create_community/up.sql new file mode 100644 index 00000000..c5eafc7b --- /dev/null +++ b/server/migrations/2019-02-27-170003_create_community/up.sql @@ -0,0 +1,5 @@ +create table community ( + id serial primary key, + name varchar(20) not null, + starttime timestamp not null default now() +) diff --git a/server/migrations/2019-02-27-170402_create_community_user/down.sql b/server/migrations/2019-02-27-170402_create_community_user/down.sql new file mode 100644 index 00000000..a1571c72 --- /dev/null +++ b/server/migrations/2019-02-27-170402_create_community_user/down.sql @@ -0,0 +1,2 @@ +drop table community_user; +-- drop type community_user_type; diff --git a/server/migrations/2019-02-27-170402_create_community_user/up.sql b/server/migrations/2019-02-27-170402_create_community_user/up.sql new file mode 100644 index 00000000..f60eea46 --- /dev/null +++ b/server/migrations/2019-02-27-170402_create_community_user/up.sql @@ -0,0 +1,10 @@ +-- No support for types yet, so just do 0,1,2 +-- create type community_user_type as enum ('creator', 'moderator', 'user'); + +create table community_user ( + id serial primary key, + fedi_user_id varchar(100) not null, + community_id int references community on update cascade on delete cascade, + community_user_type smallint not null default 2, + starttime timestamp not null default now() +) diff --git a/server/src/actions/mod.rs b/server/src/actions/mod.rs new file mode 100644 index 00000000..bc675369 --- /dev/null +++ b/server/src/actions/mod.rs @@ -0,0 +1,3 @@ +use diesel::*; +pub mod user; + diff --git a/server/src/actions/user.rs b/server/src/actions/user.rs new file mode 100644 index 00000000..2a017fd2 --- /dev/null +++ b/server/src/actions/user.rs @@ -0,0 +1,83 @@ +extern crate diesel; +use schema::user_; +use diesel::*; +use diesel::result::Error; +use schema::user_::dsl::*; +use Crud; + +#[derive(Queryable, PartialEq, Debug)] +pub struct User_ { + pub id: i32, + pub name: String, + pub password_encrypted: String, + pub email: Option, + pub icon: Option>, + pub start_time: chrono::NaiveDateTime +} + +#[derive(Insertable)] +#[table_name="user_"] +pub struct NewUser<'a> { + pub name: &'a str, + pub password_encrypted: &'a str, + pub email: Option<&'a str>, +} + +impl Crud for User_ { + fn read(conn: &PgConnection, user_id: i32) -> User_ { + user_.find(user_id) + .first::(conn) + .expect("Error in query") + } + + fn delete(conn: &PgConnection, user_id: i32) -> usize { + diesel::delete(user_.find(user_id)) + .execute(conn) + .expect("Error deleting.") + } + +// fn create(conn: &PgConnection, mut new_user: NewUser) -> Result { +} + +pub fn create(conn: &PgConnection, mut new_user: NewUser) -> Result { + new_user.password_encrypted = "here"; + // new_user.password_encrypted; + insert_into(user_) + .values(new_user) + .get_result(conn) +} + +#[cfg(test)] +mod tests { + use establish_connection; + use super::*; + #[test] + fn test_crud() { + let conn = establish_connection(); + + let new_user = NewUser { + name: "thom".into(), + password_encrypted: "nope".into(), + email: None + }; + + let inserted_user = create(&conn, new_user).unwrap(); + + let expected_user = User_ { + id: inserted_user.id, + name: "thom".into(), + password_encrypted: "here".into(), + email: None, + icon: None, + start_time: inserted_user.start_time + }; + + let read_user = User_::read(&conn, inserted_user.id); + let num_deleted = User_::delete(&conn, inserted_user.id); + + assert_eq!(expected_user, read_user); + assert_eq!(expected_user, inserted_user); + assert_eq!(1, num_deleted); + + } +} diff --git a/server/src/activitypub.rs b/server/src/activitypub.rs new file mode 100644 index 00000000..3e6c46e4 --- /dev/null +++ b/server/src/activitypub.rs @@ -0,0 +1,7 @@ +extern crate activitypub; +extern crate failure; +extern crate serde_json; + +// fn user -> Result<(), Error> { + +// } diff --git a/server/src/lib.rs b/server/src/lib.rs new file mode 100644 index 00000000..77c8ee5e --- /dev/null +++ b/server/src/lib.rs @@ -0,0 +1,41 @@ +#[macro_use] +extern crate diesel; +extern crate dotenv; + +use diesel::prelude::*; +use diesel::pg::PgConnection; +use dotenv::dotenv; +use std::env; + +pub mod schema; +pub mod models; +pub mod activitypub; +pub mod actions; + +pub fn establish_connection() -> PgConnection { + dotenv().ok(); + + let database_url = env::var("DATABASE_URL") + .expect("DATABASE_URL must be set"); + PgConnection::establish(&database_url) + .expect(&format!("Error connecting to {}", database_url)) +} + +trait Crud { + fn read(conn: &PgConnection, id: i32) -> Self; + fn delete(conn: &PgConnection, id: i32) -> usize; + // fn create(conn: &PgConnection, item: T) -> Result where Self: Sized; +} + +#[cfg(test)] +mod tests { + #[test] + fn it_works() { + assert_eq!(2 + 2, 4); + } + + #[test] + fn db_fetch() { + + } +} diff --git a/server/src/models.rs b/server/src/models.rs new file mode 100644 index 00000000..cb5eaef7 --- /dev/null +++ b/server/src/models.rs @@ -0,0 +1,19 @@ + +enum CommunityUserType { + CREATOR = 0, + MODERATOR = 1, + USER = 2 +} + +impl CommunityUserType { + fn from_u32(value: u32) -> CommunityUserType { + match value { + 0 => CommunityUserType::CREATOR, + 1 => CommunityUserType::MODERATOR, + 2 => CommunityUserType::USER, + _ => panic!("Unknown value: {}", value), + } + } +} + + diff --git a/server/src/schema.rs b/server/src/schema.rs new file mode 100644 index 00000000..a9f37009 --- /dev/null +++ b/server/src/schema.rs @@ -0,0 +1,36 @@ +table! { + community (id) { + id -> Int4, + name -> Varchar, + starttime -> Timestamp, + } +} + +table! { + community_user (id) { + id -> Int4, + fedi_user_id -> Varchar, + community_id -> Nullable, + community_user_type -> Int2, + starttime -> Timestamp, + } +} + +table! { + user_ (id) { + id -> Int4, + name -> Varchar, + password_encrypted -> Varchar, + email -> Nullable, + icon -> Nullable, + starttime -> Timestamp, + } +} + +joinable!(community_user -> community (community_id)); + +allow_tables_to_appear_in_same_query!( + community, + community_user, + user_, +); -- 2.40.1 From b1cdbf715488588337dbcd8b316b4e74dbaa5923 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Mon, 4 Mar 2019 08:39:07 -0800 Subject: [PATCH 0019/2583] Adding User and Community types. --- API.md | 62 +++--- README.md | 4 + .../2019-02-26-002946_create_user/up.sql | 10 +- .../down.sql | 4 +- .../2019-02-27-170003_create_community/up.sql | 18 +- .../down.sql | 2 - .../up.sql | 10 - .../2019-03-03-163336_create_post/down.sql | 3 + .../2019-03-03-163336_create_post/up.sql | 22 ++ server/src/actions/community.rs | 197 ++++++++++++++++++ server/src/actions/mod.rs | 4 +- server/src/actions/post.rs | 95 +++++++++ server/src/actions/src/schema.rs | 80 +++++++ server/src/actions/user.rs | 69 ++++-- server/src/activitypub.rs | 7 - server/src/lib.rs | 41 ++-- server/src/models.rs | 30 +-- server/src/schema.rs | 60 +++++- 18 files changed, 597 insertions(+), 121 deletions(-) delete mode 100644 server/migrations/2019-02-27-170402_create_community_user/down.sql delete mode 100644 server/migrations/2019-02-27-170402_create_community_user/up.sql create mode 100644 server/migrations/2019-03-03-163336_create_post/down.sql create mode 100644 server/migrations/2019-03-03-163336_create_post/up.sql create mode 100644 server/src/actions/community.rs create mode 100644 server/src/actions/post.rs create mode 100644 server/src/actions/src/schema.rs delete mode 100644 server/src/activitypub.rs diff --git a/API.md b/API.md index 47c57ac4..8438cb9e 100644 --- a/API.md +++ b/API.md @@ -49,7 +49,13 @@ "@context": "https://www.w3.org/ns/activitystreams", "type": "Person", "id": "https://rust-reddit-fediverse/api/v1/user/sally_smith", - "name": "sally_smith", // TODO can't find an activitypub vocab for alias. + "inbox": "https://rust-reddit-fediverse/api/v1/user/sally_smith/inbox", + "outbox": "https://rust-reddit-fediverse/api/v1/user/sally_smith/outbox", + "liked": "https://rust-reddit-fediverse/api/v1/user/sally_smith/liked", + "disliked": "https://rust-reddit-fediverse/api/v1/user/sally_smith/disliked", + "following": "https://rust-reddit-fediverse/api/v1/user/sally_smith/following", + "name": "sally_smith", + "preferredUsername": "Sally", "icon"?: { "type": "Image", "name": "User icon", @@ -63,7 +69,6 @@ ``` ### [Community / Group](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-group) - ``` { "@context": "https://www.w3.org/ns/activitystreams", @@ -73,6 +78,7 @@ "attributedTo": [ // The moderators "http://joe.example.org", ], + "followers": "https://rust-reddit-fediverse/api/v1/community/today_i_learned/followers", "startTime": "2014-12-31T23:00:00-08:00", "summary"?: "The group's tagline", "attachment: [{}] // TBD, these would be where strong types for custom styles, and images would work. @@ -91,16 +97,13 @@ "url": "https://news.blah.com" "attributedTo": "http://joe.example.org", // The poster "startTime": "2014-12-31T23:00:00-08:00", - } ``` ### [Post Listings / Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage) - ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Page 1 of Sally's front page", "type": "OrderedCollectionPage", "id": "https://rust-reddit-fediverse/api/v1/posts?type={all, best, front}&sort={}&page=1, "partOf": "http://example.org/foo", @@ -125,11 +128,9 @@ } ``` ### [Comment Listings / Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage) - ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Page 1 of comments for", "type": "OrderedCollectionPage", "id": "https://rust-reddit-fediverse/api/v1/comments?type={all,user,community,post,parent_comment}&id=1&page=1, "partOf": "http://example.org/foo", @@ -147,13 +148,16 @@ ``` ## Actions +- These are all posts to a user's outbox. +- The server then creates a post to the necessary inbox of the recipient, or the followers. +- Whenever a user accesses the site, they do a get from their inbox. + ### Comments #### [Create](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-create) ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally created a note", "type": "Create", "actor": id, "object": comment_id, or post_id @@ -164,7 +168,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally deleted a note", "type": "Delete", "actor": id, "object": comment_id, or post_id @@ -174,7 +177,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally created a note", "type": "Create", "actor": id, "object": comment_id, or post_id @@ -186,7 +188,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally read a comment", "type": "Read", "actor": user_id "object": comment_id @@ -194,10 +195,10 @@ ``` #### [Like](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-like) +- TODO: Should likes be notifications? IE, have a to? ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally liked a comment", "type": "Like", "actor": user_id "object": comment_id @@ -208,7 +209,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally disliked a comment", "type": "Dislike", "actor": user_id "object": comment_id @@ -221,9 +221,9 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally created a post", "type": "Create", "actor": id, + "to": community_id/followers "object": post_id } ``` @@ -231,7 +231,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally deleted a post", "type": "Delete", "actor": id, "object": comment_id, or post_id @@ -242,7 +241,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally created a post", "type": "Create", "actor": id, "object": comment_id, or post_id @@ -253,7 +251,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally read a post", "type": "Read", "actor": user_id "object": post_id @@ -265,7 +262,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally created a community", "type": "Create", "actor": id, "object": community_id @@ -275,7 +271,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally deleted a community", "type": "Delete", "actor": id, "object": community_id @@ -286,7 +281,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally created a community", "type": "Create", "actor": id, "object": community_id @@ -294,11 +288,29 @@ } ``` -#### [Join](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-join) +#### [Follow / Subscribe](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-follow) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Follow", + "actor": id + "object": community_id +} +``` + +#### [Ignore/ Unsubscribe](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-ignore) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Follow", + "actor": id + "object": community_id +} +``` +#### [Join / Become a Mod](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-join) ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally joined a community", "type": "Join", "actor": user_id, "object": community_id @@ -309,7 +321,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally left a community", "type": "Leave", "actor": user_id, "object": community_id @@ -321,7 +332,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "The moderator blocked Sally from a group", "type": "Remove", "actor": mod_id, "object": user_id, @@ -333,7 +343,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally deleted a users comment", "type": "Delete", "actor": id, "object": community_id @@ -344,7 +353,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally invited John to mod a community", "type": "Invite", "id": "https://rust-reddit-fediverse/api/v1/invite/1", "actor": sally_id, @@ -356,7 +364,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "John Accepted an invitation to mod a community", "type": "Accept", "actor": john_id, "object": invite_id @@ -366,7 +373,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "John Rejected an invitation to mod a community", "type": "Reject", "actor": john_id, "object": invite_id diff --git a/README.md b/README.md index 4802a905..9b61044a 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ We have a twitter alternative (mastodon), a facebook alternative (friendica), so - Must have communities. - Must have threaded comments. - Must be federated: liking and following communities across instances. +- Be live-updating: have a right pane for new comments, and a main pain for the full threaded view. + - Use websockets for post / gets to your own instance. ## Questions - How does voting work? Should we go back to the old way of showing up and downvote counts? Or just a score? @@ -25,5 +27,7 @@ We have a twitter alternative (mastodon), a facebook alternative (friendica), so - Use the [activitypub crate.](https://docs.rs/activitypub/0.1.4/activitypub/) - https://docs.rs/activitypub/0.1.4/activitypub/ - [Activitypub vocab.](https://www.w3.org/TR/activitystreams-vocabulary/) +- [Activitypub main](https://www.w3.org/TR/activitypub/) - [Diesel to Postgres data types](https://kotiri.com/2018/01/31/postgresql-diesel-rust-types.html) - [helpful diesel examples](http://siciarz.net/24-days-rust-diesel/) +- [Mastodan public key server example](https://blog.joinmastodon.org/2018/06/how-to-implement-a-basic-activitypub-server/) diff --git a/server/migrations/2019-02-26-002946_create_user/up.sql b/server/migrations/2019-02-26-002946_create_user/up.sql index 4f9984b7..a4ba1e88 100644 --- a/server/migrations/2019-02-26-002946_create_user/up.sql +++ b/server/migrations/2019-02-26-002946_create_user/up.sql @@ -1,8 +1,10 @@ create table user_ ( id serial primary key, name varchar(20) not null, - password_encrypted varchar(200) not null, - email varchar(200), + preferred_username varchar(20), + password_encrypted text not null, + email text, icon bytea, - startTime timestamp not null default now() -) + start_time timestamp not null default now() +); + diff --git a/server/migrations/2019-02-27-170003_create_community/down.sql b/server/migrations/2019-02-27-170003_create_community/down.sql index 5e751d43..5e6065f8 100644 --- a/server/migrations/2019-02-27-170003_create_community/down.sql +++ b/server/migrations/2019-02-27-170003_create_community/down.sql @@ -1 +1,3 @@ -drop table community +drop table community_user; +drop table community_follower; +drop table community; diff --git a/server/migrations/2019-02-27-170003_create_community/up.sql b/server/migrations/2019-02-27-170003_create_community/up.sql index c5eafc7b..692a5f06 100644 --- a/server/migrations/2019-02-27-170003_create_community/up.sql +++ b/server/migrations/2019-02-27-170003_create_community/up.sql @@ -1,5 +1,19 @@ create table community ( id serial primary key, name varchar(20) not null, - starttime timestamp not null default now() -) + start_time timestamp not null default now() +); + +create table community_user ( + id serial primary key, + community_id int references community on update cascade on delete cascade not null, + fedi_user_id text not null, + start_time timestamp not null default now() +); + +create table community_follower ( + id serial primary key, + community_id int references community on update cascade on delete cascade not null, + fedi_user_id text not null, + start_time timestamp not null default now() +); diff --git a/server/migrations/2019-02-27-170402_create_community_user/down.sql b/server/migrations/2019-02-27-170402_create_community_user/down.sql deleted file mode 100644 index a1571c72..00000000 --- a/server/migrations/2019-02-27-170402_create_community_user/down.sql +++ /dev/null @@ -1,2 +0,0 @@ -drop table community_user; --- drop type community_user_type; diff --git a/server/migrations/2019-02-27-170402_create_community_user/up.sql b/server/migrations/2019-02-27-170402_create_community_user/up.sql deleted file mode 100644 index f60eea46..00000000 --- a/server/migrations/2019-02-27-170402_create_community_user/up.sql +++ /dev/null @@ -1,10 +0,0 @@ --- No support for types yet, so just do 0,1,2 --- create type community_user_type as enum ('creator', 'moderator', 'user'); - -create table community_user ( - id serial primary key, - fedi_user_id varchar(100) not null, - community_id int references community on update cascade on delete cascade, - community_user_type smallint not null default 2, - starttime timestamp not null default now() -) diff --git a/server/migrations/2019-03-03-163336_create_post/down.sql b/server/migrations/2019-03-03-163336_create_post/down.sql new file mode 100644 index 00000000..a5783965 --- /dev/null +++ b/server/migrations/2019-03-03-163336_create_post/down.sql @@ -0,0 +1,3 @@ +drop table post_like; +drop table post_dislike; +drop table post; diff --git a/server/migrations/2019-03-03-163336_create_post/up.sql b/server/migrations/2019-03-03-163336_create_post/up.sql new file mode 100644 index 00000000..4a811fa2 --- /dev/null +++ b/server/migrations/2019-03-03-163336_create_post/up.sql @@ -0,0 +1,22 @@ +create table post ( + id serial primary key, + name varchar(100) not null, + url text not null, + attributed_to text not null, + start_time timestamp not null default now() +); + +create table post_like ( + id serial primary key, + fedi_user_id text not null, + post_id int references post on update cascade on delete cascade, + start_time timestamp not null default now() +); + +create table post_dislike ( + id serial primary key, + fedi_user_id text not null, + post_id int references post on update cascade on delete cascade, + start_time timestamp not null default now() +); + diff --git a/server/src/actions/community.rs b/server/src/actions/community.rs new file mode 100644 index 00000000..6b0bea8d --- /dev/null +++ b/server/src/actions/community.rs @@ -0,0 +1,197 @@ +extern crate diesel; +use schema::{community, community_user, community_follower}; +use diesel::*; +use diesel::result::Error; +use {Crud, Followable, Joinable}; + +#[derive(Queryable, Identifiable, PartialEq, Debug)] +#[table_name="community"] +pub struct Community { + pub id: i32, + pub name: String, + pub start_time: chrono::NaiveDateTime +} + +#[derive(Insertable, AsChangeset, Clone, Copy)] +#[table_name="community"] +pub struct CommunityForm<'a> { + pub name: &'a str, +} + +#[derive(Identifiable, Queryable, Associations, PartialEq, Debug)] +#[belongs_to(Community)] +#[table_name = "community_user"] +pub struct CommunityUser { + pub id: i32, + pub community_id: i32, + pub fedi_user_id: String, + pub start_time: chrono::NaiveDateTime +} + +#[derive(Insertable, AsChangeset, Clone, Copy)] +#[table_name="community_user"] +pub struct CommunityUserForm<'a> { + pub community_id: &'a i32, + pub fedi_user_id: &'a str, +} + +#[derive(Identifiable, Queryable, Associations, PartialEq, Debug)] +#[belongs_to(Community)] +#[table_name = "community_follower"] +pub struct CommunityFollower { + pub id: i32, + pub community_id: i32, + pub fedi_user_id: String, + pub start_time: chrono::NaiveDateTime +} + +#[derive(Insertable, AsChangeset, Clone, Copy)] +#[table_name="community_follower"] +pub struct CommunityFollowerForm<'a> { + pub community_id: &'a i32, + pub fedi_user_id: &'a str, +} + + +impl<'a> Crud> for Community { + fn read(conn: &PgConnection, community_id: i32) -> Community { + use schema::community::dsl::*; + community.find(community_id) + .first::(conn) + .expect("Error in query") + } + + fn delete(conn: &PgConnection, community_id: i32) -> usize { + use schema::community::dsl::*; + diesel::delete(community.find(community_id)) + .execute(conn) + .expect("Error deleting.") + } + + fn create(conn: &PgConnection, new_community: CommunityForm) -> Result { + use schema::community::dsl::*; + insert_into(community) + .values(new_community) + .get_result::(conn) + } + + fn update(conn: &PgConnection, community_id: i32, new_community: CommunityForm) -> Community { + use schema::community::dsl::*; + diesel::update(community.find(community_id)) + .set(new_community) + .get_result::(conn) + .expect(&format!("Unable to find {}", community_id)) + } +} + +impl<'a> Followable> for CommunityFollower { + fn follow(conn: &PgConnection, community_follower_form: CommunityFollowerForm) -> Result { + use schema::community_follower::dsl::*; + insert_into(community_follower) + .values(community_follower_form) + .get_result::(conn) + } + fn ignore(conn: &PgConnection, community_follower_form: CommunityFollowerForm) -> usize { + use schema::community_follower::dsl::*; + diesel::delete(community_follower + .filter(community_id.eq(community_follower_form.community_id)) + .filter(fedi_user_id.eq(community_follower_form.fedi_user_id))) + .execute(conn) + .expect("Error deleting.") + } +} + +impl<'a> Joinable> for CommunityUser { + fn join(conn: &PgConnection, community_user_form: CommunityUserForm) -> Result { + use schema::community_user::dsl::*; + insert_into(community_user) + .values(community_user_form) + .get_result::(conn) + } + fn leave(conn: &PgConnection, community_user_form: CommunityUserForm) -> usize { + use schema::community_user::dsl::*; + diesel::delete(community_user + .filter(community_id.eq(community_user_form.community_id)) + .filter(fedi_user_id.eq(community_user_form.fedi_user_id))) + .execute(conn) + .expect("Error deleting.") + } +} + +#[cfg(test)] +mod tests { + use establish_connection; + use super::*; + use actions::user::*; + use Crud; + #[test] + fn test_crud() { + let conn = establish_connection(); + + let new_community = CommunityForm { + name: "TIL".into(), + }; + + let inserted_community = Community::create(&conn, new_community).unwrap(); + + let expected_community = Community { + id: inserted_community.id, + name: "TIL".into(), + start_time: inserted_community.start_time + }; + + let new_user = UserForm { + name: "thom".into(), + preferred_username: None, + password_encrypted: "nope".into(), + email: None + }; + + let inserted_user = User_::create(&conn, new_user).unwrap(); + + let community_follower_form = CommunityFollowerForm { + community_id: &inserted_community.id, + fedi_user_id: "test".into() + }; + + let inserted_community_follower = CommunityFollower::follow(&conn, community_follower_form).unwrap(); + + let expected_community_follower = CommunityFollower { + id: inserted_community_follower.id, + community_id: inserted_community.id, + fedi_user_id: "test".into(), + start_time: inserted_community_follower.start_time + }; + + let community_user_form = CommunityUserForm { + community_id: &inserted_community.id, + fedi_user_id: "test".into() + }; + + let inserted_community_user = CommunityUser::join(&conn, community_user_form).unwrap(); + + let expected_community_user = CommunityUser { + id: inserted_community_user.id, + community_id: inserted_community.id, + fedi_user_id: "test".into(), + start_time: inserted_community_user.start_time + }; + + let read_community = Community::read(&conn, inserted_community.id); + let updated_community = Community::update(&conn, inserted_community.id, new_community); + let ignored_community = CommunityFollower::ignore(&conn, community_follower_form); + let left_community = CommunityUser::leave(&conn, community_user_form); + let num_deleted = Community::delete(&conn, inserted_community.id); + User_::delete(&conn, inserted_user.id); + + assert_eq!(expected_community, read_community); + assert_eq!(expected_community, inserted_community); + assert_eq!(expected_community, updated_community); + assert_eq!(expected_community_follower, inserted_community_follower); + assert_eq!(expected_community_user, inserted_community_user); + assert_eq!(1, ignored_community); + assert_eq!(1, left_community); + assert_eq!(1, num_deleted); + + } +} diff --git a/server/src/actions/mod.rs b/server/src/actions/mod.rs index bc675369..df10dbbc 100644 --- a/server/src/actions/mod.rs +++ b/server/src/actions/mod.rs @@ -1,3 +1,3 @@ -use diesel::*; pub mod user; - +pub mod community; +pub mod post; diff --git a/server/src/actions/post.rs b/server/src/actions/post.rs new file mode 100644 index 00000000..f939fc7c --- /dev/null +++ b/server/src/actions/post.rs @@ -0,0 +1,95 @@ +extern crate diesel; +use schema::user_; +use diesel::*; +use diesel::result::Error; +use schema::user_::dsl::*; + +#[derive(Queryable, PartialEq, Debug)] +pub struct User_ { + pub id: i32, + pub name: String, + pub preferred_username: Option, + pub password_encrypted: String, + pub email: Option, + pub icon: Option>, + pub start_time: chrono::NaiveDateTime +} + +#[derive(Insertable, AsChangeset, Clone, Copy)] +#[table_name="user_"] +pub struct NewUser<'a> { + pub name: &'a str, + pub preferred_username: Option<&'a str>, + pub password_encrypted: &'a str, + pub email: Option<&'a str>, +} + +pub fn read(conn: &PgConnection, user_id: i32) -> User_ { + user_.find(user_id) + .first::(conn) + .expect("Error in query") +} + +pub fn delete(conn: &PgConnection, user_id: i32) -> usize { + diesel::delete(user_.find(user_id)) + .execute(conn) + .expect("Error deleting.") +} + +pub fn create(conn: &PgConnection, new_user: &NewUser) -> Result { + let mut edited_user = new_user.clone(); + // Add the rust crypt + edited_user.password_encrypted = "here"; + // edited_user.password_encrypted; + insert_into(user_) + .values(edited_user) + .get_result::(conn) +} + +pub fn update(conn: &PgConnection, user_id: i32, new_user: &NewUser) -> User_ { + let mut edited_user = new_user.clone(); + edited_user.password_encrypted = "here"; + diesel::update(user_.find(user_id)) + .set(edited_user) + .get_result::(conn) + .expect(&format!("Unable to find user {}", user_id)) +} + +#[cfg(test)] +mod tests { + use establish_connection; + use super::*; + #[test] + fn test_crud() { + let conn = establish_connection(); + + let new_user = NewUser { + name: "thom".into(), + preferred_username: None, + password_encrypted: "nope".into(), + email: None + }; + + let inserted_user = create(&conn, &new_user).unwrap(); + + let expected_user = User_ { + id: inserted_user.id, + name: "thom".into(), + preferred_username: None, + password_encrypted: "here".into(), + email: None, + icon: None, + start_time: inserted_user.start_time + }; + + let read_user = read(&conn, inserted_user.id); + let updated_user = update(&conn, inserted_user.id, &new_user); + let num_deleted = delete(&conn, inserted_user.id); + + assert_eq!(expected_user, read_user); + assert_eq!(expected_user, inserted_user); + assert_eq!(expected_user, updated_user); + assert_eq!(1, num_deleted); + + } +} diff --git a/server/src/actions/src/schema.rs b/server/src/actions/src/schema.rs new file mode 100644 index 00000000..580b82e7 --- /dev/null +++ b/server/src/actions/src/schema.rs @@ -0,0 +1,80 @@ +table! { + community (id) { + id -> Int4, + name -> Varchar, + start_time -> Timestamp, + } +} + +table! { + community_follower (id) { + id -> Int4, + fedi_user_id -> Text, + community_id -> Nullable, + start_time -> Timestamp, + } +} + +table! { + community_user (id) { + id -> Int4, + fedi_user_id -> Text, + community_id -> Nullable, + start_time -> Timestamp, + } +} + +table! { + post (id) { + id -> Int4, + name -> Varchar, + url -> Text, + attributed_to -> Text, + start_time -> Timestamp, + } +} + +table! { + post_dislike (id) { + id -> Int4, + fedi_user_id -> Text, + post_id -> Nullable, + start_time -> Timestamp, + } +} + +table! { + post_like (id) { + id -> Int4, + fedi_user_id -> Text, + post_id -> Nullable, + start_time -> Timestamp, + } +} + +table! { + user_ (id) { + id -> Int4, + name -> Varchar, + preferred_username -> Nullable, + password_encrypted -> Text, + email -> Nullable, + icon -> Nullable, + start_time -> Timestamp, + } +} + +joinable!(community_follower -> community (community_id)); +joinable!(community_user -> community (community_id)); +joinable!(post_dislike -> post (post_id)); +joinable!(post_like -> post (post_id)); + +allow_tables_to_appear_in_same_query!( + community, + community_follower, + community_user, + post, + post_dislike, + post_like, + user_, +); diff --git a/server/src/actions/user.rs b/server/src/actions/user.rs index 2a017fd2..36222f83 100644 --- a/server/src/actions/user.rs +++ b/server/src/actions/user.rs @@ -1,83 +1,108 @@ extern crate diesel; +extern crate activitypub; use schema::user_; use diesel::*; use diesel::result::Error; use schema::user_::dsl::*; +// use self::activitypub::{context, actor::Person}; use Crud; -#[derive(Queryable, PartialEq, Debug)] +#[derive(Queryable, Identifiable, PartialEq, Debug)] +#[table_name="user_"] pub struct User_ { pub id: i32, pub name: String, + pub preferred_username: Option, pub password_encrypted: String, pub email: Option, pub icon: Option>, pub start_time: chrono::NaiveDateTime } -#[derive(Insertable)] +#[derive(Insertable, AsChangeset, Clone, Copy)] #[table_name="user_"] -pub struct NewUser<'a> { +pub struct UserForm<'a> { pub name: &'a str, + pub preferred_username: Option<&'a str>, pub password_encrypted: &'a str, pub email: Option<&'a str>, } -impl Crud for User_ { +impl<'a> Crud> for User_ { fn read(conn: &PgConnection, user_id: i32) -> User_ { user_.find(user_id) .first::(conn) .expect("Error in query") } - - fn delete(conn: &PgConnection, user_id: i32) -> usize { + fn delete(conn: &PgConnection, user_id: i32) -> usize { diesel::delete(user_.find(user_id)) .execute(conn) .expect("Error deleting.") } - -// fn create(conn: &PgConnection, mut new_user: NewUser) -> Result { + fn create(conn: &PgConnection, form: UserForm) -> Result { + let mut edited_user = form.clone(); + // Add the rust crypt + edited_user.password_encrypted = "here"; + // edited_user.password_encrypted; + insert_into(user_) + .values(edited_user) + .get_result::(conn) + } + fn update(conn: &PgConnection, user_id: i32, form: UserForm) -> User_ { + let mut edited_user = form.clone(); + edited_user.password_encrypted = "here"; + diesel::update(user_.find(user_id)) + .set(edited_user) + .get_result::(conn) + .expect(&format!("Unable to find user {}", user_id)) + } } -pub fn create(conn: &PgConnection, mut new_user: NewUser) -> Result { - new_user.password_encrypted = "here"; - // new_user.password_encrypted; - insert_into(user_) - .values(new_user) - .get_result(conn) -} + +// TODO +// pub fn person(user: &User_) -> Person { +// let mut person = Person::default(); +// person.object_props.set_context_object(context()); +// person.ap_actor_props.set_preferred_username_string("set".into()); + +// person +// } #[cfg(test)] mod tests { use establish_connection; - use super::*; + use super::{User_, UserForm}; + use Crud; #[test] fn test_crud() { let conn = establish_connection(); - let new_user = NewUser { + let new_user = UserForm { name: "thom".into(), + preferred_username: None, password_encrypted: "nope".into(), email: None }; - let inserted_user = create(&conn, new_user).unwrap(); + let inserted_user = User_::create(&conn, new_user).unwrap(); let expected_user = User_ { id: inserted_user.id, name: "thom".into(), + preferred_username: None, password_encrypted: "here".into(), email: None, icon: None, start_time: inserted_user.start_time }; - - let read_user = User_::read(&conn, inserted_user.id); - let num_deleted = User_::delete(&conn, inserted_user.id); + let read_user = User_::read(&conn, inserted_user.id); + let updated_user = User_::update(&conn, inserted_user.id, new_user); + let num_deleted = User_::delete(&conn, inserted_user.id); + assert_eq!(expected_user, read_user); assert_eq!(expected_user, inserted_user); + assert_eq!(expected_user, updated_user); assert_eq!(1, num_deleted); - } } diff --git a/server/src/activitypub.rs b/server/src/activitypub.rs deleted file mode 100644 index 3e6c46e4..00000000 --- a/server/src/activitypub.rs +++ /dev/null @@ -1,7 +0,0 @@ -extern crate activitypub; -extern crate failure; -extern crate serde_json; - -// fn user -> Result<(), Error> { - -// } diff --git a/server/src/lib.rs b/server/src/lib.rs index 77c8ee5e..e8a67c3d 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -2,16 +2,35 @@ extern crate diesel; extern crate dotenv; -use diesel::prelude::*; +use diesel::*; use diesel::pg::PgConnection; +use diesel::result::Error; use dotenv::dotenv; use std::env; pub mod schema; pub mod models; -pub mod activitypub; pub mod actions; +// pub trait Likeable; +pub trait Crud { + fn create(conn: &PgConnection, form: T) -> Result where Self: Sized; + fn read(conn: &PgConnection, id: i32) -> Self; + fn update(conn: &PgConnection, id: i32, form: T) -> Self; + fn delete(conn: &PgConnection, id: i32) -> usize; +} + +pub trait Followable { + fn follow(conn: &PgConnection, form: T) -> Result where Self: Sized; + fn ignore(conn: &PgConnection, form: T) -> usize; +} + +pub trait Joinable { + fn join(conn: &PgConnection, form: T) -> Result where Self: Sized; + fn leave(conn: &PgConnection, form: T) -> usize; +} + + pub fn establish_connection() -> PgConnection { dotenv().ok(); @@ -21,21 +40,3 @@ pub fn establish_connection() -> PgConnection { .expect(&format!("Error connecting to {}", database_url)) } -trait Crud { - fn read(conn: &PgConnection, id: i32) -> Self; - fn delete(conn: &PgConnection, id: i32) -> usize; - // fn create(conn: &PgConnection, item: T) -> Result where Self: Sized; -} - -#[cfg(test)] -mod tests { - #[test] - fn it_works() { - assert_eq!(2 + 2, 4); - } - - #[test] - fn db_fetch() { - - } -} diff --git a/server/src/models.rs b/server/src/models.rs index cb5eaef7..c895f3ea 100644 --- a/server/src/models.rs +++ b/server/src/models.rs @@ -1,19 +1,19 @@ -enum CommunityUserType { - CREATOR = 0, - MODERATOR = 1, - USER = 2 -} +// enum CommunityUserType { +// CREATOR = 0, +// MODERATOR = 1, +// USER = 2 +// } -impl CommunityUserType { - fn from_u32(value: u32) -> CommunityUserType { - match value { - 0 => CommunityUserType::CREATOR, - 1 => CommunityUserType::MODERATOR, - 2 => CommunityUserType::USER, - _ => panic!("Unknown value: {}", value), - } - } -} +// impl CommunityUserType { +// fn from_u32(value: u32) -> CommunityUserType { +// match value { +// 0 => CommunityUserType::CREATOR, +// 1 => CommunityUserType::MODERATOR, +// 2 => CommunityUserType::USER, +// _ => panic!("Unknown value: {}", value), +// } +// } +// } diff --git a/server/src/schema.rs b/server/src/schema.rs index a9f37009..cf90c047 100644 --- a/server/src/schema.rs +++ b/server/src/schema.rs @@ -2,17 +2,53 @@ table! { community (id) { id -> Int4, name -> Varchar, - starttime -> Timestamp, + start_time -> Timestamp, + } +} + +table! { + community_follower (id) { + id -> Int4, + community_id -> Int4, + fedi_user_id -> Text, + start_time -> Timestamp, } } table! { community_user (id) { id -> Int4, - fedi_user_id -> Varchar, - community_id -> Nullable, - community_user_type -> Int2, - starttime -> Timestamp, + community_id -> Int4, + fedi_user_id -> Text, + start_time -> Timestamp, + } +} + +table! { + post (id) { + id -> Int4, + name -> Varchar, + url -> Text, + attributed_to -> Text, + start_time -> Timestamp, + } +} + +table! { + post_dislike (id) { + id -> Int4, + fedi_user_id -> Text, + post_id -> Nullable, + start_time -> Timestamp, + } +} + +table! { + post_like (id) { + id -> Int4, + fedi_user_id -> Text, + post_id -> Nullable, + start_time -> Timestamp, } } @@ -20,17 +56,25 @@ table! { user_ (id) { id -> Int4, name -> Varchar, - password_encrypted -> Varchar, - email -> Nullable, + preferred_username -> Nullable, + password_encrypted -> Text, + email -> Nullable, icon -> Nullable, - starttime -> Timestamp, + start_time -> Timestamp, } } +joinable!(community_follower -> community (community_id)); joinable!(community_user -> community (community_id)); +joinable!(post_dislike -> post (post_id)); +joinable!(post_like -> post (post_id)); allow_tables_to_appear_in_same_query!( community, + community_follower, community_user, + post, + post_dislike, + post_like, user_, ); -- 2.40.1 From a62a7cb6a2f8b4b367bd565375e537bbf1aba406 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Mon, 4 Mar 2019 08:39:07 -0800 Subject: [PATCH 0020/2583] Adding User and Community types. --- API.md | 62 +++--- README.md | 4 + .../2019-02-26-002946_create_user/up.sql | 10 +- .../down.sql | 4 +- .../2019-02-27-170003_create_community/up.sql | 18 +- .../down.sql | 2 - .../up.sql | 10 - .../2019-03-03-163336_create_post/down.sql | 3 + .../2019-03-03-163336_create_post/up.sql | 22 ++ server/src/actions/community.rs | 197 ++++++++++++++++++ server/src/actions/mod.rs | 4 +- server/src/actions/post.rs | 95 +++++++++ server/src/actions/src/schema.rs | 80 +++++++ server/src/actions/user.rs | 69 ++++-- server/src/activitypub.rs | 7 - server/src/lib.rs | 41 ++-- server/src/models.rs | 30 +-- server/src/schema.rs | 60 +++++- 18 files changed, 597 insertions(+), 121 deletions(-) delete mode 100644 server/migrations/2019-02-27-170402_create_community_user/down.sql delete mode 100644 server/migrations/2019-02-27-170402_create_community_user/up.sql create mode 100644 server/migrations/2019-03-03-163336_create_post/down.sql create mode 100644 server/migrations/2019-03-03-163336_create_post/up.sql create mode 100644 server/src/actions/community.rs create mode 100644 server/src/actions/post.rs create mode 100644 server/src/actions/src/schema.rs delete mode 100644 server/src/activitypub.rs diff --git a/API.md b/API.md index 47c57ac4..8438cb9e 100644 --- a/API.md +++ b/API.md @@ -49,7 +49,13 @@ "@context": "https://www.w3.org/ns/activitystreams", "type": "Person", "id": "https://rust-reddit-fediverse/api/v1/user/sally_smith", - "name": "sally_smith", // TODO can't find an activitypub vocab for alias. + "inbox": "https://rust-reddit-fediverse/api/v1/user/sally_smith/inbox", + "outbox": "https://rust-reddit-fediverse/api/v1/user/sally_smith/outbox", + "liked": "https://rust-reddit-fediverse/api/v1/user/sally_smith/liked", + "disliked": "https://rust-reddit-fediverse/api/v1/user/sally_smith/disliked", + "following": "https://rust-reddit-fediverse/api/v1/user/sally_smith/following", + "name": "sally_smith", + "preferredUsername": "Sally", "icon"?: { "type": "Image", "name": "User icon", @@ -63,7 +69,6 @@ ``` ### [Community / Group](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-group) - ``` { "@context": "https://www.w3.org/ns/activitystreams", @@ -73,6 +78,7 @@ "attributedTo": [ // The moderators "http://joe.example.org", ], + "followers": "https://rust-reddit-fediverse/api/v1/community/today_i_learned/followers", "startTime": "2014-12-31T23:00:00-08:00", "summary"?: "The group's tagline", "attachment: [{}] // TBD, these would be where strong types for custom styles, and images would work. @@ -91,16 +97,13 @@ "url": "https://news.blah.com" "attributedTo": "http://joe.example.org", // The poster "startTime": "2014-12-31T23:00:00-08:00", - } ``` ### [Post Listings / Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage) - ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Page 1 of Sally's front page", "type": "OrderedCollectionPage", "id": "https://rust-reddit-fediverse/api/v1/posts?type={all, best, front}&sort={}&page=1, "partOf": "http://example.org/foo", @@ -125,11 +128,9 @@ } ``` ### [Comment Listings / Ordered CollectionPage](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollectionpage) - ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Page 1 of comments for", "type": "OrderedCollectionPage", "id": "https://rust-reddit-fediverse/api/v1/comments?type={all,user,community,post,parent_comment}&id=1&page=1, "partOf": "http://example.org/foo", @@ -147,13 +148,16 @@ ``` ## Actions +- These are all posts to a user's outbox. +- The server then creates a post to the necessary inbox of the recipient, or the followers. +- Whenever a user accesses the site, they do a get from their inbox. + ### Comments #### [Create](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-create) ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally created a note", "type": "Create", "actor": id, "object": comment_id, or post_id @@ -164,7 +168,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally deleted a note", "type": "Delete", "actor": id, "object": comment_id, or post_id @@ -174,7 +177,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally created a note", "type": "Create", "actor": id, "object": comment_id, or post_id @@ -186,7 +188,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally read a comment", "type": "Read", "actor": user_id "object": comment_id @@ -194,10 +195,10 @@ ``` #### [Like](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-like) +- TODO: Should likes be notifications? IE, have a to? ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally liked a comment", "type": "Like", "actor": user_id "object": comment_id @@ -208,7 +209,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally disliked a comment", "type": "Dislike", "actor": user_id "object": comment_id @@ -221,9 +221,9 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally created a post", "type": "Create", "actor": id, + "to": community_id/followers "object": post_id } ``` @@ -231,7 +231,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally deleted a post", "type": "Delete", "actor": id, "object": comment_id, or post_id @@ -242,7 +241,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally created a post", "type": "Create", "actor": id, "object": comment_id, or post_id @@ -253,7 +251,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally read a post", "type": "Read", "actor": user_id "object": post_id @@ -265,7 +262,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally created a community", "type": "Create", "actor": id, "object": community_id @@ -275,7 +271,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally deleted a community", "type": "Delete", "actor": id, "object": community_id @@ -286,7 +281,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally created a community", "type": "Create", "actor": id, "object": community_id @@ -294,11 +288,29 @@ } ``` -#### [Join](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-join) +#### [Follow / Subscribe](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-follow) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Follow", + "actor": id + "object": community_id +} +``` + +#### [Ignore/ Unsubscribe](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-ignore) +``` +{ + "@context": "https://www.w3.org/ns/activitystreams", + "type": "Follow", + "actor": id + "object": community_id +} +``` +#### [Join / Become a Mod](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-join) ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally joined a community", "type": "Join", "actor": user_id, "object": community_id @@ -309,7 +321,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally left a community", "type": "Leave", "actor": user_id, "object": community_id @@ -321,7 +332,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "The moderator blocked Sally from a group", "type": "Remove", "actor": mod_id, "object": user_id, @@ -333,7 +343,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally deleted a users comment", "type": "Delete", "actor": id, "object": community_id @@ -344,7 +353,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "Sally invited John to mod a community", "type": "Invite", "id": "https://rust-reddit-fediverse/api/v1/invite/1", "actor": sally_id, @@ -356,7 +364,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "John Accepted an invitation to mod a community", "type": "Accept", "actor": john_id, "object": invite_id @@ -366,7 +373,6 @@ ``` { "@context": "https://www.w3.org/ns/activitystreams", - "summary": "John Rejected an invitation to mod a community", "type": "Reject", "actor": john_id, "object": invite_id diff --git a/README.md b/README.md index 4802a905..9b61044a 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ We have a twitter alternative (mastodon), a facebook alternative (friendica), so - Must have communities. - Must have threaded comments. - Must be federated: liking and following communities across instances. +- Be live-updating: have a right pane for new comments, and a main pain for the full threaded view. + - Use websockets for post / gets to your own instance. ## Questions - How does voting work? Should we go back to the old way of showing up and downvote counts? Or just a score? @@ -25,5 +27,7 @@ We have a twitter alternative (mastodon), a facebook alternative (friendica), so - Use the [activitypub crate.](https://docs.rs/activitypub/0.1.4/activitypub/) - https://docs.rs/activitypub/0.1.4/activitypub/ - [Activitypub vocab.](https://www.w3.org/TR/activitystreams-vocabulary/) +- [Activitypub main](https://www.w3.org/TR/activitypub/) - [Diesel to Postgres data types](https://kotiri.com/2018/01/31/postgresql-diesel-rust-types.html) - [helpful diesel examples](http://siciarz.net/24-days-rust-diesel/) +- [Mastodan public key server example](https://blog.joinmastodon.org/2018/06/how-to-implement-a-basic-activitypub-server/) diff --git a/server/migrations/2019-02-26-002946_create_user/up.sql b/server/migrations/2019-02-26-002946_create_user/up.sql index 4f9984b7..a4ba1e88 100644 --- a/server/migrations/2019-02-26-002946_create_user/up.sql +++ b/server/migrations/2019-02-26-002946_create_user/up.sql @@ -1,8 +1,10 @@ create table user_ ( id serial primary key, name varchar(20) not null, - password_encrypted varchar(200) not null, - email varchar(200), + preferred_username varchar(20), + password_encrypted text not null, + email text, icon bytea, - startTime timestamp not null default now() -) + start_time timestamp not null default now() +); + diff --git a/server/migrations/2019-02-27-170003_create_community/down.sql b/server/migrations/2019-02-27-170003_create_community/down.sql index 5e751d43..5e6065f8 100644 --- a/server/migrations/2019-02-27-170003_create_community/down.sql +++ b/server/migrations/2019-02-27-170003_create_community/down.sql @@ -1 +1,3 @@ -drop table community +drop table community_user; +drop table community_follower; +drop table community; diff --git a/server/migrations/2019-02-27-170003_create_community/up.sql b/server/migrations/2019-02-27-170003_create_community/up.sql index c5eafc7b..692a5f06 100644 --- a/server/migrations/2019-02-27-170003_create_community/up.sql +++ b/server/migrations/2019-02-27-170003_create_community/up.sql @@ -1,5 +1,19 @@ create table community ( id serial primary key, name varchar(20) not null, - starttime timestamp not null default now() -) + start_time timestamp not null default now() +); + +create table community_user ( + id serial primary key, + community_id int references community on update cascade on delete cascade not null, + fedi_user_id text not null, + start_time timestamp not null default now() +); + +create table community_follower ( + id serial primary key, + community_id int references community on update cascade on delete cascade not null, + fedi_user_id text not null, + start_time timestamp not null default now() +); diff --git a/server/migrations/2019-02-27-170402_create_community_user/down.sql b/server/migrations/2019-02-27-170402_create_community_user/down.sql deleted file mode 100644 index a1571c72..00000000 --- a/server/migrations/2019-02-27-170402_create_community_user/down.sql +++ /dev/null @@ -1,2 +0,0 @@ -drop table community_user; --- drop type community_user_type; diff --git a/server/migrations/2019-02-27-170402_create_community_user/up.sql b/server/migrations/2019-02-27-170402_create_community_user/up.sql deleted file mode 100644 index f60eea46..00000000 --- a/server/migrations/2019-02-27-170402_create_community_user/up.sql +++ /dev/null @@ -1,10 +0,0 @@ --- No support for types yet, so just do 0,1,2 --- create type community_user_type as enum ('creator', 'moderator', 'user'); - -create table community_user ( - id serial primary key, - fedi_user_id varchar(100) not null, - community_id int references community on update cascade on delete cascade, - community_user_type smallint not null default 2, - starttime timestamp not null default now() -) diff --git a/server/migrations/2019-03-03-163336_create_post/down.sql b/server/migrations/2019-03-03-163336_create_post/down.sql new file mode 100644 index 00000000..a5783965 --- /dev/null +++ b/server/migrations/2019-03-03-163336_create_post/down.sql @@ -0,0 +1,3 @@ +drop table post_like; +drop table post_dislike; +drop table post; diff --git a/server/migrations/2019-03-03-163336_create_post/up.sql b/server/migrations/2019-03-03-163336_create_post/up.sql new file mode 100644 index 00000000..4a811fa2 --- /dev/null +++ b/server/migrations/2019-03-03-163336_create_post/up.sql @@ -0,0 +1,22 @@ +create table post ( + id serial primary key, + name varchar(100) not null, + url text not null, + attributed_to text not null, + start_time timestamp not null default now() +); + +create table post_like ( + id serial primary key, + fedi_user_id text not null, + post_id int references post on update cascade on delete cascade, + start_time timestamp not null default now() +); + +create table post_dislike ( + id serial primary key, + fedi_user_id text not null, + post_id int references post on update cascade on delete cascade, + start_time timestamp not null default now() +); + diff --git a/server/src/actions/community.rs b/server/src/actions/community.rs new file mode 100644 index 00000000..6b0bea8d --- /dev/null +++ b/server/src/actions/community.rs @@ -0,0 +1,197 @@ +extern crate diesel; +use schema::{community, community_user, community_follower}; +use diesel::*; +use diesel::result::Error; +use {Crud, Followable, Joinable}; + +#[derive(Queryable, Identifiable, PartialEq, Debug)] +#[table_name="community"] +pub struct Community { + pub id: i32, + pub name: String, + pub start_time: chrono::NaiveDateTime +} + +#[derive(Insertable, AsChangeset, Clone, Copy)] +#[table_name="community"] +pub struct CommunityForm<'a> { + pub name: &'a str, +} + +#[derive(Identifiable, Queryable, Associations, PartialEq, Debug)] +#[belongs_to(Community)] +#[table_name = "community_user"] +pub struct CommunityUser { + pub id: i32, + pub community_id: i32, + pub fedi_user_id: String, + pub start_time: chrono::NaiveDateTime +} + +#[derive(Insertable, AsChangeset, Clone, Copy)] +#[table_name="community_user"] +pub struct CommunityUserForm<'a> { + pub community_id: &'a i32, + pub fedi_user_id: &'a str, +} + +#[derive(Identifiable, Queryable, Associations, PartialEq, Debug)] +#[belongs_to(Community)] +#[table_name = "community_follower"] +pub struct CommunityFollower { + pub id: i32, + pub community_id: i32, + pub fedi_user_id: String, + pub start_time: chrono::NaiveDateTime +} + +#[derive(Insertable, AsChangeset, Clone, Copy)] +#[table_name="community_follower"] +pub struct CommunityFollowerForm<'a> { + pub community_id: &'a i32, + pub fedi_user_id: &'a str, +} + + +impl<'a> Crud> for Community { + fn read(conn: &PgConnection, community_id: i32) -> Community { + use schema::community::dsl::*; + community.find(community_id) + .first::(conn) + .expect("Error in query") + } + + fn delete(conn: &PgConnection, community_id: i32) -> usize { + use schema::community::dsl::*; + diesel::delete(community.find(community_id)) + .execute(conn) + .expect("Error deleting.") + } + + fn create(conn: &PgConnection, new_community: CommunityForm) -> Result { + use schema::community::dsl::*; + insert_into(community) + .values(new_community) + .get_result::(conn) + } + + fn update(conn: &PgConnection, community_id: i32, new_community: CommunityForm) -> Community { + use schema::community::dsl::*; + diesel::update(community.find(community_id)) + .set(new_community) + .get_result::(conn) + .expect(&format!("Unable to find {}", community_id)) + } +} + +impl<'a> Followable> for CommunityFollower { + fn follow(conn: &PgConnection, community_follower_form: CommunityFollowerForm) -> Result { + use schema::community_follower::dsl::*; + insert_into(community_follower) + .values(community_follower_form) + .get_result::(conn) + } + fn ignore(conn: &PgConnection, community_follower_form: CommunityFollowerForm) -> usize { + use schema::community_follower::dsl::*; + diesel::delete(community_follower + .filter(community_id.eq(community_follower_form.community_id)) + .filter(fedi_user_id.eq(community_follower_form.fedi_user_id))) + .execute(conn) + .expect("Error deleting.") + } +} + +impl<'a> Joinable> for CommunityUser { + fn join(conn: &PgConnection, community_user_form: CommunityUserForm) -> Result { + use schema::community_user::dsl::*; + insert_into(community_user) + .values(community_user_form) + .get_result::(conn) + } + fn leave(conn: &PgConnection, community_user_form: CommunityUserForm) -> usize { + use schema::community_user::dsl::*; + diesel::delete(community_user + .filter(community_id.eq(community_user_form.community_id)) + .filter(fedi_user_id.eq(community_user_form.fedi_user_id))) + .execute(conn) + .expect("Error deleting.") + } +} + +#[cfg(test)] +mod tests { + use establish_connection; + use super::*; + use actions::user::*; + use Crud; + #[test] + fn test_crud() { + let conn = establish_connection(); + + let new_community = CommunityForm { + name: "TIL".into(), + }; + + let inserted_community = Community::create(&conn, new_community).unwrap(); + + let expected_community = Community { + id: inserted_community.id, + name: "TIL".into(), + start_time: inserted_community.start_time + }; + + let new_user = UserForm { + name: "thom".into(), + preferred_username: None, + password_encrypted: "nope".into(), + email: None + }; + + let inserted_user = User_::create(&conn, new_user).unwrap(); + + let community_follower_form = CommunityFollowerForm { + community_id: &inserted_community.id, + fedi_user_id: "test".into() + }; + + let inserted_community_follower = CommunityFollower::follow(&conn, community_follower_form).unwrap(); + + let expected_community_follower = CommunityFollower { + id: inserted_community_follower.id, + community_id: inserted_community.id, + fedi_user_id: "test".into(), + start_time: inserted_community_follower.start_time + }; + + let community_user_form = CommunityUserForm { + community_id: &inserted_community.id, + fedi_user_id: "test".into() + }; + + let inserted_community_user = CommunityUser::join(&conn, community_user_form).unwrap(); + + let expected_community_user = CommunityUser { + id: inserted_community_user.id, + community_id: inserted_community.id, + fedi_user_id: "test".into(), + start_time: inserted_community_user.start_time + }; + + let read_community = Community::read(&conn, inserted_community.id); + let updated_community = Community::update(&conn, inserted_community.id, new_community); + let ignored_community = CommunityFollower::ignore(&conn, community_follower_form); + let left_community = CommunityUser::leave(&conn, community_user_form); + let num_deleted = Community::delete(&conn, inserted_community.id); + User_::delete(&conn, inserted_user.id); + + assert_eq!(expected_community, read_community); + assert_eq!(expected_community, inserted_community); + assert_eq!(expected_community, updated_community); + assert_eq!(expected_community_follower, inserted_community_follower); + assert_eq!(expected_community_user, inserted_community_user); + assert_eq!(1, ignored_community); + assert_eq!(1, left_community); + assert_eq!(1, num_deleted); + + } +} diff --git a/server/src/actions/mod.rs b/server/src/actions/mod.rs index bc675369..df10dbbc 100644 --- a/server/src/actions/mod.rs +++ b/server/src/actions/mod.rs @@ -1,3 +1,3 @@ -use diesel::*; pub mod user; - +pub mod community; +pub mod post; diff --git a/server/src/actions/post.rs b/server/src/actions/post.rs new file mode 100644 index 00000000..f939fc7c --- /dev/null +++ b/server/src/actions/post.rs @@ -0,0 +1,95 @@ +extern crate diesel; +use schema::user_; +use diesel::*; +use diesel::result::Error; +use schema::user_::dsl::*; + +#[derive(Queryable, PartialEq, Debug)] +pub struct User_ { + pub id: i32, + pub name: String, + pub preferred_username: Option, + pub password_encrypted: String, + pub email: Option, + pub icon: Option>, + pub start_time: chrono::NaiveDateTime +} + +#[derive(Insertable, AsChangeset, Clone, Copy)] +#[table_name="user_"] +pub struct NewUser<'a> { + pub name: &'a str, + pub preferred_username: Option<&'a str>, + pub password_encrypted: &'a str, + pub email: Option<&'a str>, +} + +pub fn read(conn: &PgConnection, user_id: i32) -> User_ { + user_.find(user_id) + .first::(conn) + .expect("Error in query") +} + +pub fn delete(conn: &PgConnection, user_id: i32) -> usize { + diesel::delete(user_.find(user_id)) + .execute(conn) + .expect("Error deleting.") +} + +pub fn create(conn: &PgConnection, new_user: &NewUser) -> Result { + let mut edited_user = new_user.clone(); + // Add the rust crypt + edited_user.password_encrypted = "here"; + // edited_user.password_encrypted; + insert_into(user_) + .values(edited_user) + .get_result::(conn) +} + +pub fn update(conn: &PgConnection, user_id: i32, new_user: &NewUser) -> User_ { + let mut edited_user = new_user.clone(); + edited_user.password_encrypted = "here"; + diesel::update(user_.find(user_id)) + .set(edited_user) + .get_result::(conn) + .expect(&format!("Unable to find user {}", user_id)) +} + +#[cfg(test)] +mod tests { + use establish_connection; + use super::*; + #[test] + fn test_crud() { + let conn = establish_connection(); + + let new_user = NewUser { + name: "thom".into(), + preferred_username: None, + password_encrypted: "nope".into(), + email: None + }; + + let inserted_user = create(&conn, &new_user).unwrap(); + + let expected_user = User_ { + id: inserted_user.id, + name: "thom".into(), + preferred_username: None, + password_encrypted: "here".into(), + email: None, + icon: None, + start_time: inserted_user.start_time + }; + + let read_user = read(&conn, inserted_user.id); + let updated_user = update(&conn, inserted_user.id, &new_user); + let num_deleted = delete(&conn, inserted_user.id); + + assert_eq!(expected_user, read_user); + assert_eq!(expected_user, inserted_user); + assert_eq!(expected_user, updated_user); + assert_eq!(1, num_deleted); + + } +} diff --git a/server/src/actions/src/schema.rs b/server/src/actions/src/schema.rs new file mode 100644 index 00000000..580b82e7 --- /dev/null +++ b/server/src/actions/src/schema.rs @@ -0,0 +1,80 @@ +table! { + community (id) { + id -> Int4, + name -> Varchar, + start_time -> Timestamp, + } +} + +table! { + community_follower (id) { + id -> Int4, + fedi_user_id -> Text, + community_id -> Nullable, + start_time -> Timestamp, + } +} + +table! { + community_user (id) { + id -> Int4, + fedi_user_id -> Text, + community_id -> Nullable, + start_time -> Timestamp, + } +} + +table! { + post (id) { + id -> Int4, + name -> Varchar, + url -> Text, + attributed_to -> Text, + start_time -> Timestamp, + } +} + +table! { + post_dislike (id) { + id -> Int4, + fedi_user_id -> Text, + post_id -> Nullable, + start_time -> Timestamp, + } +} + +table! { + post_like (id) { + id -> Int4, + fedi_user_id -> Text, + post_id -> Nullable, + start_time -> Timestamp, + } +} + +table! { + user_ (id) { + id -> Int4, + name -> Varchar, + preferred_username -> Nullable, + password_encrypted -> Text, + email -> Nullable, + icon -> Nullable, + start_time -> Timestamp, + } +} + +joinable!(community_follower -> community (community_id)); +joinable!(community_user -> community (community_id)); +joinable!(post_dislike -> post (post_id)); +joinable!(post_like -> post (post_id)); + +allow_tables_to_appear_in_same_query!( + community, + community_follower, + community_user, + post, + post_dislike, + post_like, + user_, +); diff --git a/server/src/actions/user.rs b/server/src/actions/user.rs index 2a017fd2..36222f83 100644 --- a/server/src/actions/user.rs +++ b/server/src/actions/user.rs @@ -1,83 +1,108 @@ extern crate diesel; +extern crate activitypub; use schema::user_; use diesel::*; use diesel::result::Error; use schema::user_::dsl::*; +// use self::activitypub::{context, actor::Person}; use Crud; -#[derive(Queryable, PartialEq, Debug)] +#[derive(Queryable, Identifiable, PartialEq, Debug)] +#[table_name="user_"] pub struct User_ { pub id: i32, pub name: String, + pub preferred_username: Option, pub password_encrypted: String, pub email: Option, pub icon: Option>, pub start_time: chrono::NaiveDateTime } -#[derive(Insertable)] +#[derive(Insertable, AsChangeset, Clone, Copy)] #[table_name="user_"] -pub struct NewUser<'a> { +pub struct UserForm<'a> { pub name: &'a str, + pub preferred_username: Option<&'a str>, pub password_encrypted: &'a str, pub email: Option<&'a str>, } -impl Crud for User_ { +impl<'a> Crud> for User_ { fn read(conn: &PgConnection, user_id: i32) -> User_ { user_.find(user_id) .first::(conn) .expect("Error in query") } - - fn delete(conn: &PgConnection, user_id: i32) -> usize { + fn delete(conn: &PgConnection, user_id: i32) -> usize { diesel::delete(user_.find(user_id)) .execute(conn) .expect("Error deleting.") } - -// fn create(conn: &PgConnection, mut new_user: NewUser) -> Result { + fn create(conn: &PgConnection, form: UserForm) -> Result { + let mut edited_user = form.clone(); + // Add the rust crypt + edited_user.password_encrypted = "here"; + // edited_user.password_encrypted; + insert_into(user_) + .values(edited_user) + .get_result::(conn) + } + fn update(conn: &PgConnection, user_id: i32, form: UserForm) -> User_ { + let mut edited_user = form.clone(); + edited_user.password_encrypted = "here"; + diesel::update(user_.find(user_id)) + .set(edited_user) + .get_result::(conn) + .expect(&format!("Unable to find user {}", user_id)) + } } -pub fn create(conn: &PgConnection, mut new_user: NewUser) -> Result { - new_user.password_encrypted = "here"; - // new_user.password_encrypted; - insert_into(user_) - .values(new_user) - .get_result(conn) -} + +// TODO +// pub fn person(user: &User_) -> Person { +// let mut person = Person::default(); +// person.object_props.set_context_object(context()); +// person.ap_actor_props.set_preferred_username_string("set".into()); + +// person +// } #[cfg(test)] mod tests { use establish_connection; - use super::*; + use super::{User_, UserForm}; + use Crud; #[test] fn test_crud() { let conn = establish_connection(); - let new_user = NewUser { + let new_user = UserForm { name: "thom".into(), + preferred_username: None, password_encrypted: "nope".into(), email: None }; - let inserted_user = create(&conn, new_user).unwrap(); + let inserted_user = User_::create(&conn, new_user).unwrap(); let expected_user = User_ { id: inserted_user.id, name: "thom".into(), + preferred_username: None, password_encrypted: "here".into(), email: None, icon: None, start_time: inserted_user.start_time }; - - let read_user = User_::read(&conn, inserted_user.id); - let num_deleted = User_::delete(&conn, inserted_user.id); + let read_user = User_::read(&conn, inserted_user.id); + let updated_user = User_::update(&conn, inserted_user.id, new_user); + let num_deleted = User_::delete(&conn, inserted_user.id); + assert_eq!(expected_user, read_user); assert_eq!(expected_user, inserted_user); + assert_eq!(expected_user, updated_user); assert_eq!(1, num_deleted); - } } diff --git a/server/src/activitypub.rs b/server/src/activitypub.rs deleted file mode 100644 index 3e6c46e4..00000000 --- a/server/src/activitypub.rs +++ /dev/null @@ -1,7 +0,0 @@ -extern crate activitypub; -extern crate failure; -extern crate serde_json; - -// fn user -> Result<(), Error> { - -// } diff --git a/server/src/lib.rs b/server/src/lib.rs index 77c8ee5e..e8a67c3d 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -2,16 +2,35 @@ extern crate diesel; extern crate dotenv; -use diesel::prelude::*; +use diesel::*; use diesel::pg::PgConnection; +use diesel::result::Error; use dotenv::dotenv; use std::env; pub mod schema; pub mod models; -pub mod activitypub; pub mod actions; +// pub trait Likeable; +pub trait Crud { + fn create(conn: &PgConnection, form: T) -> Result where Self: Sized; + fn read(conn: &PgConnection, id: i32) -> Self; + fn update(conn: &PgConnection, id: i32, form: T) -> Self; + fn delete(conn: &PgConnection, id: i32) -> usize; +} + +pub trait Followable { + fn follow(conn: &PgConnection, form: T) -> Result where Self: Sized; + fn ignore(conn: &PgConnection, form: T) -> usize; +} + +pub trait Joinable { + fn join(conn: &PgConnection, form: T) -> Result where Self: Sized; + fn leave(conn: &PgConnection, form: T) -> usize; +} + + pub fn establish_connection() -> PgConnection { dotenv().ok(); @@ -21,21 +40,3 @@ pub fn establish_connection() -> PgConnection { .expect(&format!("Error connecting to {}", database_url)) } -trait Crud { - fn read(conn: &PgConnection, id: i32) -> Self; - fn delete(conn: &PgConnection, id: i32) -> usize; - // fn create(conn: &PgConnection, item: T) -> Result where Self: Sized; -} - -#[cfg(test)] -mod tests { - #[test] - fn it_works() { - assert_eq!(2 + 2, 4); - } - - #[test] - fn db_fetch() { - - } -} diff --git a/server/src/models.rs b/server/src/models.rs index cb5eaef7..c895f3ea 100644 --- a/server/src/models.rs +++ b/server/src/models.rs @@ -1,19 +1,19 @@ -enum CommunityUserType { - CREATOR = 0, - MODERATOR = 1, - USER = 2 -} +// enum CommunityUserType { +// CREATOR = 0, +// MODERATOR = 1, +// USER = 2 +// } -impl CommunityUserType { - fn from_u32(value: u32) -> CommunityUserType { - match value { - 0 => CommunityUserType::CREATOR, - 1 => CommunityUserType::MODERATOR, - 2 => CommunityUserType::USER, - _ => panic!("Unknown value: {}", value), - } - } -} +// impl CommunityUserType { +// fn from_u32(value: u32) -> CommunityUserType { +// match value { +// 0 => CommunityUserType::CREATOR, +// 1 => CommunityUserType::MODERATOR, +// 2 => CommunityUserType::USER, +// _ => panic!("Unknown value: {}", value), +// } +// } +// } diff --git a/server/src/schema.rs b/server/src/schema.rs index a9f37009..cf90c047 100644 --- a/server/src/schema.rs +++ b/server/src/schema.rs @@ -2,17 +2,53 @@ table! { community (id) { id -> Int4, name -> Varchar, - starttime -> Timestamp, + start_time -> Timestamp, + } +} + +table! { + community_follower (id) { + id -> Int4, + community_id -> Int4, + fedi_user_id -> Text, + start_time -> Timestamp, } } table! { community_user (id) { id -> Int4, - fedi_user_id -> Varchar, - community_id -> Nullable, - community_user_type -> Int2, - starttime -> Timestamp, + community_id -> Int4, + fedi_user_id -> Text, + start_time -> Timestamp, + } +} + +table! { + post (id) { + id -> Int4, + name -> Varchar, + url -> Text, + attributed_to -> Text, + start_time -> Timestamp, + } +} + +table! { + post_dislike (id) { + id -> Int4, + fedi_user_id -> Text, + post_id -> Nullable, + start_time -> Timestamp, + } +} + +table! { + post_like (id) { + id -> Int4, + fedi_user_id -> Text, + post_id -> Nullable, + start_time -> Timestamp, } } @@ -20,17 +56,25 @@ table! { user_ (id) { id -> Int4, name -> Varchar, - password_encrypted -> Varchar, - email -> Nullable, + preferred_username -> Nullable, + password_encrypted -> Text, + email -> Nullable, icon -> Nullable, - starttime -> Timestamp, + start_time -> Timestamp, } } +joinable!(community_follower -> community (community_id)); joinable!(community_user -> community (community_id)); +joinable!(post_dislike -> post (post_id)); +joinable!(post_like -> post (post_id)); allow_tables_to_appear_in_same_query!( community, + community_follower, community_user, + post, + post_dislike, + post_like, user_, ); -- 2.40.1 From e8a96999b6c31e56d802dd8bb6a32b3c5b8a14da Mon Sep 17 00:00:00 2001 From: Dessalines Date: Mon, 4 Mar 2019 19:52:09 -0800 Subject: [PATCH 0021/2583] Adding and activitypub output for user. --- API.md | 1 - .../2019-02-26-002946_create_user/up.sql | 6 +- .../2019-02-27-170003_create_community/up.sql | 7 +- .../2019-03-03-163336_create_post/up.sql | 7 +- server/src/actions/community.rs | 21 ++-- server/src/actions/post.rs | 95 ------------------- server/src/actions/user.rs | 22 ++--- server/src/apub.rs | 59 ++++++++++++ server/src/lib.rs | 49 ++++++++-- server/src/models.rs | 19 ---- server/src/schema.rs | 17 ++-- 11 files changed, 141 insertions(+), 162 deletions(-) create mode 100644 server/src/apub.rs delete mode 100644 server/src/models.rs diff --git a/API.md b/API.md index 8438cb9e..fb233542 100644 --- a/API.md +++ b/API.md @@ -52,7 +52,6 @@ "inbox": "https://rust-reddit-fediverse/api/v1/user/sally_smith/inbox", "outbox": "https://rust-reddit-fediverse/api/v1/user/sally_smith/outbox", "liked": "https://rust-reddit-fediverse/api/v1/user/sally_smith/liked", - "disliked": "https://rust-reddit-fediverse/api/v1/user/sally_smith/disliked", "following": "https://rust-reddit-fediverse/api/v1/user/sally_smith/following", "name": "sally_smith", "preferredUsername": "Sally", diff --git a/server/migrations/2019-02-26-002946_create_user/up.sql b/server/migrations/2019-02-26-002946_create_user/up.sql index a4ba1e88..577ff136 100644 --- a/server/migrations/2019-02-26-002946_create_user/up.sql +++ b/server/migrations/2019-02-26-002946_create_user/up.sql @@ -5,6 +5,6 @@ create table user_ ( password_encrypted text not null, email text, icon bytea, - start_time timestamp not null default now() -); - + published timestamp not null default now(), + updated timestamp +) diff --git a/server/migrations/2019-02-27-170003_create_community/up.sql b/server/migrations/2019-02-27-170003_create_community/up.sql index 692a5f06..30deec5b 100644 --- a/server/migrations/2019-02-27-170003_create_community/up.sql +++ b/server/migrations/2019-02-27-170003_create_community/up.sql @@ -1,19 +1,20 @@ create table community ( id serial primary key, name varchar(20) not null, - start_time timestamp not null default now() + published timestamp not null default now(), + updated timestamp ); create table community_user ( id serial primary key, community_id int references community on update cascade on delete cascade not null, fedi_user_id text not null, - start_time timestamp not null default now() + published timestamp not null default now() ); create table community_follower ( id serial primary key, community_id int references community on update cascade on delete cascade not null, fedi_user_id text not null, - start_time timestamp not null default now() + published timestamp not null default now() ); diff --git a/server/migrations/2019-03-03-163336_create_post/up.sql b/server/migrations/2019-03-03-163336_create_post/up.sql index 4a811fa2..16ef545e 100644 --- a/server/migrations/2019-03-03-163336_create_post/up.sql +++ b/server/migrations/2019-03-03-163336_create_post/up.sql @@ -3,20 +3,21 @@ create table post ( name varchar(100) not null, url text not null, attributed_to text not null, - start_time timestamp not null default now() + published timestamp not null default now(), + updated timestamp ); create table post_like ( id serial primary key, fedi_user_id text not null, post_id int references post on update cascade on delete cascade, - start_time timestamp not null default now() + published timestamp not null default now() ); create table post_dislike ( id serial primary key, fedi_user_id text not null, post_id int references post on update cascade on delete cascade, - start_time timestamp not null default now() + published timestamp not null default now() ); diff --git a/server/src/actions/community.rs b/server/src/actions/community.rs index 6b0bea8d..03490369 100644 --- a/server/src/actions/community.rs +++ b/server/src/actions/community.rs @@ -9,13 +9,15 @@ use {Crud, Followable, Joinable}; pub struct Community { pub id: i32, pub name: String, - pub start_time: chrono::NaiveDateTime + pub published: chrono::NaiveDateTime, + pub updated: Option } #[derive(Insertable, AsChangeset, Clone, Copy)] #[table_name="community"] pub struct CommunityForm<'a> { - pub name: &'a str, + pub name: &'a str, + pub updated: Option<&'a chrono::NaiveDateTime> } #[derive(Identifiable, Queryable, Associations, PartialEq, Debug)] @@ -25,7 +27,7 @@ pub struct CommunityUser { pub id: i32, pub community_id: i32, pub fedi_user_id: String, - pub start_time: chrono::NaiveDateTime + pub published: chrono::NaiveDateTime, } #[derive(Insertable, AsChangeset, Clone, Copy)] @@ -42,7 +44,7 @@ pub struct CommunityFollower { pub id: i32, pub community_id: i32, pub fedi_user_id: String, - pub start_time: chrono::NaiveDateTime + pub published: chrono::NaiveDateTime, } #[derive(Insertable, AsChangeset, Clone, Copy)] @@ -130,6 +132,7 @@ mod tests { let new_community = CommunityForm { name: "TIL".into(), + updated: None }; let inserted_community = Community::create(&conn, new_community).unwrap(); @@ -137,14 +140,16 @@ mod tests { let expected_community = Community { id: inserted_community.id, name: "TIL".into(), - start_time: inserted_community.start_time + published: inserted_community.published, + updated: None }; let new_user = UserForm { name: "thom".into(), preferred_username: None, password_encrypted: "nope".into(), - email: None + email: None, + updated: None }; let inserted_user = User_::create(&conn, new_user).unwrap(); @@ -160,7 +165,7 @@ mod tests { id: inserted_community_follower.id, community_id: inserted_community.id, fedi_user_id: "test".into(), - start_time: inserted_community_follower.start_time + published: inserted_community_follower.published }; let community_user_form = CommunityUserForm { @@ -174,7 +179,7 @@ mod tests { id: inserted_community_user.id, community_id: inserted_community.id, fedi_user_id: "test".into(), - start_time: inserted_community_user.start_time + published: inserted_community_user.published }; let read_community = Community::read(&conn, inserted_community.id); diff --git a/server/src/actions/post.rs b/server/src/actions/post.rs index f939fc7c..e69de29b 100644 --- a/server/src/actions/post.rs +++ b/server/src/actions/post.rs @@ -1,95 +0,0 @@ -extern crate diesel; -use schema::user_; -use diesel::*; -use diesel::result::Error; -use schema::user_::dsl::*; - -#[derive(Queryable, PartialEq, Debug)] -pub struct User_ { - pub id: i32, - pub name: String, - pub preferred_username: Option, - pub password_encrypted: String, - pub email: Option, - pub icon: Option>, - pub start_time: chrono::NaiveDateTime -} - -#[derive(Insertable, AsChangeset, Clone, Copy)] -#[table_name="user_"] -pub struct NewUser<'a> { - pub name: &'a str, - pub preferred_username: Option<&'a str>, - pub password_encrypted: &'a str, - pub email: Option<&'a str>, -} - -pub fn read(conn: &PgConnection, user_id: i32) -> User_ { - user_.find(user_id) - .first::(conn) - .expect("Error in query") -} - -pub fn delete(conn: &PgConnection, user_id: i32) -> usize { - diesel::delete(user_.find(user_id)) - .execute(conn) - .expect("Error deleting.") -} - -pub fn create(conn: &PgConnection, new_user: &NewUser) -> Result { - let mut edited_user = new_user.clone(); - // Add the rust crypt - edited_user.password_encrypted = "here"; - // edited_user.password_encrypted; - insert_into(user_) - .values(edited_user) - .get_result::(conn) -} - -pub fn update(conn: &PgConnection, user_id: i32, new_user: &NewUser) -> User_ { - let mut edited_user = new_user.clone(); - edited_user.password_encrypted = "here"; - diesel::update(user_.find(user_id)) - .set(edited_user) - .get_result::(conn) - .expect(&format!("Unable to find user {}", user_id)) -} - -#[cfg(test)] -mod tests { - use establish_connection; - use super::*; - #[test] - fn test_crud() { - let conn = establish_connection(); - - let new_user = NewUser { - name: "thom".into(), - preferred_username: None, - password_encrypted: "nope".into(), - email: None - }; - - let inserted_user = create(&conn, &new_user).unwrap(); - - let expected_user = User_ { - id: inserted_user.id, - name: "thom".into(), - preferred_username: None, - password_encrypted: "here".into(), - email: None, - icon: None, - start_time: inserted_user.start_time - }; - - let read_user = read(&conn, inserted_user.id); - let updated_user = update(&conn, inserted_user.id, &new_user); - let num_deleted = delete(&conn, inserted_user.id); - - assert_eq!(expected_user, read_user); - assert_eq!(expected_user, inserted_user); - assert_eq!(expected_user, updated_user); - assert_eq!(1, num_deleted); - - } -} diff --git a/server/src/actions/user.rs b/server/src/actions/user.rs index 36222f83..8556525f 100644 --- a/server/src/actions/user.rs +++ b/server/src/actions/user.rs @@ -1,10 +1,8 @@ extern crate diesel; -extern crate activitypub; use schema::user_; use diesel::*; use diesel::result::Error; use schema::user_::dsl::*; -// use self::activitypub::{context, actor::Person}; use Crud; #[derive(Queryable, Identifiable, PartialEq, Debug)] @@ -16,7 +14,8 @@ pub struct User_ { pub password_encrypted: String, pub email: Option, pub icon: Option>, - pub start_time: chrono::NaiveDateTime + pub published: chrono::NaiveDateTime, + pub updated: Option } #[derive(Insertable, AsChangeset, Clone, Copy)] @@ -26,6 +25,7 @@ pub struct UserForm<'a> { pub preferred_username: Option<&'a str>, pub password_encrypted: &'a str, pub email: Option<&'a str>, + pub updated: Option<&'a chrono::NaiveDateTime> } impl<'a> Crud> for User_ { @@ -58,16 +58,6 @@ impl<'a> Crud> for User_ { } } - -// TODO -// pub fn person(user: &User_) -> Person { -// let mut person = Person::default(); -// person.object_props.set_context_object(context()); -// person.ap_actor_props.set_preferred_username_string("set".into()); - -// person -// } - #[cfg(test)] mod tests { use establish_connection; @@ -81,7 +71,8 @@ mod tests { name: "thom".into(), preferred_username: None, password_encrypted: "nope".into(), - email: None + email: None, + updated: None }; let inserted_user = User_::create(&conn, new_user).unwrap(); @@ -93,7 +84,8 @@ mod tests { password_encrypted: "here".into(), email: None, icon: None, - start_time: inserted_user.start_time + published: inserted_user.published, + updated: None }; let read_user = User_::read(&conn, inserted_user.id); diff --git a/server/src/apub.rs b/server/src/apub.rs new file mode 100644 index 00000000..4cfd1088 --- /dev/null +++ b/server/src/apub.rs @@ -0,0 +1,59 @@ +extern crate activitypub; +use self::activitypub::{context, actor::Person}; +use actions::user::User_; + +impl User_ { + pub fn person(&self) -> Person { + use {Settings, to_datetime_utc}; + let base_url = &format!("{}/user/{}", Settings::get().api_endpoint(), self.name); + let mut person = Person::default(); + person.object_props.set_context_object(context()).ok(); + person.object_props.set_id_string(base_url.to_string()).ok(); + person.object_props.set_name_string(self.name.to_owned()).ok(); + person.object_props.set_published_utctime(to_datetime_utc(self.published)).ok(); + if let Some(i) = self.updated { + person.object_props.set_updated_utctime(to_datetime_utc(i)).ok(); + } + // person.object_props.summary = self.summary; + + person.ap_actor_props.set_inbox_string(format!("{}/inbox", &base_url)).ok(); + person.ap_actor_props.set_outbox_string(format!("{}/outbox", &base_url)).ok(); + person.ap_actor_props.set_following_string(format!("{}/following", &base_url)).ok(); + person.ap_actor_props.set_liked_string(format!("{}/liked", &base_url)).ok(); + if let Some(i) = &self.preferred_username { + person.ap_actor_props.set_preferred_username_string(i.to_string()).ok(); + } + + person + } +} + +#[cfg(test)] +mod tests { + use super::activitypub::{context, actor::Person}; + use super::User_; + use naive_now; + + #[test] + fn test_person() { + let expected_user = User_ { + id: 52, + name: "thom".into(), + preferred_username: None, + password_encrypted: "here".into(), + email: None, + icon: None, + published: naive_now(), + updated: None + }; + + let person = expected_user.person(); + + // let expected_person = Person { + // }; + + assert_eq!("http://0.0.0.0/api/v1/user/thom", person.object_props.id_string().unwrap()); + + } +} + diff --git a/server/src/lib.rs b/server/src/lib.rs index e8a67c3d..e7898971 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -1,6 +1,7 @@ #[macro_use] extern crate diesel; extern crate dotenv; +extern crate chrono; use diesel::*; use diesel::pg::PgConnection; @@ -9,7 +10,7 @@ use dotenv::dotenv; use std::env; pub mod schema; -pub mod models; +pub mod apub; pub mod actions; // pub trait Likeable; @@ -30,13 +31,45 @@ pub trait Joinable { fn leave(conn: &PgConnection, form: T) -> usize; } - pub fn establish_connection() -> PgConnection { - dotenv().ok(); - - let database_url = env::var("DATABASE_URL") - .expect("DATABASE_URL must be set"); - PgConnection::establish(&database_url) - .expect(&format!("Error connecting to {}", database_url)) + let db_url = Settings::get().db_url; + PgConnection::establish(&db_url) + .expect(&format!("Error connecting to {}", db_url)) } +pub struct Settings { + db_url: String, + hostname: String +} + +impl Settings { + fn get() -> Self { + dotenv().ok(); + Settings { + db_url: env::var("DATABASE_URL") + .expect("DATABASE_URL must be set"), + hostname: env::var("HOSTNAME").unwrap_or("http://0.0.0.0".to_string()) + } + } + fn api_endpoint(&self) -> String { + format!("{}/api/v1", self.hostname) + } +} + +use chrono::{DateTime, NaiveDateTime, Utc}; +pub fn to_datetime_utc(ndt: NaiveDateTime) -> DateTime { + DateTime::::from_utc(ndt, Utc) +} + +pub fn naive_now() -> NaiveDateTime { + chrono::prelude::Utc::now().naive_utc() +} + +#[cfg(test)] +mod tests { + use Settings; + #[test] + fn test_api() { + assert_eq!(Settings::get().api_endpoint(), "http://0.0.0.0/api/v1"); + } +} diff --git a/server/src/models.rs b/server/src/models.rs deleted file mode 100644 index c895f3ea..00000000 --- a/server/src/models.rs +++ /dev/null @@ -1,19 +0,0 @@ - -// enum CommunityUserType { -// CREATOR = 0, -// MODERATOR = 1, -// USER = 2 -// } - -// impl CommunityUserType { -// fn from_u32(value: u32) -> CommunityUserType { -// match value { -// 0 => CommunityUserType::CREATOR, -// 1 => CommunityUserType::MODERATOR, -// 2 => CommunityUserType::USER, -// _ => panic!("Unknown value: {}", value), -// } -// } -// } - - diff --git a/server/src/schema.rs b/server/src/schema.rs index cf90c047..75cbad5b 100644 --- a/server/src/schema.rs +++ b/server/src/schema.rs @@ -2,7 +2,8 @@ table! { community (id) { id -> Int4, name -> Varchar, - start_time -> Timestamp, + published -> Timestamp, + updated -> Nullable, } } @@ -11,7 +12,7 @@ table! { id -> Int4, community_id -> Int4, fedi_user_id -> Text, - start_time -> Timestamp, + published -> Timestamp, } } @@ -20,7 +21,7 @@ table! { id -> Int4, community_id -> Int4, fedi_user_id -> Text, - start_time -> Timestamp, + published -> Timestamp, } } @@ -30,7 +31,8 @@ table! { name -> Varchar, url -> Text, attributed_to -> Text, - start_time -> Timestamp, + published -> Timestamp, + updated -> Nullable, } } @@ -39,7 +41,7 @@ table! { id -> Int4, fedi_user_id -> Text, post_id -> Nullable, - start_time -> Timestamp, + published -> Timestamp, } } @@ -48,7 +50,7 @@ table! { id -> Int4, fedi_user_id -> Text, post_id -> Nullable, - start_time -> Timestamp, + published -> Timestamp, } } @@ -60,7 +62,8 @@ table! { password_encrypted -> Text, email -> Nullable, icon -> Nullable, - start_time -> Timestamp, + published -> Timestamp, + updated -> Nullable, } } -- 2.40.1 From 58de24c424b039ac85b8f50edc948f273de51c8e Mon Sep 17 00:00:00 2001 From: Dessalines Date: Mon, 4 Mar 2019 19:52:09 -0800 Subject: [PATCH 0022/2583] Adding and activitypub output for user. --- API.md | 1 - .../2019-02-26-002946_create_user/up.sql | 6 +- .../2019-02-27-170003_create_community/up.sql | 7 +- .../2019-03-03-163336_create_post/up.sql | 7 +- server/src/actions/community.rs | 21 ++-- server/src/actions/post.rs | 95 ------------------- server/src/actions/user.rs | 22 ++--- server/src/apub.rs | 59 ++++++++++++ server/src/lib.rs | 49 ++++++++-- server/src/models.rs | 19 ---- server/src/schema.rs | 17 ++-- 11 files changed, 141 insertions(+), 162 deletions(-) create mode 100644 server/src/apub.rs delete mode 100644 server/src/models.rs diff --git a/API.md b/API.md index 8438cb9e..fb233542 100644 --- a/API.md +++ b/API.md @@ -52,7 +52,6 @@ "inbox": "https://rust-reddit-fediverse/api/v1/user/sally_smith/inbox", "outbox": "https://rust-reddit-fediverse/api/v1/user/sally_smith/outbox", "liked": "https://rust-reddit-fediverse/api/v1/user/sally_smith/liked", - "disliked": "https://rust-reddit-fediverse/api/v1/user/sally_smith/disliked", "following": "https://rust-reddit-fediverse/api/v1/user/sally_smith/following", "name": "sally_smith", "preferredUsername": "Sally", diff --git a/server/migrations/2019-02-26-002946_create_user/up.sql b/server/migrations/2019-02-26-002946_create_user/up.sql index a4ba1e88..577ff136 100644 --- a/server/migrations/2019-02-26-002946_create_user/up.sql +++ b/server/migrations/2019-02-26-002946_create_user/up.sql @@ -5,6 +5,6 @@ create table user_ ( password_encrypted text not null, email text, icon bytea, - start_time timestamp not null default now() -); - + published timestamp not null default now(), + updated timestamp +) diff --git a/server/migrations/2019-02-27-170003_create_community/up.sql b/server/migrations/2019-02-27-170003_create_community/up.sql index 692a5f06..30deec5b 100644 --- a/server/migrations/2019-02-27-170003_create_community/up.sql +++ b/server/migrations/2019-02-27-170003_create_community/up.sql @@ -1,19 +1,20 @@ create table community ( id serial primary key, name varchar(20) not null, - start_time timestamp not null default now() + published timestamp not null default now(), + updated timestamp ); create table community_user ( id serial primary key, community_id int references community on update cascade on delete cascade not null, fedi_user_id text not null, - start_time timestamp not null default now() + published timestamp not null default now() ); create table community_follower ( id serial primary key, community_id int references community on update cascade on delete cascade not null, fedi_user_id text not null, - start_time timestamp not null default now() + published timestamp not null default now() ); diff --git a/server/migrations/2019-03-03-163336_create_post/up.sql b/server/migrations/2019-03-03-163336_create_post/up.sql index 4a811fa2..16ef545e 100644 --- a/server/migrations/2019-03-03-163336_create_post/up.sql +++ b/server/migrations/2019-03-03-163336_create_post/up.sql @@ -3,20 +3,21 @@ create table post ( name varchar(100) not null, url text not null, attributed_to text not null, - start_time timestamp not null default now() + published timestamp not null default now(), + updated timestamp ); create table post_like ( id serial primary key, fedi_user_id text not null, post_id int references post on update cascade on delete cascade, - start_time timestamp not null default now() + published timestamp not null default now() ); create table post_dislike ( id serial primary key, fedi_user_id text not null, post_id int references post on update cascade on delete cascade, - start_time timestamp not null default now() + published timestamp not null default now() ); diff --git a/server/src/actions/community.rs b/server/src/actions/community.rs index 6b0bea8d..03490369 100644 --- a/server/src/actions/community.rs +++ b/server/src/actions/community.rs @@ -9,13 +9,15 @@ use {Crud, Followable, Joinable}; pub struct Community { pub id: i32, pub name: String, - pub start_time: chrono::NaiveDateTime + pub published: chrono::NaiveDateTime, + pub updated: Option } #[derive(Insertable, AsChangeset, Clone, Copy)] #[table_name="community"] pub struct CommunityForm<'a> { - pub name: &'a str, + pub name: &'a str, + pub updated: Option<&'a chrono::NaiveDateTime> } #[derive(Identifiable, Queryable, Associations, PartialEq, Debug)] @@ -25,7 +27,7 @@ pub struct CommunityUser { pub id: i32, pub community_id: i32, pub fedi_user_id: String, - pub start_time: chrono::NaiveDateTime + pub published: chrono::NaiveDateTime, } #[derive(Insertable, AsChangeset, Clone, Copy)] @@ -42,7 +44,7 @@ pub struct CommunityFollower { pub id: i32, pub community_id: i32, pub fedi_user_id: String, - pub start_time: chrono::NaiveDateTime + pub published: chrono::NaiveDateTime, } #[derive(Insertable, AsChangeset, Clone, Copy)] @@ -130,6 +132,7 @@ mod tests { let new_community = CommunityForm { name: "TIL".into(), + updated: None }; let inserted_community = Community::create(&conn, new_community).unwrap(); @@ -137,14 +140,16 @@ mod tests { let expected_community = Community { id: inserted_community.id, name: "TIL".into(), - start_time: inserted_community.start_time + published: inserted_community.published, + updated: None }; let new_user = UserForm { name: "thom".into(), preferred_username: None, password_encrypted: "nope".into(), - email: None + email: None, + updated: None }; let inserted_user = User_::create(&conn, new_user).unwrap(); @@ -160,7 +165,7 @@ mod tests { id: inserted_community_follower.id, community_id: inserted_community.id, fedi_user_id: "test".into(), - start_time: inserted_community_follower.start_time + published: inserted_community_follower.published }; let community_user_form = CommunityUserForm { @@ -174,7 +179,7 @@ mod tests { id: inserted_community_user.id, community_id: inserted_community.id, fedi_user_id: "test".into(), - start_time: inserted_community_user.start_time + published: inserted_community_user.published }; let read_community = Community::read(&conn, inserted_community.id); diff --git a/server/src/actions/post.rs b/server/src/actions/post.rs index f939fc7c..e69de29b 100644 --- a/server/src/actions/post.rs +++ b/server/src/actions/post.rs @@ -1,95 +0,0 @@ -extern crate diesel; -use schema::user_; -use diesel::*; -use diesel::result::Error; -use schema::user_::dsl::*; - -#[derive(Queryable, PartialEq, Debug)] -pub struct User_ { - pub id: i32, - pub name: String, - pub preferred_username: Option, - pub password_encrypted: String, - pub email: Option, - pub icon: Option>, - pub start_time: chrono::NaiveDateTime -} - -#[derive(Insertable, AsChangeset, Clone, Copy)] -#[table_name="user_"] -pub struct NewUser<'a> { - pub name: &'a str, - pub preferred_username: Option<&'a str>, - pub password_encrypted: &'a str, - pub email: Option<&'a str>, -} - -pub fn read(conn: &PgConnection, user_id: i32) -> User_ { - user_.find(user_id) - .first::(conn) - .expect("Error in query") -} - -pub fn delete(conn: &PgConnection, user_id: i32) -> usize { - diesel::delete(user_.find(user_id)) - .execute(conn) - .expect("Error deleting.") -} - -pub fn create(conn: &PgConnection, new_user: &NewUser) -> Result { - let mut edited_user = new_user.clone(); - // Add the rust crypt - edited_user.password_encrypted = "here"; - // edited_user.password_encrypted; - insert_into(user_) - .values(edited_user) - .get_result::(conn) -} - -pub fn update(conn: &PgConnection, user_id: i32, new_user: &NewUser) -> User_ { - let mut edited_user = new_user.clone(); - edited_user.password_encrypted = "here"; - diesel::update(user_.find(user_id)) - .set(edited_user) - .get_result::(conn) - .expect(&format!("Unable to find user {}", user_id)) -} - -#[cfg(test)] -mod tests { - use establish_connection; - use super::*; - #[test] - fn test_crud() { - let conn = establish_connection(); - - let new_user = NewUser { - name: "thom".into(), - preferred_username: None, - password_encrypted: "nope".into(), - email: None - }; - - let inserted_user = create(&conn, &new_user).unwrap(); - - let expected_user = User_ { - id: inserted_user.id, - name: "thom".into(), - preferred_username: None, - password_encrypted: "here".into(), - email: None, - icon: None, - start_time: inserted_user.start_time - }; - - let read_user = read(&conn, inserted_user.id); - let updated_user = update(&conn, inserted_user.id, &new_user); - let num_deleted = delete(&conn, inserted_user.id); - - assert_eq!(expected_user, read_user); - assert_eq!(expected_user, inserted_user); - assert_eq!(expected_user, updated_user); - assert_eq!(1, num_deleted); - - } -} diff --git a/server/src/actions/user.rs b/server/src/actions/user.rs index 36222f83..8556525f 100644 --- a/server/src/actions/user.rs +++ b/server/src/actions/user.rs @@ -1,10 +1,8 @@ extern crate diesel; -extern crate activitypub; use schema::user_; use diesel::*; use diesel::result::Error; use schema::user_::dsl::*; -// use self::activitypub::{context, actor::Person}; use Crud; #[derive(Queryable, Identifiable, PartialEq, Debug)] @@ -16,7 +14,8 @@ pub struct User_ { pub password_encrypted: String, pub email: Option, pub icon: Option>, - pub start_time: chrono::NaiveDateTime + pub published: chrono::NaiveDateTime, + pub updated: Option } #[derive(Insertable, AsChangeset, Clone, Copy)] @@ -26,6 +25,7 @@ pub struct UserForm<'a> { pub preferred_username: Option<&'a str>, pub password_encrypted: &'a str, pub email: Option<&'a str>, + pub updated: Option<&'a chrono::NaiveDateTime> } impl<'a> Crud> for User_ { @@ -58,16 +58,6 @@ impl<'a> Crud> for User_ { } } - -// TODO -// pub fn person(user: &User_) -> Person { -// let mut person = Person::default(); -// person.object_props.set_context_object(context()); -// person.ap_actor_props.set_preferred_username_string("set".into()); - -// person -// } - #[cfg(test)] mod tests { use establish_connection; @@ -81,7 +71,8 @@ mod tests { name: "thom".into(), preferred_username: None, password_encrypted: "nope".into(), - email: None + email: None, + updated: None }; let inserted_user = User_::create(&conn, new_user).unwrap(); @@ -93,7 +84,8 @@ mod tests { password_encrypted: "here".into(), email: None, icon: None, - start_time: inserted_user.start_time + published: inserted_user.published, + updated: None }; let read_user = User_::read(&conn, inserted_user.id); diff --git a/server/src/apub.rs b/server/src/apub.rs new file mode 100644 index 00000000..4cfd1088 --- /dev/null +++ b/server/src/apub.rs @@ -0,0 +1,59 @@ +extern crate activitypub; +use self::activitypub::{context, actor::Person}; +use actions::user::User_; + +impl User_ { + pub fn person(&self) -> Person { + use {Settings, to_datetime_utc}; + let base_url = &format!("{}/user/{}", Settings::get().api_endpoint(), self.name); + let mut person = Person::default(); + person.object_props.set_context_object(context()).ok(); + person.object_props.set_id_string(base_url.to_string()).ok(); + person.object_props.set_name_string(self.name.to_owned()).ok(); + person.object_props.set_published_utctime(to_datetime_utc(self.published)).ok(); + if let Some(i) = self.updated { + person.object_props.set_updated_utctime(to_datetime_utc(i)).ok(); + } + // person.object_props.summary = self.summary; + + person.ap_actor_props.set_inbox_string(format!("{}/inbox", &base_url)).ok(); + person.ap_actor_props.set_outbox_string(format!("{}/outbox", &base_url)).ok(); + person.ap_actor_props.set_following_string(format!("{}/following", &base_url)).ok(); + person.ap_actor_props.set_liked_string(format!("{}/liked", &base_url)).ok(); + if let Some(i) = &self.preferred_username { + person.ap_actor_props.set_preferred_username_string(i.to_string()).ok(); + } + + person + } +} + +#[cfg(test)] +mod tests { + use super::activitypub::{context, actor::Person}; + use super::User_; + use naive_now; + + #[test] + fn test_person() { + let expected_user = User_ { + id: 52, + name: "thom".into(), + preferred_username: None, + password_encrypted: "here".into(), + email: None, + icon: None, + published: naive_now(), + updated: None + }; + + let person = expected_user.person(); + + // let expected_person = Person { + // }; + + assert_eq!("http://0.0.0.0/api/v1/user/thom", person.object_props.id_string().unwrap()); + + } +} + diff --git a/server/src/lib.rs b/server/src/lib.rs index e8a67c3d..e7898971 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -1,6 +1,7 @@ #[macro_use] extern crate diesel; extern crate dotenv; +extern crate chrono; use diesel::*; use diesel::pg::PgConnection; @@ -9,7 +10,7 @@ use dotenv::dotenv; use std::env; pub mod schema; -pub mod models; +pub mod apub; pub mod actions; // pub trait Likeable; @@ -30,13 +31,45 @@ pub trait Joinable { fn leave(conn: &PgConnection, form: T) -> usize; } - pub fn establish_connection() -> PgConnection { - dotenv().ok(); - - let database_url = env::var("DATABASE_URL") - .expect("DATABASE_URL must be set"); - PgConnection::establish(&database_url) - .expect(&format!("Error connecting to {}", database_url)) + let db_url = Settings::get().db_url; + PgConnection::establish(&db_url) + .expect(&format!("Error connecting to {}", db_url)) } +pub struct Settings { + db_url: String, + hostname: String +} + +impl Settings { + fn get() -> Self { + dotenv().ok(); + Settings { + db_url: env::var("DATABASE_URL") + .expect("DATABASE_URL must be set"), + hostname: env::var("HOSTNAME").unwrap_or("http://0.0.0.0".to_string()) + } + } + fn api_endpoint(&self) -> String { + format!("{}/api/v1", self.hostname) + } +} + +use chrono::{DateTime, NaiveDateTime, Utc}; +pub fn to_datetime_utc(ndt: NaiveDateTime) -> DateTime { + DateTime::::from_utc(ndt, Utc) +} + +pub fn naive_now() -> NaiveDateTime { + chrono::prelude::Utc::now().naive_utc() +} + +#[cfg(test)] +mod tests { + use Settings; + #[test] + fn test_api() { + assert_eq!(Settings::get().api_endpoint(), "http://0.0.0.0/api/v1"); + } +} diff --git a/server/src/models.rs b/server/src/models.rs deleted file mode 100644 index c895f3ea..00000000 --- a/server/src/models.rs +++ /dev/null @@ -1,19 +0,0 @@ - -// enum CommunityUserType { -// CREATOR = 0, -// MODERATOR = 1, -// USER = 2 -// } - -// impl CommunityUserType { -// fn from_u32(value: u32) -> CommunityUserType { -// match value { -// 0 => CommunityUserType::CREATOR, -// 1 => CommunityUserType::MODERATOR, -// 2 => CommunityUserType::USER, -// _ => panic!("Unknown value: {}", value), -// } -// } -// } - - diff --git a/server/src/schema.rs b/server/src/schema.rs index cf90c047..75cbad5b 100644 --- a/server/src/schema.rs +++ b/server/src/schema.rs @@ -2,7 +2,8 @@ table! { community (id) { id -> Int4, name -> Varchar, - start_time -> Timestamp, + published -> Timestamp, + updated -> Nullable, } } @@ -11,7 +12,7 @@ table! { id -> Int4, community_id -> Int4, fedi_user_id -> Text, - start_time -> Timestamp, + published -> Timestamp, } } @@ -20,7 +21,7 @@ table! { id -> Int4, community_id -> Int4, fedi_user_id -> Text, - start_time -> Timestamp, + published -> Timestamp, } } @@ -30,7 +31,8 @@ table! { name -> Varchar, url -> Text, attributed_to -> Text, - start_time -> Timestamp, + published -> Timestamp, + updated -> Nullable, } } @@ -39,7 +41,7 @@ table! { id -> Int4, fedi_user_id -> Text, post_id -> Nullable, - start_time -> Timestamp, + published -> Timestamp, } } @@ -48,7 +50,7 @@ table! { id -> Int4, fedi_user_id -> Text, post_id -> Nullable, - start_time -> Timestamp, + published -> Timestamp, } } @@ -60,7 +62,8 @@ table! { password_encrypted -> Text, email -> Nullable, icon -> Nullable, - start_time -> Timestamp, + published -> Timestamp, + updated -> Nullable, } } -- 2.40.1 From 5b38bffb987fbabe049eaafed591fbf839cfda4c Mon Sep 17 00:00:00 2001 From: Dessalines Date: Tue, 5 Mar 2019 17:00:01 -0800 Subject: [PATCH 0023/2583] Adding posts and comments. --- API.md | 13 +- README.md | 11 +- server/.gitignore | 1 + .../2019-03-03-163336_create_post/down.sql | 1 - .../2019-03-03-163336_create_post/up.sql | 10 +- .../2019-03-05-233828_create_comment/down.sql | 2 + .../2019-03-05-233828_create_comment/up.sql | 17 ++ server/src/actions/comment.rs | 177 ++++++++++++++++++ server/src/actions/mod.rs | 1 + server/src/actions/post.rs | 150 +++++++++++++++ server/src/actions/src/schema.rs | 80 -------- server/src/apub.rs | 6 +- server/src/lib.rs | 5 + server/src/schema.rs | 40 ++-- 14 files changed, 401 insertions(+), 113 deletions(-) create mode 100644 server/migrations/2019-03-05-233828_create_comment/down.sql create mode 100644 server/migrations/2019-03-05-233828_create_comment/up.sql create mode 100644 server/src/actions/comment.rs delete mode 100644 server/src/actions/src/schema.rs diff --git a/API.md b/API.md index fb233542..d631b2ba 100644 --- a/API.md +++ b/API.md @@ -52,6 +52,7 @@ "inbox": "https://rust-reddit-fediverse/api/v1/user/sally_smith/inbox", "outbox": "https://rust-reddit-fediverse/api/v1/user/sally_smith/outbox", "liked": "https://rust-reddit-fediverse/api/v1/user/sally_smith/liked", + // TODO disliked? "following": "https://rust-reddit-fediverse/api/v1/user/sally_smith/following", "name": "sally_smith", "preferredUsername": "Sally", @@ -62,7 +63,7 @@ "width": 32, "height": 32 }, - "startTime": "2014-12-31T23:00:00-08:00", + "published": "2014-12-31T23:00:00-08:00", "summary"?: "This is sally's profile." } ``` @@ -78,7 +79,7 @@ "http://joe.example.org", ], "followers": "https://rust-reddit-fediverse/api/v1/community/today_i_learned/followers", - "startTime": "2014-12-31T23:00:00-08:00", + "published": "2014-12-31T23:00:00-08:00", "summary"?: "The group's tagline", "attachment: [{}] // TBD, these would be where strong types for custom styles, and images would work. } @@ -95,7 +96,7 @@ "name": "The title of a post, maybe a link to imgur", "url": "https://news.blah.com" "attributedTo": "http://joe.example.org", // The poster - "startTime": "2014-12-31T23:00:00-08:00", + "published": "2014-12-31T23:00:00-08:00", } ``` @@ -116,11 +117,11 @@ "@context": "https://www.w3.org/ns/activitystreams", "type": "Note", "id": "https://rust-reddit-fediverse/api/v1/comment/1", - "name": "A note", - "content": "Looks like it is going to rain today. Bring an umbrella @sally!" + "mediaType": "text/markdown", + "content": "Looks like it is going to rain today. Bring an umbrella *if necessary*!" "attributedTo": john_id, "inReplyTo": "comment or post id", - "startTime": "2014-12-31T23:00:00-08:00", + "published": "2014-12-31T23:00:00-08:00", "updated"?: "2014-12-12T12:12:12Z" "replies" // TODO, not sure if these objects should embed all replies in them or not. "to": [sally_id, group_id] diff --git a/README.md b/README.md index 9b61044a..99a8ad4e 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,6 @@ We have a twitter alternative (mastodon), a facebook alternative (friendica), so [ActivityPub API.md](API.md) - ## Goals - Come up with a name / codename. - Must have communities. @@ -21,7 +20,9 @@ We have a twitter alternative (mastodon), a facebook alternative (friendica), so - Backend: Actix, Diesel. - Frontend: inferno, typescript and bootstrap for now. - Should it allow bots? -- Should the comments / votes be static, or feel like a chat, like [flowchat?](https://flow-chat.com). +- Should the comments / votes be static, or feel like a chat, like [flowchat?](https://flow-chat.com). + - Two pane model - Right pane is live comments, left pane is live tree view. + - On mobile, allow you to switch between them. Default? ## Resources / Potential Libraries - Use the [activitypub crate.](https://docs.rs/activitypub/0.1.4/activitypub/) @@ -31,3 +32,9 @@ We have a twitter alternative (mastodon), a facebook alternative (friendica), so - [Diesel to Postgres data types](https://kotiri.com/2018/01/31/postgresql-diesel-rust-types.html) - [helpful diesel examples](http://siciarz.net/24-days-rust-diesel/) - [Mastodan public key server example](https://blog.joinmastodon.org/2018/06/how-to-implement-a-basic-activitypub-server/) +- [Recursive query for adjacency list for nested comments](https://stackoverflow.com/questions/192220/what-is-the-most-efficient-elegant-way-to-parse-a-flat-table-into-a-tree/192462#192462) + +## TODOs +- Endpoints +- DB +- Followers / following diff --git a/server/.gitignore b/server/.gitignore index fedaa2b1..93c43d03 100644 --- a/server/.gitignore +++ b/server/.gitignore @@ -1,2 +1,3 @@ /target .env +.idea diff --git a/server/migrations/2019-03-03-163336_create_post/down.sql b/server/migrations/2019-03-03-163336_create_post/down.sql index a5783965..acc0b5d1 100644 --- a/server/migrations/2019-03-03-163336_create_post/down.sql +++ b/server/migrations/2019-03-03-163336_create_post/down.sql @@ -1,3 +1,2 @@ drop table post_like; -drop table post_dislike; drop table post; diff --git a/server/migrations/2019-03-03-163336_create_post/up.sql b/server/migrations/2019-03-03-163336_create_post/up.sql index 16ef545e..a617ea33 100644 --- a/server/migrations/2019-03-03-163336_create_post/up.sql +++ b/server/migrations/2019-03-03-163336_create_post/up.sql @@ -9,15 +9,9 @@ create table post ( create table post_like ( id serial primary key, + post_id int references post on update cascade on delete cascade not null, fedi_user_id text not null, - post_id int references post on update cascade on delete cascade, - published timestamp not null default now() -); - -create table post_dislike ( - id serial primary key, - fedi_user_id text not null, - post_id int references post on update cascade on delete cascade, + score smallint not null, -- -1, or 1 for dislike, like, no row for no opinion published timestamp not null default now() ); diff --git a/server/migrations/2019-03-05-233828_create_comment/down.sql b/server/migrations/2019-03-05-233828_create_comment/down.sql new file mode 100644 index 00000000..5b92a44c --- /dev/null +++ b/server/migrations/2019-03-05-233828_create_comment/down.sql @@ -0,0 +1,2 @@ +drop table comment_like; +drop table comment; diff --git a/server/migrations/2019-03-05-233828_create_comment/up.sql b/server/migrations/2019-03-05-233828_create_comment/up.sql new file mode 100644 index 00000000..63fc758d --- /dev/null +++ b/server/migrations/2019-03-05-233828_create_comment/up.sql @@ -0,0 +1,17 @@ +create table comment ( + id serial primary key, + content text not null, + attributed_to text not null, + post_id int references post on update cascade on delete cascade not null, + parent_id int references comment on update cascade on delete cascade, + published timestamp not null default now(), + updated timestamp +); + +create table comment_like ( + id serial primary key, + comment_id int references comment on update cascade on delete cascade not null, + fedi_user_id text not null, + score smallint not null, -- -1, or 1 for dislike, like, no row for no opinion + published timestamp not null default now() +); diff --git a/server/src/actions/comment.rs b/server/src/actions/comment.rs new file mode 100644 index 00000000..104c13f2 --- /dev/null +++ b/server/src/actions/comment.rs @@ -0,0 +1,177 @@ +extern crate diesel; +use schema::{comment, comment_like}; +use diesel::*; +use diesel::result::Error; +use {Crud, Likeable}; + +#[derive(Queryable, Identifiable, PartialEq, Debug)] +#[table_name="comment"] +pub struct Comment { + pub id: i32, + pub content: String, + pub attributed_to: String, + pub post_id: i32, + pub parent_id: Option, + pub published: chrono::NaiveDateTime, + pub updated: Option +} + +#[derive(Insertable, AsChangeset, Clone, Copy)] +#[table_name="comment"] +pub struct CommentForm<'a> { + pub content: &'a str, + pub attributed_to: &'a str, + pub post_id: &'a i32, + pub parent_id: Option<&'a i32>, + pub updated: Option<&'a chrono::NaiveDateTime> +} + +#[derive(Identifiable, Queryable, Associations, PartialEq, Debug)] +#[belongs_to(Comment)] +#[table_name = "comment_like"] +pub struct CommentLike { + pub id: i32, + pub comment_id: i32, + pub fedi_user_id: String, + pub score: i16, + pub published: chrono::NaiveDateTime, +} + +#[derive(Insertable, AsChangeset, Clone, Copy)] +#[table_name="comment_like"] +pub struct CommentLikeForm<'a> { + pub comment_id: &'a i32, + pub fedi_user_id: &'a str, + pub score: &'a i16 +} + +impl<'a> Crud> for Comment { + fn read(conn: &PgConnection, comment_id: i32) -> Comment { + use schema::comment::dsl::*; + comment.find(comment_id) + .first::(conn) + .expect("Error in query") + } + + fn delete(conn: &PgConnection, comment_id: i32) -> usize { + use schema::comment::dsl::*; + diesel::delete(comment.find(comment_id)) + .execute(conn) + .expect("Error deleting.") + } + + fn create(conn: &PgConnection, comment_form: CommentForm) -> Result { + use schema::comment::dsl::*; + insert_into(comment) + .values(comment_form) + .get_result::(conn) + } + + fn update(conn: &PgConnection, comment_id: i32, comment_form: CommentForm) -> Comment { + use schema::comment::dsl::*; + diesel::update(comment.find(comment_id)) + .set(comment_form) + .get_result::(conn) + .expect(&format!("Unable to find {}", comment_id)) + } +} + +impl<'a> Likeable > for CommentLike { + fn like(conn: &PgConnection, comment_like_form: CommentLikeForm) -> Result { + use schema::comment_like::dsl::*; + insert_into(comment_like) + .values(comment_like_form) + .get_result::(conn) + } + fn remove(conn: &PgConnection, comment_like_form: CommentLikeForm) -> usize { + use schema::comment_like::dsl::*; + diesel::delete(comment_like + .filter(comment_id.eq(comment_like_form.comment_id)) + .filter(fedi_user_id.eq(comment_like_form.fedi_user_id))) + .execute(conn) + .expect("Error deleting.") + } +} + +#[cfg(test)] +mod tests { + use establish_connection; + use super::*; + use actions::post::*; + use Crud; + #[test] + fn test_crud() { + let conn = establish_connection(); + + let new_post = PostForm { + name: "A test post".into(), + url: "https://test.com".into(), + attributed_to: "test_user.com".into(), + updated: None + }; + + let inserted_post = Post::create(&conn, new_post).unwrap(); + + let comment_form = CommentForm { + content: "A test comment".into(), + attributed_to: "test_user.com".into(), + post_id: &inserted_post.id, + parent_id: None, + updated: None + }; + + let inserted_comment = Comment::create(&conn, comment_form).unwrap(); + + let expected_comment = Comment { + id: inserted_comment.id, + content: "A test comment".into(), + attributed_to: "test_user.com".into(), + post_id: inserted_post.id, + parent_id: None, + published: inserted_comment.published, + updated: None + }; + + let child_comment_form = CommentForm { + content: "A child comment".into(), + attributed_to: "test_user.com".into(), + post_id: &inserted_post.id, + parent_id: Some(&inserted_comment.id), + updated: None + }; + + let inserted_child_comment = Comment::create(&conn, child_comment_form).unwrap(); + + let comment_like_form = CommentLikeForm { + comment_id: &inserted_comment.id, + fedi_user_id: "test".into(), + score: &1 + }; + + let inserted_comment_like = CommentLike::like(&conn, comment_like_form).unwrap(); + + let expected_comment_like = CommentLike { + id: inserted_comment_like.id, + comment_id: inserted_comment.id, + fedi_user_id: "test".into(), + published: inserted_comment_like.published, + score: 1 + }; + + let read_comment = Comment::read(&conn, inserted_comment.id); + let updated_comment = Comment::update(&conn, inserted_comment.id, comment_form); + let like_removed = CommentLike::remove(&conn, comment_like_form); + let num_deleted = Comment::delete(&conn, inserted_comment.id); + Comment::delete(&conn, inserted_child_comment.id); + Post::delete(&conn, inserted_post.id); + + assert_eq!(expected_comment, read_comment); + assert_eq!(expected_comment, inserted_comment); + assert_eq!(expected_comment, updated_comment); + assert_eq!(expected_comment_like, inserted_comment_like); + assert_eq!(expected_comment.id, inserted_child_comment.parent_id.unwrap()); + assert_eq!(1, like_removed); + assert_eq!(1, num_deleted); + + } +} diff --git a/server/src/actions/mod.rs b/server/src/actions/mod.rs index df10dbbc..12227305 100644 --- a/server/src/actions/mod.rs +++ b/server/src/actions/mod.rs @@ -1,3 +1,4 @@ pub mod user; pub mod community; pub mod post; +pub mod comment; diff --git a/server/src/actions/post.rs b/server/src/actions/post.rs index e69de29b..dd80f582 100644 --- a/server/src/actions/post.rs +++ b/server/src/actions/post.rs @@ -0,0 +1,150 @@ +extern crate diesel; +use schema::{post, post_like}; +use diesel::*; +use diesel::result::Error; +use {Crud, Likeable}; + +#[derive(Queryable, Identifiable, PartialEq, Debug)] +#[table_name="post"] +pub struct Post { + pub id: i32, + pub name: String, + pub url: String, + pub attributed_to: String, + pub published: chrono::NaiveDateTime, + pub updated: Option +} + +#[derive(Insertable, AsChangeset, Clone, Copy)] +#[table_name="post"] +pub struct PostForm<'a> { + pub name: &'a str, + pub url: &'a str, + pub attributed_to: &'a str, + pub updated: Option<&'a chrono::NaiveDateTime> +} + +#[derive(Identifiable, Queryable, Associations, PartialEq, Debug)] +#[belongs_to(Post)] +#[table_name = "post_like"] +pub struct PostLike { + pub id: i32, + pub post_id: i32, + pub fedi_user_id: String, + pub score: i16, + pub published: chrono::NaiveDateTime, +} + +#[derive(Insertable, AsChangeset, Clone, Copy)] +#[table_name="post_like"] +pub struct PostLikeForm<'a> { + pub post_id: &'a i32, + pub fedi_user_id: &'a str, + pub score: &'a i16 +} + +impl<'a> Crud> for Post { + fn read(conn: &PgConnection, post_id: i32) -> Post { + use schema::post::dsl::*; + post.find(post_id) + .first::(conn) + .expect("Error in query") + } + + fn delete(conn: &PgConnection, post_id: i32) -> usize { + use schema::post::dsl::*; + diesel::delete(post.find(post_id)) + .execute(conn) + .expect("Error deleting.") + } + + fn create(conn: &PgConnection, new_post: PostForm) -> Result { + use schema::post::dsl::*; + insert_into(post) + .values(new_post) + .get_result::(conn) + } + + fn update(conn: &PgConnection, post_id: i32, new_post: PostForm) -> Post { + use schema::post::dsl::*; + diesel::update(post.find(post_id)) + .set(new_post) + .get_result::(conn) + .expect(&format!("Unable to find {}", post_id)) + } +} + +impl<'a> Likeable > for PostLike { + fn like(conn: &PgConnection, post_like_form: PostLikeForm) -> Result { + use schema::post_like::dsl::*; + insert_into(post_like) + .values(post_like_form) + .get_result::(conn) + } + fn remove(conn: &PgConnection, post_like_form: PostLikeForm) -> usize { + use schema::post_like::dsl::*; + diesel::delete(post_like + .filter(post_id.eq(post_like_form.post_id)) + .filter(fedi_user_id.eq(post_like_form.fedi_user_id))) + .execute(conn) + .expect("Error deleting.") + } +} + +#[cfg(test)] +mod tests { + use establish_connection; + use super::*; + use Crud; + #[test] + fn test_crud() { + let conn = establish_connection(); + + let new_post = PostForm { + name: "A test post".into(), + url: "https://test.com".into(), + attributed_to: "test_user.com".into(), + updated: None + }; + + let inserted_post = Post::create(&conn, new_post).unwrap(); + + let expected_post = Post { + id: inserted_post.id, + name: "A test post".into(), + url: "https://test.com".into(), + attributed_to: "test_user.com".into(), + published: inserted_post.published, + updated: None + }; + + let post_like_form = PostLikeForm { + post_id: &inserted_post.id, + fedi_user_id: "test".into(), + score: &1 + }; + + let inserted_post_like = PostLike::like(&conn, post_like_form).unwrap(); + + let expected_post_like = PostLike { + id: inserted_post_like.id, + post_id: inserted_post.id, + fedi_user_id: "test".into(), + published: inserted_post_like.published, + score: 1 + }; + + let read_post = Post::read(&conn, inserted_post.id); + let updated_post = Post::update(&conn, inserted_post.id, new_post); + let like_removed = PostLike::remove(&conn, post_like_form); + let num_deleted = Post::delete(&conn, inserted_post.id); + + assert_eq!(expected_post, read_post); + assert_eq!(expected_post, inserted_post); + assert_eq!(expected_post, updated_post); + assert_eq!(expected_post_like, inserted_post_like); + assert_eq!(1, like_removed); + assert_eq!(1, num_deleted); + + } +} diff --git a/server/src/actions/src/schema.rs b/server/src/actions/src/schema.rs deleted file mode 100644 index 580b82e7..00000000 --- a/server/src/actions/src/schema.rs +++ /dev/null @@ -1,80 +0,0 @@ -table! { - community (id) { - id -> Int4, - name -> Varchar, - start_time -> Timestamp, - } -} - -table! { - community_follower (id) { - id -> Int4, - fedi_user_id -> Text, - community_id -> Nullable, - start_time -> Timestamp, - } -} - -table! { - community_user (id) { - id -> Int4, - fedi_user_id -> Text, - community_id -> Nullable, - start_time -> Timestamp, - } -} - -table! { - post (id) { - id -> Int4, - name -> Varchar, - url -> Text, - attributed_to -> Text, - start_time -> Timestamp, - } -} - -table! { - post_dislike (id) { - id -> Int4, - fedi_user_id -> Text, - post_id -> Nullable, - start_time -> Timestamp, - } -} - -table! { - post_like (id) { - id -> Int4, - fedi_user_id -> Text, - post_id -> Nullable, - start_time -> Timestamp, - } -} - -table! { - user_ (id) { - id -> Int4, - name -> Varchar, - preferred_username -> Nullable, - password_encrypted -> Text, - email -> Nullable, - icon -> Nullable, - start_time -> Timestamp, - } -} - -joinable!(community_follower -> community (community_id)); -joinable!(community_user -> community (community_id)); -joinable!(post_dislike -> post (post_id)); -joinable!(post_like -> post (post_id)); - -allow_tables_to_appear_in_same_query!( - community, - community_follower, - community_user, - post, - post_dislike, - post_like, - user_, -); diff --git a/server/src/apub.rs b/server/src/apub.rs index 4cfd1088..16b8be1b 100644 --- a/server/src/apub.rs +++ b/server/src/apub.rs @@ -48,11 +48,9 @@ mod tests { }; let person = expected_user.person(); - - // let expected_person = Person { - // }; - assert_eq!("http://0.0.0.0/api/v1/user/thom", person.object_props.id_string().unwrap()); + let json = serde_json::to_string_pretty(&person).unwrap(); + println!("{}", json); } } diff --git a/server/src/lib.rs b/server/src/lib.rs index e7898971..b1a1f252 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -31,6 +31,11 @@ pub trait Joinable { fn leave(conn: &PgConnection, form: T) -> usize; } +pub trait Likeable { + fn like(conn: &PgConnection, form: T) -> Result where Self: Sized; + fn remove(conn: &PgConnection, form: T) -> usize; +} + pub fn establish_connection() -> PgConnection { let db_url = Settings::get().db_url; PgConnection::establish(&db_url) diff --git a/server/src/schema.rs b/server/src/schema.rs index 75cbad5b..4ab54bc4 100644 --- a/server/src/schema.rs +++ b/server/src/schema.rs @@ -1,3 +1,25 @@ +table! { + comment (id) { + id -> Int4, + content -> Text, + attributed_to -> Text, + post_id -> Int4, + parent_id -> Nullable, + published -> Timestamp, + updated -> Nullable, + } +} + +table! { + comment_like (id) { + id -> Int4, + comment_id -> Int4, + fedi_user_id -> Text, + score -> Int2, + published -> Timestamp, + } +} + table! { community (id) { id -> Int4, @@ -36,20 +58,12 @@ table! { } } -table! { - post_dislike (id) { - id -> Int4, - fedi_user_id -> Text, - post_id -> Nullable, - published -> Timestamp, - } -} - table! { post_like (id) { id -> Int4, + post_id -> Int4, fedi_user_id -> Text, - post_id -> Nullable, + score -> Int2, published -> Timestamp, } } @@ -67,17 +81,19 @@ table! { } } +joinable!(comment -> post (post_id)); +joinable!(comment_like -> comment (comment_id)); joinable!(community_follower -> community (community_id)); joinable!(community_user -> community (community_id)); -joinable!(post_dislike -> post (post_id)); joinable!(post_like -> post (post_id)); allow_tables_to_appear_in_same_query!( + comment, + comment_like, community, community_follower, community_user, post, - post_dislike, post_like, user_, ); -- 2.40.1 From 064d7f84b25236195eeb33a8671935bc9df37e57 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Tue, 5 Mar 2019 17:00:01 -0800 Subject: [PATCH 0024/2583] Adding posts and comments. --- API.md | 13 +- README.md | 11 +- server/.gitignore | 1 + .../2019-03-03-163336_create_post/down.sql | 1 - .../2019-03-03-163336_create_post/up.sql | 10 +- .../2019-03-05-233828_create_comment/down.sql | 2 + .../2019-03-05-233828_create_comment/up.sql | 17 ++ server/src/actions/comment.rs | 177 ++++++++++++++++++ server/src/actions/mod.rs | 1 + server/src/actions/post.rs | 150 +++++++++++++++ server/src/actions/src/schema.rs | 80 -------- server/src/apub.rs | 6 +- server/src/lib.rs | 5 + server/src/schema.rs | 40 ++-- 14 files changed, 401 insertions(+), 113 deletions(-) create mode 100644 server/migrations/2019-03-05-233828_create_comment/down.sql create mode 100644 server/migrations/2019-03-05-233828_create_comment/up.sql create mode 100644 server/src/actions/comment.rs delete mode 100644 server/src/actions/src/schema.rs diff --git a/API.md b/API.md index fb233542..d631b2ba 100644 --- a/API.md +++ b/API.md @@ -52,6 +52,7 @@ "inbox": "https://rust-reddit-fediverse/api/v1/user/sally_smith/inbox", "outbox": "https://rust-reddit-fediverse/api/v1/user/sally_smith/outbox", "liked": "https://rust-reddit-fediverse/api/v1/user/sally_smith/liked", + // TODO disliked? "following": "https://rust-reddit-fediverse/api/v1/user/sally_smith/following", "name": "sally_smith", "preferredUsername": "Sally", @@ -62,7 +63,7 @@ "width": 32, "height": 32 }, - "startTime": "2014-12-31T23:00:00-08:00", + "published": "2014-12-31T23:00:00-08:00", "summary"?: "This is sally's profile." } ``` @@ -78,7 +79,7 @@ "http://joe.example.org", ], "followers": "https://rust-reddit-fediverse/api/v1/community/today_i_learned/followers", - "startTime": "2014-12-31T23:00:00-08:00", + "published": "2014-12-31T23:00:00-08:00", "summary"?: "The group's tagline", "attachment: [{}] // TBD, these would be where strong types for custom styles, and images would work. } @@ -95,7 +96,7 @@ "name": "The title of a post, maybe a link to imgur", "url": "https://news.blah.com" "attributedTo": "http://joe.example.org", // The poster - "startTime": "2014-12-31T23:00:00-08:00", + "published": "2014-12-31T23:00:00-08:00", } ``` @@ -116,11 +117,11 @@ "@context": "https://www.w3.org/ns/activitystreams", "type": "Note", "id": "https://rust-reddit-fediverse/api/v1/comment/1", - "name": "A note", - "content": "Looks like it is going to rain today. Bring an umbrella @sally!" + "mediaType": "text/markdown", + "content": "Looks like it is going to rain today. Bring an umbrella *if necessary*!" "attributedTo": john_id, "inReplyTo": "comment or post id", - "startTime": "2014-12-31T23:00:00-08:00", + "published": "2014-12-31T23:00:00-08:00", "updated"?: "2014-12-12T12:12:12Z" "replies" // TODO, not sure if these objects should embed all replies in them or not. "to": [sally_id, group_id] diff --git a/README.md b/README.md index 9b61044a..99a8ad4e 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,6 @@ We have a twitter alternative (mastodon), a facebook alternative (friendica), so [ActivityPub API.md](API.md) - ## Goals - Come up with a name / codename. - Must have communities. @@ -21,7 +20,9 @@ We have a twitter alternative (mastodon), a facebook alternative (friendica), so - Backend: Actix, Diesel. - Frontend: inferno, typescript and bootstrap for now. - Should it allow bots? -- Should the comments / votes be static, or feel like a chat, like [flowchat?](https://flow-chat.com). +- Should the comments / votes be static, or feel like a chat, like [flowchat?](https://flow-chat.com). + - Two pane model - Right pane is live comments, left pane is live tree view. + - On mobile, allow you to switch between them. Default? ## Resources / Potential Libraries - Use the [activitypub crate.](https://docs.rs/activitypub/0.1.4/activitypub/) @@ -31,3 +32,9 @@ We have a twitter alternative (mastodon), a facebook alternative (friendica), so - [Diesel to Postgres data types](https://kotiri.com/2018/01/31/postgresql-diesel-rust-types.html) - [helpful diesel examples](http://siciarz.net/24-days-rust-diesel/) - [Mastodan public key server example](https://blog.joinmastodon.org/2018/06/how-to-implement-a-basic-activitypub-server/) +- [Recursive query for adjacency list for nested comments](https://stackoverflow.com/questions/192220/what-is-the-most-efficient-elegant-way-to-parse-a-flat-table-into-a-tree/192462#192462) + +## TODOs +- Endpoints +- DB +- Followers / following diff --git a/server/.gitignore b/server/.gitignore index fedaa2b1..93c43d03 100644 --- a/server/.gitignore +++ b/server/.gitignore @@ -1,2 +1,3 @@ /target .env +.idea diff --git a/server/migrations/2019-03-03-163336_create_post/down.sql b/server/migrations/2019-03-03-163336_create_post/down.sql index a5783965..acc0b5d1 100644 --- a/server/migrations/2019-03-03-163336_create_post/down.sql +++ b/server/migrations/2019-03-03-163336_create_post/down.sql @@ -1,3 +1,2 @@ drop table post_like; -drop table post_dislike; drop table post; diff --git a/server/migrations/2019-03-03-163336_create_post/up.sql b/server/migrations/2019-03-03-163336_create_post/up.sql index 16ef545e..a617ea33 100644 --- a/server/migrations/2019-03-03-163336_create_post/up.sql +++ b/server/migrations/2019-03-03-163336_create_post/up.sql @@ -9,15 +9,9 @@ create table post ( create table post_like ( id serial primary key, + post_id int references post on update cascade on delete cascade not null, fedi_user_id text not null, - post_id int references post on update cascade on delete cascade, - published timestamp not null default now() -); - -create table post_dislike ( - id serial primary key, - fedi_user_id text not null, - post_id int references post on update cascade on delete cascade, + score smallint not null, -- -1, or 1 for dislike, like, no row for no opinion published timestamp not null default now() ); diff --git a/server/migrations/2019-03-05-233828_create_comment/down.sql b/server/migrations/2019-03-05-233828_create_comment/down.sql new file mode 100644 index 00000000..5b92a44c --- /dev/null +++ b/server/migrations/2019-03-05-233828_create_comment/down.sql @@ -0,0 +1,2 @@ +drop table comment_like; +drop table comment; diff --git a/server/migrations/2019-03-05-233828_create_comment/up.sql b/server/migrations/2019-03-05-233828_create_comment/up.sql new file mode 100644 index 00000000..63fc758d --- /dev/null +++ b/server/migrations/2019-03-05-233828_create_comment/up.sql @@ -0,0 +1,17 @@ +create table comment ( + id serial primary key, + content text not null, + attributed_to text not null, + post_id int references post on update cascade on delete cascade not null, + parent_id int references comment on update cascade on delete cascade, + published timestamp not null default now(), + updated timestamp +); + +create table comment_like ( + id serial primary key, + comment_id int references comment on update cascade on delete cascade not null, + fedi_user_id text not null, + score smallint not null, -- -1, or 1 for dislike, like, no row for no opinion + published timestamp not null default now() +); diff --git a/server/src/actions/comment.rs b/server/src/actions/comment.rs new file mode 100644 index 00000000..104c13f2 --- /dev/null +++ b/server/src/actions/comment.rs @@ -0,0 +1,177 @@ +extern crate diesel; +use schema::{comment, comment_like}; +use diesel::*; +use diesel::result::Error; +use {Crud, Likeable}; + +#[derive(Queryable, Identifiable, PartialEq, Debug)] +#[table_name="comment"] +pub struct Comment { + pub id: i32, + pub content: String, + pub attributed_to: String, + pub post_id: i32, + pub parent_id: Option, + pub published: chrono::NaiveDateTime, + pub updated: Option +} + +#[derive(Insertable, AsChangeset, Clone, Copy)] +#[table_name="comment"] +pub struct CommentForm<'a> { + pub content: &'a str, + pub attributed_to: &'a str, + pub post_id: &'a i32, + pub parent_id: Option<&'a i32>, + pub updated: Option<&'a chrono::NaiveDateTime> +} + +#[derive(Identifiable, Queryable, Associations, PartialEq, Debug)] +#[belongs_to(Comment)] +#[table_name = "comment_like"] +pub struct CommentLike { + pub id: i32, + pub comment_id: i32, + pub fedi_user_id: String, + pub score: i16, + pub published: chrono::NaiveDateTime, +} + +#[derive(Insertable, AsChangeset, Clone, Copy)] +#[table_name="comment_like"] +pub struct CommentLikeForm<'a> { + pub comment_id: &'a i32, + pub fedi_user_id: &'a str, + pub score: &'a i16 +} + +impl<'a> Crud> for Comment { + fn read(conn: &PgConnection, comment_id: i32) -> Comment { + use schema::comment::dsl::*; + comment.find(comment_id) + .first::(conn) + .expect("Error in query") + } + + fn delete(conn: &PgConnection, comment_id: i32) -> usize { + use schema::comment::dsl::*; + diesel::delete(comment.find(comment_id)) + .execute(conn) + .expect("Error deleting.") + } + + fn create(conn: &PgConnection, comment_form: CommentForm) -> Result { + use schema::comment::dsl::*; + insert_into(comment) + .values(comment_form) + .get_result::(conn) + } + + fn update(conn: &PgConnection, comment_id: i32, comment_form: CommentForm) -> Comment { + use schema::comment::dsl::*; + diesel::update(comment.find(comment_id)) + .set(comment_form) + .get_result::(conn) + .expect(&format!("Unable to find {}", comment_id)) + } +} + +impl<'a> Likeable > for CommentLike { + fn like(conn: &PgConnection, comment_like_form: CommentLikeForm) -> Result { + use schema::comment_like::dsl::*; + insert_into(comment_like) + .values(comment_like_form) + .get_result::(conn) + } + fn remove(conn: &PgConnection, comment_like_form: CommentLikeForm) -> usize { + use schema::comment_like::dsl::*; + diesel::delete(comment_like + .filter(comment_id.eq(comment_like_form.comment_id)) + .filter(fedi_user_id.eq(comment_like_form.fedi_user_id))) + .execute(conn) + .expect("Error deleting.") + } +} + +#[cfg(test)] +mod tests { + use establish_connection; + use super::*; + use actions::post::*; + use Crud; + #[test] + fn test_crud() { + let conn = establish_connection(); + + let new_post = PostForm { + name: "A test post".into(), + url: "https://test.com".into(), + attributed_to: "test_user.com".into(), + updated: None + }; + + let inserted_post = Post::create(&conn, new_post).unwrap(); + + let comment_form = CommentForm { + content: "A test comment".into(), + attributed_to: "test_user.com".into(), + post_id: &inserted_post.id, + parent_id: None, + updated: None + }; + + let inserted_comment = Comment::create(&conn, comment_form).unwrap(); + + let expected_comment = Comment { + id: inserted_comment.id, + content: "A test comment".into(), + attributed_to: "test_user.com".into(), + post_id: inserted_post.id, + parent_id: None, + published: inserted_comment.published, + updated: None + }; + + let child_comment_form = CommentForm { + content: "A child comment".into(), + attributed_to: "test_user.com".into(), + post_id: &inserted_post.id, + parent_id: Some(&inserted_comment.id), + updated: None + }; + + let inserted_child_comment = Comment::create(&conn, child_comment_form).unwrap(); + + let comment_like_form = CommentLikeForm { + comment_id: &inserted_comment.id, + fedi_user_id: "test".into(), + score: &1 + }; + + let inserted_comment_like = CommentLike::like(&conn, comment_like_form).unwrap(); + + let expected_comment_like = CommentLike { + id: inserted_comment_like.id, + comment_id: inserted_comment.id, + fedi_user_id: "test".into(), + published: inserted_comment_like.published, + score: 1 + }; + + let read_comment = Comment::read(&conn, inserted_comment.id); + let updated_comment = Comment::update(&conn, inserted_comment.id, comment_form); + let like_removed = CommentLike::remove(&conn, comment_like_form); + let num_deleted = Comment::delete(&conn, inserted_comment.id); + Comment::delete(&conn, inserted_child_comment.id); + Post::delete(&conn, inserted_post.id); + + assert_eq!(expected_comment, read_comment); + assert_eq!(expected_comment, inserted_comment); + assert_eq!(expected_comment, updated_comment); + assert_eq!(expected_comment_like, inserted_comment_like); + assert_eq!(expected_comment.id, inserted_child_comment.parent_id.unwrap()); + assert_eq!(1, like_removed); + assert_eq!(1, num_deleted); + + } +} diff --git a/server/src/actions/mod.rs b/server/src/actions/mod.rs index df10dbbc..12227305 100644 --- a/server/src/actions/mod.rs +++ b/server/src/actions/mod.rs @@ -1,3 +1,4 @@ pub mod user; pub mod community; pub mod post; +pub mod comment; diff --git a/server/src/actions/post.rs b/server/src/actions/post.rs index e69de29b..dd80f582 100644 --- a/server/src/actions/post.rs +++ b/server/src/actions/post.rs @@ -0,0 +1,150 @@ +extern crate diesel; +use schema::{post, post_like}; +use diesel::*; +use diesel::result::Error; +use {Crud, Likeable}; + +#[derive(Queryable, Identifiable, PartialEq, Debug)] +#[table_name="post"] +pub struct Post { + pub id: i32, + pub name: String, + pub url: String, + pub attributed_to: String, + pub published: chrono::NaiveDateTime, + pub updated: Option +} + +#[derive(Insertable, AsChangeset, Clone, Copy)] +#[table_name="post"] +pub struct PostForm<'a> { + pub name: &'a str, + pub url: &'a str, + pub attributed_to: &'a str, + pub updated: Option<&'a chrono::NaiveDateTime> +} + +#[derive(Identifiable, Queryable, Associations, PartialEq, Debug)] +#[belongs_to(Post)] +#[table_name = "post_like"] +pub struct PostLike { + pub id: i32, + pub post_id: i32, + pub fedi_user_id: String, + pub score: i16, + pub published: chrono::NaiveDateTime, +} + +#[derive(Insertable, AsChangeset, Clone, Copy)] +#[table_name="post_like"] +pub struct PostLikeForm<'a> { + pub post_id: &'a i32, + pub fedi_user_id: &'a str, + pub score: &'a i16 +} + +impl<'a> Crud> for Post { + fn read(conn: &PgConnection, post_id: i32) -> Post { + use schema::post::dsl::*; + post.find(post_id) + .first::(conn) + .expect("Error in query") + } + + fn delete(conn: &PgConnection, post_id: i32) -> usize { + use schema::post::dsl::*; + diesel::delete(post.find(post_id)) + .execute(conn) + .expect("Error deleting.") + } + + fn create(conn: &PgConnection, new_post: PostForm) -> Result { + use schema::post::dsl::*; + insert_into(post) + .values(new_post) + .get_result::(conn) + } + + fn update(conn: &PgConnection, post_id: i32, new_post: PostForm) -> Post { + use schema::post::dsl::*; + diesel::update(post.find(post_id)) + .set(new_post) + .get_result::(conn) + .expect(&format!("Unable to find {}", post_id)) + } +} + +impl<'a> Likeable > for PostLike { + fn like(conn: &PgConnection, post_like_form: PostLikeForm) -> Result { + use schema::post_like::dsl::*; + insert_into(post_like) + .values(post_like_form) + .get_result::(conn) + } + fn remove(conn: &PgConnection, post_like_form: PostLikeForm) -> usize { + use schema::post_like::dsl::*; + diesel::delete(post_like + .filter(post_id.eq(post_like_form.post_id)) + .filter(fedi_user_id.eq(post_like_form.fedi_user_id))) + .execute(conn) + .expect("Error deleting.") + } +} + +#[cfg(test)] +mod tests { + use establish_connection; + use super::*; + use Crud; + #[test] + fn test_crud() { + let conn = establish_connection(); + + let new_post = PostForm { + name: "A test post".into(), + url: "https://test.com".into(), + attributed_to: "test_user.com".into(), + updated: None + }; + + let inserted_post = Post::create(&conn, new_post).unwrap(); + + let expected_post = Post { + id: inserted_post.id, + name: "A test post".into(), + url: "https://test.com".into(), + attributed_to: "test_user.com".into(), + published: inserted_post.published, + updated: None + }; + + let post_like_form = PostLikeForm { + post_id: &inserted_post.id, + fedi_user_id: "test".into(), + score: &1 + }; + + let inserted_post_like = PostLike::like(&conn, post_like_form).unwrap(); + + let expected_post_like = PostLike { + id: inserted_post_like.id, + post_id: inserted_post.id, + fedi_user_id: "test".into(), + published: inserted_post_like.published, + score: 1 + }; + + let read_post = Post::read(&conn, inserted_post.id); + let updated_post = Post::update(&conn, inserted_post.id, new_post); + let like_removed = PostLike::remove(&conn, post_like_form); + let num_deleted = Post::delete(&conn, inserted_post.id); + + assert_eq!(expected_post, read_post); + assert_eq!(expected_post, inserted_post); + assert_eq!(expected_post, updated_post); + assert_eq!(expected_post_like, inserted_post_like); + assert_eq!(1, like_removed); + assert_eq!(1, num_deleted); + + } +} diff --git a/server/src/actions/src/schema.rs b/server/src/actions/src/schema.rs deleted file mode 100644 index 580b82e7..00000000 --- a/server/src/actions/src/schema.rs +++ /dev/null @@ -1,80 +0,0 @@ -table! { - community (id) { - id -> Int4, - name -> Varchar, - start_time -> Timestamp, - } -} - -table! { - community_follower (id) { - id -> Int4, - fedi_user_id -> Text, - community_id -> Nullable, - start_time -> Timestamp, - } -} - -table! { - community_user (id) { - id -> Int4, - fedi_user_id -> Text, - community_id -> Nullable, - start_time -> Timestamp, - } -} - -table! { - post (id) { - id -> Int4, - name -> Varchar, - url -> Text, - attributed_to -> Text, - start_time -> Timestamp, - } -} - -table! { - post_dislike (id) { - id -> Int4, - fedi_user_id -> Text, - post_id -> Nullable, - start_time -> Timestamp, - } -} - -table! { - post_like (id) { - id -> Int4, - fedi_user_id -> Text, - post_id -> Nullable, - start_time -> Timestamp, - } -} - -table! { - user_ (id) { - id -> Int4, - name -> Varchar, - preferred_username -> Nullable, - password_encrypted -> Text, - email -> Nullable, - icon -> Nullable, - start_time -> Timestamp, - } -} - -joinable!(community_follower -> community (community_id)); -joinable!(community_user -> community (community_id)); -joinable!(post_dislike -> post (post_id)); -joinable!(post_like -> post (post_id)); - -allow_tables_to_appear_in_same_query!( - community, - community_follower, - community_user, - post, - post_dislike, - post_like, - user_, -); diff --git a/server/src/apub.rs b/server/src/apub.rs index 4cfd1088..16b8be1b 100644 --- a/server/src/apub.rs +++ b/server/src/apub.rs @@ -48,11 +48,9 @@ mod tests { }; let person = expected_user.person(); - - // let expected_person = Person { - // }; - assert_eq!("http://0.0.0.0/api/v1/user/thom", person.object_props.id_string().unwrap()); + let json = serde_json::to_string_pretty(&person).unwrap(); + println!("{}", json); } } diff --git a/server/src/lib.rs b/server/src/lib.rs index e7898971..b1a1f252 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -31,6 +31,11 @@ pub trait Joinable { fn leave(conn: &PgConnection, form: T) -> usize; } +pub trait Likeable { + fn like(conn: &PgConnection, form: T) -> Result where Self: Sized; + fn remove(conn: &PgConnection, form: T) -> usize; +} + pub fn establish_connection() -> PgConnection { let db_url = Settings::get().db_url; PgConnection::establish(&db_url) diff --git a/server/src/schema.rs b/server/src/schema.rs index 75cbad5b..4ab54bc4 100644 --- a/server/src/schema.rs +++ b/server/src/schema.rs @@ -1,3 +1,25 @@ +table! { + comment (id) { + id -> Int4, + content -> Text, + attributed_to -> Text, + post_id -> Int4, + parent_id -> Nullable, + published -> Timestamp, + updated -> Nullable, + } +} + +table! { + comment_like (id) { + id -> Int4, + comment_id -> Int4, + fedi_user_id -> Text, + score -> Int2, + published -> Timestamp, + } +} + table! { community (id) { id -> Int4, @@ -36,20 +58,12 @@ table! { } } -table! { - post_dislike (id) { - id -> Int4, - fedi_user_id -> Text, - post_id -> Nullable, - published -> Timestamp, - } -} - table! { post_like (id) { id -> Int4, + post_id -> Int4, fedi_user_id -> Text, - post_id -> Nullable, + score -> Int2, published -> Timestamp, } } @@ -67,17 +81,19 @@ table! { } } +joinable!(comment -> post (post_id)); +joinable!(comment_like -> comment (comment_id)); joinable!(community_follower -> community (community_id)); joinable!(community_user -> community (community_id)); -joinable!(post_dislike -> post (post_id)); joinable!(post_like -> post (post_id)); allow_tables_to_appear_in_same_query!( + comment, + comment_like, community, community_follower, community_user, post, - post_dislike, post_like, user_, ); -- 2.40.1 From d52c16c123851e5ee8b5a6ee8c106615dab5081c Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 20 Mar 2019 18:22:31 -0700 Subject: [PATCH 0025/2583] Adding initial UI and Websocket server. --- API.md | 3 - README.md | 4 + server/Cargo.lock | 1450 ++++++++++++ server/Cargo.toml | 7 + server/src/actions/comment.rs | 7 + server/src/apub.rs | 2 +- server/src/bin/main.rs | 270 +++ server/src/lib.rs | 22 +- server/src/websocket_server/mod.rs | 1 + server/src/websocket_server/server.rs | 269 +++ ui/.gitignore | 30 + ui/assets/favicon.ico | Bin 0 -> 1150 bytes ui/fuse.js | 55 + ui/package.json | 31 + ui/src/components/home.tsx | 14 + ui/src/components/login.tsx | 145 ++ ui/src/components/navbar.tsx | 38 + ui/src/components/search.tsx | 205 ++ ui/src/env.ts | 3 + ui/src/index.html | 19 + ui/src/index.tsx | 42 + ui/src/interfaces.ts | 14 + ui/src/main.css | 0 ui/src/services.ts | 57 + ui/src/utils.ts | 2 + ui/tsconfig.json | 12 + ui/tslint.json | 28 + ui/yarn.lock | 3084 +++++++++++++++++++++++++ 28 files changed, 5803 insertions(+), 11 deletions(-) create mode 100644 server/src/bin/main.rs create mode 100644 server/src/websocket_server/mod.rs create mode 100644 server/src/websocket_server/server.rs create mode 100644 ui/.gitignore create mode 100644 ui/assets/favicon.ico create mode 100644 ui/fuse.js create mode 100644 ui/package.json create mode 100644 ui/src/components/home.tsx create mode 100644 ui/src/components/login.tsx create mode 100644 ui/src/components/navbar.tsx create mode 100644 ui/src/components/search.tsx create mode 100644 ui/src/env.ts create mode 100644 ui/src/index.html create mode 100644 ui/src/index.tsx create mode 100644 ui/src/interfaces.ts create mode 100644 ui/src/main.css create mode 100644 ui/src/services.ts create mode 100644 ui/src/utils.ts create mode 100644 ui/tsconfig.json create mode 100644 ui/tslint.json create mode 100644 ui/yarn.lock diff --git a/API.md b/API.md index d631b2ba..cf65b65d 100644 --- a/API.md +++ b/API.md @@ -147,13 +147,11 @@ } ``` ## Actions - - These are all posts to a user's outbox. - The server then creates a post to the necessary inbox of the recipient, or the followers. - Whenever a user accesses the site, they do a get from their inbox. ### Comments - #### [Create](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-create) ``` { @@ -163,7 +161,6 @@ "object": comment_id, or post_id } ``` - #### [Delete](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-delete) ``` { diff --git a/README.md b/README.md index 99a8ad4e..b3f8d11b 100644 --- a/README.md +++ b/README.md @@ -33,8 +33,12 @@ We have a twitter alternative (mastodon), a facebook alternative (friendica), so - [helpful diesel examples](http://siciarz.net/24-days-rust-diesel/) - [Mastodan public key server example](https://blog.joinmastodon.org/2018/06/how-to-implement-a-basic-activitypub-server/) - [Recursive query for adjacency list for nested comments](https://stackoverflow.com/questions/192220/what-is-the-most-efficient-elegant-way-to-parse-a-flat-table-into-a-tree/192462#192462) +- https://github.com/sparksuite/simplemde-markdown-editor +- [Sticky Sidebar](https://stackoverflow.com/questions/38382043/how-to-use-css-position-sticky-to-keep-a-sidebar-visible-with-bootstrap-4/49111934) ## TODOs - Endpoints - DB - Followers / following + + diff --git a/server/Cargo.lock b/server/Cargo.lock index 93769d2d..b4557d00 100644 --- a/server/Cargo.lock +++ b/server/Cargo.lock @@ -45,6 +45,126 @@ dependencies = [ "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "actix" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "actix_derive 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-signal 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "trust-dns-proto 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "trust-dns-resolver 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)", + "uuid 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "actix-net" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "actix 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-current-thread 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "trust-dns-resolver 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "actix-web" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "actix 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-net 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "brotli2 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "cookie 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "h2 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", + "mime_guess 2.0.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_urlencoded 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-current-thread 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "v_htmlescape 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "actix_derive" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "adler32" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "aho-corasick" version = "0.6.10" @@ -53,6 +173,29 @@ dependencies = [ "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "arc-swap" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "arrayvec" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "atty" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "autocfg" version = "0.1.2" @@ -80,6 +223,15 @@ dependencies = [ "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "base64" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "base64" version = "0.10.1" @@ -123,11 +275,43 @@ dependencies = [ "opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "brotli-sys" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "brotli2" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "brotli-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "build_const" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "byteorder" version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "bytes" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "cc" version = "1.0.29" @@ -157,6 +341,81 @@ dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "cookie" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crc" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crc32fast" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-channel" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-deque" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-queue" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-utils" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "diesel" version = "1.4.1" @@ -187,6 +446,88 @@ dependencies = [ "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "dtoa" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "encoding" +version = "0.2.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "encoding-index-japanese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding-index-korean 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding-index-simpchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding-index-singlebyte 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "encoding-index-japanese" +version = "1.20141219.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "encoding-index-korean" +version = "1.20141219.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "encoding-index-simpchinese" +version = "1.20141219.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "encoding-index-singlebyte" +version = "1.20141219.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "encoding-index-tradchinese" +version = "1.20141219.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "encoding_index_tests" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "env_logger" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "error-chain" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "backtrace 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "failure" version = "0.1.5" @@ -207,11 +548,55 @@ dependencies = [ "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "flate2" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz_oxide_c_api 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "fnv" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "fuchsia-cprng" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "fuchsia-zircon" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "fuchsia-zircon-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-cpupool" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "generic-array" version = "0.12.0" @@ -220,26 +605,178 @@ dependencies = [ "typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "h2" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "heck" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "hostname" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "winutil 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "http" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "httparse" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "humantime" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "idna" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "indexmap" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "iovec" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ipconfig" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "error-chain 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "socket2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "widestring 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winreg 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "itoa" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "kernel32-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "language-tags" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "lazy_static" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "lazycell" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "libc" version = "0.2.49" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "linked-hash-map" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "lock_api" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "log" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "lru-cache" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "linked-hash-map 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "matches" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "memchr" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "memoffset" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "mime" version = "0.3.13" @@ -248,6 +785,108 @@ dependencies = [ "unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "mime_guess" +version = "2.0.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", + "phf 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_codegen 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "miniz-sys" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "miniz_oxide" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "miniz_oxide_c_api" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz_oxide 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "mio" +version = "0.6.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "mio-uds" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "miow" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "net2" +version = "0.2.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "nodrop" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "nom" +version = "4.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "num-integer" version = "0.1.39" @@ -261,11 +900,88 @@ name = "num-traits" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "num_cpus" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "opaque-debug" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "owning_ref" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "parking_lot" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "parking_lot_core" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "percent-encoding" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "phf" +version = "0.7.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "phf_codegen" +version = "0.7.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "phf_generator" +version = "0.7.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "phf_shared" +version = "0.7.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "pq-sys" version = "0.4.6" @@ -290,6 +1006,11 @@ dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "quick-error" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "quote" version = "0.5.2" @@ -306,6 +1027,18 @@ dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rand" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rand" version = "0.6.5" @@ -415,6 +1148,14 @@ name = "redox_syscall" version = "0.1.51" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "redox_termios" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "regex" version = "0.2.11" @@ -427,6 +1168,18 @@ dependencies = [ "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "regex" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "regex-syntax" version = "0.5.6" @@ -435,20 +1188,82 @@ dependencies = [ "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "regex-syntax" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "resolv-conf" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "hostname 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ring" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rustc-demangle" version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "ryu" version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "safemem" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "scopeguard" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "serde" version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "serde_derive" @@ -470,17 +1285,101 @@ dependencies = [ "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "serde_urlencoded" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "server" version = "0.0.1" dependencies = [ "activitypub 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "actix 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-web 0.7.18 (registry+https://github.com/rust-lang/crates.io-index)", "bcrypt 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "diesel 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "dotenv 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "strum 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", + "strum_macros 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sha1" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "signal-hook" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "arc-swap 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "siphasher" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "slab" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "smallvec" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "socket2" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "stable_deref_trait" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "string" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "strum" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "strum_macros" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -514,6 +1413,24 @@ dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "termcolor" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "termion" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "thread_local" version = "0.3.6" @@ -532,6 +1449,263 @@ dependencies = [ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "tokio" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-current-thread 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-fs 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-uds 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-codec" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-current-thread" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-executor" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-fs" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-io" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-reactor" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-signal" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", + "signal-hook 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-sync" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-tcp" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-threadpool" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-timer" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-udp" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-uds" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tower-service" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "trust-dns-proto" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "socket2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "trust-dns-proto" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "socket2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "trust-dns-resolver" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "ipconfig 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "resolv-conf 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "trust-dns-proto 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "typenum" version = "1.10.0" @@ -542,6 +1716,14 @@ name = "ucd-util" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "unicase" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "unicase" version = "2.2.0" @@ -550,16 +1732,91 @@ dependencies = [ "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "unicode-bidi" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "unicode-normalization" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "unicode-segmentation" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "unicode-xid" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "untrusted" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "url" +version = "1.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "utf8-ranges" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "uuid" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "v_escape" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "v_escape_derive 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "v_escape_derive" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "nom 4.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "v_htmlescape" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "v_escape 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "vcpkg" version = "0.2.6" @@ -570,6 +1827,16 @@ name = "version_check" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "widestring" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "winapi" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "winapi" version = "0.3.6" @@ -579,55 +1846,179 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "winapi-build" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "winapi-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "wincolor" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "winreg" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "winutil" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ws2_32-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [metadata] "checksum activitypub 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08018b04725f5107d4a64e850f8a44a1f8a7e72abf0ca09125e3054921d26fd9" "checksum activitystreams-derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "48db826c588a009960d74530e7c215e21fae130f585362504dc6b6357e5ce86b" "checksum activitystreams-traits 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "670ef03168e704b0cae242e7a5d8b40506772b339687e01a3496fc4afe2e8542" "checksum activitystreams-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "224d1e28d043f4275139445475da8866f0a430ecfc9047c9a15fbe3c70c22b04" +"checksum actix 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6c616db5fa4b0c40702fb75201c2af7f8aa8f3a2e2c1dda3b0655772aa949666" +"checksum actix-net 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "8bebfbe6629e0131730746718c9e032b58f02c6ce06ed7c982b9fef6c8545acd" +"checksum actix-web 0.7.18 (registry+https://github.com/rust-lang/crates.io-index)" = "e9f33c941e5e69a58a6bfef33853228042ed3799fc4b5a4923a36a85776fb690" +"checksum actix_derive 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4300e9431455322ae393d43a2ba1ef96b8080573c0fc23b196219efedfb6ba69" +"checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c" "checksum aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "81ce3d38065e618af2d7b77e10c5ad9a069859b4be3c2250f674af3840d9c8a5" +"checksum arc-swap 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1025aeae2b664ca0ea726a89d574fe8f4e77dd712d443236ad1de00379450cf6" +"checksum arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "92c7fb76bc8826a8b33b4ee5bb07a247a81e76764ab4d55e8f73e3a4d8808c71" +"checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" "checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799" "checksum backtrace 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "cd5a90e2b463010cd0e0ce9a11d4a9d5d58d9f41d4a6ba3dcaf9e68b466e88b4" "checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6" "checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" +"checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" "checksum bcrypt 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2a426ab63025c1d21e4e12a218c915fa22097b89ab7ed5765fa803101e004b27" "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" "checksum block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1c924d49bd09e7c06003acda26cd9742e796e34282ec6c1189404dee0c1f4774" "checksum blowfish 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6aeb80d00f2688459b8542068abd974cfb101e7a82182414a99b5026c0d85cc3" +"checksum brotli-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4445dea95f4c2b41cde57cc9fee236ae4dbae88d8fcbdb4750fc1bb5d86aaecd" +"checksum brotli2 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0cb036c3eade309815c15ddbacec5b22c4d1f3983a774ab2eac2e3e9ea85568e" +"checksum build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39092a32794787acd8525ee150305ff051b0aa6cc2abaf193924f5ab05425f39" "checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb" +"checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" "checksum cc 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)" = "4390a3b5f4f6bce9c1d0c00128379df433e53777fdd30e92f16a529332baec4e" "checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4" "checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +"checksum cookie 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1465f8134efa296b4c19db34d909637cb2bf0f7aaf21299e23e18fa29ac557cf" +"checksum crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d663548de7f5cca343f1e0a48d14dcfb0e9eb4e079ec58883b7251539fa10aeb" +"checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" +"checksum crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0f0ed1a4de2235cabda8558ff5840bffb97fcb64c97827f354a451307df5f72b" +"checksum crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b18cd2e169ad86297e6bc0ad9aa679aee9daa4f19e8163860faf7c164e4f5a71" +"checksum crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "04c9e3102cc2d69cd681412141b390abd55a362afc1540965dad0ad4d34280b4" +"checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" +"checksum crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f8306fcef4a7b563b76b7dd949ca48f52bc1141aa067d2ea09565f3e2652aa5c" "checksum diesel 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a2469cbcf1dfb9446e491cac4c493c2554133f87f7d041e892ac82e5cd36e863" "checksum diesel_derives 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "62a27666098617d52c487a41f70de23d44a1dc1f3aa5877ceba2790fb1f1cab4" "checksum dotenv 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "400b347fe65ccfbd8f545c9d9a75d04b0caf23fec49aaa838a9a05398f94c019" +"checksum dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6d301140eb411af13d3115f9a562c85cc6b541ade9dfa314132244aaee7489dd" +"checksum encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec" +"checksum encoding-index-japanese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91" +"checksum encoding-index-korean 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4dc33fb8e6bcba213fe2f14275f0963fd16f0a02c878e3095ecfdf5bee529d81" +"checksum encoding-index-simpchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d87a7194909b9118fc707194baa434a4e3b0fb6a5a757c73c3adb07aa25031f7" +"checksum encoding-index-singlebyte 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3351d5acffb224af9ca265f435b859c7c01537c0849754d3db3fdf2bfe2ae84a" +"checksum encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18" +"checksum encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569" +"checksum env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "afb070faf94c85d17d50ca44f6ad076bce18ae92f0037d350947240a36e9d42e" +"checksum error-chain 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6930e04918388a9a2e41d518c25cf679ccafe26733fb4127dbf21993f2575d46" "checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" "checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" +"checksum flate2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2291c165c8e703ee54ef3055ad6188e3d51108e2ded18e9f2476e774fc5ad3d4" +"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" "checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" +"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" +"checksum futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "49e7653e374fe0d0c12de4250f0bdb60680b8c80eed558c5c7538eec9c89e21b" +"checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" "checksum generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c0f28c2f5bfb5960175af447a2da7c18900693738343dc896ffbcabd9839592" +"checksum h2 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "ddb2b25a33e231484694267af28fec74ac63b5ccf51ee2065a5e313b834d836e" +"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" +"checksum hostname 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "21ceb46a83a85e824ef93669c8b390009623863b5c195d1ba747292c0c72f94e" +"checksum http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "fe67e3678f2827030e89cc4b9e7ecd16d52f132c0b940ab5005f88e821500f6a" +"checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" +"checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114" +"checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" +"checksum indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e81a7c05f79578dbc15793d8b619db9ba32b4577003ef3af1a91c416798c58d" +"checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" +"checksum ipconfig 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "08f7eadeaf4b52700de180d147c4805f199854600b36faa963d91114827b2ffc" "checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" +"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +"checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" "checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" +"checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" "checksum libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)" = "413f3dfc802c5dc91dc570b05125b6cda9855edfaa9825c9849807876376e70e" +"checksum linked-hash-map 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7860ec297f7008ff7a1e3382d7f7e1dcd69efc94751a2284bafc3d013c2aa939" +"checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" +"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" +"checksum lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4d06ff7ff06f729ce5f4e227876cb88d10bc59cd4ae1e09fbb2bde15c850dc21" +"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" "checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39" +"checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" "checksum mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "3e27ca21f40a310bd06d9031785f4801710d566c184a6e15bad4f1d9b65f9425" +"checksum mime_guess 2.0.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "30de2e4613efcba1ec63d8133f344076952090c122992a903359be5a4f99c3ed" +"checksum miniz-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "0300eafb20369952951699b68243ab4334f4b10a88f411c221d444b36c40e649" +"checksum miniz_oxide 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c468f2369f07d651a5d0bb2c9079f8488a66d5466efe42d0c5c6466edcb7f71e" +"checksum miniz_oxide_c_api 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b7fe927a42e3807ef71defb191dc87d4e24479b221e67015fe38ae2b7b447bab" +"checksum mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)" = "71646331f2619b1026cc302f87a2b8b648d5c6dd6937846a16cc8ce0f347f432" +"checksum mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" +"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" +"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" +"checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" +"checksum nom 4.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "22293d25d3f33a8567cc8a1dc20f40c7eeb761ce83d0fcca059858580790cac3" "checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea" "checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" +"checksum num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a23f0ed30a54abaa0c7e83b1d2d87ada7c3c23078d1d87815af3e3b6385fbba" "checksum opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "93f5bb2e8e8dec81642920ccff6b61f1eb94fa3020c5a325c9851ff604152409" +"checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" +"checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" +"checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" +"checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" +"checksum phf 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b3da44b85f8e8dfaec21adae67f95d93244b2ecf6ad2a692320598dcc8e6dd18" +"checksum phf_codegen 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b03e85129e324ad4166b06b2c7491ae27fe3ec353af72e72cd1654c7225d517e" +"checksum phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "09364cc93c159b8b06b1f4dd8a4398984503483891b0c26b867cf431fb132662" +"checksum phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "234f71a15de2288bcb7e3b6515828d22af7ec8598ee6d24c3b526fa0a80b67a0" "checksum pq-sys 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "6ac25eee5a0582f45a67e837e350d784e7003bd29a5f460796772061ca49ffda" "checksum proc-macro2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1b06e2f335f48d24442b35a19df506a835fb3547bc3c06ef27340da9acf5cae7" "checksum proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)" = "4d317f9caece796be1980837fd5cb3dfec5613ebdb04ad0956deea83ce168915" +"checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" "checksum quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9949cfe66888ffe1d53e6ec9d9f3b70714083854be20fd5e271b232a017401e8" "checksum quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "cdd8e04bd9c52e0342b406469d494fcb033be4bdbe5c606016defbb1681411e1" +"checksum rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" "checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" "checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" "checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" @@ -640,25 +2031,84 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" "checksum redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)" = "423e376fffca3dfa06c9e9790a9ccd282fafb3cc6e6397d01dbf64f9bacc6b85" +"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" "checksum regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384" +"checksum regex 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "53ee8cfdddb2e0291adfb9f13d31d3bbe0a03c9a402c01b1e24188d86c35b24f" "checksum regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7" +"checksum regex-syntax 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8c2f35eedad5295fdf00a63d7d4b238135723f92b434ec06774dad15c7ab0861" +"checksum resolv-conf 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b263b4aa1b5de9ffc0054a2386f96992058bb6870aab516f8cdeb8a667d56dcb" +"checksum ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2c4db68a2e35f3497146b7e4563df7d4773a2433230c5e4b448328e31740458a" "checksum rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "adacaae16d02b6ec37fdc7acfcddf365978de76d1983d3ee22afc260e1ca9619" +"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" "checksum ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9e9b8cde282a9fe6a42dd4681319bfb63f121b8a8ee9439c6f4107e58a46f7" +"checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9" +"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" +"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" "checksum serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)" = "9f301d728f2b94c9a7691c90f07b0b4e8a4517181d9461be94c04bddeb4bd850" "checksum serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)" = "beed18e6f5175aef3ba670e57c60ef3b1b74d250d962a26604bff4c80e970dd4" "checksum serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)" = "27dce848e7467aa0e2fcaf0a413641499c0b745452aaca1194d24dedde9e13c9" +"checksum serde_urlencoded 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d48f9f99cd749a2de71d29da5f948de7f2764cc5a9d7f3c97e3514d4ee6eabf2" +"checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" +"checksum signal-hook 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "97a47ae722318beceb0294e6f3d601205a1e6abaa4437d9d33e3a212233e3021" +"checksum siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" +"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" +"checksum smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c4488ae950c49d403731982257768f48fada354a5203fe81f9bb6f43ca9002be" +"checksum socket2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "c4d11a52082057d87cb5caa31ad812f4504b97ab44732cd8359df2e9ff9f48e7" +"checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" +"checksum string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b639411d0b9c738748b5397d5ceba08e648f4f1992231aa859af1a017f31f60b" +"checksum strum 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1810e25f576e7ffce1ff5243b37066da5ded0310b3274c20baaeccb1145b2806" +"checksum strum_macros 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "572a2f4e53dd4c3483fd79e5cc10ddd773a3acb1169bbfe8762365e107110579" "checksum syn 0.13.11 (registry+https://github.com/rust-lang/crates.io-index)" = "14f9bf6292f3a61d2c716723fdb789a41bbe104168e6f496dc6497e531ea1b9b" "checksum syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)" = "f92e629aa1d9c827b2bb8297046c1ccffc57c99b947a680d3ccff1f136a3bee9" "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" +"checksum termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f" +"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" +"checksum tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "fcaabb3cec70485d0df6e9454fe514393ad1c4070dee8915f11041e95630b230" +"checksum tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c501eceaf96f0e1793cf26beb63da3d11c738c4a943fdf3746d81d64684c39f" +"checksum tokio-current-thread 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c756b04680eea21902a46fca4e9f410a2332c04995af590e07ff262e2193a9a3" +"checksum tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "30c6dbf2d1ad1de300b393910e8a3aa272b724a400b6531da03eed99e329fbf0" +"checksum tokio-fs 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "3fe6dc22b08d6993916647d108a1a7d15b9cd29c4f4496c62b92c45b5041b7af" +"checksum tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5090db468dad16e1a7a54c8c67280c5e4b544f3d3e018f0b913b400261f85926" +"checksum tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6af16bfac7e112bea8b0442542161bfc41cbfa4466b580bdda7d18cb88b911ce" +"checksum tokio-signal 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "dd6dc5276ea05ce379a16de90083ec80836440d5ef8a6a39545a3207373b8296" +"checksum tokio-sync 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1bf2b9dac2a0509b5cfd1df5aa25eafacb616a42a491a13604d6bbeab4486363" +"checksum tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" +"checksum tokio-threadpool 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "742e511f6ce2298aeb86fc9ea0d8df81c2388c6ebae3dc8a7316e8c9df0df801" +"checksum tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "2910970404ba6fa78c5539126a9ae2045d62e3713041e447f695f41405a120c6" +"checksum tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "66268575b80f4a4a710ef83d087fdfeeabdce9b74c797535fbac18a2cb906e92" +"checksum tokio-uds 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "037ffc3ba0e12a0ab4aca92e5234e0dedeb48fddf6ccd260f1f150a36a9f2445" +"checksum tower-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b32f72af77f1bfe3d3d4da8516a238ebe7039b51dd8637a09841ac7f16d2c987" +"checksum trust-dns-proto 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0838272e89f1c693b4df38dc353412e389cf548ceed6f9fd1af5a8d6e0e7cf74" +"checksum trust-dns-proto 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "09144f0992b0870fa8d2972cc069cbf1e3c0fda64d1f3d45c4d68d0e0b52ad4e" +"checksum trust-dns-resolver 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8a9f877f7a1ad821ab350505e1f1b146a4960402991787191d6d8cab2ce2de2c" "checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" "checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" +"checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" "checksum unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9d3218ea14b4edcaccfa0df0a64a3792a2c32cc706f1b336e48867f9d3147f90" +"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" +"checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" +"checksum unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa6024fc12ddfd1c6dbc14a80fa2324d4568849869b779f6bd37e5e4c03344d1" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" +"checksum untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "55cd1f4b4e96b46aeb8d4855db4a7a9bd96eeeb5c6a1ab54593328761642ce2f" +"checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" "checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737" +"checksum uuid 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0238db0c5b605dd1cf51de0f21766f97fba2645897024461d6a00c036819a768" +"checksum v_escape 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c8b50688edb86f4c092a1a9fe8bda004b0faa3197100897653809e97e09a2814" +"checksum v_escape_derive 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7cd994c63b487fef7aad31e5394ec04b9e24de7b32ea5251c9fb499cd2cbf44c" +"checksum v_htmlescape 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "020cae817dc82693aa523f01087b291b1c7a9ac8cea5c12297963f21769fb27f" "checksum vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "def296d3eb3b12371b2c7d0e83bfe1403e4db2d7a0bba324a12b21c4ee13143d" "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" +"checksum widestring 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7157704c2e12e3d2189c507b7482c52820a16dfa4465ba91add92f266667cadb" +"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" +"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +"checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +"checksum wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba" +"checksum winreg 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a27a759395c1195c4cc5cda607ef6f8f6498f64e78f7900f5de0a127a424704a" +"checksum winutil 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7daf138b6b14196e3830a588acf1e86966c694d3e8fb026fb105b8b5dca07e6e" +"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" diff --git a/server/Cargo.toml b/server/Cargo.toml index ba497f44..3c875e90 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -11,3 +11,10 @@ activitypub = "0.1.4" chrono = { version = "0.4", features = ["serde"] } failure = "0.1.5" serde_json = "*" +serde = { version = "1.0", features = ["derive"] } +actix = "*" +actix-web = "*" +env_logger = "*" +rand = "0.6.5" +strum = "0.14.0" +strum_macros = "0.14.0" diff --git a/server/src/actions/comment.rs b/server/src/actions/comment.rs index 104c13f2..d23382c6 100644 --- a/server/src/actions/comment.rs +++ b/server/src/actions/comment.rs @@ -4,6 +4,13 @@ use diesel::*; use diesel::result::Error; use {Crud, Likeable}; +// WITH RECURSIVE MyTree AS ( +// SELECT * FROM comment WHERE parent_id IS NULL +// UNION ALL +// SELECT m.* FROM comment AS m JOIN MyTree AS t ON m.parent_id = t.id +// ) +// SELECT * FROM MyTree; + #[derive(Queryable, Identifiable, PartialEq, Debug)] #[table_name="comment"] pub struct Comment { diff --git a/server/src/apub.rs b/server/src/apub.rs index 16b8be1b..6272fedc 100644 --- a/server/src/apub.rs +++ b/server/src/apub.rs @@ -34,7 +34,7 @@ mod tests { use super::User_; use naive_now; - #[test] + #[test] fn test_person() { let expected_user = User_ { id: 52, diff --git a/server/src/bin/main.rs b/server/src/bin/main.rs new file mode 100644 index 00000000..25181aaa --- /dev/null +++ b/server/src/bin/main.rs @@ -0,0 +1,270 @@ +extern crate server; + +use std::time::{Instant, Duration}; +use server::actix::*; +use server::actix_web::server::HttpServer; +use server::actix_web::{fs, http, ws, App, Error, HttpRequest, HttpResponse}; + + +/// How often heartbeat pings are sent +const HEARTBEAT_INTERVAL: Duration = Duration::from_secs(5); +/// How long before lack of client response causes a timeout +const CLIENT_TIMEOUT: Duration = Duration::from_secs(10); + +use server::websocket_server::server::*; +use std::str::FromStr; +// use server::websocket_server::server::UserOperation::from_str; + +/// This is our websocket route state, this state is shared with all route +/// instances via `HttpContext::state()` +struct WsChatSessionState { + addr: Addr, +} + +/// Entry point for our route +fn chat_route(req: &HttpRequest) -> Result { + ws::start( + req, + WSSession { + id: 0, + hb: Instant::now() + }, + ) +} + +struct WSSession { + /// unique session id + id: usize, + /// Client must send ping at least once per 10 seconds (CLIENT_TIMEOUT), + /// otherwise we drop connection. + hb: Instant +} + +impl Actor for WSSession { + type Context = ws::WebsocketContext; + + /// Method is called on actor start. + /// We register ws session with ChatServer + fn started(&mut self, ctx: &mut Self::Context) { + // we'll start heartbeat process on session start. + self.hb(ctx); + + // register self in chat server. `AsyncContext::wait` register + // future within context, but context waits until this future resolves + // before processing any other events. + // HttpContext::state() is instance of WsChatSessionState, state is shared + // across all routes within application + let addr = ctx.address(); + ctx.state() + .addr + .send(Connect { + addr: addr.recipient(), + }) + .into_actor(self) + .then(|res, act, ctx| { + match res { + Ok(res) => act.id = res, + // something is wrong with chat server + _ => ctx.stop(), + } + fut::ok(()) + }) + .wait(ctx); + } + + fn stopping(&mut self, ctx: &mut Self::Context) -> Running { + // notify chat server + ctx.state().addr.do_send(Disconnect { id: self.id }); + Running::Stop + } +} + +/// Handle messages from chat server, we simply send it to peer websocket +impl Handler for WSSession { + type Result = (); + + fn handle(&mut self, msg: WSMessage, ctx: &mut Self::Context) { + ctx.text(msg.0); + } +} + +use server::serde_json::Value; +/// WebSocket message handler +impl StreamHandler for WSSession { + fn handle(&mut self, msg: ws::Message, ctx: &mut Self::Context) { + // println!("WEBSOCKET MESSAGE: {:?}", msg); + match msg { + ws::Message::Ping(msg) => { + self.hb = Instant::now(); + ctx.pong(&msg); + } + ws::Message::Pong(_) => { + self.hb = Instant::now(); + } + ws::Message::Text(text) => { + let m = text.trim(); + let json: Value = serde_json::from_str(m).unwrap(); + + // Get the OP command, and its data + let op: &str = &json["op"].as_str().unwrap(); + let data: &Value = &json["data"]; + + let user_operation: UserOperation = UserOperation::from_str(op).unwrap(); + + match user_operation { + UserOperation::Login => { + let login: Login = serde_json::from_str(&data.to_string()).unwrap(); + ctx.state() + .addr + .do_send(login); + }, + UserOperation::Register => { + let register: Register = serde_json::from_str(&data.to_string()).unwrap(); + ctx.state() + .addr + .send(register) + .into_actor(self) + .then(|res, _, ctx| { + match res { + Ok(wut) => ctx.text(wut), + _ => println!("Something is wrong"), + } + fut::ok(()) + }) + .wait(ctx) + } + _ => ctx.text(format!("!!! unknown command: {:?}", m)), + } + + // we check for /sss type of messages + // if m.starts_with('/') { + // let v: Vec<&str> = m.splitn(2, ' ').collect(); + // match v[0] { + // "/list" => { + // // Send ListRooms message to chat server and wait for + // // response + // println!("List rooms"); + // ctx.state() + // .addr + // .send(ListRooms) + // .into_actor(self) + // .then(|res, _, ctx| { + // match res { + // Ok(rooms) => { + // for room in rooms { + // ctx.text(room); + // } + // } + // _ => println!("Something is wrong"), + // } + // fut::ok(()) + // }) + // .wait(ctx) + // .wait(ctx) pauses all events in context, + // so actor wont receive any new messages until it get list + // of rooms back + // } + // "/join" => { + // if v.len() == 2 { + // self.room = v[1].to_owned(); + // ctx.state().addr.do_send(Join { + // id: self.id, + // name: self.room.clone(), + // }); + + // ctx.text("joined"); + // } else { + // ctx.text("!!! room name is required"); + // } + // } + // "/name" => { + // if v.len() == 2 { + // self.name = Some(v[1].to_owned()); + // } else { + // ctx.text("!!! name is required"); + // } + // } + // _ => ctx.text(format!("!!! unknown command: {:?}", m)), + // } + // } else { + // let msg = if let Some(ref name) = self.name { + // format!("{}: {}", name, m) + // } else { + // m.to_owned() + // }; + // send message to chat server + // ctx.state().addr.do_send(ClientMessage { + // id: self.id, + // msg: msg, + // room: self.room.clone(), + // }) + // } + } + ws::Message::Binary(_bin) => println!("Unexpected binary"), + ws::Message::Close(_) => { + ctx.stop(); + }, + } + } +} + +impl WSSession { + /// helper method that sends ping to client every second. + /// + /// also this method checks heartbeats from client + fn hb(&self, ctx: &mut ws::WebsocketContext) { + ctx.run_interval(HEARTBEAT_INTERVAL, |act, ctx| { + // check client heartbeats + if Instant::now().duration_since(act.hb) > CLIENT_TIMEOUT { + // heartbeat timed out + println!("Websocket Client heartbeat failed, disconnecting!"); + + // notify chat server + ctx.state() + .addr + .do_send(Disconnect { id: act.id }); + + // stop actor + ctx.stop(); + + // don't try to send a ping + return; + } + + ctx.ping(""); + }); + } +} + +fn main() { + let _ = env_logger::init(); + let sys = actix::System::new("rust-reddit-fediverse-server"); + + // Start chat server actor in separate thread + let server = Arbiter::start(|_| ChatServer::default()); + + // Create Http server with websocket support + HttpServer::new(move || { + // Websocket sessions state + let state = WsChatSessionState { + addr: server.clone(), + }; + + App::with_state(state) + // redirect to websocket.html + // .resource("/", |r| r.method(http::Method::GET).f(|_| { + // HttpResponse::Found() + // .header("LOCATION", "/static/websocket.html") + // .finish() + // })) + // // websocket + .resource("/service/ws", |r| r.route().f(chat_route)) + // static resources + // .handler("/static/", fs::StaticFiles::new("static/").unwrap()) + }).bind("127.0.0.1:8080") + .unwrap() + .start(); + + println!("Started http server: 127.0.0.1:8080"); + let _ = sys.run(); +} diff --git a/server/src/lib.rs b/server/src/lib.rs index b1a1f252..3daeb8d2 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -1,7 +1,19 @@ #[macro_use] -extern crate diesel; -extern crate dotenv; -extern crate chrono; +pub extern crate diesel; +pub extern crate dotenv; +pub extern crate chrono; +pub extern crate serde; +pub extern crate serde_json; +pub extern crate actix; +pub extern crate actix_web; +pub extern crate rand; +pub extern crate strum; +#[macro_use] pub extern crate strum_macros; + +pub mod schema; +pub mod apub; +pub mod actions; +pub mod websocket_server; use diesel::*; use diesel::pg::PgConnection; @@ -9,11 +21,7 @@ use diesel::result::Error; use dotenv::dotenv; use std::env; -pub mod schema; -pub mod apub; -pub mod actions; -// pub trait Likeable; pub trait Crud { fn create(conn: &PgConnection, form: T) -> Result where Self: Sized; fn read(conn: &PgConnection, id: i32) -> Self; diff --git a/server/src/websocket_server/mod.rs b/server/src/websocket_server/mod.rs new file mode 100644 index 00000000..74f47ad3 --- /dev/null +++ b/server/src/websocket_server/mod.rs @@ -0,0 +1 @@ +pub mod server; diff --git a/server/src/websocket_server/server.rs b/server/src/websocket_server/server.rs new file mode 100644 index 00000000..2d410176 --- /dev/null +++ b/server/src/websocket_server/server.rs @@ -0,0 +1,269 @@ +//! `ChatServer` is an actor. It maintains list of connection client session. +//! And manages available rooms. Peers send messages to other peers in same +//! room through `ChatServer`. + +use actix::prelude::*; +use rand::{rngs::ThreadRng, Rng}; +use std::collections::{HashMap, HashSet}; +use serde::{Deserialize, Serialize}; + +use {Crud,establish_connection}; + +#[derive(EnumString,ToString,Debug)] +pub enum UserOperation { + Login, Register, Logout, Join, Edit, Reply, Vote, Delete, NextPage, Sticky +} + +pub enum MessageType { + Comments, Users, Ping, Pong +} + + + +/// Chat server sends this messages to session +#[derive(Message)] +pub struct WSMessage(pub String); + +/// Message for chat server communications + +/// New chat session is created +#[derive(Message)] +#[rtype(usize)] +pub struct Connect { + pub addr: Recipient, +} + +/// Session is disconnected +#[derive(Message)] +pub struct Disconnect { + pub id: usize, +} + +/// Send message to specific room +#[derive(Message)] +pub struct ClientMessage { + /// Id of the client session + pub id: usize, + /// Peer message + pub msg: String, + /// Room name + pub room: String, +} + +/// List of available rooms +pub struct ListRooms; + +impl actix::Message for ListRooms { + type Result = Vec; +} + +/// Join room, if room does not exists create new one. +#[derive(Message)] +pub struct Join { + /// Client id + pub id: usize, + /// Room name + pub name: String, +} + +#[derive(Message)] +#[derive(Serialize, Deserialize)] +pub struct Login { + pub username: String, + pub password: String +} + +// #[derive(Message)] +#[derive(Serialize, Deserialize)] +pub struct Register { + username: String, + email: Option, + password: String, + password_verify: String +} + +impl actix::Message for Register { + type Result = String; +} +/// `ChatServer` manages chat rooms and responsible for coordinating chat +/// session. implementation is super primitive +pub struct ChatServer { + sessions: HashMap>, // A map from generated random ID to session addr + rooms: HashMap>, // A map from room name to set of connectionIDs + rng: ThreadRng, +} + +impl Default for ChatServer { + fn default() -> ChatServer { + // default room + let mut rooms = HashMap::new(); + rooms.insert("Main".to_owned(), HashSet::new()); + + ChatServer { + sessions: HashMap::new(), + rooms: rooms, + rng: rand::thread_rng(), + } + } +} + +impl ChatServer { + /// Send message to all users in the room + fn send_room_message(&self, room: &str, message: &str, skip_id: usize) { + if let Some(sessions) = self.rooms.get(room) { + for id in sessions { + if *id != skip_id { + if let Some(addr) = self.sessions.get(id) { + let _ = addr.do_send(WSMessage(message.to_owned())); + } + } + } + } + } +} + +/// Make actor from `ChatServer` +impl Actor for ChatServer { + /// We are going to use simple Context, we just need ability to communicate + /// with other actors. + type Context = Context; +} + +/// Handler for Connect message. +/// +/// Register new session and assign unique id to this session +impl Handler for ChatServer { + type Result = usize; + + fn handle(&mut self, msg: Connect, _: &mut Context) -> Self::Result { + println!("Someone joined"); + + // notify all users in same room + self.send_room_message(&"Main".to_owned(), "Someone joined", 0); + + // register session with random id + let id = self.rng.gen::(); + self.sessions.insert(id, msg.addr); + + // auto join session to Main room + self.rooms.get_mut(&"Main".to_owned()).unwrap().insert(id); + + // send id back + id + } +} + +/// Handler for Disconnect message. +impl Handler for ChatServer { + type Result = (); + + fn handle(&mut self, msg: Disconnect, _: &mut Context) { + println!("Someone disconnected"); + + let mut rooms: Vec = Vec::new(); + + // remove address + if self.sessions.remove(&msg.id).is_some() { + // remove session from all rooms + for (name, sessions) in &mut self.rooms { + if sessions.remove(&msg.id) { + rooms.push(name.to_owned()); + } + } + } + // send message to other users + for room in rooms { + self.send_room_message(&room, "Someone disconnected", 0); + } + } +} + +/// Handler for Message message. +impl Handler for ChatServer { + type Result = (); + + fn handle(&mut self, msg: ClientMessage, _: &mut Context) { + self.send_room_message(&msg.room, msg.msg.as_str(), msg.id); + } +} + +/// Handler for `ListRooms` message. +impl Handler for ChatServer { + type Result = MessageResult; + + fn handle(&mut self, _: ListRooms, _: &mut Context) -> Self::Result { + let mut rooms = Vec::new(); + + for key in self.rooms.keys() { + rooms.push(key.to_owned()) + } + + MessageResult(rooms) + } +} + +/// Join room, send disconnect message to old room +/// send join message to new room +impl Handler for ChatServer { + type Result = (); + + fn handle(&mut self, msg: Join, _: &mut Context) { + let Join { id, name } = msg; + let mut rooms = Vec::new(); + + // remove session from all rooms + for (n, sessions) in &mut self.rooms { + if sessions.remove(&id) { + rooms.push(n.to_owned()); + } + } + // send message to other users + for room in rooms { + self.send_room_message(&room, "Someone disconnected", 0); + } + + if self.rooms.get_mut(&name).is_none() { + self.rooms.insert(name.clone(), HashSet::new()); + } + self.send_room_message(&name, "Someone connected", id); + self.rooms.get_mut(&name).unwrap().insert(id); + } + +} + +impl Handler for ChatServer { + + type Result = (); + fn handle(&mut self, msg: Login, _: &mut Context) { + println!("{}", msg.password); + + } +} + +impl Handler for ChatServer { + + type Result = MessageResult; + fn handle(&mut self, msg: Register, _: &mut Context) -> Self::Result { + + use actions::user::*; + let conn = establish_connection(); + + // TODO figure out how to return values, and throw errors + + // Register the new user + let user_form = UserForm { + name: &msg.username, + email: msg.email.as_ref().map(|x| &**x), + password_encrypted: &msg.password, + preferred_username: None, + updated: None + }; + + let inserted_user = User_::create(&conn, user_form).unwrap(); + + + // Return the jwt + MessageResult("hi".to_string()) + + } +} diff --git a/ui/.gitignore b/ui/.gitignore new file mode 100644 index 00000000..cc0ab540 --- /dev/null +++ b/ui/.gitignore @@ -0,0 +1,30 @@ +dist +.fusebox +_site +.alm +.history +.git +build +.build +.git +.history +.idea +.jshintrc +.nyc_output +.sass-cache +.vscode +build +coverage +jsconfig.json +Gemfile.lock +node_modules +.DS_Store +*.map +*.log +*.swp +*~ +test/data/result.json + +package-lock.json +*.orig + diff --git a/ui/assets/favicon.ico b/ui/assets/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..13f310e9f127f7d158d22478ffd2413d1a46e585 GIT binary patch literal 1150 zcmeH`%?`mp6os#reQkuDjl|C0L-Mq;CruXB5D z&-A8u#;n3f664;sMb)ffW?eu+dFf1MWCIaDp@3J&L8RU<`5o`)GS` z1<3;bD_*TXgC5kO=20wd3QM>I{4Mk$XpMLE56CwI{uI4v{o8>5U;l6af6?AO-wX6F m`=I~3fIq@N0`0#e=*-+ailr&1JsRcxWuKihJ8&AyAnyZdacNfo literal 0 HcmV?d00001 diff --git a/ui/fuse.js b/ui/fuse.js new file mode 100644 index 00000000..ff1e6d15 --- /dev/null +++ b/ui/fuse.js @@ -0,0 +1,55 @@ +const { + FuseBox, + Sparky, + EnvPlugin, + CSSPlugin, + WebIndexPlugin, + QuantumPlugin +} = require('fuse-box'); +// const transformInferno = require('../../dist').default +const transformInferno = require('ts-transform-inferno').default; +const transformClasscat = require('ts-transform-classcat').default; +let fuse, app; +let isProduction = false; + +Sparky.task('config', _ => { + fuse = new FuseBox({ + homeDir: 'src', + hash: isProduction, + output: 'dist/$name.js', + experimentalFeatures: true, + cache: !isProduction, + sourceMaps: !isProduction, + transformers: { + before: [transformClasscat(), transformInferno()], + }, + plugins: [ + EnvPlugin({ NODE_ENV: isProduction ? 'production' : 'development' }), + CSSPlugin(), + WebIndexPlugin({ + title: 'Inferno Typescript FuseBox Example', + template: 'src/index.html', + path: isProduction ? "/static" : "/" + }), + isProduction && + QuantumPlugin({ + bakeApiIntoBundle: 'app', + treeshake: true, + uglify: true, + }), + ], + }); + app = fuse.bundle('app').instructions('>index.tsx'); +}); +Sparky.task('clean', _ => Sparky.src('dist/').clean('dist/')); +Sparky.task('env', _ => (isProduction = true)); +Sparky.task('copy-assets', () => Sparky.src('assets/*.ico').dest('dist/')); +Sparky.task('dev', ['clean', 'config', 'copy-assets'], _ => { + fuse.dev(); + app.hmr().watch(); + return fuse.run(); +}); +Sparky.task('prod', ['clean', 'env', 'config', 'copy-assets'], _ => { + // fuse.dev({ reload: true }); // remove after demo + return fuse.run(); +}); diff --git a/ui/package.json b/ui/package.json new file mode 100644 index 00000000..ca4fa368 --- /dev/null +++ b/ui/package.json @@ -0,0 +1,31 @@ +{ + "name": "rust_reddit_fediverse", + "version": "1.0.0", + "description": "A simple UI for rust_reddit_fediverse", + "main": "index.js", + "scripts": { + "start": "node fuse dev", + "build": "node fuse prod" + }, + "keywords": [], + "author": "Dessalines", + "license": "GPL-2.0-or-later", + "engines": { + "node": ">=8.9.0" + }, + "engineStrict": true, + "dependencies": { + "classcat": "^1.1.3", + "dotenv": "^6.1.0", + "inferno": "^7.0.1", + "inferno-router": "^7.0.1", + "moment": "^2.22.2" + }, + "devDependencies": { + "fuse-box": "3.1.3", + "ts-transform-classcat": "^0.0.2", + "ts-transform-inferno": "^4.0.2", + "typescript": "^3.3.3333", + "uglify-es": "^3.3.9" + } +} diff --git a/ui/src/components/home.tsx b/ui/src/components/home.tsx new file mode 100644 index 00000000..07cb94f5 --- /dev/null +++ b/ui/src/components/home.tsx @@ -0,0 +1,14 @@ +import { Component } from 'inferno'; +import { repoUrl } from '../utils'; + +export class Home extends Component { + + render() { + return ( +
+ hola this is me. +
+ ) + } + +} diff --git a/ui/src/components/login.tsx b/ui/src/components/login.tsx new file mode 100644 index 00000000..fd6f5045 --- /dev/null +++ b/ui/src/components/login.tsx @@ -0,0 +1,145 @@ +import { Component, linkEvent } from 'inferno'; + +import { LoginForm, RegisterForm } from '../interfaces'; +import { WebSocketService } from '../services'; + +interface State { + loginForm: LoginForm; + registerForm: RegisterForm; +} + +let emptyState: State = { + loginForm: { + username: null, + password: null + }, + registerForm: { + username: null, + password: null, + password_verify: null + } +} + +export class Login extends Component { + + constructor(props, context) { + super(props, context); + + this.state = emptyState; + + } + render() { + return ( +
+
+
+ {this.loginForm()} +
+
+ {this.registerForm()} +
+
+
+ ) + } + + loginForm() { + return ( +
+
+

Login

+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+
+
+ Forgot your password or deleted your account? Reset your password. TODO +
+ ); + } + registerForm() { + return ( +
+

Sign Up

+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+
+
+ ); + } + + handleLoginSubmit(i: Login, event) { + console.log(i.state); + event.preventDefault(); + WebSocketService.Instance.login(i.state.loginForm); + } + + handleLoginUsernameChange(i: Login, event) { + i.state.loginForm.username = event.target.value; + } + + handleLoginPasswordChange(i: Login, event) { + i.state.loginForm.password = event.target.value; + } + + handleRegisterSubmit(i: Login, event) { + console.log(i.state); + event.preventDefault(); + WebSocketService.Instance.register(i.state.registerForm); + } + + handleRegisterUsernameChange(i: Login, event) { + i.state.registerForm.username = event.target.value; + } + + handleRegisterEmailChange(i: Login, event) { + i.state.registerForm.email = event.target.value; + } + + handleRegisterPasswordChange(i: Login, event) { + i.state.registerForm.password = event.target.value; + } + + handleRegisterPasswordVerifyChange(i: Login, event) { + i.state.registerForm.password_verify = event.target.value; + } +} diff --git a/ui/src/components/navbar.tsx b/ui/src/components/navbar.tsx new file mode 100644 index 00000000..86d5d1d2 --- /dev/null +++ b/ui/src/components/navbar.tsx @@ -0,0 +1,38 @@ +import { Component, linkEvent } from 'inferno'; +import { Link } from 'inferno-router'; +import { repoUrl } from '../utils'; + +export class Navbar extends Component { + + constructor(props, context) { + super(props, context); + } + + render() { + return ( +
{this.navbar()}
+ ) + } + + // TODO class active corresponding to current page + navbar() { + return ( + + ); + } + +} diff --git a/ui/src/components/search.tsx b/ui/src/components/search.tsx new file mode 100644 index 00000000..080761f9 --- /dev/null +++ b/ui/src/components/search.tsx @@ -0,0 +1,205 @@ +import { Component, linkEvent } from 'inferno'; +import * as moment from 'moment'; + +import { endpoint } from '../env'; +import { SearchParams, Results, Torrent } from '../interfaces'; +import { humanFileSize, magnetLink, getFileName } from '../utils'; + +interface State { + results: Results; + searchParams: SearchParams; + searching: Boolean; +} + +export class Search extends Component { + + state: State = { + results: { + torrents: [] + }, + searchParams: { + q: "", + page: 1, + type_: 'torrent' + }, + searching: false + }; + + constructor(props, context) { + super(props, context); + } + + componentDidMount() { + this.state.searchParams = { + page: Number(this.props.match.params.page), + q: this.props.match.params.q, + type_: this.props.match.params.type_ + } + this.search(); + } + + // Re-do search if the props have changed + componentDidUpdate(lastProps, lastState, snapshot) { + if (lastProps.match && lastProps.match.params !== this.props.match.params) { + this.state.searchParams = { + page: Number(this.props.match.params.page), + q: this.props.match.params.q, + type_: this.props.match.params.type_ + } + this.search(); + } + + } + + search() { + if (!!this.state.searchParams.q) { + this.setState({ searching: true, results: { torrents: [] } }); + this.fetchData(this.state.searchParams) + .then(torrents => { + if (!!torrents) { + this.setState({ + results: { + torrents: torrents + } + }); + } + }).catch(error => { + console.error('request failed', error); + }).then(() => this.setState({ searching: false })); + } else { + this.setState({ results: { torrents: [] } }); + } + } + + fetchData(searchParams: SearchParams): Promise> { + let q = encodeURI(searchParams.q); + return fetch(`${endpoint}/service/search?q=${q}&page=${searchParams.page}&type_=${searchParams.type_}`) + .then(data => data.json()); + } + + render() { + return ( +
+ { + this.state.searching ? + this.spinner() : this.state.results.torrents[0] ? + this.torrentsTable() + : this.noResults() + } +
+ ); + } + + spinner() { + return ( +
+ +
+ ); + } + + noResults() { + return ( +
+

No Results

+
+ ) + } + + torrentsTable() { + return ( +
+ + + + + + + + + + + + + {this.state.results.torrents.map(torrent => ( + + { !torrent.name ? ( + + ) : ( + + )} + + + + + + + ))} + +
NameSizeSeedsLeechesCreated
+ + {getFileName(torrent.path)} + + + + {torrent.name} + + {humanFileSize(torrent.size_bytes, true)} + + {torrent.seeders} + + + {torrent.leechers} + + {moment(torrent.created_unix * 1000).fromNow()} + + + + + + + +
+ {this.paginator()} +
+ ); + } + + paginator() { + return ( + + ); + } + + switchPage(a: { i: Search, nextPage: boolean }, event) { + let newSearch = a.i.state.searchParams; + newSearch.page += (a.nextPage) ? 1 : -1; + a.i.props.history.push(`/search/${newSearch.type_}/${newSearch.q}/${newSearch.page}`); + } +} diff --git a/ui/src/env.ts b/ui/src/env.ts new file mode 100644 index 00000000..a8e72d90 --- /dev/null +++ b/ui/src/env.ts @@ -0,0 +1,3 @@ +// export const endpoint = window.location.origin; +export const endpoint = "http://localhost:8080"; +export let wsUri = (window.location.protocol=='https:') ? 'wss://' : 'ws://' + endpoint.substr(7) + '/service/ws'; diff --git a/ui/src/index.html b/ui/src/index.html new file mode 100644 index 00000000..2a3e4198 --- /dev/null +++ b/ui/src/index.html @@ -0,0 +1,19 @@ + + + + + + + + + rust-reddit-fediverse + + + + + +
+ $bundles + + + diff --git a/ui/src/index.tsx b/ui/src/index.tsx new file mode 100644 index 00000000..36e5681d --- /dev/null +++ b/ui/src/index.tsx @@ -0,0 +1,42 @@ +import { render, Component } from 'inferno'; +import { HashRouter, Route, Switch } from 'inferno-router'; + +import { Navbar } from './components/navbar'; +import { Home } from './components/home'; +import { Login } from './components/login'; + +import './main.css'; + +import { WebSocketService } from './services'; + +const container = document.getElementById('app'); + +class Index extends Component { + + constructor(props, context) { + super(props, context); + WebSocketService.Instance; + } + + render() { + return ( + + +
+ + + + {/* + + + + + */} + +
+
+ ); + } +} + +render(, container); diff --git a/ui/src/interfaces.ts b/ui/src/interfaces.ts new file mode 100644 index 00000000..c1550cc1 --- /dev/null +++ b/ui/src/interfaces.ts @@ -0,0 +1,14 @@ +export interface LoginForm { + username: string; + password: string; +} +export interface RegisterForm { + username: string; + email?: string; + password: string; + password_verify: string; +} + +export enum UserOperation { + Login, Register +} diff --git a/ui/src/main.css b/ui/src/main.css new file mode 100644 index 00000000..e69de29b diff --git a/ui/src/services.ts b/ui/src/services.ts new file mode 100644 index 00000000..b9536aed --- /dev/null +++ b/ui/src/services.ts @@ -0,0 +1,57 @@ +import { wsUri } from './env'; +import { LoginForm, RegisterForm, UserOperation } from './interfaces'; + +export class WebSocketService { + private static _instance: WebSocketService; + private _ws; + private conn: WebSocket; + + private constructor() { + console.log("Creating WSS"); + this.connect(); + console.log(wsUri); + } + + public static get Instance(){ + return this._instance || (this._instance = new this()); + } + + private connect() { + this.disconnect(); + this.conn = new WebSocket(wsUri); + console.log('Connecting...'); + this.conn.onopen = (() => { + console.log('Connected.'); + }); + this.conn.onmessage = (e => { + console.log('Received: ' + e.data); + }); + this.conn.onclose = (() => { + console.log('Disconnected.'); + this.conn = null; + }); + } + private disconnect() { + if (this.conn != null) { + console.log('Disconnecting...'); + this.conn.close(); + this.conn = null; + } + } + + public login(loginForm: LoginForm) { + this.conn.send(this.wsSendWrapper(UserOperation.Login, loginForm)); + } + + public register(registerForm: RegisterForm) { + this.conn.send(this.wsSendWrapper(UserOperation.Register, registerForm)); + } + + private wsSendWrapper(op: UserOperation, data: any): string { + let send = { op: UserOperation[op], data: data }; + console.log(send); + return JSON.stringify(send); + } + + +} diff --git a/ui/src/utils.ts b/ui/src/utils.ts new file mode 100644 index 00000000..e141c681 --- /dev/null +++ b/ui/src/utils.ts @@ -0,0 +1,2 @@ +export let repoUrl = 'https://github.com/dessalines/rust-reddit-fediverse'; +export let wsUri = (window.location.protocol=='https:'&&'wss://'||'ws://')+window.location.host + '/service/ws/'; diff --git a/ui/tsconfig.json b/ui/tsconfig.json new file mode 100644 index 00000000..f58da758 --- /dev/null +++ b/ui/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es2015", + "sourceMap": true, + "inlineSources": true, + "jsx": "preserve", + "importHelpers": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true + } +} diff --git a/ui/tslint.json b/ui/tslint.json new file mode 100644 index 00000000..d3e7a8a9 --- /dev/null +++ b/ui/tslint.json @@ -0,0 +1,28 @@ +{ + "extends": "tslint:recommended", + "rules": { + "forin": false, + "indent": [ true, "tabs" ], + "interface-name": false, + "ban-types": true, + "max-classes-per-file": true, + "max-line-length": false, + "member-access": true, + "member-ordering": false, + "no-bitwise": false, + "no-conditional-assignment": false, + "no-debugger": false, + "no-empty": true, + "no-namespace": false, + "no-unused-expression": true, + "object-literal-sort-keys": true, + "one-variable-per-declaration": [true, "ignore-for-loop"], + "only-arrow-functions": [false], + "ordered-imports": true, + "prefer-const": true, + "prefer-for-of": false, + "quotemark": [ true, "single", "jsx-double" ], + "trailing-comma": [true, {"multiline": "never", "singleline": "never"}], + "variable-name": false + } +} diff --git a/ui/yarn.lock b/ui/yarn.lock new file mode 100644 index 00000000..92a1250a --- /dev/null +++ b/ui/yarn.lock @@ -0,0 +1,3084 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/runtime@^7.1.2": + version "7.3.4" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.3.4.tgz#73d12ba819e365fcf7fd152aed56d6df97d21c83" + integrity sha512-IvfvnMdSaLBateu0jfsYIpZTxAc2cKEXEMiezGGN75QcBcecDUKd3PgLAncT0oOgxKy8dd8hrJKj9MfzgfZd6g== + dependencies: + regenerator-runtime "^0.12.0" + +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + +accepts@~1.3.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2" + integrity sha1-63d99gEXI6OxTopywIBcjoZ0a9I= + dependencies: + mime-types "~2.1.18" + negotiator "0.6.1" + +acorn-jsx@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-4.1.1.tgz#e8e41e48ea2fe0c896740610ab6a4ffd8add225e" + integrity sha512-JY+iV6r+cO21KtntVvFkD+iqjtdpRUpGqKWgfkCdZq1R+kbreEl8EcdcJR4SmiIgsIQT33s6QzheQ9a275Q8xw== + dependencies: + acorn "^5.0.3" + +acorn@^5.0.3, acorn@^5.1.2: + version "5.7.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" + integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== + +ajax-request@^1.2.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/ajax-request/-/ajax-request-1.2.3.tgz#99fcbec1d6d2792f85fa949535332bd14f5f3790" + integrity sha1-mfy+wdbSeS+F+pSVNTMr0U9fN5A= + dependencies: + file-system "^2.1.1" + utils-extend "^1.0.7" + +ajv@^6.5.5: + version "6.10.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.0.tgz#90d0d54439da587cd7e843bfb7045f50bd22bdf1" + integrity sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg== + dependencies: + fast-deep-equal "^2.0.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-escapes@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" + integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/ansi/-/ansi-0.3.1.tgz#0c42d4fb17160d5a9af1e484bace1c66922c1b21" + integrity sha1-DELU+xcWDVqa8eSEus4cZpIsGyE= + +anymatch@^1.3.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" + integrity sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA== + dependencies: + micromatch "^2.1.5" + normalize-path "^2.0.0" + +app-root-path@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-1.4.0.tgz#6335d865c9640d0fad99004e5a79232238e92dfa" + integrity sha1-YzXYZclkDQ+tmQBOWnkjIjjpLfo= + +app-root-path@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.1.0.tgz#98bf6599327ecea199309866e8140368fd2e646a" + integrity sha1-mL9lmTJ+zqGZMJhm6BQDaP0uZGo= + +aproba@^1.0.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== + +are-we-there-yet@~1.1.2: + version "1.1.5" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" + integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + integrity sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8= + dependencies: + arr-flatten "^1.0.1" + +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= + +arr-flatten@^1.0.1, arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + integrity sha1-odl8yvy8JiXMcPrc6zalDFiwGlM= + +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= + +asn1@~0.2.3: + version "0.2.4" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== + dependencies: + safer-buffer "~2.1.0" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= + +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= + +async-each@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.2.tgz#8b8a7ca2a658f927e9f307d6d1a42f4199f0f735" + integrity sha512-6xrbvN0MOBKSJDdonmSSz2OwFSgxRaVtBDes26mj9KIGtDo+g9xosFRSC+i1gQh2oAN/tQ62AI/pGZGQjVOiRg== + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + +atob@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= + +aws4@^1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" + integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + +base64-img@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/base64-img/-/base64-img-1.0.4.tgz#3e22d55d6c74a24553d840d2b1bc12a7db078d35" + integrity sha1-PiLVXWx0okVT2EDSsbwSp9sHjTU= + dependencies: + ajax-request "^1.2.0" + file-system "^2.1.0" + +base64-js@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3" + integrity sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw== + +base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= + dependencies: + tweetnacl "^0.14.3" + +binary-extensions@^1.0.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.0.tgz#9523e001306a32444b907423f1de2164222f6ab1" + integrity sha512-EgmjVLMn22z7eGGv3kcnHwSnJXmFHjISTY9E/S5lIcTD3Oxw05QTcBLNkJFzcb3cNueUdF/IN4U+d78V0zO8Hw== + +body-parser@1.18.3: + version "1.18.3" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.3.tgz#5b292198ffdd553b3a0f20ded0592b956955c8b4" + integrity sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ= + dependencies: + bytes "3.0.0" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.2" + http-errors "~1.6.3" + iconv-lite "0.4.23" + on-finished "~2.3.0" + qs "6.5.2" + raw-body "2.3.3" + type-is "~1.6.16" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + integrity sha1-uneWLhLf+WnWt2cR6RS3N4V79qc= + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +braces@^2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + +bytes@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" + integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= + +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + +camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + +chain-able@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/chain-able/-/chain-able-1.0.1.tgz#b48ac9bdc18f2192ec730abc66609f90aab5605f" + integrity sha1-tIrJvcGPIZLscwq8ZmCfkKq1YF8= + +chain-able@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/chain-able/-/chain-able-3.0.0.tgz#dcffe8b04f3da210941a23843bc1332bb288ca9f" + integrity sha512-26MoELhta86n7gCsE2T1hGRyncZvPjFXTkB/DEp4+i/EJVSxXQNwXMDZZb2+SWcbPuow18wQtztaW7GXOel9DA== + +chalk@^2.0.0, chalk@^2.4.1: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chardet@^0.4.0: + version "0.4.2" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" + integrity sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I= + +chokidar@^1.6.1: + version "1.7.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" + integrity sha1-eY5ol3gVHIB2tLNg5e3SjNortGg= + dependencies: + anymatch "^1.3.0" + async-each "^1.0.0" + glob-parent "^2.0.0" + inherits "^2.0.1" + is-binary-path "^1.0.0" + is-glob "^2.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.0.0" + optionalDependencies: + fsevents "^1.0.0" + +chownr@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494" + integrity sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g== + +class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + +classcat@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/classcat/-/classcat-1.1.3.tgz#ec748eecd962ec195a5d8f73f01d67c3d9040912" + integrity sha512-nuf6HJ5RlEgUUPqN/giIy1wsfA0LJwCHpo/aMGMwEIAxYypbLW/ZdPH4SNrF+OwdrkL3wxJmAs4GPyoE3ZkQ4w== + +clean-css@^4.1.9: + version "4.2.1" + resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.2.1.tgz#2d411ef76b8569b6d0c84068dabe85b0aa5e5c17" + integrity sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g== + dependencies: + source-map "~0.6.0" + +cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= + dependencies: + restore-cursor "^2.0.0" + +cli-width@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" + integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= + +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + integrity sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0= + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= + +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + +combined-stream@^1.0.6, combined-stream@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.7.tgz#2d1d24317afb8abe95d6d2c0b07b57813539d828" + integrity sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w== + dependencies: + delayed-stream "~1.0.0" + +commander@~2.13.0: + version "2.13.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" + integrity sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA== + +component-emitter@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" + integrity sha1-E3kY1teCg/ffemt8WmPhQOaUJeY= + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= + +content-disposition@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" + integrity sha1-DPaLud318r55YcOoUXjLhdunjLQ= + +content-type@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= + +cookie@0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" + integrity sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s= + +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= + +core-util-is@1.0.2, core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + +cross-spawn@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= + dependencies: + assert-plus "^1.0.0" + +debug@2.6.9, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +decamelize@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= + +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + +deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= + +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= + dependencies: + is-descriptor "^1.0.0" + +define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= + +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= + +detect-libc@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= + +dotenv@^6.1.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-6.2.0.tgz#941c0410535d942c8becf28d3f357dbd9d476064" + integrity sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w== + +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= + +error-ex@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +escodegen@^1.8.1: + version "1.11.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.11.1.tgz#c485ff8d6b4cdb89e27f4a856e91f118401ca510" + integrity sha512-JwiqFD9KdGVVpeuRa68yU3zZnBEOcPs0nKW7wZzXky8Z7tffdYUHbe11bPCV5jYlK6DVdKLWLm0f5I/QlL0Kmw== + dependencies: + esprima "^3.1.3" + estraverse "^4.2.0" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.6.1" + +esprima@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" + integrity sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM= + +estraverse@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" + integrity sha1-De4/7TH81GlhjOc0IJn8GvoL2xM= + +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= + +exec-sh@^0.2.0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.2.tgz#2a5e7ffcbd7d0ba2755bdecb16e5a427dfbdec36" + integrity sha512-FIUCJz1RbuS0FKTdaAafAByGS0CPvU3R0MeHxgtl+djzCc//F8HakL8GzmVNZanasTbTAY/3DRFA0KpVqj/eAw== + dependencies: + merge "^1.2.0" + +execa@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + integrity sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s= + dependencies: + is-posix-bracket "^0.1.0" + +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + integrity sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc= + dependencies: + fill-range "^2.1.0" + +express@^4.14.0: + version "4.16.4" + resolved "https://registry.yarnpkg.com/express/-/express-4.16.4.tgz#fddef61926109e24c515ea97fd2f1bdbf62df12e" + integrity sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg== + dependencies: + accepts "~1.3.5" + array-flatten "1.1.1" + body-parser "1.18.3" + content-disposition "0.5.2" + content-type "~1.0.4" + cookie "0.3.1" + cookie-signature "1.0.6" + debug "2.6.9" + depd "~1.1.2" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "1.1.1" + fresh "0.5.2" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.2" + path-to-regexp "0.1.7" + proxy-addr "~2.0.4" + qs "6.5.2" + range-parser "~1.2.0" + safe-buffer "5.1.2" + send "0.16.2" + serve-static "1.13.2" + setprototypeof "1.1.0" + statuses "~1.4.0" + type-is "~1.6.16" + utils-merge "1.0.1" + vary "~1.1.2" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + +extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +external-editor@^2.0.4: + version "2.2.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5" + integrity sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A== + dependencies: + chardet "^0.4.0" + iconv-lite "^0.4.17" + tmp "^0.0.33" + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + integrity sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE= + dependencies: + is-extglob "^1.0.0" + +extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= + +fast-deep-equal@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" + integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= + +fast-json-stable-stringify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" + integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= + +fast-levenshtein@~2.0.4: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= + +figures@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= + dependencies: + escape-string-regexp "^1.0.5" + +file-match@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/file-match/-/file-match-1.0.2.tgz#c9cad265d2c8adf3a81475b0df475859069faef7" + integrity sha1-ycrSZdLIrfOoFHWw30dYWQafrvc= + dependencies: + utils-extend "^1.0.6" + +file-system@^2.1.0, file-system@^2.1.1: + version "2.2.2" + resolved "https://registry.yarnpkg.com/file-system/-/file-system-2.2.2.tgz#7d65833e3a2347dcd956a813c677153ed3edd987" + integrity sha1-fWWDPjojR9zZVqgTxncVPtPt2Yc= + dependencies: + file-match "^1.0.1" + utils-extend "^1.0.4" + +filename-regex@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + integrity sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY= + +fill-range@^2.1.0: + version "2.2.4" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" + integrity sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q== + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^3.0.0" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + +finalhandler@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.1.tgz#eebf4ed840079c83f4249038c9d703008301b105" + integrity sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.2" + statuses "~1.4.0" + unpipe "~1.0.0" + +find-up@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= + dependencies: + locate-path "^2.0.0" + +fliplog@^0.3.13: + version "0.3.13" + resolved "https://registry.yarnpkg.com/fliplog/-/fliplog-0.3.13.tgz#dd0d786e821822aae272e0ddc84012596a96154c" + integrity sha512-R504CdX+mdhMYpmyrdiQ9PW6ncAyZnxyeA85fS1/P/Y9qmbMiQsqt6QzsYhq5kbqMb84PibVOcS1oz98GJl6EQ== + dependencies: + chain-able "^1.0.1" + +for-in@^1.0.1, for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= + +for-own@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + integrity sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4= + dependencies: + for-in "^1.0.1" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= + +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +forwarded@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" + integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= + +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= + dependencies: + map-cache "^0.2.2" + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= + +fs-extra@^2.0.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-2.1.2.tgz#046c70163cef9aad46b0e4a7fa467fb22d71de35" + integrity sha1-BGxwFjzvmq1GsOSn+kZ/si1x3jU= + dependencies: + graceful-fs "^4.1.2" + jsonfile "^2.1.0" + +fs-minipass@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" + integrity sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ== + dependencies: + minipass "^2.2.1" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +fsevents@^1.0.0: + version "1.2.7" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.7.tgz#4851b664a3783e52003b3c66eb0eee1074933aa4" + integrity sha512-Pxm6sI2MeBD7RdD12RYsqaP0nMiwx8eZBXCa6z2L+mRHm2DYrOYwihmhjpkdjUHwQhslWQjRpEgNq4XvBmaAuw== + dependencies: + nan "^2.9.2" + node-pre-gyp "^0.10.0" + +fuse-box@3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fuse-box/-/fuse-box-3.1.3.tgz#a923c41ac107bb78e1a51c3419b4ebe9649fc086" + integrity sha512-mmOq06EWR09JusIfKwLt7hUweW7IhQ2tazBhh1yOxtxnbv0IQK/CJRSuxdrQKmLDzYzWNVQsJPpUiBnkLHK4fQ== + dependencies: + acorn "^5.1.2" + acorn-jsx "^4.0.1" + ansi "^0.3.1" + app-root-path "^2.0.1" + base64-img "^1.0.3" + base64-js "^1.2.0" + chokidar "^1.6.1" + clean-css "^4.1.9" + escodegen "^1.8.1" + express "^4.14.0" + fliplog "^0.3.13" + fs-extra "^2.0.0" + fuse-concat-with-sourcemaps "^1.0.5" + glob "^7.1.1" + ieee754 "^1.1.8" + inquirer "^3.0.6" + lego-api "^1.0.7" + mustache "^2.3.0" + postcss "^6.0.1" + pretty-time "^0.2.0" + prettysize "0.0.3" + react "^16.2.0" + react-dom "^16.2.0" + realm-utils "^1.0.9" + regexpu-core "^4.1.3" + request "^2.79.0" + shorthash "0.0.2" + tslib "^1.8.0" + watch "^1.0.1" + ws "^1.1.1" + yargs "^9.0.1" + +fuse-concat-with-sourcemaps@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/fuse-concat-with-sourcemaps/-/fuse-concat-with-sourcemaps-1.0.5.tgz#9c6a521f675cff5cdbb48db1ca9c181ae49a7b97" + integrity sha512-tKsRJIxn9tU3IH8JHMwFhGbObqkDKXhNKOvcM+QyflAlYb2EgOvIQe8D6WB/cocA3puldHatsp9SN5SKryasrw== + dependencies: + source-map "^0.6.1" + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +get-caller-file@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" + integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== + +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= + +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= + dependencies: + assert-plus "^1.0.0" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + integrity sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q= + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + integrity sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg= + dependencies: + is-glob "^2.0.0" + +glob@^7.1.1, glob@^7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" + integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: + version "4.1.15" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" + integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== + +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= + +har-validator@~5.1.0: + version "5.1.3" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" + integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g== + dependencies: + ajv "^6.5.5" + har-schema "^2.0.0" + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= + +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +history@^4.7.2: + version "4.9.0" + resolved "https://registry.yarnpkg.com/history/-/history-4.9.0.tgz#84587c2068039ead8af769e9d6a6860a14fa1bca" + integrity sha512-H2DkjCjXf0Op9OAr6nJ56fcRkTSNrUiv41vNJ6IswJjif6wlpZK0BTfFbi7qK9dXLSYZxkq5lBsj3vUjlYBYZA== + dependencies: + "@babel/runtime" "^7.1.2" + loose-envify "^1.2.0" + resolve-pathname "^2.2.0" + tiny-invariant "^1.0.2" + tiny-warning "^1.0.0" + value-equal "^0.4.0" + +hoist-non-inferno-statics@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/hoist-non-inferno-statics/-/hoist-non-inferno-statics-1.1.3.tgz#7d870f4160bfb6a59269b45c343c027f0e30ab35" + integrity sha1-fYcPQWC/tqWSabRcNDwCfw4wqzU= + +hosted-git-info@^2.1.4: + version "2.7.1" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" + integrity sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w== + +http-errors@1.6.3, http-errors@~1.6.2, http-errors@~1.6.3: + version "1.6.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" + integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.0" + statuses ">= 1.4.0 < 2" + +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +iconv-lite@0.4.23: + version "0.4.23" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" + integrity sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +iconv-lite@^0.4.17, iconv-lite@^0.4.4: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +ieee754@^1.1.8: + version "1.1.12" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.12.tgz#50bf24e5b9c8bb98af4964c941cdb0918da7b60b" + integrity sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA== + +ignore-walk@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" + integrity sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ== + dependencies: + minimatch "^3.0.4" + +inferno-router@^7.0.1: + version "7.1.10" + resolved "https://registry.yarnpkg.com/inferno-router/-/inferno-router-7.1.10.tgz#9850fea9bfcbf0d2cc069c3fa3a6b3a4b475551d" + integrity sha512-Xbi6Vg5ymD0AoIzMA0Rjzpc1aWzIjR1T2d4cpit8Rnx2VvuAzTk414axAZ4yIr91652Dq1EUGVp4BGM2qfkHGA== + dependencies: + history "^4.7.2" + hoist-non-inferno-statics "^1.1.3" + inferno "7.1.10" + path-to-regexp-es6 "1.7.0" + +inferno-shared@7.1.10: + version "7.1.10" + resolved "https://registry.yarnpkg.com/inferno-shared/-/inferno-shared-7.1.10.tgz#8f835bdeda5226f5ef9ba60b848b4d252f8fa89d" + integrity sha512-+wpmagRB1tpUwmaZBFh4bOYc3erSfYxc0xMzEyRrHa2SJZM9BIem4d+pbeSCK+q/ytf2lIRSrFgtExXSQD0KkQ== + +inferno-vnode-flags@7.1.10: + version "7.1.10" + resolved "https://registry.yarnpkg.com/inferno-vnode-flags/-/inferno-vnode-flags-7.1.10.tgz#4731f2f71c4f50d9d9533562ea9ab3cd2c0efc0f" + integrity sha512-Gi5fh5GTYmOkdizbb0nmCZwVMxJOCiw+BeP4Sww+cM4RkuNFiR8dFjAaH9Lv9i/AjdR54K7segqqICvyTB75lQ== + +inferno@7.1.10, inferno@^7.0.1: + version "7.1.10" + resolved "https://registry.yarnpkg.com/inferno/-/inferno-7.1.10.tgz#826a3bc7482a2567b3ac53cd25fb736ca98d3219" + integrity sha512-slm6ozMfQVa7yfmenlcWrkK/zbuOH62j/59Z2lj8y0rhHGDrTA+K/EXXvoQBuy8te35Gjt+E85Zzm+3AShlJxw== + dependencies: + inferno-shared "7.1.10" + inferno-vnode-flags "7.1.10" + opencollective-postinstall "^2.0.2" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= + +ini@~1.3.0: + version "1.3.5" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== + +inquirer@^3.0.6: + version "3.3.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" + integrity sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ== + dependencies: + ansi-escapes "^3.0.0" + chalk "^2.0.0" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^2.0.4" + figures "^2.0.0" + lodash "^4.3.0" + mute-stream "0.0.7" + run-async "^2.2.0" + rx-lite "^4.0.8" + rx-lite-aggregates "^4.0.8" + string-width "^2.1.0" + strip-ansi "^4.0.0" + through "^2.3.6" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= + +ipaddr.js@1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.8.0.tgz#eaa33d6ddd7ace8f7f6fe0c9ca0440e706738b1e" + integrity sha1-6qM9bd16zo9/b+DJygRA5wZzix4= + +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= + dependencies: + kind-of "^3.0.2" + +is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== + dependencies: + kind-of "^6.0.0" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= + dependencies: + binary-extensions "^1.0.0" + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= + dependencies: + kind-of "^3.0.2" + +is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== + dependencies: + kind-of "^6.0.0" + +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + +is-dotfile@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" + integrity sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE= + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + integrity sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ= + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= + +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== + dependencies: + is-plain-object "^2.0.4" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + integrity sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA= + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + integrity sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM= + dependencies: + is-extglob "^1.0.0" + +is-number@^2.0.2, is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + integrity sha1-Afy7s5NGOlSPL0ZszhbezknbkI8= + dependencies: + kind-of "^3.0.2" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= + dependencies: + kind-of "^3.0.2" + +is-number@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" + integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== + +is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + integrity sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q= + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + integrity sha1-IHurkWOEmcB7Kt8kCkGochADRXU= + +is-promise@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" + integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= + +is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= + +is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= + +isarray@1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= + dependencies: + isarray "1.0.0" + +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + +"js-tokens@^3.0.0 || ^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= + +jsonfile@^2.1.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" + integrity sha1-NzaitCi4e72gzIO1P6PWM6NcKug= + optionalDependencies: + graceful-fs "^4.1.6" + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= + dependencies: + is-buffer "^1.1.5" + +kind-of@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== + +kind-of@^6.0.0, kind-of@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" + integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= + dependencies: + invert-kv "^1.0.0" + +lego-api@^1.0.7: + version "1.0.8" + resolved "https://registry.yarnpkg.com/lego-api/-/lego-api-1.0.8.tgz#5e26be726c5e11d540f89e7c6b1abf8c5834bd01" + integrity sha512-pZD0mf32+RL1bUMJztRcXiNBB1gE8gd/h4MDLWdZp7vaMZyjPiYK/zNpNNGoJvmoa7D/wf9dll+5z7pDObdLFg== + dependencies: + chain-able "^3.0.0" + +levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +load-json-file@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" + integrity sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg= + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + strip-bom "^3.0.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +lodash@^4.3.0: + version "4.17.11" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" + integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== + +loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +lru-cache@^4.0.1: + version "4.1.5" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" + integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + +map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= + +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= + dependencies: + object-visit "^1.0.0" + +math-random@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.4.tgz#5dd6943c938548267016d4e34f057583080c514c" + integrity sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A== + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= + +mem@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" + integrity sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y= + dependencies: + mimic-fn "^1.0.0" + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= + +merge@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.1.tgz#38bebf80c3220a8a487b6fcfb3941bb11720c145" + integrity sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ== + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= + +micromatch@^2.1.5: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + integrity sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU= + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +micromatch@^3.1.10: + version "3.1.10" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + +mime-db@~1.38.0: + version "1.38.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.38.0.tgz#1a2aab16da9eb167b49c6e4df2d9c68d63d8e2ad" + integrity sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg== + +mime-types@^2.1.12, mime-types@~2.1.18, mime-types@~2.1.19: + version "2.1.22" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.22.tgz#fe6b355a190926ab7698c9a0556a11199b2199bd" + integrity sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog== + dependencies: + mime-db "~1.38.0" + +mime@1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" + integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ== + +mimic-fn@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" + integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== + +minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= + +minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= + +minipass@^2.2.1, minipass@^2.3.4: + version "2.3.5" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848" + integrity sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA== + dependencies: + safe-buffer "^5.1.2" + yallist "^3.0.0" + +minizlib@^1.1.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.1.tgz#dd27ea6136243c7c880684e8672bb3a45fd9b614" + integrity sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA== + dependencies: + minipass "^2.2.1" + +mixin-deep@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" + integrity sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ== + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + +mkdirp@^0.5.0, mkdirp@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= + dependencies: + minimist "0.0.8" + +moment@^2.22.2: + version "2.24.0" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b" + integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg== + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +mustache@^2.3.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/mustache/-/mustache-2.3.2.tgz#a6d4d9c3f91d13359ab889a812954f9230a3d0c5" + integrity sha512-KpMNwdQsYz3O/SBS1qJ/o3sqUJ5wSb8gb0pul8CO0S56b9Y2ALm8zCfsjPXsqGFfoNBkDwZuZIAjhsZI03gYVQ== + +mute-stream@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= + +nan@^2.9.2: + version "2.13.1" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.13.1.tgz#a15bee3790bde247e8f38f1d446edcdaeb05f2dd" + integrity sha512-I6YB/YEuDeUZMmhscXKxGgZlFnhsn5y0hgOZBadkzfTRrZBtJDZeg6eQf7PYMIEclwmorTKK8GztsyOUSVBREA== + +nanomatch@^1.2.9: + version "1.2.13" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +nanoseconds@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/nanoseconds/-/nanoseconds-0.1.0.tgz#69ec39fcd00e77ab3a72de0a43342824cd79233a" + integrity sha1-aew5/NAOd6s6ct4KQzQoJM15Izo= + +needle@^2.2.1: + version "2.2.4" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.4.tgz#51931bff82533b1928b7d1d69e01f1b00ffd2a4e" + integrity sha512-HyoqEb4wr/rsoaIDfTH2aVL9nWtQqba2/HvMv+++m8u0dz808MaagKILxtfeSN7QU7nvbQ79zk3vYOJp9zsNEA== + dependencies: + debug "^2.1.2" + iconv-lite "^0.4.4" + sax "^1.2.4" + +negotiator@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" + integrity sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk= + +node-pre-gyp@^0.10.0: + version "0.10.3" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz#3070040716afdc778747b61b6887bf78880b80fc" + integrity sha512-d1xFs+C/IPS8Id0qPTZ4bUT8wWryfR/OzzAFxweG+uLN85oPzyo2Iw6bVlLQ/JOdgNonXLCoRyqDzDWq4iw72A== + dependencies: + detect-libc "^1.0.2" + mkdirp "^0.5.1" + needle "^2.2.1" + nopt "^4.0.1" + npm-packlist "^1.1.6" + npmlog "^4.0.2" + rc "^1.2.7" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^4" + +nopt@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00= + dependencies: + abbrev "1" + osenv "^0.1.4" + +normalize-package-data@^2.3.2: + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.0.0, normalize-path@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= + dependencies: + remove-trailing-separator "^1.0.1" + +npm-bundled@^1.0.1: + version "1.0.6" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.6.tgz#e7ba9aadcef962bb61248f91721cd932b3fe6bdd" + integrity sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g== + +npm-packlist@^1.1.6: + version "1.4.1" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.1.tgz#19064cdf988da80ea3cee45533879d90192bbfbc" + integrity sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw== + dependencies: + ignore-walk "^3.0.1" + npm-bundled "^1.0.1" + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= + dependencies: + path-key "^2.0.0" + +npmlog@^4.0.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= + +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== + +object-assign@^4.1.0, object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= + dependencies: + isobject "^3.0.0" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + integrity sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo= + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= + dependencies: + isobject "^3.0.1" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= + dependencies: + ee-first "1.1.1" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= + dependencies: + mimic-fn "^1.0.0" + +opencollective-postinstall@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz#5657f1bede69b6e33a45939b061eb53d3c6c3a89" + integrity sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw== + +optionator@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + integrity sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q= + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.4" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + wordwrap "~1.0.0" + +options@>=0.0.5: + version "0.0.6" + resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" + integrity sha1-7CLTEoBrtT5zF3Pnza788cZDEo8= + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= + +os-locale@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" + integrity sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA== + dependencies: + execa "^0.7.0" + lcid "^1.0.0" + mem "^1.1.0" + +os-tmpdir@^1.0.0, os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + +osenv@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= + +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== + dependencies: + p-try "^1.0.0" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= + dependencies: + p-limit "^1.1.0" + +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + integrity sha1-ssN2z7EfNVE7rdFz7wu246OIORw= + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= + dependencies: + error-ex "^1.2.0" + +parseurl@~1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" + integrity sha1-/CidTtiZMRlGDBViUyYs3I3mW/M= + +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-key@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= + +path-parse@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + +path-to-regexp-es6@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/path-to-regexp-es6/-/path-to-regexp-es6-1.7.0.tgz#965657c9f8ea8f660e103ccb839abf038cba4caf" + integrity sha512-QdT7okCAMGv7FR7w6KWFH9OSMivOgtXAGKodD6MDZBNR/XNL16W+hHoj6qBmV6cy/7eR1fr0Qujrg9OhBf5QPw== + dependencies: + path-to-regexp "1.7.0" + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= + +path-to-regexp@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.7.0.tgz#59fde0f435badacba103a84e9d3bc64e96b9937d" + integrity sha1-Wf3g9DW62suhA6hOnTvGTpa5k30= + dependencies: + isarray "0.0.1" + +path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + integrity sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM= + dependencies: + pify "^2.0.0" + +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= + +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= + +postcss@^6.0.1: + version "6.0.23" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.23.tgz#61c82cc328ac60e677645f979054eb98bc0e3324" + integrity sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag== + dependencies: + chalk "^2.4.1" + source-map "^0.6.1" + supports-color "^5.4.0" + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks= + +pretty-time@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/pretty-time/-/pretty-time-0.2.0.tgz#7a3bdec4049c620cd7c42b7f342b74d56e73d74e" + integrity sha1-ejvexAScYgzXxCt/NCt01W5z104= + dependencies: + is-number "^2.0.2" + nanoseconds "^0.1.0" + +prettysize@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/prettysize/-/prettysize-0.0.3.tgz#14afff6a645e591a4ddf1c72919c23b4146181a1" + integrity sha1-FK//amReWRpN3xxykZwjtBRhgaE= + +process-nextick-args@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" + integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw== + +prop-types@^15.6.2: + version "15.7.2" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" + integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== + dependencies: + loose-envify "^1.4.0" + object-assign "^4.1.1" + react-is "^16.8.1" + +proxy-addr@~2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.4.tgz#ecfc733bf22ff8c6f407fa275327b9ab67e48b93" + integrity sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA== + dependencies: + forwarded "~0.1.2" + ipaddr.js "1.8.0" + +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= + +psl@^1.1.24: + version "1.1.31" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.31.tgz#e9aa86d0101b5b105cbe93ac6b784cd547276184" + integrity sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw== + +punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= + +punycode@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +qs@6.5.2, qs@~6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== + +randomatic@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.1.tgz#b776efc59375984e36c537b2f51a1f0aff0da1ed" + integrity sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw== + dependencies: + is-number "^4.0.0" + kind-of "^6.0.0" + math-random "^1.0.1" + +range-parser@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" + integrity sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4= + +raw-body@2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.3.tgz#1b324ece6b5706e153855bc1148c65bb7f6ea0c3" + integrity sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw== + dependencies: + bytes "3.0.0" + http-errors "1.6.3" + iconv-lite "0.4.23" + unpipe "1.0.0" + +rc@^1.2.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +react-dom@^16.2.0: + version "16.8.4" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.4.tgz#1061a8e01a2b3b0c8160037441c3bf00a0e3bc48" + integrity sha512-Ob2wK7XG2tUDt7ps7LtLzGYYB6DXMCLj0G5fO6WeEICtT4/HdpOi7W/xLzZnR6RCG1tYza60nMdqtxzA8FaPJQ== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + prop-types "^15.6.2" + scheduler "^0.13.4" + +react-is@^16.8.1: + version "16.8.4" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.4.tgz#90f336a68c3a29a096a3d648ab80e87ec61482a2" + integrity sha512-PVadd+WaUDOAciICm/J1waJaSvgq+4rHE/K70j0PFqKhkTBsPv/82UGQJNXAngz1fOQLLxI6z1sEDmJDQhCTAA== + +react@^16.2.0: + version "16.8.4" + resolved "https://registry.yarnpkg.com/react/-/react-16.8.4.tgz#fdf7bd9ae53f03a9c4cd1a371432c206be1c4768" + integrity sha512-0GQ6gFXfUH7aZcjGVymlPOASTuSjlQL4ZtVC5YKH+3JL6bBLCVO21DknzmaPlI90LN253ojj02nsapy+j7wIjg== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + prop-types "^15.6.2" + scheduler "^0.13.4" + +read-pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" + integrity sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4= + dependencies: + find-up "^2.0.0" + read-pkg "^2.0.0" + +read-pkg@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" + integrity sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg= + dependencies: + load-json-file "^2.0.0" + normalize-package-data "^2.3.2" + path-type "^2.0.0" + +readable-stream@^2.0.2, readable-stream@^2.0.6: + version "2.3.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" + integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readdirp@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" + integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== + dependencies: + graceful-fs "^4.1.11" + micromatch "^3.1.10" + readable-stream "^2.0.2" + +realm-utils@^1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/realm-utils/-/realm-utils-1.0.9.tgz#5c76a5ff39e4816af2c133a161f4221d6628eff4" + integrity sha1-XHal/znkgWrywTOhYfQiHWYo7/Q= + dependencies: + app-root-path "^1.3.0" + mkdirp "^0.5.1" + +regenerate-unicode-properties@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.0.2.tgz#7b38faa296252376d363558cfbda90c9ce709662" + integrity sha512-SbA/iNrBUf6Pv2zU8Ekv1Qbhv92yxL4hiDa2siuxs4KKn4oOoMDHXjAf7+Nz9qinUQ46B1LcWEi/PhJfPWpZWQ== + dependencies: + regenerate "^1.4.0" + +regenerate@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" + integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg== + +regenerator-runtime@^0.12.0: + version "0.12.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz#fa1a71544764c036f8c49b13a08b2594c9f8a0de" + integrity sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg== + +regex-cache@^0.4.2: + version "0.4.4" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" + integrity sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ== + dependencies: + is-equal-shallow "^0.1.3" + +regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + +regexpu-core@^4.1.3: + version "4.5.4" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.5.4.tgz#080d9d02289aa87fe1667a4f5136bc98a6aebaae" + integrity sha512-BtizvGtFQKGPUcTy56o3nk1bGRp4SZOTYrDtGNlqCQufptV5IkkLN6Emw+yunAJjzf+C9FQFtvq7IoA3+oMYHQ== + dependencies: + regenerate "^1.4.0" + regenerate-unicode-properties "^8.0.2" + regjsgen "^0.5.0" + regjsparser "^0.6.0" + unicode-match-property-ecmascript "^1.0.4" + unicode-match-property-value-ecmascript "^1.1.0" + +regjsgen@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.0.tgz#a7634dc08f89209c2049adda3525711fb97265dd" + integrity sha512-RnIrLhrXCX5ow/E5/Mh2O4e/oa1/jW0eaBKTSy3LaCj+M3Bqvm97GWDp2yUtzIs4LEn65zR2yiYGFqb2ApnzDA== + +regjsparser@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.0.tgz#f1e6ae8b7da2bae96c99399b868cd6c933a2ba9c" + integrity sha512-RQ7YyokLiQBomUJuUG8iGVvkgOLxwyZM8k6d3q5SAXpg4r5TZJZigKFvC6PpD+qQ98bCDC5YelPeA3EucDoNeQ== + dependencies: + jsesc "~0.5.0" + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= + +repeat-element@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" + integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== + +repeat-string@^1.5.2, repeat-string@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= + +request@^2.79.0: + version "2.88.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" + integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.0" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.4.3" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= + +resolve-pathname@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-2.2.0.tgz#7e9ae21ed815fd63ab189adeee64dc831eefa879" + integrity sha512-bAFz9ld18RzJfddgrO2e/0S2O81710++chRMUxHjXOYKF6jTAMrUNZrEZ1PvV0zlhfjidm08iRPdTLPno1FuRg== + +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= + +resolve@^1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.10.0.tgz#3bdaaeaf45cc07f375656dfd2e54ed0810b101ba" + integrity sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg== + dependencies: + path-parse "^1.0.6" + +restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== + +rimraf@^2.6.1: + version "2.6.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" + integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== + dependencies: + glob "^7.1.3" + +run-async@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" + integrity sha1-A3GrSuC91yDUFm19/aZP96RFpsA= + dependencies: + is-promise "^2.1.0" + +rx-lite-aggregates@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" + integrity sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74= + dependencies: + rx-lite "*" + +rx-lite@*, rx-lite@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" + integrity sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ= + +safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= + dependencies: + ret "~0.1.10" + +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +sax@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== + +scheduler@^0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.13.4.tgz#8fef05e7a3580c76c0364d2df5e550e4c9140298" + integrity sha512-cvSOlRPxOHs5dAhP9yiS/6IDmVAVxmk33f0CtTJRkmUWcb1Us+t7b1wqdzoC0REw2muC9V5f1L/w5R5uKGaepA== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + +"semver@2 || 3 || 4 || 5", semver@^5.3.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" + integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== + +send@0.16.2: + version "0.16.2" + resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" + integrity sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw== + dependencies: + debug "2.6.9" + depd "~1.1.2" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.6.2" + mime "1.4.1" + ms "2.0.0" + on-finished "~2.3.0" + range-parser "~1.2.0" + statuses "~1.4.0" + +serve-static@1.13.2: + version "1.13.2" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1" + integrity sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.2" + send "0.16.2" + +set-blocking@^2.0.0, set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + +set-value@^0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" + integrity sha1-fbCPnT0i3H945Trzw79GZuzfzPE= + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.1" + to-object-path "^0.3.0" + +set-value@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" + integrity sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg== + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + +setprototypeof@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" + integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= + +shorthash@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/shorthash/-/shorthash-0.0.2.tgz#59b268eecbde59038b30da202bcfbddeb2c4a4eb" + integrity sha1-WbJo7sveWQOLMNogK8+93rLEpOs= + +signal-exit@^3.0.0, signal-exit@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= + +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + +source-map-resolve@^0.5.0: + version "0.5.2" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" + integrity sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA== + dependencies: + atob "^2.1.1" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-url@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" + integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= + +source-map@^0.5.6: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= + +source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +spdx-correct@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" + integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" + integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== + +spdx-expression-parse@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" + integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz#81c0ce8f21474756148bbb5f3bfc0f36bf15d76e" + integrity sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g== + +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== + dependencies: + extend-shallow "^3.0.0" + +sshpk@^1.7.0: + version "1.16.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" + integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + +"statuses@>= 1.4.0 < 2": + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= + +statuses@~1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" + integrity sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew== + +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= + dependencies: + ansi-regex "^3.0.0" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + +supports-color@^5.3.0, supports-color@^5.4.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +tar@^4: + version "4.4.8" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.8.tgz#b19eec3fde2a96e64666df9fdb40c5ca1bc3747d" + integrity sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ== + dependencies: + chownr "^1.1.1" + fs-minipass "^1.2.5" + minipass "^2.3.4" + minizlib "^1.1.1" + mkdirp "^0.5.0" + safe-buffer "^5.1.2" + yallist "^3.0.2" + +through@^2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= + +tiny-invariant@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.0.3.tgz#91efaaa0269ccb6271f0296aeedb05fc3e067b7a" + integrity sha512-ytQx8T4DL8PjlX53yYzcIC0WhIZbpR0p1qcYjw2pHu3w6UtgWwFJQ/02cnhOnBBhlFx/edUIfcagCaQSe3KMWg== + +tiny-warning@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.2.tgz#1dfae771ee1a04396bdfde27a3adcebc6b648b28" + integrity sha512-rru86D9CpQRLvsFG5XFdy0KdLAvjdQDyZCsRcuu60WtzFylDM3eAWSxEVz5kzL2Gp544XiUvPbVKtOA/txLi9Q== + +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= + dependencies: + kind-of "^3.0.2" + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + +to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + +tough-cookie@~2.4.3: + version "2.4.3" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" + integrity sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ== + dependencies: + psl "^1.1.24" + punycode "^1.4.1" + +ts-transform-classcat@^0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/ts-transform-classcat/-/ts-transform-classcat-0.0.2.tgz#2386c9418f3a7c1f03261ff51225b70d0a7664fb" + integrity sha512-7laOOhgVxWVqvhK10mIEfedJx2nnNOS8J4P/6a/ehXtHFvsBVRRS9/FcTifgzJweOScZsF5BRD5VOGeNidMSqQ== + dependencies: + typescript "^2.6.2" + +ts-transform-inferno@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/ts-transform-inferno/-/ts-transform-inferno-4.0.2.tgz#06b9be45edf874ba7a6ebfb6107ba782509c6afe" + integrity sha512-CZb4+w/2l2zikPZ/c51fi3n+qnR2HCEfAS73oGQB80aqRLffkZqm25kYYTMmqUW2+oVfs4M5AZa0z14cvxlQ5w== + +tslib@^1.8.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" + integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ== + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= + dependencies: + prelude-ls "~1.1.2" + +type-is@~1.6.16: + version "1.6.16" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194" + integrity sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.18" + +typescript@^2.6.2: + version "2.9.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c" + integrity sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w== + +typescript@^3.3.3333: + version "3.3.3333" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.3.3333.tgz#171b2c5af66c59e9431199117a3bcadc66fdcfd6" + integrity sha512-JjSKsAfuHBE/fB2oZ8NxtRTk5iGcg6hkYXMnZ3Wc+b2RSqejEqTaem11mHASMnFilHrax3sLK0GDzcJrekZYLw== + +uglify-es@^3.3.9: + version "3.3.9" + resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677" + integrity sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ== + dependencies: + commander "~2.13.0" + source-map "~0.6.1" + +ultron@1.0.x: + version "1.0.2" + resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa" + integrity sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po= + +unicode-canonical-property-names-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" + integrity sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ== + +unicode-match-property-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c" + integrity sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg== + dependencies: + unicode-canonical-property-names-ecmascript "^1.0.4" + unicode-property-aliases-ecmascript "^1.0.4" + +unicode-match-property-value-ecmascript@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz#5b4b426e08d13a80365e0d657ac7a6c1ec46a277" + integrity sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g== + +unicode-property-aliases-ecmascript@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz#a9cc6cc7ce63a0a3023fc99e341b94431d405a57" + integrity sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw== + +union-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" + integrity sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ= + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^0.4.3" + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= + +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +uri-js@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" + integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== + dependencies: + punycode "^2.1.0" + +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= + +use@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + +utils-extend@^1.0.4, utils-extend@^1.0.6, utils-extend@^1.0.7: + version "1.0.8" + resolved "https://registry.yarnpkg.com/utils-extend/-/utils-extend-1.0.8.tgz#ccfd7b64540f8e90ee21eec57769d0651cab8a5f" + integrity sha1-zP17ZFQPjpDuIe7Fd2nQZRyril8= + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= + +uuid@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" + integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== + +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +value-equal@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-0.4.0.tgz#c5bdd2f54ee093c04839d71ce2e4758a6890abc7" + integrity sha512-x+cYdNnaA3CxvMaTX0INdTCN8m8aF2uY9BvEqmxuYp8bL09cs/kWVQPVGcA35fMktdOsP69IgU7wFj/61dJHEw== + +vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +watch@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/watch/-/watch-1.0.2.tgz#340a717bde765726fa0aa07d721e0147a551df0c" + integrity sha1-NApxe952Vyb6CqB9ch4BR6VR3ww= + dependencies: + exec-sh "^0.2.0" + minimist "^1.2.0" + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= + +which@^1.2.9: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +wide-align@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== + dependencies: + string-width "^1.0.2 || 2" + +wordwrap@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +ws@^1.1.1: + version "1.1.5" + resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.5.tgz#cbd9e6e75e09fc5d2c90015f21f0c40875e0dd51" + integrity sha512-o3KqipXNUdS7wpQzBHSe180lBGO60SoK0yVo3CYJgb2MkobuWuBX6dhkYP5ORCLd55y+SaflMOV5fqAB53ux4w== + dependencies: + options ">=0.0.5" + ultron "1.0.x" + +y18n@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= + +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= + +yallist@^3.0.0, yallist@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" + integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A== + +yargs-parser@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" + integrity sha1-jQrELxbqVd69MyyvTEA4s+P139k= + dependencies: + camelcase "^4.1.0" + +yargs@^9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-9.0.1.tgz#52acc23feecac34042078ee78c0c007f5085db4c" + integrity sha1-UqzCP+7Kw0BCB47njAwAf1CF20w= + dependencies: + camelcase "^4.1.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^2.0.0" + read-pkg-up "^2.0.0" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^2.0.0" + which-module "^2.0.0" + y18n "^3.2.1" + yargs-parser "^7.0.0" -- 2.40.1 From 816aa0b15f3766e340d8722f03e8b3a7633ab6fb Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 20 Mar 2019 18:22:31 -0700 Subject: [PATCH 0026/2583] Adding initial UI and Websocket server. --- API.md | 3 - README.md | 4 + server/Cargo.lock | 1450 ++++++++++++ server/Cargo.toml | 7 + server/src/actions/comment.rs | 7 + server/src/apub.rs | 2 +- server/src/bin/main.rs | 270 +++ server/src/lib.rs | 22 +- server/src/websocket_server/mod.rs | 1 + server/src/websocket_server/server.rs | 269 +++ ui/.gitignore | 30 + ui/assets/favicon.ico | Bin 0 -> 1150 bytes ui/fuse.js | 55 + ui/package.json | 31 + ui/src/components/home.tsx | 14 + ui/src/components/login.tsx | 145 ++ ui/src/components/navbar.tsx | 38 + ui/src/components/search.tsx | 205 ++ ui/src/env.ts | 3 + ui/src/index.html | 19 + ui/src/index.tsx | 42 + ui/src/interfaces.ts | 14 + ui/src/main.css | 0 ui/src/services.ts | 57 + ui/src/utils.ts | 2 + ui/tsconfig.json | 12 + ui/tslint.json | 28 + ui/yarn.lock | 3084 +++++++++++++++++++++++++ 28 files changed, 5803 insertions(+), 11 deletions(-) create mode 100644 server/src/bin/main.rs create mode 100644 server/src/websocket_server/mod.rs create mode 100644 server/src/websocket_server/server.rs create mode 100644 ui/.gitignore create mode 100644 ui/assets/favicon.ico create mode 100644 ui/fuse.js create mode 100644 ui/package.json create mode 100644 ui/src/components/home.tsx create mode 100644 ui/src/components/login.tsx create mode 100644 ui/src/components/navbar.tsx create mode 100644 ui/src/components/search.tsx create mode 100644 ui/src/env.ts create mode 100644 ui/src/index.html create mode 100644 ui/src/index.tsx create mode 100644 ui/src/interfaces.ts create mode 100644 ui/src/main.css create mode 100644 ui/src/services.ts create mode 100644 ui/src/utils.ts create mode 100644 ui/tsconfig.json create mode 100644 ui/tslint.json create mode 100644 ui/yarn.lock diff --git a/API.md b/API.md index d631b2ba..cf65b65d 100644 --- a/API.md +++ b/API.md @@ -147,13 +147,11 @@ } ``` ## Actions - - These are all posts to a user's outbox. - The server then creates a post to the necessary inbox of the recipient, or the followers. - Whenever a user accesses the site, they do a get from their inbox. ### Comments - #### [Create](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-create) ``` { @@ -163,7 +161,6 @@ "object": comment_id, or post_id } ``` - #### [Delete](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-delete) ``` { diff --git a/README.md b/README.md index 99a8ad4e..b3f8d11b 100644 --- a/README.md +++ b/README.md @@ -33,8 +33,12 @@ We have a twitter alternative (mastodon), a facebook alternative (friendica), so - [helpful diesel examples](http://siciarz.net/24-days-rust-diesel/) - [Mastodan public key server example](https://blog.joinmastodon.org/2018/06/how-to-implement-a-basic-activitypub-server/) - [Recursive query for adjacency list for nested comments](https://stackoverflow.com/questions/192220/what-is-the-most-efficient-elegant-way-to-parse-a-flat-table-into-a-tree/192462#192462) +- https://github.com/sparksuite/simplemde-markdown-editor +- [Sticky Sidebar](https://stackoverflow.com/questions/38382043/how-to-use-css-position-sticky-to-keep-a-sidebar-visible-with-bootstrap-4/49111934) ## TODOs - Endpoints - DB - Followers / following + + diff --git a/server/Cargo.lock b/server/Cargo.lock index 93769d2d..b4557d00 100644 --- a/server/Cargo.lock +++ b/server/Cargo.lock @@ -45,6 +45,126 @@ dependencies = [ "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "actix" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "actix_derive 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-signal 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "trust-dns-proto 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "trust-dns-resolver 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)", + "uuid 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "actix-net" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "actix 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-current-thread 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "trust-dns-resolver 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "actix-web" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "actix 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-net 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "brotli2 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "cookie 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "h2 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", + "mime_guess 2.0.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_urlencoded 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-current-thread 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "v_htmlescape 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "actix_derive" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "adler32" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "aho-corasick" version = "0.6.10" @@ -53,6 +173,29 @@ dependencies = [ "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "arc-swap" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "arrayvec" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "atty" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "autocfg" version = "0.1.2" @@ -80,6 +223,15 @@ dependencies = [ "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "base64" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "base64" version = "0.10.1" @@ -123,11 +275,43 @@ dependencies = [ "opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "brotli-sys" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "brotli2" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "brotli-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "build_const" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "byteorder" version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "bytes" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "cc" version = "1.0.29" @@ -157,6 +341,81 @@ dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "cookie" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crc" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crc32fast" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-channel" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-deque" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-queue" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-utils" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "diesel" version = "1.4.1" @@ -187,6 +446,88 @@ dependencies = [ "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "dtoa" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "encoding" +version = "0.2.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "encoding-index-japanese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding-index-korean 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding-index-simpchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding-index-singlebyte 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "encoding-index-japanese" +version = "1.20141219.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "encoding-index-korean" +version = "1.20141219.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "encoding-index-simpchinese" +version = "1.20141219.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "encoding-index-singlebyte" +version = "1.20141219.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "encoding-index-tradchinese" +version = "1.20141219.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "encoding_index_tests" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "env_logger" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "error-chain" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "backtrace 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "failure" version = "0.1.5" @@ -207,11 +548,55 @@ dependencies = [ "synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "flate2" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz_oxide_c_api 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "fnv" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "fuchsia-cprng" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "fuchsia-zircon" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "fuchsia-zircon-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-cpupool" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "generic-array" version = "0.12.0" @@ -220,26 +605,178 @@ dependencies = [ "typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "h2" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "heck" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "hostname" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "winutil 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "http" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "httparse" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "humantime" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "idna" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "indexmap" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "iovec" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ipconfig" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "error-chain 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "socket2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "widestring 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winreg 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "itoa" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "kernel32-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "language-tags" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "lazy_static" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "lazycell" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "libc" version = "0.2.49" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "linked-hash-map" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "lock_api" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "log" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "lru-cache" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "linked-hash-map 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "matches" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "memchr" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "memoffset" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "mime" version = "0.3.13" @@ -248,6 +785,108 @@ dependencies = [ "unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "mime_guess" +version = "2.0.0-alpha.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", + "phf 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_codegen 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "miniz-sys" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "miniz_oxide" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "miniz_oxide_c_api" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz_oxide 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "mio" +version = "0.6.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "mio-uds" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "miow" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "net2" +version = "0.2.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "nodrop" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "nom" +version = "4.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "num-integer" version = "0.1.39" @@ -261,11 +900,88 @@ name = "num-traits" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "num_cpus" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "opaque-debug" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "owning_ref" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "parking_lot" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "parking_lot_core" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "percent-encoding" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "phf" +version = "0.7.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "phf_codegen" +version = "0.7.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", + "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "phf_generator" +version = "0.7.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "phf_shared" +version = "0.7.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "pq-sys" version = "0.4.6" @@ -290,6 +1006,11 @@ dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "quick-error" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "quote" version = "0.5.2" @@ -306,6 +1027,18 @@ dependencies = [ "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rand" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rand" version = "0.6.5" @@ -415,6 +1148,14 @@ name = "redox_syscall" version = "0.1.51" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "redox_termios" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "regex" version = "0.2.11" @@ -427,6 +1168,18 @@ dependencies = [ "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "regex" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "regex-syntax" version = "0.5.6" @@ -435,20 +1188,82 @@ dependencies = [ "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "regex-syntax" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "resolv-conf" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "hostname 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ring" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rustc-demangle" version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "ryu" version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "safemem" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "scopeguard" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "serde" version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "serde_derive" @@ -470,17 +1285,101 @@ dependencies = [ "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "serde_urlencoded" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "server" version = "0.0.1" dependencies = [ "activitypub 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "actix 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-web 0.7.18 (registry+https://github.com/rust-lang/crates.io-index)", "bcrypt 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "diesel 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "dotenv 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "strum 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", + "strum_macros 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "sha1" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "signal-hook" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "arc-swap 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "siphasher" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "slab" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "smallvec" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "socket2" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "stable_deref_trait" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "string" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "strum" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "strum_macros" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -514,6 +1413,24 @@ dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "termcolor" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "termion" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "thread_local" version = "0.3.6" @@ -532,6 +1449,263 @@ dependencies = [ "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "tokio" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-current-thread 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-fs 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-uds 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-codec" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-current-thread" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-executor" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-fs" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-threadpool 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-io" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-reactor" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-sync 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-signal" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", + "signal-hook 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-sync" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-tcp" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-threadpool" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-timer" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-udp" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-uds" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tower-service" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "trust-dns-proto" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "socket2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "trust-dns-proto" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "socket2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "trust-dns-resolver" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "ipconfig 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "resolv-conf 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "trust-dns-proto 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "typenum" version = "1.10.0" @@ -542,6 +1716,14 @@ name = "ucd-util" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "unicase" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "unicase" version = "2.2.0" @@ -550,16 +1732,91 @@ dependencies = [ "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "unicode-bidi" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "unicode-normalization" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "unicode-segmentation" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "unicode-xid" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "untrusted" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "url" +version = "1.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "utf8-ranges" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "uuid" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "v_escape" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "v_escape_derive 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "v_escape_derive" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "nom 4.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "v_htmlescape" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "v_escape 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "vcpkg" version = "0.2.6" @@ -570,6 +1827,16 @@ name = "version_check" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "widestring" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "winapi" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "winapi" version = "0.3.6" @@ -579,55 +1846,179 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "winapi-build" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "winapi-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "wincolor" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "winreg" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "winutil" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ws2_32-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [metadata] "checksum activitypub 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08018b04725f5107d4a64e850f8a44a1f8a7e72abf0ca09125e3054921d26fd9" "checksum activitystreams-derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "48db826c588a009960d74530e7c215e21fae130f585362504dc6b6357e5ce86b" "checksum activitystreams-traits 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "670ef03168e704b0cae242e7a5d8b40506772b339687e01a3496fc4afe2e8542" "checksum activitystreams-types 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "224d1e28d043f4275139445475da8866f0a430ecfc9047c9a15fbe3c70c22b04" +"checksum actix 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6c616db5fa4b0c40702fb75201c2af7f8aa8f3a2e2c1dda3b0655772aa949666" +"checksum actix-net 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "8bebfbe6629e0131730746718c9e032b58f02c6ce06ed7c982b9fef6c8545acd" +"checksum actix-web 0.7.18 (registry+https://github.com/rust-lang/crates.io-index)" = "e9f33c941e5e69a58a6bfef33853228042ed3799fc4b5a4923a36a85776fb690" +"checksum actix_derive 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4300e9431455322ae393d43a2ba1ef96b8080573c0fc23b196219efedfb6ba69" +"checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c" "checksum aho-corasick 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "81ce3d38065e618af2d7b77e10c5ad9a069859b4be3c2250f674af3840d9c8a5" +"checksum arc-swap 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1025aeae2b664ca0ea726a89d574fe8f4e77dd712d443236ad1de00379450cf6" +"checksum arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "92c7fb76bc8826a8b33b4ee5bb07a247a81e76764ab4d55e8f73e3a4d8808c71" +"checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" "checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799" "checksum backtrace 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "cd5a90e2b463010cd0e0ce9a11d4a9d5d58d9f41d4a6ba3dcaf9e68b466e88b4" "checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6" "checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" +"checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" "checksum bcrypt 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2a426ab63025c1d21e4e12a218c915fa22097b89ab7ed5765fa803101e004b27" "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" "checksum block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1c924d49bd09e7c06003acda26cd9742e796e34282ec6c1189404dee0c1f4774" "checksum blowfish 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6aeb80d00f2688459b8542068abd974cfb101e7a82182414a99b5026c0d85cc3" +"checksum brotli-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4445dea95f4c2b41cde57cc9fee236ae4dbae88d8fcbdb4750fc1bb5d86aaecd" +"checksum brotli2 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0cb036c3eade309815c15ddbacec5b22c4d1f3983a774ab2eac2e3e9ea85568e" +"checksum build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39092a32794787acd8525ee150305ff051b0aa6cc2abaf193924f5ab05425f39" "checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb" +"checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" "checksum cc 1.0.29 (registry+https://github.com/rust-lang/crates.io-index)" = "4390a3b5f4f6bce9c1d0c00128379df433e53777fdd30e92f16a529332baec4e" "checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4" "checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +"checksum cookie 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1465f8134efa296b4c19db34d909637cb2bf0f7aaf21299e23e18fa29ac557cf" +"checksum crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d663548de7f5cca343f1e0a48d14dcfb0e9eb4e079ec58883b7251539fa10aeb" +"checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" +"checksum crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0f0ed1a4de2235cabda8558ff5840bffb97fcb64c97827f354a451307df5f72b" +"checksum crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b18cd2e169ad86297e6bc0ad9aa679aee9daa4f19e8163860faf7c164e4f5a71" +"checksum crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "04c9e3102cc2d69cd681412141b390abd55a362afc1540965dad0ad4d34280b4" +"checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" +"checksum crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f8306fcef4a7b563b76b7dd949ca48f52bc1141aa067d2ea09565f3e2652aa5c" "checksum diesel 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a2469cbcf1dfb9446e491cac4c493c2554133f87f7d041e892ac82e5cd36e863" "checksum diesel_derives 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "62a27666098617d52c487a41f70de23d44a1dc1f3aa5877ceba2790fb1f1cab4" "checksum dotenv 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "400b347fe65ccfbd8f545c9d9a75d04b0caf23fec49aaa838a9a05398f94c019" +"checksum dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6d301140eb411af13d3115f9a562c85cc6b541ade9dfa314132244aaee7489dd" +"checksum encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec" +"checksum encoding-index-japanese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91" +"checksum encoding-index-korean 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4dc33fb8e6bcba213fe2f14275f0963fd16f0a02c878e3095ecfdf5bee529d81" +"checksum encoding-index-simpchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d87a7194909b9118fc707194baa434a4e3b0fb6a5a757c73c3adb07aa25031f7" +"checksum encoding-index-singlebyte 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3351d5acffb224af9ca265f435b859c7c01537c0849754d3db3fdf2bfe2ae84a" +"checksum encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18" +"checksum encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569" +"checksum env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "afb070faf94c85d17d50ca44f6ad076bce18ae92f0037d350947240a36e9d42e" +"checksum error-chain 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6930e04918388a9a2e41d518c25cf679ccafe26733fb4127dbf21993f2575d46" "checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" "checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" +"checksum flate2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2291c165c8e703ee54ef3055ad6188e3d51108e2ded18e9f2476e774fc5ad3d4" +"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" "checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" +"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" +"checksum futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "49e7653e374fe0d0c12de4250f0bdb60680b8c80eed558c5c7538eec9c89e21b" +"checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" "checksum generic-array 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c0f28c2f5bfb5960175af447a2da7c18900693738343dc896ffbcabd9839592" +"checksum h2 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "ddb2b25a33e231484694267af28fec74ac63b5ccf51ee2065a5e313b834d836e" +"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" +"checksum hostname 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "21ceb46a83a85e824ef93669c8b390009623863b5c195d1ba747292c0c72f94e" +"checksum http 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "fe67e3678f2827030e89cc4b9e7ecd16d52f132c0b940ab5005f88e821500f6a" +"checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" +"checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114" +"checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" +"checksum indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e81a7c05f79578dbc15793d8b619db9ba32b4577003ef3af1a91c416798c58d" +"checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" +"checksum ipconfig 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "08f7eadeaf4b52700de180d147c4805f199854600b36faa963d91114827b2ffc" "checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" +"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +"checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" "checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" +"checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" "checksum libc 0.2.49 (registry+https://github.com/rust-lang/crates.io-index)" = "413f3dfc802c5dc91dc570b05125b6cda9855edfaa9825c9849807876376e70e" +"checksum linked-hash-map 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7860ec297f7008ff7a1e3382d7f7e1dcd69efc94751a2284bafc3d013c2aa939" +"checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" +"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" +"checksum lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4d06ff7ff06f729ce5f4e227876cb88d10bc59cd4ae1e09fbb2bde15c850dc21" +"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" "checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39" +"checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" "checksum mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "3e27ca21f40a310bd06d9031785f4801710d566c184a6e15bad4f1d9b65f9425" +"checksum mime_guess 2.0.0-alpha.6 (registry+https://github.com/rust-lang/crates.io-index)" = "30de2e4613efcba1ec63d8133f344076952090c122992a903359be5a4f99c3ed" +"checksum miniz-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "0300eafb20369952951699b68243ab4334f4b10a88f411c221d444b36c40e649" +"checksum miniz_oxide 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c468f2369f07d651a5d0bb2c9079f8488a66d5466efe42d0c5c6466edcb7f71e" +"checksum miniz_oxide_c_api 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b7fe927a42e3807ef71defb191dc87d4e24479b221e67015fe38ae2b7b447bab" +"checksum mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)" = "71646331f2619b1026cc302f87a2b8b648d5c6dd6937846a16cc8ce0f347f432" +"checksum mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" +"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" +"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" +"checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" +"checksum nom 4.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "22293d25d3f33a8567cc8a1dc20f40c7eeb761ce83d0fcca059858580790cac3" "checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea" "checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1" +"checksum num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a23f0ed30a54abaa0c7e83b1d2d87ada7c3c23078d1d87815af3e3b6385fbba" "checksum opaque-debug 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "93f5bb2e8e8dec81642920ccff6b61f1eb94fa3020c5a325c9851ff604152409" +"checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" +"checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" +"checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" +"checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" +"checksum phf 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b3da44b85f8e8dfaec21adae67f95d93244b2ecf6ad2a692320598dcc8e6dd18" +"checksum phf_codegen 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b03e85129e324ad4166b06b2c7491ae27fe3ec353af72e72cd1654c7225d517e" +"checksum phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "09364cc93c159b8b06b1f4dd8a4398984503483891b0c26b867cf431fb132662" +"checksum phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "234f71a15de2288bcb7e3b6515828d22af7ec8598ee6d24c3b526fa0a80b67a0" "checksum pq-sys 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "6ac25eee5a0582f45a67e837e350d784e7003bd29a5f460796772061ca49ffda" "checksum proc-macro2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1b06e2f335f48d24442b35a19df506a835fb3547bc3c06ef27340da9acf5cae7" "checksum proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)" = "4d317f9caece796be1980837fd5cb3dfec5613ebdb04ad0956deea83ce168915" +"checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" "checksum quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9949cfe66888ffe1d53e6ec9d9f3b70714083854be20fd5e271b232a017401e8" "checksum quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "cdd8e04bd9c52e0342b406469d494fcb033be4bdbe5c606016defbb1681411e1" +"checksum rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" "checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" "checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" "checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" @@ -640,25 +2031,84 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" "checksum redox_syscall 0.1.51 (registry+https://github.com/rust-lang/crates.io-index)" = "423e376fffca3dfa06c9e9790a9ccd282fafb3cc6e6397d01dbf64f9bacc6b85" +"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" "checksum regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384" +"checksum regex 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "53ee8cfdddb2e0291adfb9f13d31d3bbe0a03c9a402c01b1e24188d86c35b24f" "checksum regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7" +"checksum regex-syntax 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8c2f35eedad5295fdf00a63d7d4b238135723f92b434ec06774dad15c7ab0861" +"checksum resolv-conf 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b263b4aa1b5de9ffc0054a2386f96992058bb6870aab516f8cdeb8a667d56dcb" +"checksum ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2c4db68a2e35f3497146b7e4563df7d4773a2433230c5e4b448328e31740458a" "checksum rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "adacaae16d02b6ec37fdc7acfcddf365978de76d1983d3ee22afc260e1ca9619" +"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" "checksum ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9e9b8cde282a9fe6a42dd4681319bfb63f121b8a8ee9439c6f4107e58a46f7" +"checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9" +"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" +"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" "checksum serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)" = "9f301d728f2b94c9a7691c90f07b0b4e8a4517181d9461be94c04bddeb4bd850" "checksum serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)" = "beed18e6f5175aef3ba670e57c60ef3b1b74d250d962a26604bff4c80e970dd4" "checksum serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)" = "27dce848e7467aa0e2fcaf0a413641499c0b745452aaca1194d24dedde9e13c9" +"checksum serde_urlencoded 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d48f9f99cd749a2de71d29da5f948de7f2764cc5a9d7f3c97e3514d4ee6eabf2" +"checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" +"checksum signal-hook 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "97a47ae722318beceb0294e6f3d601205a1e6abaa4437d9d33e3a212233e3021" +"checksum siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" +"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" +"checksum smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c4488ae950c49d403731982257768f48fada354a5203fe81f9bb6f43ca9002be" +"checksum socket2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "c4d11a52082057d87cb5caa31ad812f4504b97ab44732cd8359df2e9ff9f48e7" +"checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" +"checksum string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b639411d0b9c738748b5397d5ceba08e648f4f1992231aa859af1a017f31f60b" +"checksum strum 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1810e25f576e7ffce1ff5243b37066da5ded0310b3274c20baaeccb1145b2806" +"checksum strum_macros 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "572a2f4e53dd4c3483fd79e5cc10ddd773a3acb1169bbfe8762365e107110579" "checksum syn 0.13.11 (registry+https://github.com/rust-lang/crates.io-index)" = "14f9bf6292f3a61d2c716723fdb789a41bbe104168e6f496dc6497e531ea1b9b" "checksum syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)" = "f92e629aa1d9c827b2bb8297046c1ccffc57c99b947a680d3ccff1f136a3bee9" "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015" +"checksum termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f" +"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" +"checksum tokio 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "fcaabb3cec70485d0df6e9454fe514393ad1c4070dee8915f11041e95630b230" +"checksum tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c501eceaf96f0e1793cf26beb63da3d11c738c4a943fdf3746d81d64684c39f" +"checksum tokio-current-thread 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c756b04680eea21902a46fca4e9f410a2332c04995af590e07ff262e2193a9a3" +"checksum tokio-executor 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "30c6dbf2d1ad1de300b393910e8a3aa272b724a400b6531da03eed99e329fbf0" +"checksum tokio-fs 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "3fe6dc22b08d6993916647d108a1a7d15b9cd29c4f4496c62b92c45b5041b7af" +"checksum tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5090db468dad16e1a7a54c8c67280c5e4b544f3d3e018f0b913b400261f85926" +"checksum tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6af16bfac7e112bea8b0442542161bfc41cbfa4466b580bdda7d18cb88b911ce" +"checksum tokio-signal 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "dd6dc5276ea05ce379a16de90083ec80836440d5ef8a6a39545a3207373b8296" +"checksum tokio-sync 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1bf2b9dac2a0509b5cfd1df5aa25eafacb616a42a491a13604d6bbeab4486363" +"checksum tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" +"checksum tokio-threadpool 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "742e511f6ce2298aeb86fc9ea0d8df81c2388c6ebae3dc8a7316e8c9df0df801" +"checksum tokio-timer 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "2910970404ba6fa78c5539126a9ae2045d62e3713041e447f695f41405a120c6" +"checksum tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "66268575b80f4a4a710ef83d087fdfeeabdce9b74c797535fbac18a2cb906e92" +"checksum tokio-uds 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "037ffc3ba0e12a0ab4aca92e5234e0dedeb48fddf6ccd260f1f150a36a9f2445" +"checksum tower-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b32f72af77f1bfe3d3d4da8516a238ebe7039b51dd8637a09841ac7f16d2c987" +"checksum trust-dns-proto 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0838272e89f1c693b4df38dc353412e389cf548ceed6f9fd1af5a8d6e0e7cf74" +"checksum trust-dns-proto 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "09144f0992b0870fa8d2972cc069cbf1e3c0fda64d1f3d45c4d68d0e0b52ad4e" +"checksum trust-dns-resolver 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8a9f877f7a1ad821ab350505e1f1b146a4960402991787191d6d8cab2ce2de2c" "checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" "checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" +"checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" "checksum unicase 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9d3218ea14b4edcaccfa0df0a64a3792a2c32cc706f1b336e48867f9d3147f90" +"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" +"checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" +"checksum unicode-segmentation 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa6024fc12ddfd1c6dbc14a80fa2324d4568849869b779f6bd37e5e4c03344d1" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" +"checksum untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "55cd1f4b4e96b46aeb8d4855db4a7a9bd96eeeb5c6a1ab54593328761642ce2f" +"checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" "checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737" +"checksum uuid 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0238db0c5b605dd1cf51de0f21766f97fba2645897024461d6a00c036819a768" +"checksum v_escape 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c8b50688edb86f4c092a1a9fe8bda004b0faa3197100897653809e97e09a2814" +"checksum v_escape_derive 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7cd994c63b487fef7aad31e5394ec04b9e24de7b32ea5251c9fb499cd2cbf44c" +"checksum v_htmlescape 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "020cae817dc82693aa523f01087b291b1c7a9ac8cea5c12297963f21769fb27f" "checksum vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "def296d3eb3b12371b2c7d0e83bfe1403e4db2d7a0bba324a12b21c4ee13143d" "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" +"checksum widestring 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7157704c2e12e3d2189c507b7482c52820a16dfa4465ba91add92f266667cadb" +"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" +"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +"checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +"checksum wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba" +"checksum winreg 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a27a759395c1195c4cc5cda607ef6f8f6498f64e78f7900f5de0a127a424704a" +"checksum winutil 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7daf138b6b14196e3830a588acf1e86966c694d3e8fb026fb105b8b5dca07e6e" +"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" diff --git a/server/Cargo.toml b/server/Cargo.toml index ba497f44..3c875e90 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -11,3 +11,10 @@ activitypub = "0.1.4" chrono = { version = "0.4", features = ["serde"] } failure = "0.1.5" serde_json = "*" +serde = { version = "1.0", features = ["derive"] } +actix = "*" +actix-web = "*" +env_logger = "*" +rand = "0.6.5" +strum = "0.14.0" +strum_macros = "0.14.0" diff --git a/server/src/actions/comment.rs b/server/src/actions/comment.rs index 104c13f2..d23382c6 100644 --- a/server/src/actions/comment.rs +++ b/server/src/actions/comment.rs @@ -4,6 +4,13 @@ use diesel::*; use diesel::result::Error; use {Crud, Likeable}; +// WITH RECURSIVE MyTree AS ( +// SELECT * FROM comment WHERE parent_id IS NULL +// UNION ALL +// SELECT m.* FROM comment AS m JOIN MyTree AS t ON m.parent_id = t.id +// ) +// SELECT * FROM MyTree; + #[derive(Queryable, Identifiable, PartialEq, Debug)] #[table_name="comment"] pub struct Comment { diff --git a/server/src/apub.rs b/server/src/apub.rs index 16b8be1b..6272fedc 100644 --- a/server/src/apub.rs +++ b/server/src/apub.rs @@ -34,7 +34,7 @@ mod tests { use super::User_; use naive_now; - #[test] + #[test] fn test_person() { let expected_user = User_ { id: 52, diff --git a/server/src/bin/main.rs b/server/src/bin/main.rs new file mode 100644 index 00000000..25181aaa --- /dev/null +++ b/server/src/bin/main.rs @@ -0,0 +1,270 @@ +extern crate server; + +use std::time::{Instant, Duration}; +use server::actix::*; +use server::actix_web::server::HttpServer; +use server::actix_web::{fs, http, ws, App, Error, HttpRequest, HttpResponse}; + + +/// How often heartbeat pings are sent +const HEARTBEAT_INTERVAL: Duration = Duration::from_secs(5); +/// How long before lack of client response causes a timeout +const CLIENT_TIMEOUT: Duration = Duration::from_secs(10); + +use server::websocket_server::server::*; +use std::str::FromStr; +// use server::websocket_server::server::UserOperation::from_str; + +/// This is our websocket route state, this state is shared with all route +/// instances via `HttpContext::state()` +struct WsChatSessionState { + addr: Addr, +} + +/// Entry point for our route +fn chat_route(req: &HttpRequest) -> Result { + ws::start( + req, + WSSession { + id: 0, + hb: Instant::now() + }, + ) +} + +struct WSSession { + /// unique session id + id: usize, + /// Client must send ping at least once per 10 seconds (CLIENT_TIMEOUT), + /// otherwise we drop connection. + hb: Instant +} + +impl Actor for WSSession { + type Context = ws::WebsocketContext; + + /// Method is called on actor start. + /// We register ws session with ChatServer + fn started(&mut self, ctx: &mut Self::Context) { + // we'll start heartbeat process on session start. + self.hb(ctx); + + // register self in chat server. `AsyncContext::wait` register + // future within context, but context waits until this future resolves + // before processing any other events. + // HttpContext::state() is instance of WsChatSessionState, state is shared + // across all routes within application + let addr = ctx.address(); + ctx.state() + .addr + .send(Connect { + addr: addr.recipient(), + }) + .into_actor(self) + .then(|res, act, ctx| { + match res { + Ok(res) => act.id = res, + // something is wrong with chat server + _ => ctx.stop(), + } + fut::ok(()) + }) + .wait(ctx); + } + + fn stopping(&mut self, ctx: &mut Self::Context) -> Running { + // notify chat server + ctx.state().addr.do_send(Disconnect { id: self.id }); + Running::Stop + } +} + +/// Handle messages from chat server, we simply send it to peer websocket +impl Handler for WSSession { + type Result = (); + + fn handle(&mut self, msg: WSMessage, ctx: &mut Self::Context) { + ctx.text(msg.0); + } +} + +use server::serde_json::Value; +/// WebSocket message handler +impl StreamHandler for WSSession { + fn handle(&mut self, msg: ws::Message, ctx: &mut Self::Context) { + // println!("WEBSOCKET MESSAGE: {:?}", msg); + match msg { + ws::Message::Ping(msg) => { + self.hb = Instant::now(); + ctx.pong(&msg); + } + ws::Message::Pong(_) => { + self.hb = Instant::now(); + } + ws::Message::Text(text) => { + let m = text.trim(); + let json: Value = serde_json::from_str(m).unwrap(); + + // Get the OP command, and its data + let op: &str = &json["op"].as_str().unwrap(); + let data: &Value = &json["data"]; + + let user_operation: UserOperation = UserOperation::from_str(op).unwrap(); + + match user_operation { + UserOperation::Login => { + let login: Login = serde_json::from_str(&data.to_string()).unwrap(); + ctx.state() + .addr + .do_send(login); + }, + UserOperation::Register => { + let register: Register = serde_json::from_str(&data.to_string()).unwrap(); + ctx.state() + .addr + .send(register) + .into_actor(self) + .then(|res, _, ctx| { + match res { + Ok(wut) => ctx.text(wut), + _ => println!("Something is wrong"), + } + fut::ok(()) + }) + .wait(ctx) + } + _ => ctx.text(format!("!!! unknown command: {:?}", m)), + } + + // we check for /sss type of messages + // if m.starts_with('/') { + // let v: Vec<&str> = m.splitn(2, ' ').collect(); + // match v[0] { + // "/list" => { + // // Send ListRooms message to chat server and wait for + // // response + // println!("List rooms"); + // ctx.state() + // .addr + // .send(ListRooms) + // .into_actor(self) + // .then(|res, _, ctx| { + // match res { + // Ok(rooms) => { + // for room in rooms { + // ctx.text(room); + // } + // } + // _ => println!("Something is wrong"), + // } + // fut::ok(()) + // }) + // .wait(ctx) + // .wait(ctx) pauses all events in context, + // so actor wont receive any new messages until it get list + // of rooms back + // } + // "/join" => { + // if v.len() == 2 { + // self.room = v[1].to_owned(); + // ctx.state().addr.do_send(Join { + // id: self.id, + // name: self.room.clone(), + // }); + + // ctx.text("joined"); + // } else { + // ctx.text("!!! room name is required"); + // } + // } + // "/name" => { + // if v.len() == 2 { + // self.name = Some(v[1].to_owned()); + // } else { + // ctx.text("!!! name is required"); + // } + // } + // _ => ctx.text(format!("!!! unknown command: {:?}", m)), + // } + // } else { + // let msg = if let Some(ref name) = self.name { + // format!("{}: {}", name, m) + // } else { + // m.to_owned() + // }; + // send message to chat server + // ctx.state().addr.do_send(ClientMessage { + // id: self.id, + // msg: msg, + // room: self.room.clone(), + // }) + // } + } + ws::Message::Binary(_bin) => println!("Unexpected binary"), + ws::Message::Close(_) => { + ctx.stop(); + }, + } + } +} + +impl WSSession { + /// helper method that sends ping to client every second. + /// + /// also this method checks heartbeats from client + fn hb(&self, ctx: &mut ws::WebsocketContext) { + ctx.run_interval(HEARTBEAT_INTERVAL, |act, ctx| { + // check client heartbeats + if Instant::now().duration_since(act.hb) > CLIENT_TIMEOUT { + // heartbeat timed out + println!("Websocket Client heartbeat failed, disconnecting!"); + + // notify chat server + ctx.state() + .addr + .do_send(Disconnect { id: act.id }); + + // stop actor + ctx.stop(); + + // don't try to send a ping + return; + } + + ctx.ping(""); + }); + } +} + +fn main() { + let _ = env_logger::init(); + let sys = actix::System::new("rust-reddit-fediverse-server"); + + // Start chat server actor in separate thread + let server = Arbiter::start(|_| ChatServer::default()); + + // Create Http server with websocket support + HttpServer::new(move || { + // Websocket sessions state + let state = WsChatSessionState { + addr: server.clone(), + }; + + App::with_state(state) + // redirect to websocket.html + // .resource("/", |r| r.method(http::Method::GET).f(|_| { + // HttpResponse::Found() + // .header("LOCATION", "/static/websocket.html") + // .finish() + // })) + // // websocket + .resource("/service/ws", |r| r.route().f(chat_route)) + // static resources + // .handler("/static/", fs::StaticFiles::new("static/").unwrap()) + }).bind("127.0.0.1:8080") + .unwrap() + .start(); + + println!("Started http server: 127.0.0.1:8080"); + let _ = sys.run(); +} diff --git a/server/src/lib.rs b/server/src/lib.rs index b1a1f252..3daeb8d2 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -1,7 +1,19 @@ #[macro_use] -extern crate diesel; -extern crate dotenv; -extern crate chrono; +pub extern crate diesel; +pub extern crate dotenv; +pub extern crate chrono; +pub extern crate serde; +pub extern crate serde_json; +pub extern crate actix; +pub extern crate actix_web; +pub extern crate rand; +pub extern crate strum; +#[macro_use] pub extern crate strum_macros; + +pub mod schema; +pub mod apub; +pub mod actions; +pub mod websocket_server; use diesel::*; use diesel::pg::PgConnection; @@ -9,11 +21,7 @@ use diesel::result::Error; use dotenv::dotenv; use std::env; -pub mod schema; -pub mod apub; -pub mod actions; -// pub trait Likeable; pub trait Crud { fn create(conn: &PgConnection, form: T) -> Result where Self: Sized; fn read(conn: &PgConnection, id: i32) -> Self; diff --git a/server/src/websocket_server/mod.rs b/server/src/websocket_server/mod.rs new file mode 100644 index 00000000..74f47ad3 --- /dev/null +++ b/server/src/websocket_server/mod.rs @@ -0,0 +1 @@ +pub mod server; diff --git a/server/src/websocket_server/server.rs b/server/src/websocket_server/server.rs new file mode 100644 index 00000000..2d410176 --- /dev/null +++ b/server/src/websocket_server/server.rs @@ -0,0 +1,269 @@ +//! `ChatServer` is an actor. It maintains list of connection client session. +//! And manages available rooms. Peers send messages to other peers in same +//! room through `ChatServer`. + +use actix::prelude::*; +use rand::{rngs::ThreadRng, Rng}; +use std::collections::{HashMap, HashSet}; +use serde::{Deserialize, Serialize}; + +use {Crud,establish_connection}; + +#[derive(EnumString,ToString,Debug)] +pub enum UserOperation { + Login, Register, Logout, Join, Edit, Reply, Vote, Delete, NextPage, Sticky +} + +pub enum MessageType { + Comments, Users, Ping, Pong +} + + + +/// Chat server sends this messages to session +#[derive(Message)] +pub struct WSMessage(pub String); + +/// Message for chat server communications + +/// New chat session is created +#[derive(Message)] +#[rtype(usize)] +pub struct Connect { + pub addr: Recipient, +} + +/// Session is disconnected +#[derive(Message)] +pub struct Disconnect { + pub id: usize, +} + +/// Send message to specific room +#[derive(Message)] +pub struct ClientMessage { + /// Id of the client session + pub id: usize, + /// Peer message + pub msg: String, + /// Room name + pub room: String, +} + +/// List of available rooms +pub struct ListRooms; + +impl actix::Message for ListRooms { + type Result = Vec; +} + +/// Join room, if room does not exists create new one. +#[derive(Message)] +pub struct Join { + /// Client id + pub id: usize, + /// Room name + pub name: String, +} + +#[derive(Message)] +#[derive(Serialize, Deserialize)] +pub struct Login { + pub username: String, + pub password: String +} + +// #[derive(Message)] +#[derive(Serialize, Deserialize)] +pub struct Register { + username: String, + email: Option, + password: String, + password_verify: String +} + +impl actix::Message for Register { + type Result = String; +} +/// `ChatServer` manages chat rooms and responsible for coordinating chat +/// session. implementation is super primitive +pub struct ChatServer { + sessions: HashMap>, // A map from generated random ID to session addr + rooms: HashMap>, // A map from room name to set of connectionIDs + rng: ThreadRng, +} + +impl Default for ChatServer { + fn default() -> ChatServer { + // default room + let mut rooms = HashMap::new(); + rooms.insert("Main".to_owned(), HashSet::new()); + + ChatServer { + sessions: HashMap::new(), + rooms: rooms, + rng: rand::thread_rng(), + } + } +} + +impl ChatServer { + /// Send message to all users in the room + fn send_room_message(&self, room: &str, message: &str, skip_id: usize) { + if let Some(sessions) = self.rooms.get(room) { + for id in sessions { + if *id != skip_id { + if let Some(addr) = self.sessions.get(id) { + let _ = addr.do_send(WSMessage(message.to_owned())); + } + } + } + } + } +} + +/// Make actor from `ChatServer` +impl Actor for ChatServer { + /// We are going to use simple Context, we just need ability to communicate + /// with other actors. + type Context = Context; +} + +/// Handler for Connect message. +/// +/// Register new session and assign unique id to this session +impl Handler for ChatServer { + type Result = usize; + + fn handle(&mut self, msg: Connect, _: &mut Context) -> Self::Result { + println!("Someone joined"); + + // notify all users in same room + self.send_room_message(&"Main".to_owned(), "Someone joined", 0); + + // register session with random id + let id = self.rng.gen::(); + self.sessions.insert(id, msg.addr); + + // auto join session to Main room + self.rooms.get_mut(&"Main".to_owned()).unwrap().insert(id); + + // send id back + id + } +} + +/// Handler for Disconnect message. +impl Handler for ChatServer { + type Result = (); + + fn handle(&mut self, msg: Disconnect, _: &mut Context) { + println!("Someone disconnected"); + + let mut rooms: Vec = Vec::new(); + + // remove address + if self.sessions.remove(&msg.id).is_some() { + // remove session from all rooms + for (name, sessions) in &mut self.rooms { + if sessions.remove(&msg.id) { + rooms.push(name.to_owned()); + } + } + } + // send message to other users + for room in rooms { + self.send_room_message(&room, "Someone disconnected", 0); + } + } +} + +/// Handler for Message message. +impl Handler for ChatServer { + type Result = (); + + fn handle(&mut self, msg: ClientMessage, _: &mut Context) { + self.send_room_message(&msg.room, msg.msg.as_str(), msg.id); + } +} + +/// Handler for `ListRooms` message. +impl Handler for ChatServer { + type Result = MessageResult; + + fn handle(&mut self, _: ListRooms, _: &mut Context) -> Self::Result { + let mut rooms = Vec::new(); + + for key in self.rooms.keys() { + rooms.push(key.to_owned()) + } + + MessageResult(rooms) + } +} + +/// Join room, send disconnect message to old room +/// send join message to new room +impl Handler for ChatServer { + type Result = (); + + fn handle(&mut self, msg: Join, _: &mut Context) { + let Join { id, name } = msg; + let mut rooms = Vec::new(); + + // remove session from all rooms + for (n, sessions) in &mut self.rooms { + if sessions.remove(&id) { + rooms.push(n.to_owned()); + } + } + // send message to other users + for room in rooms { + self.send_room_message(&room, "Someone disconnected", 0); + } + + if self.rooms.get_mut(&name).is_none() { + self.rooms.insert(name.clone(), HashSet::new()); + } + self.send_room_message(&name, "Someone connected", id); + self.rooms.get_mut(&name).unwrap().insert(id); + } + +} + +impl Handler for ChatServer { + + type Result = (); + fn handle(&mut self, msg: Login, _: &mut Context) { + println!("{}", msg.password); + + } +} + +impl Handler for ChatServer { + + type Result = MessageResult; + fn handle(&mut self, msg: Register, _: &mut Context) -> Self::Result { + + use actions::user::*; + let conn = establish_connection(); + + // TODO figure out how to return values, and throw errors + + // Register the new user + let user_form = UserForm { + name: &msg.username, + email: msg.email.as_ref().map(|x| &**x), + password_encrypted: &msg.password, + preferred_username: None, + updated: None + }; + + let inserted_user = User_::create(&conn, user_form).unwrap(); + + + // Return the jwt + MessageResult("hi".to_string()) + + } +} diff --git a/ui/.gitignore b/ui/.gitignore new file mode 100644 index 00000000..cc0ab540 --- /dev/null +++ b/ui/.gitignore @@ -0,0 +1,30 @@ +dist +.fusebox +_site +.alm +.history +.git +build +.build +.git +.history +.idea +.jshintrc +.nyc_output +.sass-cache +.vscode +build +coverage +jsconfig.json +Gemfile.lock +node_modules +.DS_Store +*.map +*.log +*.swp +*~ +test/data/result.json + +package-lock.json +*.orig + diff --git a/ui/assets/favicon.ico b/ui/assets/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..13f310e9f127f7d158d22478ffd2413d1a46e585 GIT binary patch literal 1150 zcmeH`%?`mp6os#reQkuDjl|C0L-Mq;CruXB5D z&-A8u#;n3f664;sMb)ffW?eu+dFf1MWCIaDp@3J&L8RU<`5o`)GS` z1<3;bD_*TXgC5kO=20wd3QM>I{4Mk$XpMLE56CwI{uI4v{o8>5U;l6af6?AO-wX6F m`=I~3fIq@N0`0#e=*-+ailr&1JsRcxWuKihJ8&AyAnyZdacNfo literal 0 HcmV?d00001 diff --git a/ui/fuse.js b/ui/fuse.js new file mode 100644 index 00000000..ff1e6d15 --- /dev/null +++ b/ui/fuse.js @@ -0,0 +1,55 @@ +const { + FuseBox, + Sparky, + EnvPlugin, + CSSPlugin, + WebIndexPlugin, + QuantumPlugin +} = require('fuse-box'); +// const transformInferno = require('../../dist').default +const transformInferno = require('ts-transform-inferno').default; +const transformClasscat = require('ts-transform-classcat').default; +let fuse, app; +let isProduction = false; + +Sparky.task('config', _ => { + fuse = new FuseBox({ + homeDir: 'src', + hash: isProduction, + output: 'dist/$name.js', + experimentalFeatures: true, + cache: !isProduction, + sourceMaps: !isProduction, + transformers: { + before: [transformClasscat(), transformInferno()], + }, + plugins: [ + EnvPlugin({ NODE_ENV: isProduction ? 'production' : 'development' }), + CSSPlugin(), + WebIndexPlugin({ + title: 'Inferno Typescript FuseBox Example', + template: 'src/index.html', + path: isProduction ? "/static" : "/" + }), + isProduction && + QuantumPlugin({ + bakeApiIntoBundle: 'app', + treeshake: true, + uglify: true, + }), + ], + }); + app = fuse.bundle('app').instructions('>index.tsx'); +}); +Sparky.task('clean', _ => Sparky.src('dist/').clean('dist/')); +Sparky.task('env', _ => (isProduction = true)); +Sparky.task('copy-assets', () => Sparky.src('assets/*.ico').dest('dist/')); +Sparky.task('dev', ['clean', 'config', 'copy-assets'], _ => { + fuse.dev(); + app.hmr().watch(); + return fuse.run(); +}); +Sparky.task('prod', ['clean', 'env', 'config', 'copy-assets'], _ => { + // fuse.dev({ reload: true }); // remove after demo + return fuse.run(); +}); diff --git a/ui/package.json b/ui/package.json new file mode 100644 index 00000000..ca4fa368 --- /dev/null +++ b/ui/package.json @@ -0,0 +1,31 @@ +{ + "name": "rust_reddit_fediverse", + "version": "1.0.0", + "description": "A simple UI for rust_reddit_fediverse", + "main": "index.js", + "scripts": { + "start": "node fuse dev", + "build": "node fuse prod" + }, + "keywords": [], + "author": "Dessalines", + "license": "GPL-2.0-or-later", + "engines": { + "node": ">=8.9.0" + }, + "engineStrict": true, + "dependencies": { + "classcat": "^1.1.3", + "dotenv": "^6.1.0", + "inferno": "^7.0.1", + "inferno-router": "^7.0.1", + "moment": "^2.22.2" + }, + "devDependencies": { + "fuse-box": "3.1.3", + "ts-transform-classcat": "^0.0.2", + "ts-transform-inferno": "^4.0.2", + "typescript": "^3.3.3333", + "uglify-es": "^3.3.9" + } +} diff --git a/ui/src/components/home.tsx b/ui/src/components/home.tsx new file mode 100644 index 00000000..07cb94f5 --- /dev/null +++ b/ui/src/components/home.tsx @@ -0,0 +1,14 @@ +import { Component } from 'inferno'; +import { repoUrl } from '../utils'; + +export class Home extends Component { + + render() { + return ( +
+ hola this is me. +
+ ) + } + +} diff --git a/ui/src/components/login.tsx b/ui/src/components/login.tsx new file mode 100644 index 00000000..fd6f5045 --- /dev/null +++ b/ui/src/components/login.tsx @@ -0,0 +1,145 @@ +import { Component, linkEvent } from 'inferno'; + +import { LoginForm, RegisterForm } from '../interfaces'; +import { WebSocketService } from '../services'; + +interface State { + loginForm: LoginForm; + registerForm: RegisterForm; +} + +let emptyState: State = { + loginForm: { + username: null, + password: null + }, + registerForm: { + username: null, + password: null, + password_verify: null + } +} + +export class Login extends Component { + + constructor(props, context) { + super(props, context); + + this.state = emptyState; + + } + render() { + return ( +
+
+
+ {this.loginForm()} +
+
+ {this.registerForm()} +
+
+
+ ) + } + + loginForm() { + return ( +
+
+

Login

+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+
+
+ Forgot your password or deleted your account? Reset your password. TODO +
+ ); + } + registerForm() { + return ( +
+

Sign Up

+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+
+
+ ); + } + + handleLoginSubmit(i: Login, event) { + console.log(i.state); + event.preventDefault(); + WebSocketService.Instance.login(i.state.loginForm); + } + + handleLoginUsernameChange(i: Login, event) { + i.state.loginForm.username = event.target.value; + } + + handleLoginPasswordChange(i: Login, event) { + i.state.loginForm.password = event.target.value; + } + + handleRegisterSubmit(i: Login, event) { + console.log(i.state); + event.preventDefault(); + WebSocketService.Instance.register(i.state.registerForm); + } + + handleRegisterUsernameChange(i: Login, event) { + i.state.registerForm.username = event.target.value; + } + + handleRegisterEmailChange(i: Login, event) { + i.state.registerForm.email = event.target.value; + } + + handleRegisterPasswordChange(i: Login, event) { + i.state.registerForm.password = event.target.value; + } + + handleRegisterPasswordVerifyChange(i: Login, event) { + i.state.registerForm.password_verify = event.target.value; + } +} diff --git a/ui/src/components/navbar.tsx b/ui/src/components/navbar.tsx new file mode 100644 index 00000000..86d5d1d2 --- /dev/null +++ b/ui/src/components/navbar.tsx @@ -0,0 +1,38 @@ +import { Component, linkEvent } from 'inferno'; +import { Link } from 'inferno-router'; +import { repoUrl } from '../utils'; + +export class Navbar extends Component { + + constructor(props, context) { + super(props, context); + } + + render() { + return ( +
{this.navbar()}
+ ) + } + + // TODO class active corresponding to current page + navbar() { + return ( + + ); + } + +} diff --git a/ui/src/components/search.tsx b/ui/src/components/search.tsx new file mode 100644 index 00000000..080761f9 --- /dev/null +++ b/ui/src/components/search.tsx @@ -0,0 +1,205 @@ +import { Component, linkEvent } from 'inferno'; +import * as moment from 'moment'; + +import { endpoint } from '../env'; +import { SearchParams, Results, Torrent } from '../interfaces'; +import { humanFileSize, magnetLink, getFileName } from '../utils'; + +interface State { + results: Results; + searchParams: SearchParams; + searching: Boolean; +} + +export class Search extends Component { + + state: State = { + results: { + torrents: [] + }, + searchParams: { + q: "", + page: 1, + type_: 'torrent' + }, + searching: false + }; + + constructor(props, context) { + super(props, context); + } + + componentDidMount() { + this.state.searchParams = { + page: Number(this.props.match.params.page), + q: this.props.match.params.q, + type_: this.props.match.params.type_ + } + this.search(); + } + + // Re-do search if the props have changed + componentDidUpdate(lastProps, lastState, snapshot) { + if (lastProps.match && lastProps.match.params !== this.props.match.params) { + this.state.searchParams = { + page: Number(this.props.match.params.page), + q: this.props.match.params.q, + type_: this.props.match.params.type_ + } + this.search(); + } + + } + + search() { + if (!!this.state.searchParams.q) { + this.setState({ searching: true, results: { torrents: [] } }); + this.fetchData(this.state.searchParams) + .then(torrents => { + if (!!torrents) { + this.setState({ + results: { + torrents: torrents + } + }); + } + }).catch(error => { + console.error('request failed', error); + }).then(() => this.setState({ searching: false })); + } else { + this.setState({ results: { torrents: [] } }); + } + } + + fetchData(searchParams: SearchParams): Promise> { + let q = encodeURI(searchParams.q); + return fetch(`${endpoint}/service/search?q=${q}&page=${searchParams.page}&type_=${searchParams.type_}`) + .then(data => data.json()); + } + + render() { + return ( +
+ { + this.state.searching ? + this.spinner() : this.state.results.torrents[0] ? + this.torrentsTable() + : this.noResults() + } +
+ ); + } + + spinner() { + return ( +
+ +
+ ); + } + + noResults() { + return ( +
+

No Results

+
+ ) + } + + torrentsTable() { + return ( +
+ + + + + + + + + + + + + {this.state.results.torrents.map(torrent => ( + + { !torrent.name ? ( + + ) : ( + + )} + + + + + + + ))} + +
NameSizeSeedsLeechesCreated
+ + {getFileName(torrent.path)} + + + + {torrent.name} + + {humanFileSize(torrent.size_bytes, true)} + + {torrent.seeders} + + + {torrent.leechers} + + {moment(torrent.created_unix * 1000).fromNow()} + + + + + + + +
+ {this.paginator()} +
+ ); + } + + paginator() { + return ( + + ); + } + + switchPage(a: { i: Search, nextPage: boolean }, event) { + let newSearch = a.i.state.searchParams; + newSearch.page += (a.nextPage) ? 1 : -1; + a.i.props.history.push(`/search/${newSearch.type_}/${newSearch.q}/${newSearch.page}`); + } +} diff --git a/ui/src/env.ts b/ui/src/env.ts new file mode 100644 index 00000000..a8e72d90 --- /dev/null +++ b/ui/src/env.ts @@ -0,0 +1,3 @@ +// export const endpoint = window.location.origin; +export const endpoint = "http://localhost:8080"; +export let wsUri = (window.location.protocol=='https:') ? 'wss://' : 'ws://' + endpoint.substr(7) + '/service/ws'; diff --git a/ui/src/index.html b/ui/src/index.html new file mode 100644 index 00000000..2a3e4198 --- /dev/null +++ b/ui/src/index.html @@ -0,0 +1,19 @@ + + + + + + + + + rust-reddit-fediverse + + + + + +
+ $bundles + + + diff --git a/ui/src/index.tsx b/ui/src/index.tsx new file mode 100644 index 00000000..36e5681d --- /dev/null +++ b/ui/src/index.tsx @@ -0,0 +1,42 @@ +import { render, Component } from 'inferno'; +import { HashRouter, Route, Switch } from 'inferno-router'; + +import { Navbar } from './components/navbar'; +import { Home } from './components/home'; +import { Login } from './components/login'; + +import './main.css'; + +import { WebSocketService } from './services'; + +const container = document.getElementById('app'); + +class Index extends Component { + + constructor(props, context) { + super(props, context); + WebSocketService.Instance; + } + + render() { + return ( + + +
+ + + + {/* + + + + + */} + +
+
+ ); + } +} + +render(, container); diff --git a/ui/src/interfaces.ts b/ui/src/interfaces.ts new file mode 100644 index 00000000..c1550cc1 --- /dev/null +++ b/ui/src/interfaces.ts @@ -0,0 +1,14 @@ +export interface LoginForm { + username: string; + password: string; +} +export interface RegisterForm { + username: string; + email?: string; + password: string; + password_verify: string; +} + +export enum UserOperation { + Login, Register +} diff --git a/ui/src/main.css b/ui/src/main.css new file mode 100644 index 00000000..e69de29b diff --git a/ui/src/services.ts b/ui/src/services.ts new file mode 100644 index 00000000..b9536aed --- /dev/null +++ b/ui/src/services.ts @@ -0,0 +1,57 @@ +import { wsUri } from './env'; +import { LoginForm, RegisterForm, UserOperation } from './interfaces'; + +export class WebSocketService { + private static _instance: WebSocketService; + private _ws; + private conn: WebSocket; + + private constructor() { + console.log("Creating WSS"); + this.connect(); + console.log(wsUri); + } + + public static get Instance(){ + return this._instance || (this._instance = new this()); + } + + private connect() { + this.disconnect(); + this.conn = new WebSocket(wsUri); + console.log('Connecting...'); + this.conn.onopen = (() => { + console.log('Connected.'); + }); + this.conn.onmessage = (e => { + console.log('Received: ' + e.data); + }); + this.conn.onclose = (() => { + console.log('Disconnected.'); + this.conn = null; + }); + } + private disconnect() { + if (this.conn != null) { + console.log('Disconnecting...'); + this.conn.close(); + this.conn = null; + } + } + + public login(loginForm: LoginForm) { + this.conn.send(this.wsSendWrapper(UserOperation.Login, loginForm)); + } + + public register(registerForm: RegisterForm) { + this.conn.send(this.wsSendWrapper(UserOperation.Register, registerForm)); + } + + private wsSendWrapper(op: UserOperation, data: any): string { + let send = { op: UserOperation[op], data: data }; + console.log(send); + return JSON.stringify(send); + } + + +} diff --git a/ui/src/utils.ts b/ui/src/utils.ts new file mode 100644 index 00000000..e141c681 --- /dev/null +++ b/ui/src/utils.ts @@ -0,0 +1,2 @@ +export let repoUrl = 'https://github.com/dessalines/rust-reddit-fediverse'; +export let wsUri = (window.location.protocol=='https:'&&'wss://'||'ws://')+window.location.host + '/service/ws/'; diff --git a/ui/tsconfig.json b/ui/tsconfig.json new file mode 100644 index 00000000..f58da758 --- /dev/null +++ b/ui/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es2015", + "sourceMap": true, + "inlineSources": true, + "jsx": "preserve", + "importHelpers": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true + } +} diff --git a/ui/tslint.json b/ui/tslint.json new file mode 100644 index 00000000..d3e7a8a9 --- /dev/null +++ b/ui/tslint.json @@ -0,0 +1,28 @@ +{ + "extends": "tslint:recommended", + "rules": { + "forin": false, + "indent": [ true, "tabs" ], + "interface-name": false, + "ban-types": true, + "max-classes-per-file": true, + "max-line-length": false, + "member-access": true, + "member-ordering": false, + "no-bitwise": false, + "no-conditional-assignment": false, + "no-debugger": false, + "no-empty": true, + "no-namespace": false, + "no-unused-expression": true, + "object-literal-sort-keys": true, + "one-variable-per-declaration": [true, "ignore-for-loop"], + "only-arrow-functions": [false], + "ordered-imports": true, + "prefer-const": true, + "prefer-for-of": false, + "quotemark": [ true, "single", "jsx-double" ], + "trailing-comma": [true, {"multiline": "never", "singleline": "never"}], + "variable-name": false + } +} diff --git a/ui/yarn.lock b/ui/yarn.lock new file mode 100644 index 00000000..92a1250a --- /dev/null +++ b/ui/yarn.lock @@ -0,0 +1,3084 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/runtime@^7.1.2": + version "7.3.4" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.3.4.tgz#73d12ba819e365fcf7fd152aed56d6df97d21c83" + integrity sha512-IvfvnMdSaLBateu0jfsYIpZTxAc2cKEXEMiezGGN75QcBcecDUKd3PgLAncT0oOgxKy8dd8hrJKj9MfzgfZd6g== + dependencies: + regenerator-runtime "^0.12.0" + +abbrev@1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + +accepts@~1.3.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2" + integrity sha1-63d99gEXI6OxTopywIBcjoZ0a9I= + dependencies: + mime-types "~2.1.18" + negotiator "0.6.1" + +acorn-jsx@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-4.1.1.tgz#e8e41e48ea2fe0c896740610ab6a4ffd8add225e" + integrity sha512-JY+iV6r+cO21KtntVvFkD+iqjtdpRUpGqKWgfkCdZq1R+kbreEl8EcdcJR4SmiIgsIQT33s6QzheQ9a275Q8xw== + dependencies: + acorn "^5.0.3" + +acorn@^5.0.3, acorn@^5.1.2: + version "5.7.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" + integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== + +ajax-request@^1.2.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/ajax-request/-/ajax-request-1.2.3.tgz#99fcbec1d6d2792f85fa949535332bd14f5f3790" + integrity sha1-mfy+wdbSeS+F+pSVNTMr0U9fN5A= + dependencies: + file-system "^2.1.1" + utils-extend "^1.0.7" + +ajv@^6.5.5: + version "6.10.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.0.tgz#90d0d54439da587cd7e843bfb7045f50bd22bdf1" + integrity sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg== + dependencies: + fast-deep-equal "^2.0.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-escapes@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" + integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/ansi/-/ansi-0.3.1.tgz#0c42d4fb17160d5a9af1e484bace1c66922c1b21" + integrity sha1-DELU+xcWDVqa8eSEus4cZpIsGyE= + +anymatch@^1.3.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" + integrity sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA== + dependencies: + micromatch "^2.1.5" + normalize-path "^2.0.0" + +app-root-path@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-1.4.0.tgz#6335d865c9640d0fad99004e5a79232238e92dfa" + integrity sha1-YzXYZclkDQ+tmQBOWnkjIjjpLfo= + +app-root-path@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.1.0.tgz#98bf6599327ecea199309866e8140368fd2e646a" + integrity sha1-mL9lmTJ+zqGZMJhm6BQDaP0uZGo= + +aproba@^1.0.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== + +are-we-there-yet@~1.1.2: + version "1.1.5" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" + integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + integrity sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8= + dependencies: + arr-flatten "^1.0.1" + +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= + +arr-flatten@^1.0.1, arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + integrity sha1-odl8yvy8JiXMcPrc6zalDFiwGlM= + +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= + +asn1@~0.2.3: + version "0.2.4" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== + dependencies: + safer-buffer "~2.1.0" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= + +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= + +async-each@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.2.tgz#8b8a7ca2a658f927e9f307d6d1a42f4199f0f735" + integrity sha512-6xrbvN0MOBKSJDdonmSSz2OwFSgxRaVtBDes26mj9KIGtDo+g9xosFRSC+i1gQh2oAN/tQ62AI/pGZGQjVOiRg== + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + +atob@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= + +aws4@^1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" + integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + +base64-img@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/base64-img/-/base64-img-1.0.4.tgz#3e22d55d6c74a24553d840d2b1bc12a7db078d35" + integrity sha1-PiLVXWx0okVT2EDSsbwSp9sHjTU= + dependencies: + ajax-request "^1.2.0" + file-system "^2.1.0" + +base64-js@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3" + integrity sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw== + +base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= + dependencies: + tweetnacl "^0.14.3" + +binary-extensions@^1.0.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.0.tgz#9523e001306a32444b907423f1de2164222f6ab1" + integrity sha512-EgmjVLMn22z7eGGv3kcnHwSnJXmFHjISTY9E/S5lIcTD3Oxw05QTcBLNkJFzcb3cNueUdF/IN4U+d78V0zO8Hw== + +body-parser@1.18.3: + version "1.18.3" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.3.tgz#5b292198ffdd553b3a0f20ded0592b956955c8b4" + integrity sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ= + dependencies: + bytes "3.0.0" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.2" + http-errors "~1.6.3" + iconv-lite "0.4.23" + on-finished "~2.3.0" + qs "6.5.2" + raw-body "2.3.3" + type-is "~1.6.16" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + integrity sha1-uneWLhLf+WnWt2cR6RS3N4V79qc= + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +braces@^2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + +bytes@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" + integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= + +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + +camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + +chain-able@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/chain-able/-/chain-able-1.0.1.tgz#b48ac9bdc18f2192ec730abc66609f90aab5605f" + integrity sha1-tIrJvcGPIZLscwq8ZmCfkKq1YF8= + +chain-able@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/chain-able/-/chain-able-3.0.0.tgz#dcffe8b04f3da210941a23843bc1332bb288ca9f" + integrity sha512-26MoELhta86n7gCsE2T1hGRyncZvPjFXTkB/DEp4+i/EJVSxXQNwXMDZZb2+SWcbPuow18wQtztaW7GXOel9DA== + +chalk@^2.0.0, chalk@^2.4.1: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chardet@^0.4.0: + version "0.4.2" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" + integrity sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I= + +chokidar@^1.6.1: + version "1.7.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" + integrity sha1-eY5ol3gVHIB2tLNg5e3SjNortGg= + dependencies: + anymatch "^1.3.0" + async-each "^1.0.0" + glob-parent "^2.0.0" + inherits "^2.0.1" + is-binary-path "^1.0.0" + is-glob "^2.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.0.0" + optionalDependencies: + fsevents "^1.0.0" + +chownr@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494" + integrity sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g== + +class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + +classcat@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/classcat/-/classcat-1.1.3.tgz#ec748eecd962ec195a5d8f73f01d67c3d9040912" + integrity sha512-nuf6HJ5RlEgUUPqN/giIy1wsfA0LJwCHpo/aMGMwEIAxYypbLW/ZdPH4SNrF+OwdrkL3wxJmAs4GPyoE3ZkQ4w== + +clean-css@^4.1.9: + version "4.2.1" + resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.2.1.tgz#2d411ef76b8569b6d0c84068dabe85b0aa5e5c17" + integrity sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g== + dependencies: + source-map "~0.6.0" + +cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= + dependencies: + restore-cursor "^2.0.0" + +cli-width@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" + integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= + +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + integrity sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0= + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= + +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + +combined-stream@^1.0.6, combined-stream@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.7.tgz#2d1d24317afb8abe95d6d2c0b07b57813539d828" + integrity sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w== + dependencies: + delayed-stream "~1.0.0" + +commander@~2.13.0: + version "2.13.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" + integrity sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA== + +component-emitter@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" + integrity sha1-E3kY1teCg/ffemt8WmPhQOaUJeY= + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= + +content-disposition@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" + integrity sha1-DPaLud318r55YcOoUXjLhdunjLQ= + +content-type@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= + +cookie@0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" + integrity sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s= + +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= + +core-util-is@1.0.2, core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + +cross-spawn@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= + dependencies: + assert-plus "^1.0.0" + +debug@2.6.9, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +decamelize@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= + +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + +deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= + +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= + dependencies: + is-descriptor "^1.0.0" + +define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= + +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= + +detect-libc@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= + +dotenv@^6.1.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-6.2.0.tgz#941c0410535d942c8becf28d3f357dbd9d476064" + integrity sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w== + +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= + +error-ex@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +escodegen@^1.8.1: + version "1.11.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.11.1.tgz#c485ff8d6b4cdb89e27f4a856e91f118401ca510" + integrity sha512-JwiqFD9KdGVVpeuRa68yU3zZnBEOcPs0nKW7wZzXky8Z7tffdYUHbe11bPCV5jYlK6DVdKLWLm0f5I/QlL0Kmw== + dependencies: + esprima "^3.1.3" + estraverse "^4.2.0" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.6.1" + +esprima@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" + integrity sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM= + +estraverse@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" + integrity sha1-De4/7TH81GlhjOc0IJn8GvoL2xM= + +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= + +exec-sh@^0.2.0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.2.tgz#2a5e7ffcbd7d0ba2755bdecb16e5a427dfbdec36" + integrity sha512-FIUCJz1RbuS0FKTdaAafAByGS0CPvU3R0MeHxgtl+djzCc//F8HakL8GzmVNZanasTbTAY/3DRFA0KpVqj/eAw== + dependencies: + merge "^1.2.0" + +execa@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + integrity sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s= + dependencies: + is-posix-bracket "^0.1.0" + +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + integrity sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc= + dependencies: + fill-range "^2.1.0" + +express@^4.14.0: + version "4.16.4" + resolved "https://registry.yarnpkg.com/express/-/express-4.16.4.tgz#fddef61926109e24c515ea97fd2f1bdbf62df12e" + integrity sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg== + dependencies: + accepts "~1.3.5" + array-flatten "1.1.1" + body-parser "1.18.3" + content-disposition "0.5.2" + content-type "~1.0.4" + cookie "0.3.1" + cookie-signature "1.0.6" + debug "2.6.9" + depd "~1.1.2" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "1.1.1" + fresh "0.5.2" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.2" + path-to-regexp "0.1.7" + proxy-addr "~2.0.4" + qs "6.5.2" + range-parser "~1.2.0" + safe-buffer "5.1.2" + send "0.16.2" + serve-static "1.13.2" + setprototypeof "1.1.0" + statuses "~1.4.0" + type-is "~1.6.16" + utils-merge "1.0.1" + vary "~1.1.2" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + +extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +external-editor@^2.0.4: + version "2.2.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5" + integrity sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A== + dependencies: + chardet "^0.4.0" + iconv-lite "^0.4.17" + tmp "^0.0.33" + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + integrity sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE= + dependencies: + is-extglob "^1.0.0" + +extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= + +fast-deep-equal@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" + integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= + +fast-json-stable-stringify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" + integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= + +fast-levenshtein@~2.0.4: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= + +figures@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= + dependencies: + escape-string-regexp "^1.0.5" + +file-match@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/file-match/-/file-match-1.0.2.tgz#c9cad265d2c8adf3a81475b0df475859069faef7" + integrity sha1-ycrSZdLIrfOoFHWw30dYWQafrvc= + dependencies: + utils-extend "^1.0.6" + +file-system@^2.1.0, file-system@^2.1.1: + version "2.2.2" + resolved "https://registry.yarnpkg.com/file-system/-/file-system-2.2.2.tgz#7d65833e3a2347dcd956a813c677153ed3edd987" + integrity sha1-fWWDPjojR9zZVqgTxncVPtPt2Yc= + dependencies: + file-match "^1.0.1" + utils-extend "^1.0.4" + +filename-regex@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + integrity sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY= + +fill-range@^2.1.0: + version "2.2.4" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" + integrity sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q== + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^3.0.0" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + +finalhandler@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.1.tgz#eebf4ed840079c83f4249038c9d703008301b105" + integrity sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.2" + statuses "~1.4.0" + unpipe "~1.0.0" + +find-up@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= + dependencies: + locate-path "^2.0.0" + +fliplog@^0.3.13: + version "0.3.13" + resolved "https://registry.yarnpkg.com/fliplog/-/fliplog-0.3.13.tgz#dd0d786e821822aae272e0ddc84012596a96154c" + integrity sha512-R504CdX+mdhMYpmyrdiQ9PW6ncAyZnxyeA85fS1/P/Y9qmbMiQsqt6QzsYhq5kbqMb84PibVOcS1oz98GJl6EQ== + dependencies: + chain-able "^1.0.1" + +for-in@^1.0.1, for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= + +for-own@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + integrity sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4= + dependencies: + for-in "^1.0.1" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= + +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +forwarded@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" + integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= + +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= + dependencies: + map-cache "^0.2.2" + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= + +fs-extra@^2.0.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-2.1.2.tgz#046c70163cef9aad46b0e4a7fa467fb22d71de35" + integrity sha1-BGxwFjzvmq1GsOSn+kZ/si1x3jU= + dependencies: + graceful-fs "^4.1.2" + jsonfile "^2.1.0" + +fs-minipass@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" + integrity sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ== + dependencies: + minipass "^2.2.1" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +fsevents@^1.0.0: + version "1.2.7" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.7.tgz#4851b664a3783e52003b3c66eb0eee1074933aa4" + integrity sha512-Pxm6sI2MeBD7RdD12RYsqaP0nMiwx8eZBXCa6z2L+mRHm2DYrOYwihmhjpkdjUHwQhslWQjRpEgNq4XvBmaAuw== + dependencies: + nan "^2.9.2" + node-pre-gyp "^0.10.0" + +fuse-box@3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fuse-box/-/fuse-box-3.1.3.tgz#a923c41ac107bb78e1a51c3419b4ebe9649fc086" + integrity sha512-mmOq06EWR09JusIfKwLt7hUweW7IhQ2tazBhh1yOxtxnbv0IQK/CJRSuxdrQKmLDzYzWNVQsJPpUiBnkLHK4fQ== + dependencies: + acorn "^5.1.2" + acorn-jsx "^4.0.1" + ansi "^0.3.1" + app-root-path "^2.0.1" + base64-img "^1.0.3" + base64-js "^1.2.0" + chokidar "^1.6.1" + clean-css "^4.1.9" + escodegen "^1.8.1" + express "^4.14.0" + fliplog "^0.3.13" + fs-extra "^2.0.0" + fuse-concat-with-sourcemaps "^1.0.5" + glob "^7.1.1" + ieee754 "^1.1.8" + inquirer "^3.0.6" + lego-api "^1.0.7" + mustache "^2.3.0" + postcss "^6.0.1" + pretty-time "^0.2.0" + prettysize "0.0.3" + react "^16.2.0" + react-dom "^16.2.0" + realm-utils "^1.0.9" + regexpu-core "^4.1.3" + request "^2.79.0" + shorthash "0.0.2" + tslib "^1.8.0" + watch "^1.0.1" + ws "^1.1.1" + yargs "^9.0.1" + +fuse-concat-with-sourcemaps@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/fuse-concat-with-sourcemaps/-/fuse-concat-with-sourcemaps-1.0.5.tgz#9c6a521f675cff5cdbb48db1ca9c181ae49a7b97" + integrity sha512-tKsRJIxn9tU3IH8JHMwFhGbObqkDKXhNKOvcM+QyflAlYb2EgOvIQe8D6WB/cocA3puldHatsp9SN5SKryasrw== + dependencies: + source-map "^0.6.1" + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +get-caller-file@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" + integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== + +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= + +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= + dependencies: + assert-plus "^1.0.0" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + integrity sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q= + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + integrity sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg= + dependencies: + is-glob "^2.0.0" + +glob@^7.1.1, glob@^7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" + integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6: + version "4.1.15" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" + integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== + +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= + +har-validator@~5.1.0: + version "5.1.3" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" + integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g== + dependencies: + ajv "^6.5.5" + har-schema "^2.0.0" + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= + +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +history@^4.7.2: + version "4.9.0" + resolved "https://registry.yarnpkg.com/history/-/history-4.9.0.tgz#84587c2068039ead8af769e9d6a6860a14fa1bca" + integrity sha512-H2DkjCjXf0Op9OAr6nJ56fcRkTSNrUiv41vNJ6IswJjif6wlpZK0BTfFbi7qK9dXLSYZxkq5lBsj3vUjlYBYZA== + dependencies: + "@babel/runtime" "^7.1.2" + loose-envify "^1.2.0" + resolve-pathname "^2.2.0" + tiny-invariant "^1.0.2" + tiny-warning "^1.0.0" + value-equal "^0.4.0" + +hoist-non-inferno-statics@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/hoist-non-inferno-statics/-/hoist-non-inferno-statics-1.1.3.tgz#7d870f4160bfb6a59269b45c343c027f0e30ab35" + integrity sha1-fYcPQWC/tqWSabRcNDwCfw4wqzU= + +hosted-git-info@^2.1.4: + version "2.7.1" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" + integrity sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w== + +http-errors@1.6.3, http-errors@~1.6.2, http-errors@~1.6.3: + version "1.6.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" + integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.0" + statuses ">= 1.4.0 < 2" + +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +iconv-lite@0.4.23: + version "0.4.23" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" + integrity sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +iconv-lite@^0.4.17, iconv-lite@^0.4.4: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +ieee754@^1.1.8: + version "1.1.12" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.12.tgz#50bf24e5b9c8bb98af4964c941cdb0918da7b60b" + integrity sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA== + +ignore-walk@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" + integrity sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ== + dependencies: + minimatch "^3.0.4" + +inferno-router@^7.0.1: + version "7.1.10" + resolved "https://registry.yarnpkg.com/inferno-router/-/inferno-router-7.1.10.tgz#9850fea9bfcbf0d2cc069c3fa3a6b3a4b475551d" + integrity sha512-Xbi6Vg5ymD0AoIzMA0Rjzpc1aWzIjR1T2d4cpit8Rnx2VvuAzTk414axAZ4yIr91652Dq1EUGVp4BGM2qfkHGA== + dependencies: + history "^4.7.2" + hoist-non-inferno-statics "^1.1.3" + inferno "7.1.10" + path-to-regexp-es6 "1.7.0" + +inferno-shared@7.1.10: + version "7.1.10" + resolved "https://registry.yarnpkg.com/inferno-shared/-/inferno-shared-7.1.10.tgz#8f835bdeda5226f5ef9ba60b848b4d252f8fa89d" + integrity sha512-+wpmagRB1tpUwmaZBFh4bOYc3erSfYxc0xMzEyRrHa2SJZM9BIem4d+pbeSCK+q/ytf2lIRSrFgtExXSQD0KkQ== + +inferno-vnode-flags@7.1.10: + version "7.1.10" + resolved "https://registry.yarnpkg.com/inferno-vnode-flags/-/inferno-vnode-flags-7.1.10.tgz#4731f2f71c4f50d9d9533562ea9ab3cd2c0efc0f" + integrity sha512-Gi5fh5GTYmOkdizbb0nmCZwVMxJOCiw+BeP4Sww+cM4RkuNFiR8dFjAaH9Lv9i/AjdR54K7segqqICvyTB75lQ== + +inferno@7.1.10, inferno@^7.0.1: + version "7.1.10" + resolved "https://registry.yarnpkg.com/inferno/-/inferno-7.1.10.tgz#826a3bc7482a2567b3ac53cd25fb736ca98d3219" + integrity sha512-slm6ozMfQVa7yfmenlcWrkK/zbuOH62j/59Z2lj8y0rhHGDrTA+K/EXXvoQBuy8te35Gjt+E85Zzm+3AShlJxw== + dependencies: + inferno-shared "7.1.10" + inferno-vnode-flags "7.1.10" + opencollective-postinstall "^2.0.2" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= + +ini@~1.3.0: + version "1.3.5" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== + +inquirer@^3.0.6: + version "3.3.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" + integrity sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ== + dependencies: + ansi-escapes "^3.0.0" + chalk "^2.0.0" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^2.0.4" + figures "^2.0.0" + lodash "^4.3.0" + mute-stream "0.0.7" + run-async "^2.2.0" + rx-lite "^4.0.8" + rx-lite-aggregates "^4.0.8" + string-width "^2.1.0" + strip-ansi "^4.0.0" + through "^2.3.6" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= + +ipaddr.js@1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.8.0.tgz#eaa33d6ddd7ace8f7f6fe0c9ca0440e706738b1e" + integrity sha1-6qM9bd16zo9/b+DJygRA5wZzix4= + +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= + dependencies: + kind-of "^3.0.2" + +is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== + dependencies: + kind-of "^6.0.0" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= + dependencies: + binary-extensions "^1.0.0" + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= + dependencies: + kind-of "^3.0.2" + +is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== + dependencies: + kind-of "^6.0.0" + +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + +is-dotfile@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" + integrity sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE= + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + integrity sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ= + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= + +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== + dependencies: + is-plain-object "^2.0.4" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + integrity sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA= + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + integrity sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM= + dependencies: + is-extglob "^1.0.0" + +is-number@^2.0.2, is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + integrity sha1-Afy7s5NGOlSPL0ZszhbezknbkI8= + dependencies: + kind-of "^3.0.2" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= + dependencies: + kind-of "^3.0.2" + +is-number@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" + integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== + +is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + integrity sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q= + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + integrity sha1-IHurkWOEmcB7Kt8kCkGochADRXU= + +is-promise@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" + integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= + +is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= + +is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= + +isarray@1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= + dependencies: + isarray "1.0.0" + +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + +"js-tokens@^3.0.0 || ^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= + +jsonfile@^2.1.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" + integrity sha1-NzaitCi4e72gzIO1P6PWM6NcKug= + optionalDependencies: + graceful-fs "^4.1.6" + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= + dependencies: + is-buffer "^1.1.5" + +kind-of@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== + +kind-of@^6.0.0, kind-of@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" + integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= + dependencies: + invert-kv "^1.0.0" + +lego-api@^1.0.7: + version "1.0.8" + resolved "https://registry.yarnpkg.com/lego-api/-/lego-api-1.0.8.tgz#5e26be726c5e11d540f89e7c6b1abf8c5834bd01" + integrity sha512-pZD0mf32+RL1bUMJztRcXiNBB1gE8gd/h4MDLWdZp7vaMZyjPiYK/zNpNNGoJvmoa7D/wf9dll+5z7pDObdLFg== + dependencies: + chain-able "^3.0.0" + +levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +load-json-file@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" + integrity sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg= + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + strip-bom "^3.0.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +lodash@^4.3.0: + version "4.17.11" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" + integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== + +loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +lru-cache@^4.0.1: + version "4.1.5" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" + integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + +map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= + +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= + dependencies: + object-visit "^1.0.0" + +math-random@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.4.tgz#5dd6943c938548267016d4e34f057583080c514c" + integrity sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A== + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= + +mem@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" + integrity sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y= + dependencies: + mimic-fn "^1.0.0" + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= + +merge@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.1.tgz#38bebf80c3220a8a487b6fcfb3941bb11720c145" + integrity sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ== + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= + +micromatch@^2.1.5: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + integrity sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU= + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +micromatch@^3.1.10: + version "3.1.10" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + +mime-db@~1.38.0: + version "1.38.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.38.0.tgz#1a2aab16da9eb167b49c6e4df2d9c68d63d8e2ad" + integrity sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg== + +mime-types@^2.1.12, mime-types@~2.1.18, mime-types@~2.1.19: + version "2.1.22" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.22.tgz#fe6b355a190926ab7698c9a0556a11199b2199bd" + integrity sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog== + dependencies: + mime-db "~1.38.0" + +mime@1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" + integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ== + +mimic-fn@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" + integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== + +minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= + +minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= + +minipass@^2.2.1, minipass@^2.3.4: + version "2.3.5" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848" + integrity sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA== + dependencies: + safe-buffer "^5.1.2" + yallist "^3.0.0" + +minizlib@^1.1.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.1.tgz#dd27ea6136243c7c880684e8672bb3a45fd9b614" + integrity sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA== + dependencies: + minipass "^2.2.1" + +mixin-deep@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" + integrity sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ== + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + +mkdirp@^0.5.0, mkdirp@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= + dependencies: + minimist "0.0.8" + +moment@^2.22.2: + version "2.24.0" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b" + integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg== + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +mustache@^2.3.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/mustache/-/mustache-2.3.2.tgz#a6d4d9c3f91d13359ab889a812954f9230a3d0c5" + integrity sha512-KpMNwdQsYz3O/SBS1qJ/o3sqUJ5wSb8gb0pul8CO0S56b9Y2ALm8zCfsjPXsqGFfoNBkDwZuZIAjhsZI03gYVQ== + +mute-stream@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= + +nan@^2.9.2: + version "2.13.1" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.13.1.tgz#a15bee3790bde247e8f38f1d446edcdaeb05f2dd" + integrity sha512-I6YB/YEuDeUZMmhscXKxGgZlFnhsn5y0hgOZBadkzfTRrZBtJDZeg6eQf7PYMIEclwmorTKK8GztsyOUSVBREA== + +nanomatch@^1.2.9: + version "1.2.13" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +nanoseconds@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/nanoseconds/-/nanoseconds-0.1.0.tgz#69ec39fcd00e77ab3a72de0a43342824cd79233a" + integrity sha1-aew5/NAOd6s6ct4KQzQoJM15Izo= + +needle@^2.2.1: + version "2.2.4" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.4.tgz#51931bff82533b1928b7d1d69e01f1b00ffd2a4e" + integrity sha512-HyoqEb4wr/rsoaIDfTH2aVL9nWtQqba2/HvMv+++m8u0dz808MaagKILxtfeSN7QU7nvbQ79zk3vYOJp9zsNEA== + dependencies: + debug "^2.1.2" + iconv-lite "^0.4.4" + sax "^1.2.4" + +negotiator@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" + integrity sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk= + +node-pre-gyp@^0.10.0: + version "0.10.3" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz#3070040716afdc778747b61b6887bf78880b80fc" + integrity sha512-d1xFs+C/IPS8Id0qPTZ4bUT8wWryfR/OzzAFxweG+uLN85oPzyo2Iw6bVlLQ/JOdgNonXLCoRyqDzDWq4iw72A== + dependencies: + detect-libc "^1.0.2" + mkdirp "^0.5.1" + needle "^2.2.1" + nopt "^4.0.1" + npm-packlist "^1.1.6" + npmlog "^4.0.2" + rc "^1.2.7" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^4" + +nopt@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00= + dependencies: + abbrev "1" + osenv "^0.1.4" + +normalize-package-data@^2.3.2: + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.0.0, normalize-path@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= + dependencies: + remove-trailing-separator "^1.0.1" + +npm-bundled@^1.0.1: + version "1.0.6" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.6.tgz#e7ba9aadcef962bb61248f91721cd932b3fe6bdd" + integrity sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g== + +npm-packlist@^1.1.6: + version "1.4.1" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.1.tgz#19064cdf988da80ea3cee45533879d90192bbfbc" + integrity sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw== + dependencies: + ignore-walk "^3.0.1" + npm-bundled "^1.0.1" + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= + dependencies: + path-key "^2.0.0" + +npmlog@^4.0.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= + +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== + +object-assign@^4.1.0, object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= + dependencies: + isobject "^3.0.0" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + integrity sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo= + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= + dependencies: + isobject "^3.0.1" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= + dependencies: + ee-first "1.1.1" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= + dependencies: + mimic-fn "^1.0.0" + +opencollective-postinstall@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz#5657f1bede69b6e33a45939b061eb53d3c6c3a89" + integrity sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw== + +optionator@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + integrity sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q= + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.4" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + wordwrap "~1.0.0" + +options@>=0.0.5: + version "0.0.6" + resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" + integrity sha1-7CLTEoBrtT5zF3Pnza788cZDEo8= + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= + +os-locale@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" + integrity sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA== + dependencies: + execa "^0.7.0" + lcid "^1.0.0" + mem "^1.1.0" + +os-tmpdir@^1.0.0, os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + +osenv@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= + +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== + dependencies: + p-try "^1.0.0" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= + dependencies: + p-limit "^1.1.0" + +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + integrity sha1-ssN2z7EfNVE7rdFz7wu246OIORw= + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= + dependencies: + error-ex "^1.2.0" + +parseurl@~1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" + integrity sha1-/CidTtiZMRlGDBViUyYs3I3mW/M= + +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-key@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= + +path-parse@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + +path-to-regexp-es6@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/path-to-regexp-es6/-/path-to-regexp-es6-1.7.0.tgz#965657c9f8ea8f660e103ccb839abf038cba4caf" + integrity sha512-QdT7okCAMGv7FR7w6KWFH9OSMivOgtXAGKodD6MDZBNR/XNL16W+hHoj6qBmV6cy/7eR1fr0Qujrg9OhBf5QPw== + dependencies: + path-to-regexp "1.7.0" + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= + +path-to-regexp@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.7.0.tgz#59fde0f435badacba103a84e9d3bc64e96b9937d" + integrity sha1-Wf3g9DW62suhA6hOnTvGTpa5k30= + dependencies: + isarray "0.0.1" + +path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + integrity sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM= + dependencies: + pify "^2.0.0" + +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= + +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= + +postcss@^6.0.1: + version "6.0.23" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.23.tgz#61c82cc328ac60e677645f979054eb98bc0e3324" + integrity sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag== + dependencies: + chalk "^2.4.1" + source-map "^0.6.1" + supports-color "^5.4.0" + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks= + +pretty-time@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/pretty-time/-/pretty-time-0.2.0.tgz#7a3bdec4049c620cd7c42b7f342b74d56e73d74e" + integrity sha1-ejvexAScYgzXxCt/NCt01W5z104= + dependencies: + is-number "^2.0.2" + nanoseconds "^0.1.0" + +prettysize@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/prettysize/-/prettysize-0.0.3.tgz#14afff6a645e591a4ddf1c72919c23b4146181a1" + integrity sha1-FK//amReWRpN3xxykZwjtBRhgaE= + +process-nextick-args@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" + integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw== + +prop-types@^15.6.2: + version "15.7.2" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" + integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== + dependencies: + loose-envify "^1.4.0" + object-assign "^4.1.1" + react-is "^16.8.1" + +proxy-addr@~2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.4.tgz#ecfc733bf22ff8c6f407fa275327b9ab67e48b93" + integrity sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA== + dependencies: + forwarded "~0.1.2" + ipaddr.js "1.8.0" + +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= + +psl@^1.1.24: + version "1.1.31" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.31.tgz#e9aa86d0101b5b105cbe93ac6b784cd547276184" + integrity sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw== + +punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= + +punycode@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +qs@6.5.2, qs@~6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== + +randomatic@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.1.tgz#b776efc59375984e36c537b2f51a1f0aff0da1ed" + integrity sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw== + dependencies: + is-number "^4.0.0" + kind-of "^6.0.0" + math-random "^1.0.1" + +range-parser@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" + integrity sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4= + +raw-body@2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.3.tgz#1b324ece6b5706e153855bc1148c65bb7f6ea0c3" + integrity sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw== + dependencies: + bytes "3.0.0" + http-errors "1.6.3" + iconv-lite "0.4.23" + unpipe "1.0.0" + +rc@^1.2.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +react-dom@^16.2.0: + version "16.8.4" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.4.tgz#1061a8e01a2b3b0c8160037441c3bf00a0e3bc48" + integrity sha512-Ob2wK7XG2tUDt7ps7LtLzGYYB6DXMCLj0G5fO6WeEICtT4/HdpOi7W/xLzZnR6RCG1tYza60nMdqtxzA8FaPJQ== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + prop-types "^15.6.2" + scheduler "^0.13.4" + +react-is@^16.8.1: + version "16.8.4" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.4.tgz#90f336a68c3a29a096a3d648ab80e87ec61482a2" + integrity sha512-PVadd+WaUDOAciICm/J1waJaSvgq+4rHE/K70j0PFqKhkTBsPv/82UGQJNXAngz1fOQLLxI6z1sEDmJDQhCTAA== + +react@^16.2.0: + version "16.8.4" + resolved "https://registry.yarnpkg.com/react/-/react-16.8.4.tgz#fdf7bd9ae53f03a9c4cd1a371432c206be1c4768" + integrity sha512-0GQ6gFXfUH7aZcjGVymlPOASTuSjlQL4ZtVC5YKH+3JL6bBLCVO21DknzmaPlI90LN253ojj02nsapy+j7wIjg== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + prop-types "^15.6.2" + scheduler "^0.13.4" + +read-pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" + integrity sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4= + dependencies: + find-up "^2.0.0" + read-pkg "^2.0.0" + +read-pkg@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" + integrity sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg= + dependencies: + load-json-file "^2.0.0" + normalize-package-data "^2.3.2" + path-type "^2.0.0" + +readable-stream@^2.0.2, readable-stream@^2.0.6: + version "2.3.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" + integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readdirp@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" + integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== + dependencies: + graceful-fs "^4.1.11" + micromatch "^3.1.10" + readable-stream "^2.0.2" + +realm-utils@^1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/realm-utils/-/realm-utils-1.0.9.tgz#5c76a5ff39e4816af2c133a161f4221d6628eff4" + integrity sha1-XHal/znkgWrywTOhYfQiHWYo7/Q= + dependencies: + app-root-path "^1.3.0" + mkdirp "^0.5.1" + +regenerate-unicode-properties@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.0.2.tgz#7b38faa296252376d363558cfbda90c9ce709662" + integrity sha512-SbA/iNrBUf6Pv2zU8Ekv1Qbhv92yxL4hiDa2siuxs4KKn4oOoMDHXjAf7+Nz9qinUQ46B1LcWEi/PhJfPWpZWQ== + dependencies: + regenerate "^1.4.0" + +regenerate@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" + integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg== + +regenerator-runtime@^0.12.0: + version "0.12.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz#fa1a71544764c036f8c49b13a08b2594c9f8a0de" + integrity sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg== + +regex-cache@^0.4.2: + version "0.4.4" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" + integrity sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ== + dependencies: + is-equal-shallow "^0.1.3" + +regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + +regexpu-core@^4.1.3: + version "4.5.4" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.5.4.tgz#080d9d02289aa87fe1667a4f5136bc98a6aebaae" + integrity sha512-BtizvGtFQKGPUcTy56o3nk1bGRp4SZOTYrDtGNlqCQufptV5IkkLN6Emw+yunAJjzf+C9FQFtvq7IoA3+oMYHQ== + dependencies: + regenerate "^1.4.0" + regenerate-unicode-properties "^8.0.2" + regjsgen "^0.5.0" + regjsparser "^0.6.0" + unicode-match-property-ecmascript "^1.0.4" + unicode-match-property-value-ecmascript "^1.1.0" + +regjsgen@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.0.tgz#a7634dc08f89209c2049adda3525711fb97265dd" + integrity sha512-RnIrLhrXCX5ow/E5/Mh2O4e/oa1/jW0eaBKTSy3LaCj+M3Bqvm97GWDp2yUtzIs4LEn65zR2yiYGFqb2ApnzDA== + +regjsparser@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.0.tgz#f1e6ae8b7da2bae96c99399b868cd6c933a2ba9c" + integrity sha512-RQ7YyokLiQBomUJuUG8iGVvkgOLxwyZM8k6d3q5SAXpg4r5TZJZigKFvC6PpD+qQ98bCDC5YelPeA3EucDoNeQ== + dependencies: + jsesc "~0.5.0" + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= + +repeat-element@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" + integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== + +repeat-string@^1.5.2, repeat-string@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= + +request@^2.79.0: + version "2.88.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" + integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.0" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.4.3" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= + +resolve-pathname@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-2.2.0.tgz#7e9ae21ed815fd63ab189adeee64dc831eefa879" + integrity sha512-bAFz9ld18RzJfddgrO2e/0S2O81710++chRMUxHjXOYKF6jTAMrUNZrEZ1PvV0zlhfjidm08iRPdTLPno1FuRg== + +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= + +resolve@^1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.10.0.tgz#3bdaaeaf45cc07f375656dfd2e54ed0810b101ba" + integrity sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg== + dependencies: + path-parse "^1.0.6" + +restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== + +rimraf@^2.6.1: + version "2.6.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" + integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== + dependencies: + glob "^7.1.3" + +run-async@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" + integrity sha1-A3GrSuC91yDUFm19/aZP96RFpsA= + dependencies: + is-promise "^2.1.0" + +rx-lite-aggregates@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" + integrity sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74= + dependencies: + rx-lite "*" + +rx-lite@*, rx-lite@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" + integrity sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ= + +safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= + dependencies: + ret "~0.1.10" + +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +sax@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== + +scheduler@^0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.13.4.tgz#8fef05e7a3580c76c0364d2df5e550e4c9140298" + integrity sha512-cvSOlRPxOHs5dAhP9yiS/6IDmVAVxmk33f0CtTJRkmUWcb1Us+t7b1wqdzoC0REw2muC9V5f1L/w5R5uKGaepA== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + +"semver@2 || 3 || 4 || 5", semver@^5.3.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" + integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== + +send@0.16.2: + version "0.16.2" + resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" + integrity sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw== + dependencies: + debug "2.6.9" + depd "~1.1.2" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.6.2" + mime "1.4.1" + ms "2.0.0" + on-finished "~2.3.0" + range-parser "~1.2.0" + statuses "~1.4.0" + +serve-static@1.13.2: + version "1.13.2" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1" + integrity sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.2" + send "0.16.2" + +set-blocking@^2.0.0, set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + +set-value@^0.4.3: + version "0.4.3" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" + integrity sha1-fbCPnT0i3H945Trzw79GZuzfzPE= + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.1" + to-object-path "^0.3.0" + +set-value@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" + integrity sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg== + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + +setprototypeof@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" + integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= + +shorthash@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/shorthash/-/shorthash-0.0.2.tgz#59b268eecbde59038b30da202bcfbddeb2c4a4eb" + integrity sha1-WbJo7sveWQOLMNogK8+93rLEpOs= + +signal-exit@^3.0.0, signal-exit@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= + +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + +source-map-resolve@^0.5.0: + version "0.5.2" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" + integrity sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA== + dependencies: + atob "^2.1.1" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-url@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" + integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= + +source-map@^0.5.6: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= + +source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +spdx-correct@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" + integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" + integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== + +spdx-expression-parse@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" + integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz#81c0ce8f21474756148bbb5f3bfc0f36bf15d76e" + integrity sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g== + +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== + dependencies: + extend-shallow "^3.0.0" + +sshpk@^1.7.0: + version "1.16.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" + integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + +"statuses@>= 1.4.0 < 2": + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= + +statuses@~1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" + integrity sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew== + +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= + dependencies: + ansi-regex "^3.0.0" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + +supports-color@^5.3.0, supports-color@^5.4.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +tar@^4: + version "4.4.8" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.8.tgz#b19eec3fde2a96e64666df9fdb40c5ca1bc3747d" + integrity sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ== + dependencies: + chownr "^1.1.1" + fs-minipass "^1.2.5" + minipass "^2.3.4" + minizlib "^1.1.1" + mkdirp "^0.5.0" + safe-buffer "^5.1.2" + yallist "^3.0.2" + +through@^2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= + +tiny-invariant@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.0.3.tgz#91efaaa0269ccb6271f0296aeedb05fc3e067b7a" + integrity sha512-ytQx8T4DL8PjlX53yYzcIC0WhIZbpR0p1qcYjw2pHu3w6UtgWwFJQ/02cnhOnBBhlFx/edUIfcagCaQSe3KMWg== + +tiny-warning@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.2.tgz#1dfae771ee1a04396bdfde27a3adcebc6b648b28" + integrity sha512-rru86D9CpQRLvsFG5XFdy0KdLAvjdQDyZCsRcuu60WtzFylDM3eAWSxEVz5kzL2Gp544XiUvPbVKtOA/txLi9Q== + +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= + dependencies: + kind-of "^3.0.2" + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + +to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + +tough-cookie@~2.4.3: + version "2.4.3" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" + integrity sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ== + dependencies: + psl "^1.1.24" + punycode "^1.4.1" + +ts-transform-classcat@^0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/ts-transform-classcat/-/ts-transform-classcat-0.0.2.tgz#2386c9418f3a7c1f03261ff51225b70d0a7664fb" + integrity sha512-7laOOhgVxWVqvhK10mIEfedJx2nnNOS8J4P/6a/ehXtHFvsBVRRS9/FcTifgzJweOScZsF5BRD5VOGeNidMSqQ== + dependencies: + typescript "^2.6.2" + +ts-transform-inferno@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/ts-transform-inferno/-/ts-transform-inferno-4.0.2.tgz#06b9be45edf874ba7a6ebfb6107ba782509c6afe" + integrity sha512-CZb4+w/2l2zikPZ/c51fi3n+qnR2HCEfAS73oGQB80aqRLffkZqm25kYYTMmqUW2+oVfs4M5AZa0z14cvxlQ5w== + +tslib@^1.8.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" + integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ== + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= + dependencies: + prelude-ls "~1.1.2" + +type-is@~1.6.16: + version "1.6.16" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194" + integrity sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.18" + +typescript@^2.6.2: + version "2.9.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c" + integrity sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w== + +typescript@^3.3.3333: + version "3.3.3333" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.3.3333.tgz#171b2c5af66c59e9431199117a3bcadc66fdcfd6" + integrity sha512-JjSKsAfuHBE/fB2oZ8NxtRTk5iGcg6hkYXMnZ3Wc+b2RSqejEqTaem11mHASMnFilHrax3sLK0GDzcJrekZYLw== + +uglify-es@^3.3.9: + version "3.3.9" + resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677" + integrity sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ== + dependencies: + commander "~2.13.0" + source-map "~0.6.1" + +ultron@1.0.x: + version "1.0.2" + resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa" + integrity sha1-rOEWq1V80Zc4ak6I9GhTeMiy5Po= + +unicode-canonical-property-names-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" + integrity sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ== + +unicode-match-property-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c" + integrity sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg== + dependencies: + unicode-canonical-property-names-ecmascript "^1.0.4" + unicode-property-aliases-ecmascript "^1.0.4" + +unicode-match-property-value-ecmascript@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz#5b4b426e08d13a80365e0d657ac7a6c1ec46a277" + integrity sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g== + +unicode-property-aliases-ecmascript@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz#a9cc6cc7ce63a0a3023fc99e341b94431d405a57" + integrity sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw== + +union-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" + integrity sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ= + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^0.4.3" + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= + +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +uri-js@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" + integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== + dependencies: + punycode "^2.1.0" + +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= + +use@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + +utils-extend@^1.0.4, utils-extend@^1.0.6, utils-extend@^1.0.7: + version "1.0.8" + resolved "https://registry.yarnpkg.com/utils-extend/-/utils-extend-1.0.8.tgz#ccfd7b64540f8e90ee21eec57769d0651cab8a5f" + integrity sha1-zP17ZFQPjpDuIe7Fd2nQZRyril8= + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= + +uuid@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" + integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== + +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +value-equal@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-0.4.0.tgz#c5bdd2f54ee093c04839d71ce2e4758a6890abc7" + integrity sha512-x+cYdNnaA3CxvMaTX0INdTCN8m8aF2uY9BvEqmxuYp8bL09cs/kWVQPVGcA35fMktdOsP69IgU7wFj/61dJHEw== + +vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +watch@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/watch/-/watch-1.0.2.tgz#340a717bde765726fa0aa07d721e0147a551df0c" + integrity sha1-NApxe952Vyb6CqB9ch4BR6VR3ww= + dependencies: + exec-sh "^0.2.0" + minimist "^1.2.0" + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= + +which@^1.2.9: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +wide-align@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== + dependencies: + string-width "^1.0.2 || 2" + +wordwrap@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +ws@^1.1.1: + version "1.1.5" + resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.5.tgz#cbd9e6e75e09fc5d2c90015f21f0c40875e0dd51" + integrity sha512-o3KqipXNUdS7wpQzBHSe180lBGO60SoK0yVo3CYJgb2MkobuWuBX6dhkYP5ORCLd55y+SaflMOV5fqAB53ux4w== + dependencies: + options ">=0.0.5" + ultron "1.0.x" + +y18n@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= + +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= + +yallist@^3.0.0, yallist@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" + integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A== + +yargs-parser@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" + integrity sha1-jQrELxbqVd69MyyvTEA4s+P139k= + dependencies: + camelcase "^4.1.0" + +yargs@^9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-9.0.1.tgz#52acc23feecac34042078ee78c0c007f5085db4c" + integrity sha1-UqzCP+7Kw0BCB47njAwAf1CF20w= + dependencies: + camelcase "^4.1.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^2.0.0" + read-pkg-up "^2.0.0" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^2.0.0" + which-module "^2.0.0" + y18n "^3.2.1" + yargs-parser "^7.0.0" -- 2.40.1 From c438f0fef15febed0e365a9d412bf3a3394bed1c Mon Sep 17 00:00:00 2001 From: Dessalines Date: Fri, 22 Mar 2019 18:42:57 -0700 Subject: [PATCH 0027/2583] Adding login and Register - Login and Register mostly working. - Starting to work on creating communities. --- README.md | 2 + server/Cargo.lock | 17 ++ server/Cargo.toml | 2 + .../2019-02-26-002946_create_user/up.sql | 4 +- .../2019-02-27-170003_create_community/up.sql | 2 +- server/src/actions/comment.rs | 84 +++++---- server/src/actions/community.rs | 97 +++++----- server/src/actions/post.rs | 68 ++++--- server/src/actions/user.rs | 102 +++++++---- server/src/bin/main.rs | 63 ++++++- server/src/lib.rs | 44 +++-- server/src/websocket_server/server.rs | 166 +++++++++++++++--- ui/package.json | 6 +- ui/src/components/create-community.tsx | 90 ++++++++++ ui/src/components/create-post.tsx | 57 ++++++ ui/src/components/login.tsx | 57 ++++-- ui/src/components/navbar.tsx | 54 ++++-- ui/src/index.tsx | 7 +- ui/src/interfaces.ts | 24 ++- ui/src/main.css | 5 + ui/src/services.ts | 57 ------ ui/src/services/UserService.ts | 51 ++++++ ui/src/services/WebSocketService.ts | 37 ++++ ui/src/services/index.ts | 2 + ui/src/utils.ts | 7 + ui/yarn.lock | 24 ++- 26 files changed, 827 insertions(+), 302 deletions(-) create mode 100644 ui/src/components/create-community.tsx create mode 100644 ui/src/components/create-post.tsx delete mode 100644 ui/src/services.ts create mode 100644 ui/src/services/UserService.ts create mode 100644 ui/src/services/WebSocketService.ts create mode 100644 ui/src/services/index.ts diff --git a/README.md b/README.md index b3f8d11b..ce8672e6 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,8 @@ We have a twitter alternative (mastodon), a facebook alternative (friendica), so - [Recursive query for adjacency list for nested comments](https://stackoverflow.com/questions/192220/what-is-the-most-efficient-elegant-way-to-parse-a-flat-table-into-a-tree/192462#192462) - https://github.com/sparksuite/simplemde-markdown-editor - [Sticky Sidebar](https://stackoverflow.com/questions/38382043/how-to-use-css-position-sticky-to-keep-a-sidebar-visible-with-bootstrap-4/49111934) +- [RXJS websocket](https://stackoverflow.com/questions/44060315/reconnecting-a-websocket-in-angular-and-rxjs/44067972#44067972) +- [Rust JWT](https://github.com/Keats/jsonwebtoken) ## TODOs - Endpoints diff --git a/server/Cargo.lock b/server/Cargo.lock index b4557d00..21594ccf 100644 --- a/server/Cargo.lock +++ b/server/Cargo.lock @@ -703,6 +703,20 @@ name = "itoa" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "jsonwebtoken" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", + "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "kernel32-sys" version = "0.2.2" @@ -1309,7 +1323,9 @@ dependencies = [ "dotenv 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonwebtoken 5.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.88 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.38 (registry+https://github.com/rust-lang/crates.io-index)", "strum 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1977,6 +1993,7 @@ dependencies = [ "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" "checksum ipconfig 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "08f7eadeaf4b52700de180d147c4805f199854600b36faa963d91114827b2ffc" "checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" +"checksum jsonwebtoken 5.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8d438ea707d465c230305963b67f8357a1d56fcfad9434797d7cb1c46c2e41df" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" "checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" diff --git a/server/Cargo.toml b/server/Cargo.toml index 3c875e90..ebd7b568 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -18,3 +18,5 @@ env_logger = "*" rand = "0.6.5" strum = "0.14.0" strum_macros = "0.14.0" +jsonwebtoken = "*" +regex = "1" diff --git a/server/migrations/2019-02-26-002946_create_user/up.sql b/server/migrations/2019-02-26-002946_create_user/up.sql index 577ff136..d4edb370 100644 --- a/server/migrations/2019-02-26-002946_create_user/up.sql +++ b/server/migrations/2019-02-26-002946_create_user/up.sql @@ -1,9 +1,9 @@ create table user_ ( id serial primary key, - name varchar(20) not null, + name varchar(20) not null unique, preferred_username varchar(20), password_encrypted text not null, - email text, + email text unique, icon bytea, published timestamp not null default now(), updated timestamp diff --git a/server/migrations/2019-02-27-170003_create_community/up.sql b/server/migrations/2019-02-27-170003_create_community/up.sql index 30deec5b..1ee2e51d 100644 --- a/server/migrations/2019-02-27-170003_create_community/up.sql +++ b/server/migrations/2019-02-27-170003_create_community/up.sql @@ -1,6 +1,6 @@ create table community ( id serial primary key, - name varchar(20) not null, + name varchar(20) not null unique, published timestamp not null default now(), updated timestamp ); diff --git a/server/src/actions/comment.rs b/server/src/actions/comment.rs index d23382c6..98d5322c 100644 --- a/server/src/actions/comment.rs +++ b/server/src/actions/comment.rs @@ -23,14 +23,14 @@ pub struct Comment { pub updated: Option } -#[derive(Insertable, AsChangeset, Clone, Copy)] +#[derive(Insertable, AsChangeset, Clone)] #[table_name="comment"] -pub struct CommentForm<'a> { - pub content: &'a str, - pub attributed_to: &'a str, - pub post_id: &'a i32, - pub parent_id: Option<&'a i32>, - pub updated: Option<&'a chrono::NaiveDateTime> +pub struct CommentForm { + pub content: String, + pub attributed_to: String, + pub post_id: i32, + pub parent_id: Option, + pub updated: Option } #[derive(Identifiable, Queryable, Associations, PartialEq, Debug)] @@ -44,59 +44,55 @@ pub struct CommentLike { pub published: chrono::NaiveDateTime, } -#[derive(Insertable, AsChangeset, Clone, Copy)] +#[derive(Insertable, AsChangeset, Clone)] #[table_name="comment_like"] -pub struct CommentLikeForm<'a> { - pub comment_id: &'a i32, - pub fedi_user_id: &'a str, - pub score: &'a i16 +pub struct CommentLikeForm { + pub comment_id: i32, + pub fedi_user_id: String, + pub score: i16 } -impl<'a> Crud> for Comment { - fn read(conn: &PgConnection, comment_id: i32) -> Comment { +impl Crud for Comment { + fn read(conn: &PgConnection, comment_id: i32) -> Result { use schema::comment::dsl::*; comment.find(comment_id) - .first::(conn) - .expect("Error in query") + .first::(conn) } - fn delete(conn: &PgConnection, comment_id: i32) -> usize { + fn delete(conn: &PgConnection, comment_id: i32) -> Result { use schema::comment::dsl::*; diesel::delete(comment.find(comment_id)) .execute(conn) - .expect("Error deleting.") } - fn create(conn: &PgConnection, comment_form: CommentForm) -> Result { + fn create(conn: &PgConnection, comment_form: &CommentForm) -> Result { use schema::comment::dsl::*; insert_into(comment) .values(comment_form) - .get_result::(conn) + .get_result::(conn) } - fn update(conn: &PgConnection, comment_id: i32, comment_form: CommentForm) -> Comment { + fn update(conn: &PgConnection, comment_id: i32, comment_form: &CommentForm) -> Result { use schema::comment::dsl::*; diesel::update(comment.find(comment_id)) .set(comment_form) - .get_result::(conn) - .expect(&format!("Unable to find {}", comment_id)) + .get_result::(conn) } } -impl<'a> Likeable > for CommentLike { - fn like(conn: &PgConnection, comment_like_form: CommentLikeForm) -> Result { +impl Likeable for CommentLike { + fn like(conn: &PgConnection, comment_like_form: &CommentLikeForm) -> Result { use schema::comment_like::dsl::*; insert_into(comment_like) .values(comment_like_form) - .get_result::(conn) + .get_result::(conn) } - fn remove(conn: &PgConnection, comment_like_form: CommentLikeForm) -> usize { + fn remove(conn: &PgConnection, comment_like_form: &CommentLikeForm) -> Result { use schema::comment_like::dsl::*; diesel::delete(comment_like .filter(comment_id.eq(comment_like_form.comment_id)) - .filter(fedi_user_id.eq(comment_like_form.fedi_user_id))) + .filter(fedi_user_id.eq(&comment_like_form.fedi_user_id))) .execute(conn) - .expect("Error deleting.") } } @@ -117,17 +113,17 @@ mod tests { updated: None }; - let inserted_post = Post::create(&conn, new_post).unwrap(); + let inserted_post = Post::create(&conn, &new_post).unwrap(); let comment_form = CommentForm { content: "A test comment".into(), attributed_to: "test_user.com".into(), - post_id: &inserted_post.id, + post_id: inserted_post.id, parent_id: None, updated: None }; - let inserted_comment = Comment::create(&conn, comment_form).unwrap(); + let inserted_comment = Comment::create(&conn, &comment_form).unwrap(); let expected_comment = Comment { id: inserted_comment.id, @@ -142,20 +138,20 @@ mod tests { let child_comment_form = CommentForm { content: "A child comment".into(), attributed_to: "test_user.com".into(), - post_id: &inserted_post.id, - parent_id: Some(&inserted_comment.id), + post_id: inserted_post.id, + parent_id: Some(inserted_comment.id), updated: None }; - let inserted_child_comment = Comment::create(&conn, child_comment_form).unwrap(); + let inserted_child_comment = Comment::create(&conn, &child_comment_form).unwrap(); let comment_like_form = CommentLikeForm { - comment_id: &inserted_comment.id, + comment_id: inserted_comment.id, fedi_user_id: "test".into(), - score: &1 + score: 1 }; - let inserted_comment_like = CommentLike::like(&conn, comment_like_form).unwrap(); + let inserted_comment_like = CommentLike::like(&conn, &comment_like_form).unwrap(); let expected_comment_like = CommentLike { id: inserted_comment_like.id, @@ -165,12 +161,12 @@ mod tests { score: 1 }; - let read_comment = Comment::read(&conn, inserted_comment.id); - let updated_comment = Comment::update(&conn, inserted_comment.id, comment_form); - let like_removed = CommentLike::remove(&conn, comment_like_form); - let num_deleted = Comment::delete(&conn, inserted_comment.id); - Comment::delete(&conn, inserted_child_comment.id); - Post::delete(&conn, inserted_post.id); + let read_comment = Comment::read(&conn, inserted_comment.id).unwrap(); + let updated_comment = Comment::update(&conn, inserted_comment.id, &comment_form).unwrap(); + let like_removed = CommentLike::remove(&conn, &comment_like_form).unwrap(); + let num_deleted = Comment::delete(&conn, inserted_comment.id).unwrap(); + Comment::delete(&conn, inserted_child_comment.id).unwrap(); + Post::delete(&conn, inserted_post.id).unwrap(); assert_eq!(expected_comment, read_comment); assert_eq!(expected_comment, inserted_comment); diff --git a/server/src/actions/community.rs b/server/src/actions/community.rs index 03490369..44d7b749 100644 --- a/server/src/actions/community.rs +++ b/server/src/actions/community.rs @@ -2,9 +2,10 @@ extern crate diesel; use schema::{community, community_user, community_follower}; use diesel::*; use diesel::result::Error; +use serde::{Deserialize, Serialize}; use {Crud, Followable, Joinable}; -#[derive(Queryable, Identifiable, PartialEq, Debug)] +#[derive(Queryable, Identifiable, PartialEq, Debug, Serialize, Deserialize)] #[table_name="community"] pub struct Community { pub id: i32, @@ -13,11 +14,11 @@ pub struct Community { pub updated: Option } -#[derive(Insertable, AsChangeset, Clone, Copy)] +#[derive(Insertable, AsChangeset, Clone, Serialize, Deserialize)] #[table_name="community"] -pub struct CommunityForm<'a> { - pub name: &'a str, - pub updated: Option<&'a chrono::NaiveDateTime> +pub struct CommunityForm { + pub name: String, + pub updated: Option } #[derive(Identifiable, Queryable, Associations, PartialEq, Debug)] @@ -30,11 +31,11 @@ pub struct CommunityUser { pub published: chrono::NaiveDateTime, } -#[derive(Insertable, AsChangeset, Clone, Copy)] +#[derive(Insertable, AsChangeset, Clone)] #[table_name="community_user"] -pub struct CommunityUserForm<'a> { - pub community_id: &'a i32, - pub fedi_user_id: &'a str, +pub struct CommunityUserForm { + pub community_id: i32, + pub fedi_user_id: String, } #[derive(Identifiable, Queryable, Associations, PartialEq, Debug)] @@ -47,76 +48,72 @@ pub struct CommunityFollower { pub published: chrono::NaiveDateTime, } -#[derive(Insertable, AsChangeset, Clone, Copy)] +#[derive(Insertable, AsChangeset, Clone)] #[table_name="community_follower"] -pub struct CommunityFollowerForm<'a> { - pub community_id: &'a i32, - pub fedi_user_id: &'a str, +pub struct CommunityFollowerForm { + pub community_id: i32, + pub fedi_user_id: String, } -impl<'a> Crud> for Community { - fn read(conn: &PgConnection, community_id: i32) -> Community { +impl Crud for Community { + fn read(conn: &PgConnection, community_id: i32) -> Result { use schema::community::dsl::*; community.find(community_id) - .first::(conn) - .expect("Error in query") + .first::(conn) } - fn delete(conn: &PgConnection, community_id: i32) -> usize { + fn delete(conn: &PgConnection, community_id: i32) -> Result { use schema::community::dsl::*; diesel::delete(community.find(community_id)) .execute(conn) - .expect("Error deleting.") } - fn create(conn: &PgConnection, new_community: CommunityForm) -> Result { + fn create(conn: &PgConnection, new_community: &CommunityForm) -> Result { use schema::community::dsl::*; insert_into(community) .values(new_community) - .get_result::(conn) + .get_result::(conn) } - fn update(conn: &PgConnection, community_id: i32, new_community: CommunityForm) -> Community { + fn update(conn: &PgConnection, community_id: i32, new_community: &CommunityForm) -> Result { use schema::community::dsl::*; diesel::update(community.find(community_id)) .set(new_community) - .get_result::(conn) - .expect(&format!("Unable to find {}", community_id)) + .get_result::(conn) } } -impl<'a> Followable> for CommunityFollower { - fn follow(conn: &PgConnection, community_follower_form: CommunityFollowerForm) -> Result { +impl Followable for CommunityFollower { + fn follow(conn: &PgConnection, community_follower_form: &CommunityFollowerForm) -> Result { use schema::community_follower::dsl::*; insert_into(community_follower) .values(community_follower_form) - .get_result::(conn) + .get_result::(conn) } - fn ignore(conn: &PgConnection, community_follower_form: CommunityFollowerForm) -> usize { + fn ignore(conn: &PgConnection, community_follower_form: &CommunityFollowerForm) -> Result { use schema::community_follower::dsl::*; diesel::delete(community_follower - .filter(community_id.eq(community_follower_form.community_id)) - .filter(fedi_user_id.eq(community_follower_form.fedi_user_id))) + .filter(community_id.eq(&community_follower_form.community_id)) + .filter(fedi_user_id.eq(&community_follower_form.fedi_user_id))) .execute(conn) - .expect("Error deleting.") } } -impl<'a> Joinable> for CommunityUser { - fn join(conn: &PgConnection, community_user_form: CommunityUserForm) -> Result { +impl Joinable for CommunityUser { + fn join(conn: &PgConnection, community_user_form: &CommunityUserForm) -> Result { use schema::community_user::dsl::*; insert_into(community_user) .values(community_user_form) - .get_result::(conn) + .get_result::(conn) } - fn leave(conn: &PgConnection, community_user_form: CommunityUserForm) -> usize { + + fn leave(conn: &PgConnection, community_user_form: &CommunityUserForm) -> Result { use schema::community_user::dsl::*; diesel::delete(community_user .filter(community_id.eq(community_user_form.community_id)) - .filter(fedi_user_id.eq(community_user_form.fedi_user_id))) + .filter(fedi_user_id.eq(&community_user_form.fedi_user_id))) .execute(conn) - .expect("Error deleting.") } } @@ -135,7 +132,7 @@ mod tests { updated: None }; - let inserted_community = Community::create(&conn, new_community).unwrap(); + let inserted_community = Community::create(&conn, &new_community).unwrap(); let expected_community = Community { id: inserted_community.id, @@ -145,21 +142,21 @@ mod tests { }; let new_user = UserForm { - name: "thom".into(), + name: "terry".into(), preferred_username: None, password_encrypted: "nope".into(), email: None, updated: None }; - let inserted_user = User_::create(&conn, new_user).unwrap(); + let inserted_user = User_::create(&conn, &new_user).unwrap(); let community_follower_form = CommunityFollowerForm { - community_id: &inserted_community.id, + community_id: inserted_community.id, fedi_user_id: "test".into() }; - let inserted_community_follower = CommunityFollower::follow(&conn, community_follower_form).unwrap(); + let inserted_community_follower = CommunityFollower::follow(&conn, &community_follower_form).unwrap(); let expected_community_follower = CommunityFollower { id: inserted_community_follower.id, @@ -169,11 +166,11 @@ mod tests { }; let community_user_form = CommunityUserForm { - community_id: &inserted_community.id, + community_id: inserted_community.id, fedi_user_id: "test".into() }; - let inserted_community_user = CommunityUser::join(&conn, community_user_form).unwrap(); + let inserted_community_user = CommunityUser::join(&conn, &community_user_form).unwrap(); let expected_community_user = CommunityUser { id: inserted_community_user.id, @@ -182,12 +179,12 @@ mod tests { published: inserted_community_user.published }; - let read_community = Community::read(&conn, inserted_community.id); - let updated_community = Community::update(&conn, inserted_community.id, new_community); - let ignored_community = CommunityFollower::ignore(&conn, community_follower_form); - let left_community = CommunityUser::leave(&conn, community_user_form); - let num_deleted = Community::delete(&conn, inserted_community.id); - User_::delete(&conn, inserted_user.id); + let read_community = Community::read(&conn, inserted_community.id).unwrap(); + let updated_community = Community::update(&conn, inserted_community.id, &new_community).unwrap(); + let ignored_community = CommunityFollower::ignore(&conn, &community_follower_form).unwrap(); + let left_community = CommunityUser::leave(&conn, &community_user_form).unwrap(); + let num_deleted = Community::delete(&conn, inserted_community.id).unwrap(); + User_::delete(&conn, inserted_user.id).unwrap(); assert_eq!(expected_community, read_community); assert_eq!(expected_community, inserted_community); diff --git a/server/src/actions/post.rs b/server/src/actions/post.rs index dd80f582..889fcf03 100644 --- a/server/src/actions/post.rs +++ b/server/src/actions/post.rs @@ -15,13 +15,13 @@ pub struct Post { pub updated: Option } -#[derive(Insertable, AsChangeset, Clone, Copy)] +#[derive(Insertable, AsChangeset, Clone)] #[table_name="post"] -pub struct PostForm<'a> { - pub name: &'a str, - pub url: &'a str, - pub attributed_to: &'a str, - pub updated: Option<&'a chrono::NaiveDateTime> +pub struct PostForm { + pub name: String, + pub url: String, + pub attributed_to: String, + pub updated: Option } #[derive(Identifiable, Queryable, Associations, PartialEq, Debug)] @@ -35,59 +35,55 @@ pub struct PostLike { pub published: chrono::NaiveDateTime, } -#[derive(Insertable, AsChangeset, Clone, Copy)] +#[derive(Insertable, AsChangeset, Clone)] #[table_name="post_like"] -pub struct PostLikeForm<'a> { - pub post_id: &'a i32, - pub fedi_user_id: &'a str, - pub score: &'a i16 +pub struct PostLikeForm { + pub post_id: i32, + pub fedi_user_id: String, + pub score: i16 } -impl<'a> Crud> for Post { - fn read(conn: &PgConnection, post_id: i32) -> Post { +impl Crud for Post { + fn read(conn: &PgConnection, post_id: i32) -> Result { use schema::post::dsl::*; post.find(post_id) - .first::(conn) - .expect("Error in query") + .first::(conn) } - fn delete(conn: &PgConnection, post_id: i32) -> usize { + fn delete(conn: &PgConnection, post_id: i32) -> Result { use schema::post::dsl::*; diesel::delete(post.find(post_id)) .execute(conn) - .expect("Error deleting.") } - fn create(conn: &PgConnection, new_post: PostForm) -> Result { + fn create(conn: &PgConnection, new_post: &PostForm) -> Result { use schema::post::dsl::*; insert_into(post) .values(new_post) - .get_result::(conn) + .get_result::(conn) } - fn update(conn: &PgConnection, post_id: i32, new_post: PostForm) -> Post { + fn update(conn: &PgConnection, post_id: i32, new_post: &PostForm) -> Result { use schema::post::dsl::*; diesel::update(post.find(post_id)) .set(new_post) - .get_result::(conn) - .expect(&format!("Unable to find {}", post_id)) + .get_result::(conn) } } -impl<'a> Likeable > for PostLike { - fn like(conn: &PgConnection, post_like_form: PostLikeForm) -> Result { +impl Likeable for PostLike { + fn like(conn: &PgConnection, post_like_form: &PostLikeForm) -> Result { use schema::post_like::dsl::*; insert_into(post_like) .values(post_like_form) - .get_result::(conn) + .get_result::(conn) } - fn remove(conn: &PgConnection, post_like_form: PostLikeForm) -> usize { + fn remove(conn: &PgConnection, post_like_form: &PostLikeForm) -> Result { use schema::post_like::dsl::*; diesel::delete(post_like .filter(post_id.eq(post_like_form.post_id)) - .filter(fedi_user_id.eq(post_like_form.fedi_user_id))) + .filter(fedi_user_id.eq(&post_like_form.fedi_user_id))) .execute(conn) - .expect("Error deleting.") } } @@ -107,7 +103,7 @@ mod tests { updated: None }; - let inserted_post = Post::create(&conn, new_post).unwrap(); + let inserted_post = Post::create(&conn, &new_post).unwrap(); let expected_post = Post { id: inserted_post.id, @@ -119,12 +115,12 @@ mod tests { }; let post_like_form = PostLikeForm { - post_id: &inserted_post.id, + post_id: inserted_post.id, fedi_user_id: "test".into(), - score: &1 + score: 1 }; - let inserted_post_like = PostLike::like(&conn, post_like_form).unwrap(); + let inserted_post_like = PostLike::like(&conn, &post_like_form).unwrap(); let expected_post_like = PostLike { id: inserted_post_like.id, @@ -134,10 +130,10 @@ mod tests { score: 1 }; - let read_post = Post::read(&conn, inserted_post.id); - let updated_post = Post::update(&conn, inserted_post.id, new_post); - let like_removed = PostLike::remove(&conn, post_like_form); - let num_deleted = Post::delete(&conn, inserted_post.id); + let read_post = Post::read(&conn, inserted_post.id).unwrap(); + let updated_post = Post::update(&conn, inserted_post.id, &new_post).unwrap(); + let like_removed = PostLike::remove(&conn, &post_like_form).unwrap(); + let num_deleted = Post::delete(&conn, inserted_post.id).unwrap(); assert_eq!(expected_post, read_post); assert_eq!(expected_post, inserted_post); diff --git a/server/src/actions/user.rs b/server/src/actions/user.rs index 8556525f..6016580d 100644 --- a/server/src/actions/user.rs +++ b/server/src/actions/user.rs @@ -1,9 +1,11 @@ -extern crate diesel; use schema::user_; use diesel::*; use diesel::result::Error; use schema::user_::dsl::*; -use Crud; +use serde::{Serialize, Deserialize}; +use {Crud,is_email_regex}; +use jsonwebtoken::{encode, decode, Header, Validation}; +use bcrypt::{DEFAULT_COST, hash}; #[derive(Queryable, Identifiable, PartialEq, Debug)] #[table_name="user_"] @@ -18,43 +20,75 @@ pub struct User_ { pub updated: Option } -#[derive(Insertable, AsChangeset, Clone, Copy)] +#[derive(Insertable, AsChangeset, Clone)] #[table_name="user_"] -pub struct UserForm<'a> { - pub name: &'a str, - pub preferred_username: Option<&'a str>, - pub password_encrypted: &'a str, - pub email: Option<&'a str>, - pub updated: Option<&'a chrono::NaiveDateTime> +pub struct UserForm { + pub name: String, + pub preferred_username: Option, + pub password_encrypted: String, + pub email: Option, + pub updated: Option } -impl<'a> Crud> for User_ { - fn read(conn: &PgConnection, user_id: i32) -> User_ { +impl Crud for User_ { + fn read(conn: &PgConnection, user_id: i32) -> Result { user_.find(user_id) - .first::(conn) - .expect("Error in query") + .first::(conn) } - fn delete(conn: &PgConnection, user_id: i32) -> usize { + fn delete(conn: &PgConnection, user_id: i32) -> Result { diesel::delete(user_.find(user_id)) .execute(conn) - .expect("Error deleting.") } - fn create(conn: &PgConnection, form: UserForm) -> Result { + fn create(conn: &PgConnection, form: &UserForm) -> Result { let mut edited_user = form.clone(); - // Add the rust crypt - edited_user.password_encrypted = "here"; - // edited_user.password_encrypted; - insert_into(user_) - .values(edited_user) - .get_result::(conn) + let password_hash = hash(&form.password_encrypted, DEFAULT_COST) + .expect("Couldn't hash password"); + edited_user.password_encrypted = password_hash; + insert_into(user_) + .values(edited_user) + .get_result::(conn) } - fn update(conn: &PgConnection, user_id: i32, form: UserForm) -> User_ { + fn update(conn: &PgConnection, user_id: i32, form: &UserForm) -> Result { let mut edited_user = form.clone(); - edited_user.password_encrypted = "here"; + let password_hash = hash(&form.password_encrypted, DEFAULT_COST) + .expect("Couldn't hash password"); + edited_user.password_encrypted = password_hash; diesel::update(user_.find(user_id)) .set(edited_user) - .get_result::(conn) - .expect(&format!("Unable to find user {}", user_id)) + .get_result::(conn) + } +} + +#[derive(Debug, Serialize, Deserialize)] +struct Claims { + id: i32, + username: String +} + +type Jwt = String; +impl User_ { + pub fn jwt(&self) -> Jwt { + let my_claims = Claims { + id: self.id, + username: self.name.to_owned() + }; + encode(&Header::default(), &my_claims, "secret".as_ref()).unwrap() + } + + pub fn find_by_email_or_username(conn: &PgConnection, username_or_email: &str) -> Result { + if is_email_regex(username_or_email) { + user_.filter(email.eq(username_or_email)) + .first::(conn) + } else { + user_.filter(name.eq(username_or_email)) + .first::(conn) + } + } + + pub fn find_by_jwt(conn: &PgConnection, jwt: &str) -> Result { + let token = decode::(&jwt, "secret".as_ref(), &Validation::default()) + .expect("Couldn't decode jwt"); + Self::read(&conn, token.claims.id) } } @@ -75,26 +109,26 @@ mod tests { updated: None }; - let inserted_user = User_::create(&conn, new_user).unwrap(); + let inserted_user = User_::create(&conn, &new_user).unwrap(); let expected_user = User_ { id: inserted_user.id, name: "thom".into(), preferred_username: None, - password_encrypted: "here".into(), + password_encrypted: "$2y$12$YXpNpYsdfjmed.QlYLvw4OfTCgyKUnKHc/V8Dgcf9YcVKHPaYXYYy".into(), email: None, icon: None, published: inserted_user.published, updated: None }; - let read_user = User_::read(&conn, inserted_user.id); - let updated_user = User_::update(&conn, inserted_user.id, new_user); - let num_deleted = User_::delete(&conn, inserted_user.id); + let read_user = User_::read(&conn, inserted_user.id).unwrap(); + let updated_user = User_::update(&conn, inserted_user.id, &new_user).unwrap(); + let num_deleted = User_::delete(&conn, inserted_user.id).unwrap(); - assert_eq!(expected_user, read_user); - assert_eq!(expected_user, inserted_user); - assert_eq!(expected_user, updated_user); + assert_eq!(expected_user.id, read_user.id); + assert_eq!(expected_user.id, inserted_user.id); + assert_eq!(expected_user.id, updated_user.id); assert_eq!(1, num_deleted); } } diff --git a/server/src/bin/main.rs b/server/src/bin/main.rs index 25181aaa..bd4c2d21 100644 --- a/server/src/bin/main.rs +++ b/server/src/bin/main.rs @@ -4,17 +4,15 @@ use std::time::{Instant, Duration}; use server::actix::*; use server::actix_web::server::HttpServer; use server::actix_web::{fs, http, ws, App, Error, HttpRequest, HttpResponse}; +use std::str::FromStr; +use server::websocket_server::server::*; /// How often heartbeat pings are sent const HEARTBEAT_INTERVAL: Duration = Duration::from_secs(5); /// How long before lack of client response causes a timeout const CLIENT_TIMEOUT: Duration = Duration::from_secs(10); -use server::websocket_server::server::*; -use std::str::FromStr; -// use server::websocket_server::server::UserOperation::from_str; - /// This is our websocket route state, this state is shared with all route /// instances via `HttpContext::state()` struct WsChatSessionState { @@ -92,7 +90,7 @@ use server::serde_json::Value; /// WebSocket message handler impl StreamHandler for WSSession { fn handle(&mut self, msg: ws::Message, ctx: &mut Self::Context) { - // println!("WEBSOCKET MESSAGE: {:?}", msg); + println!("WEBSOCKET MESSAGE: {:?}", msg); match msg { ws::Message::Ping(msg) => { self.hb = Instant::now(); @@ -108,7 +106,7 @@ impl StreamHandler for WSSession { // Get the OP command, and its data let op: &str = &json["op"].as_str().unwrap(); let data: &Value = &json["data"]; - + let user_operation: UserOperation = UserOperation::from_str(op).unwrap(); match user_operation { @@ -116,7 +114,23 @@ impl StreamHandler for WSSession { let login: Login = serde_json::from_str(&data.to_string()).unwrap(); ctx.state() .addr - .do_send(login); + .send(login) + .into_actor(self) + .then(|res, _, ctx| { + match res { + Ok(response) => match response { + Ok(t) => ctx.text(serde_json::to_string(&t).unwrap()), + Err(e) => { + let error_message_str: String = serde_json::to_string(&e).unwrap(); + eprintln!("{}", &error_message_str); + ctx.text(&error_message_str); + } + }, + _ => println!("Something is wrong"), + } + fut::ok(()) + }) + .wait(ctx) }, UserOperation::Register => { let register: Register = serde_json::from_str(&data.to_string()).unwrap(); @@ -126,13 +140,44 @@ impl StreamHandler for WSSession { .into_actor(self) .then(|res, _, ctx| { match res { - Ok(wut) => ctx.text(wut), + Ok(response) => match response { + Ok(t) => ctx.text(serde_json::to_string(&t).unwrap()), + Err(e) => { + let error_message_str: String = serde_json::to_string(&e).unwrap(); + eprintln!("{}", &error_message_str); + ctx.text(&error_message_str); + } + }, _ => println!("Something is wrong"), } fut::ok(()) }) .wait(ctx) - } + }, + UserOperation::CreateCommunity => { + use server::actions::community::CommunityForm; + let auth: &str = &json["auth"].as_str().unwrap(); + let community_form: CommunityForm = serde_json::from_str(&data.to_string()).unwrap(); + ctx.state() + .addr + .send(community_form) + .into_actor(self) + .then(|res, _, ctx| { + match res { + Ok(response) => match response { + Ok(t) => ctx.text(serde_json::to_string(&t).unwrap()), + Err(e) => { + let error_message_str: String = serde_json::to_string(&e).unwrap(); + eprintln!("{}", &error_message_str); + ctx.text(&error_message_str); + } + }, + _ => println!("Something is wrong"), + } + fut::ok(()) + }) + .wait(ctx) + }, _ => ctx.text(format!("!!! unknown command: {:?}", m)), } diff --git a/server/src/lib.rs b/server/src/lib.rs index 3daeb8d2..fcc9c2c8 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -8,6 +8,9 @@ pub extern crate actix; pub extern crate actix_web; pub extern crate rand; pub extern crate strum; +pub extern crate jsonwebtoken; +pub extern crate bcrypt; +pub extern crate regex; #[macro_use] pub extern crate strum_macros; pub mod schema; @@ -20,28 +23,28 @@ use diesel::pg::PgConnection; use diesel::result::Error; use dotenv::dotenv; use std::env; - +use regex::Regex; pub trait Crud { - fn create(conn: &PgConnection, form: T) -> Result where Self: Sized; - fn read(conn: &PgConnection, id: i32) -> Self; - fn update(conn: &PgConnection, id: i32, form: T) -> Self; - fn delete(conn: &PgConnection, id: i32) -> usize; + fn create(conn: &PgConnection, form: &T) -> Result where Self: Sized; + fn read(conn: &PgConnection, id: i32) -> Result where Self: Sized; + fn update(conn: &PgConnection, id: i32, form: &T) -> Result where Self: Sized; + fn delete(conn: &PgConnection, id: i32) -> Result where Self: Sized; } pub trait Followable { - fn follow(conn: &PgConnection, form: T) -> Result where Self: Sized; - fn ignore(conn: &PgConnection, form: T) -> usize; + fn follow(conn: &PgConnection, form: &T) -> Result where Self: Sized; + fn ignore(conn: &PgConnection, form: &T) -> Result where Self: Sized; } pub trait Joinable { - fn join(conn: &PgConnection, form: T) -> Result where Self: Sized; - fn leave(conn: &PgConnection, form: T) -> usize; + fn join(conn: &PgConnection, form: &T) -> Result where Self: Sized; + fn leave(conn: &PgConnection, form: &T) -> Result where Self: Sized; } pub trait Likeable { - fn like(conn: &PgConnection, form: T) -> Result where Self: Sized; - fn remove(conn: &PgConnection, form: T) -> usize; + fn like(conn: &PgConnection, form: &T) -> Result where Self: Sized; + fn remove(conn: &PgConnection, form: &T) -> Result where Self: Sized; } pub fn establish_connection() -> PgConnection { @@ -61,7 +64,7 @@ impl Settings { Settings { db_url: env::var("DATABASE_URL") .expect("DATABASE_URL must be set"), - hostname: env::var("HOSTNAME").unwrap_or("http://0.0.0.0".to_string()) + hostname: env::var("HOSTNAME").unwrap_or("http://0.0.0.0".to_string()) } } fn api_endpoint(&self) -> String { @@ -78,11 +81,22 @@ pub fn naive_now() -> NaiveDateTime { chrono::prelude::Utc::now().naive_utc() } +pub fn is_email_regex(test: &str) -> bool { + let re = Regex::new(r"^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$").unwrap(); + re.is_match(test) +} + #[cfg(test)] mod tests { - use Settings; - #[test] + use {Settings, is_email_regex}; + #[test] fn test_api() { assert_eq!(Settings::get().api_endpoint(), "http://0.0.0.0/api/v1"); } -} + + #[test] + fn test_email() { + assert!(is_email_regex("gush@gmail.com")); + assert!(!is_email_regex("nada_neutho")); + } +} diff --git a/server/src/websocket_server/server.rs b/server/src/websocket_server/server.rs index 2d410176..857db306 100644 --- a/server/src/websocket_server/server.rs +++ b/server/src/websocket_server/server.rs @@ -6,19 +6,27 @@ use actix::prelude::*; use rand::{rngs::ThreadRng, Rng}; use std::collections::{HashMap, HashSet}; use serde::{Deserialize, Serialize}; +use bcrypt::{verify}; use {Crud,establish_connection}; +use actions::community::*; #[derive(EnumString,ToString,Debug)] pub enum UserOperation { - Login, Register, Logout, Join, Edit, Reply, Vote, Delete, NextPage, Sticky -} - -pub enum MessageType { - Comments, Users, Ping, Pong + Login, Register, Logout, CreateCommunity, Join, Edit, Reply, Vote, Delete, NextPage, Sticky } +#[derive(EnumString,ToString,Debug)] +pub enum MessageToUser { + Comments, Users, Ping, Pong, Error +} + +#[derive(Serialize, Deserialize)] +pub struct ErrorMessage { + op: String, + error: String +} /// Chat server sends this messages to session #[derive(Message)] @@ -66,14 +74,16 @@ pub struct Join { pub name: String, } -#[derive(Message)] #[derive(Serialize, Deserialize)] pub struct Login { - pub username: String, + pub username_or_email: String, pub password: String } -// #[derive(Message)] +impl actix::Message for Login { + type Result = Result; +} + #[derive(Serialize, Deserialize)] pub struct Register { username: String, @@ -82,9 +92,31 @@ pub struct Register { password_verify: String } -impl actix::Message for Register { - type Result = String; +#[derive(Serialize, Deserialize)] +pub struct LoginResponse { + op: String, + jwt: String } + +impl actix::Message for Register { + type Result = Result; +} + +// #[derive(Serialize, Deserialize)] +// pub struct CreateCommunity { +// name: String +// } + +#[derive(Serialize, Deserialize)] +pub struct CreateCommunityResponse { + op: String, + community: Community +} + +impl actix::Message for CommunityForm { + type Result = Result; +} + /// `ChatServer` manages chat rooms and responsible for coordinating chat /// session. implementation is super primitive pub struct ChatServer { @@ -233,10 +265,47 @@ impl Handler for ChatServer { impl Handler for ChatServer { - type Result = (); - fn handle(&mut self, msg: Login, _: &mut Context) { - println!("{}", msg.password); + type Result = MessageResult; + fn handle(&mut self, msg: Login, _: &mut Context) -> Self::Result { + use actions::user::*; + let conn = establish_connection(); + + // Fetch that username / email + let user: User_ = match User_::find_by_email_or_username(&conn, &msg.username_or_email) { + Ok(user) => user, + Err(e) => return MessageResult( + Err( + ErrorMessage { + op: UserOperation::Login.to_string(), + error: "Couldn't find that username or email".to_string() + } + ) + ) + }; + + // Verify the password + let valid: bool = verify(&msg.password, &user.password_encrypted).unwrap_or(false); + if !valid { + return MessageResult( + Err( + ErrorMessage { + op: UserOperation::Login.to_string(), + error: "Password incorrect".to_string() + } + ) + ) + } + + // Return the jwt + MessageResult( + Ok( + LoginResponse { + op: UserOperation::Login.to_string(), + jwt: user.jwt() + } + ) + ) } } @@ -248,22 +317,79 @@ impl Handler for ChatServer { use actions::user::*; let conn = establish_connection(); - // TODO figure out how to return values, and throw errors + // Make sure passwords match + if msg.password != msg.password_verify { + return MessageResult( + Err( + ErrorMessage { + op: UserOperation::Register.to_string(), + error: "Passwords do not match.".to_string() + } + ) + ); + } // Register the new user let user_form = UserForm { - name: &msg.username, - email: msg.email.as_ref().map(|x| &**x), - password_encrypted: &msg.password, + name: msg.username, + email: msg.email, + password_encrypted: msg.password, preferred_username: None, updated: None }; - let inserted_user = User_::create(&conn, user_form).unwrap(); + // Create the user + let inserted_user = match User_::create(&conn, &user_form) { + Ok(user) => user, + Err(e) => return MessageResult( + Err( + ErrorMessage { + op: UserOperation::Register.to_string(), + error: "User already exists.".to_string() // overwrite the diesel error + } + ) + ) + }; - // Return the jwt - MessageResult("hi".to_string()) + MessageResult( + Ok( + LoginResponse { + op: UserOperation::Register.to_string(), + jwt: inserted_user.jwt() + } + ) + ) } } + + +impl Handler for ChatServer { + + type Result = MessageResult; + + fn handle(&mut self, form: CommunityForm, _: &mut Context) -> Self::Result { + let conn = establish_connection(); + let community = match Community::create(&conn, &form) { + Ok(community) => community, + Err(e) => return MessageResult( + Err( + ErrorMessage { + op: UserOperation::CreateCommunity.to_string(), + error: "Community already exists.".to_string() // overwrite the diesel error + } + ) + ) + }; + + MessageResult( + Ok( + CreateCommunityResponse { + op: UserOperation::CreateCommunity.to_string(), + community: community + } + ) + ) + } +} diff --git a/ui/package.json b/ui/package.json index ca4fa368..08443b14 100644 --- a/ui/package.json +++ b/ui/package.json @@ -15,11 +15,15 @@ }, "engineStrict": true, "dependencies": { + "@types/js-cookie": "^2.2.1", "classcat": "^1.1.3", "dotenv": "^6.1.0", "inferno": "^7.0.1", "inferno-router": "^7.0.1", - "moment": "^2.22.2" + "js-cookie": "^2.2.0", + "jwt-decode": "^2.2.0", + "moment": "^2.22.2", + "rxjs": "^6.4.0" }, "devDependencies": { "fuse-box": "3.1.3", diff --git a/ui/src/components/create-community.tsx b/ui/src/components/create-community.tsx new file mode 100644 index 00000000..dbacd18d --- /dev/null +++ b/ui/src/components/create-community.tsx @@ -0,0 +1,90 @@ +import { Component, linkEvent } from 'inferno'; +import { Subscription } from "rxjs"; +import { retryWhen, delay, take } from 'rxjs/operators'; +import { CommunityForm, UserOperation } from '../interfaces'; +import { WebSocketService, UserService } from '../services'; +import { msgOp } from '../utils'; + +interface State { + communityForm: CommunityForm; +} + +let emptyState: State = { + communityForm: { + name: null, + } +} + +export class CreateCommunity extends Component { + private subscription: Subscription; + + constructor(props, context) { + super(props, context); + + this.state = emptyState; + + this.subscription = WebSocketService.Instance.subject + .pipe(retryWhen(errors => errors.pipe(delay(3000), take(10)))) + .subscribe( + (msg) => this.parseMessage(msg), + (err) => console.error(err), + ); + } + + componentWillUnmount() { + this.subscription.unsubscribe(); + } + + render() { + return ( +
+
+
+ {this.communityForm()} +
+
+
+ ) + } + + communityForm() { + return ( +
+
+

Create Forum

+
+ +
+ +
+
+
+
+ +
+
+
+
+ ); + } + + handleCreateCommunitySubmit(i: CreateCommunity, event) { + event.preventDefault(); + WebSocketService.Instance.createCommunity(i.state.communityForm); + } + + handleCommunityNameChange(i: CreateCommunity, event) { + i.state.communityForm.name = event.target.value; + i.setState(i.state); + } + + parseMessage(msg: any) { + let op: UserOperation = msgOp(msg); + if (msg.error) { + alert(msg.error); + return; + } else { + } + } + +} diff --git a/ui/src/components/create-post.tsx b/ui/src/components/create-post.tsx new file mode 100644 index 00000000..bb6e60e2 --- /dev/null +++ b/ui/src/components/create-post.tsx @@ -0,0 +1,57 @@ +import { Component, linkEvent } from 'inferno'; + +import { LoginForm, PostForm, UserOperation } from '../interfaces'; +import { WebSocketService, UserService } from '../services'; +import { msgOp } from '../utils'; + +interface State { + postForm: PostForm; +} + +let emptyState: State = { + postForm: { + name: null, + url: null, + attributed_to: null + } +} + +export class CreatePost extends Component { + + constructor(props, context) { + super(props, context); + + this.state = emptyState; + + WebSocketService.Instance.subject.subscribe( + (msg) => this.parseMessage(msg), + (err) => console.error(err), + () => console.log('complete') + ); + } + + + render() { + return ( +
+
+
+ create post + {/* {this.postForm()} */} +
+
+
+ ) + } + + parseMessage(msg: any) { + console.log(msg); + let op: UserOperation = msgOp(msg); + if (msg.error) { + alert(msg.error); + return; + } else { + } + } + +} diff --git a/ui/src/components/login.tsx b/ui/src/components/login.tsx index fd6f5045..372b1557 100644 --- a/ui/src/components/login.tsx +++ b/ui/src/components/login.tsx @@ -1,7 +1,9 @@ import { Component, linkEvent } from 'inferno'; - -import { LoginForm, RegisterForm } from '../interfaces'; -import { WebSocketService } from '../services'; +import { Subscription } from "rxjs"; +import { retryWhen, delay, take } from 'rxjs/operators'; +import { LoginForm, RegisterForm, UserOperation } from '../interfaces'; +import { WebSocketService, UserService } from '../services'; +import { msgOp } from '../utils'; interface State { loginForm: LoginForm; @@ -10,24 +12,36 @@ interface State { let emptyState: State = { loginForm: { - username: null, - password: null + username_or_email: undefined, + password: undefined }, registerForm: { - username: null, - password: null, - password_verify: null + username: undefined, + password: undefined, + password_verify: undefined } } export class Login extends Component { + private subscription: Subscription; constructor(props, context) { super(props, context); this.state = emptyState; + this.subscription = WebSocketService.Instance.subject + .pipe(retryWhen(errors => errors.pipe(delay(3000), take(10)))) + .subscribe( + (msg) => this.parseMessage(msg), + (err) => console.error(err), + ); } + + componentWillUnmount() { + this.subscription.unsubscribe(); + } + render() { return (
@@ -51,7 +65,7 @@ export class Login extends Component {
- +
@@ -108,38 +122,55 @@ export class Login extends Component { } handleLoginSubmit(i: Login, event) { - console.log(i.state); event.preventDefault(); WebSocketService.Instance.login(i.state.loginForm); } handleLoginUsernameChange(i: Login, event) { - i.state.loginForm.username = event.target.value; + i.state.loginForm.username_or_email = event.target.value; + i.setState(i.state); } handleLoginPasswordChange(i: Login, event) { i.state.loginForm.password = event.target.value; + i.setState(i.state); } handleRegisterSubmit(i: Login, event) { - console.log(i.state); event.preventDefault(); WebSocketService.Instance.register(i.state.registerForm); } handleRegisterUsernameChange(i: Login, event) { i.state.registerForm.username = event.target.value; + i.setState(i.state); } handleRegisterEmailChange(i: Login, event) { i.state.registerForm.email = event.target.value; + i.setState(i.state); } handleRegisterPasswordChange(i: Login, event) { i.state.registerForm.password = event.target.value; + i.setState(i.state); } - + handleRegisterPasswordVerifyChange(i: Login, event) { i.state.registerForm.password_verify = event.target.value; + i.setState(i.state); + } + + parseMessage(msg: any) { + let op: UserOperation = msgOp(msg); + if (msg.error) { + alert(msg.error); + return; + } else { + if (op == UserOperation.Register || op == UserOperation.Login) { + UserService.Instance.login(msg.jwt); + this.props.history.push('/'); + } + } } } diff --git a/ui/src/components/navbar.tsx b/ui/src/components/navbar.tsx index 86d5d1d2..4cf6d6d2 100644 --- a/ui/src/components/navbar.tsx +++ b/ui/src/components/navbar.tsx @@ -1,38 +1,62 @@ import { Component, linkEvent } from 'inferno'; import { Link } from 'inferno-router'; import { repoUrl } from '../utils'; +import { UserService } from '../services'; export class Navbar extends Component { constructor(props, context) { super(props, context); + this.state = {isLoggedIn: UserService.Instance.loggedIn}; + + // Subscribe to user changes + UserService.Instance.sub.subscribe(user => { + let loggedIn: boolean = user !== null; + this.setState({isLoggedIn: loggedIn}); + }); } render() { return ( -
{this.navbar()}
+
{this.navbar()}
) } // TODO class active corresponding to current page + // TODO toggle css collapse navbar() { return ( -