diff --git a/cli-tool/.gitignore b/.gitignore
similarity index 87%
rename from cli-tool/.gitignore
rename to .gitignore
index 9945ef77b..a6212f019 100644
--- a/cli-tool/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
node_modules
.npmrc
.npmrcs
+.env
\ No newline at end of file
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
deleted file mode 100644
index 354feb814..000000000
--- a/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,94 +0,0 @@
-# Citizen Code of Conduct
-
-## 1. Purpose
-
-A primary goal of Gindex V4 is to be inclusive to the largest number of contributors, with the most varied and diverse backgrounds possible. As such, we are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, sexual orientation, ability, ethnicity, socioeconomic status, and religion (or lack thereof).
-
-This code of conduct outlines our expectations for all those who participate in our community, as well as the consequences for unacceptable behavior.
-
-We invite all those who participate in Gindex V4 to help us create safe and positive experiences for everyone.
-
-## 2. Open [Source/Culture/Tech] Citizenship
-
-A supplemental goal of this Code of Conduct is to increase open [source/culture/tech] citizenship by encouraging participants to recognize and strengthen the relationships between our actions and their effects on our community.
-
-Communities mirror the societies in which they exist and positive action is essential to counteract the many forms of inequality and abuses of power that exist in society.
-
-If you see someone who is making an extra effort to ensure our community is welcoming, friendly, and encourages all participants to contribute to the fullest extent, we want to know.
-
-## 3. Expected Behavior
-
-The following behaviors are expected and requested of all community members:
-
- * Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community.
- * Exercise consideration and respect in your speech and actions.
- * Attempt collaboration before conflict.
- * Refrain from demeaning, discriminatory, or harassing behavior and speech.
- * Be mindful of your surroundings and of your fellow participants. Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential.
- * Remember that community event venues may be shared with members of the public; please be respectful to all patrons of these locations.
-
-## 4. Unacceptable Behavior
-
-The following behaviors are considered harassment and are unacceptable within our community:
-
- * Violence, threats of violence or violent language directed against another person.
- * Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language.
- * Posting or displaying sexually explicit or violent material.
- * Posting or threatening to post other people's personally identifying information ("doxing").
- * Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability.
- * Inappropriate photography or recording.
- * Inappropriate physical contact. You should have someone's consent before touching them.
- * Unwelcome sexual attention. This includes, sexualized comments or jokes; inappropriate touching, groping, and unwelcomed sexual advances.
- * Deliberate intimidation, stalking or following (online or in person).
- * Advocating for, or encouraging, any of the above behavior.
- * Sustained disruption of community events, including talks and presentations.
-
-## 5. Weapons Policy
-
-No weapons will be allowed at Gindex V4 events, community spaces, or in other spaces covered by the scope of this Code of Conduct. Weapons include but are not limited to guns, explosives (including fireworks), and large knives such as those used for hunting or display, as well as any other item used for the purpose of causing injury or harm to others. Anyone seen in possession of one of these items will be asked to leave immediately, and will only be allowed to return without the weapon. Community members are further expected to comply with all state and local laws on this matter.
-
-## 6. Consequences of Unacceptable Behavior
-
-Unacceptable behavior from any community member, including sponsors and those with decision-making authority, will not be tolerated.
-
-Anyone asked to stop unacceptable behavior is expected to comply immediately.
-
-If a community member engages in unacceptable behavior, the community organizers may take any action they deem appropriate, up to and including a temporary ban or permanent expulsion from the community without warning (and without refund in the case of a paid event).
-
-## 7. Reporting Guidelines
-
-If you are subject to or witness unacceptable behavior, or have any other concerns, please notify a community organizer as soon as possible. tksudharshan@gmail.com.
-
-
-
-Additionally, community organizers are available to help community members engage with local law enforcement or to otherwise help those experiencing unacceptable behavior feel safe. In the context of in-person events, organizers will also provide escorts as desired by the person experiencing distress.
-
-## 8. Addressing Grievances
-
-If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify with a concise description of your grievance. Your grievance will be handled in accordance with our existing governing policies.
-
-
-
-## 9. Scope
-
-We expect all community participants (contributors, paid or otherwise; sponsors; and other guests) to abide by this Code of Conduct in all community venues--online and in-person--as well as in all one-on-one communications pertaining to community business.
-
-This code of conduct and its related procedures also applies to unacceptable behavior occurring outside the scope of community activities when such behavior has the potential to adversely affect the safety and well-being of community members.
-
-## 10. Contact info
-
-tksudharshan@gmail.com
-
-## 11. License and attribution
-
-The Citizen Code of Conduct is distributed by [Stumptown Syndicate](http://stumptownsyndicate.org) under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/).
-
-Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy).
-
-_Revision 2.3. Posted 6 March 2017._
-
-_Revision 2.2. Posted 4 February 2016._
-
-_Revision 2.1. Posted 23 June 2014._
-
-_Revision 2.0, adopted by the [Stumptown Syndicate](http://stumptownsyndicate.org) board on 10 January 2013. Posted 17 March 2013._
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
deleted file mode 100644
index 9f1ab7baf..000000000
--- a/CONTRIBUTING.md
+++ /dev/null
@@ -1,92 +0,0 @@
-# Contributing
-
-When contributing to this repository, please first discuss the change you wish to make via issue,
-email, or any other method with the owners of this repository before making a change.
-
-Please note we have a code of conduct, please follow it in all your interactions with the project.
-
-## Pull Request Process
-
-1. Ensure any install or build dependencies are removed before the end of the layer when doing a
- build.
-2. Update the README.md with details of changes to the interface, this includes new environment
- variables, exposed ports, useful file locations and container parameters.
-3. Increase the version numbers in any examples files and the README.md to the new version that this
- Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
-4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
- do not have permission to do that, you may request the second reviewer to merge it for you.
-
-## Code of Conduct
-
-### Our Pledge
-
-In the interest of fostering an open and welcoming environment, we as
-contributors and maintainers pledge to making participation in our project and
-our community a harassment-free experience for everyone, regardless of age, body
-size, disability, ethnicity, gender identity and expression, level of experience,
-nationality, personal appearance, race, religion, or sexual identity and
-orientation.
-
-### Our Standards
-
-Examples of behavior that contributes to creating a positive environment
-include:
-
-* Using welcoming and inclusive language
-* Being respectful of differing viewpoints and experiences
-* Gracefully accepting constructive criticism
-* Focusing on what is best for the community
-* Showing empathy towards other community members
-
-Examples of unacceptable behavior by participants include:
-
-* The use of sexualized language or imagery and unwelcome sexual attention or
-advances
-* Trolling, insulting/derogatory comments, and personal or political attacks
-* Public or private harassment
-* Publishing others' private information, such as a physical or electronic
- address, without explicit permission
-* Other conduct which could reasonably be considered inappropriate in a
- professional setting
-
-### Our Responsibilities
-
-Project maintainers are responsible for clarifying the standards of acceptable
-behavior and are expected to take appropriate and fair corrective action in
-response to any instances of unacceptable behavior.
-
-Project maintainers have the right and responsibility to remove, edit, or
-reject comments, commits, code, wiki edits, issues, and other contributions
-that are not aligned to this Code of Conduct, or to ban temporarily or
-permanently any contributor for other behaviors that they deem inappropriate,
-threatening, offensive, or harmful.
-
-### Scope
-
-This Code of Conduct applies both within project spaces and in public spaces
-when an individual is representing the project or its community. Examples of
-representing a project or community include using an official project e-mail
-address, posting via an official social media account, or acting as an appointed
-representative at an online or offline event. Representation of a project may be
-further defined and clarified by project maintainers.
-
-### Enforcement
-
-Instances of abusive, harassing, or otherwise unacceptable behavior may be
-reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
-complaints will be reviewed and investigated and will result in a response that
-is deemed necessary and appropriate to the circumstances. The project team is
-obligated to maintain confidentiality with regard to the reporter of an incident.
-Further details of specific enforcement policies may be posted separately.
-
-Project maintainers who do not follow or enforce the Code of Conduct in good
-faith may face temporary or permanent repercussions as determined by other
-members of the project's leadership.
-
-### Attribution
-
-This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
-available at [http://contributor-covenant.org/version/1/4][version]
-
-[homepage]: http://contributor-covenant.org
-[version]: http://contributor-covenant.org/version/1/4/
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index f288702d2..000000000
--- a/LICENSE
+++ /dev/null
@@ -1,674 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 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 General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is 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. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- 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.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- 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 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. Use with the GNU Affero General Public License.
-
- 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 Affero 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 special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU 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 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 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 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 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- Copyright (C)
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- 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 GPL, see
-.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-.
diff --git a/README.md b/README.md
deleted file mode 100644
index 1da47babe..000000000
--- a/README.md
+++ /dev/null
@@ -1,126 +0,0 @@
-![https://data.jsdelivr.com/v1/package/gh/tks18/gindex-v4/badge/year](https://data.jsdelivr.com/v1/package/gh/tks18/gindex-v4/badge/year) ![https://data.jsdelivr.com/v1/package/gh/tks18/gindex-v4/badge/month](https://data.jsdelivr.com/v1/package/gh/tks18/gindex-v4/badge/month) ![https://data.jsdelivr.com/v1/package/gh/tks18/gindex-v4/badge/week](https://data.jsdelivr.com/v1/package/gh/tks18/gindex-v4/badge/week) ![https://img.shields.io/github/languages/top/tks18/gindex-v4](https://img.shields.io/github/languages/top/tks18/gindex-v4) [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/Naereen/StrapDown.js/graphs/commit-activity) [![Ask Me Anything !](https://img.shields.io/badge/Ask%20me-anything-1abc9c.svg)](https://t.me/joinchat/UapdD22_Vy40MDdl)
-
-## A Vue js Based GD Index
-
-#### [Project HomePage](https://gen.infozy.tk/)
-#### [Follow guide to deploy yours!](https://telegra.ph/Google-Drive-Ultimate-Index-07-04)
-#### [![Telegram Support Group](https://i.ibb.co/0n3kkHx/image.png)](https://t.me/joinchat/UapdD22_Vy40MDdl)
-
-**Scan or Click to Join Support Group**
-
-#### We have a Detailed Project WiKi that Explains Everything in Detail and the Process to be Done to Deploy Everything and Also how to Develop in Local Environment - [Here is the Wiki](https://github.com/tks18/gindex-v4/wiki)
-
-## Introducing Our Own CLI Tool
-
-You can Use Our CLI Tool to Deploy Your Backend With Ease.
-
-* Open Cmd or Terminal as the Case maybe and Type the following
-
-```js
-> npm i -g gindex-cli-tool
-```
-
-* After Installing the Package, Enter the Following to Initialize the Tool and Check for all the Pre-requisites
-
-```js
-> gdployer init
-```
-
-* After Performing all the Checks it give a Success Output.
-* Type in the Following to Login to Heroku Account from the CLI.
-
-```js
-> heroku login
-```
-
-* Type in the Following to Start Deployment Process.
-
-```js
-> gdployer deploy
-```
-
-* Follow the On-screen Instructions to Deploy the Backend.
-* Enter a unique app name when Prompted. This will come before herokuapp.com, `Example: https://sample.herokuapp.com`
-* [Click here for Help Related to All the Environment Variables that needs to be setted up.](https://github.com/tks18/gindex-v4/wiki/backend-envirnment-variables).
-
-## What is GD Index ?
-
-First of all GD-Index stands for Google Drive Directory Index. It is a Serverless Google Drive directory indexing program. It can list Google Drive files in the form of a directory and can be downloaded through a straight chain. It Can be Your Personal Drive or Share Drive or a Folder or a Team Drive.
-
-This GIndex is Based on Vue.js, a progressive framework for building user interfaces. Unlike other monolithic frameworks, Vue is designed from the ground up to be incrementally adoptable. The core library is focused on the view layer only, and is easy to pick up and integrate with other libraries or existing projects.
-
-Any Issues / Help Regarding Setup, Feel free to Contact Through the telegram Group.
-
-## Local Development
-
-You can Visit the Releases folder in the Repo for All the Local Development Zips Including Frontend, Backend and CLI Tool to Develop Locally. Pull Requests are Welcomed Provided it is Worthy to Merge it.
-
-[Click Here for Releases](https://github.com/tks18/gindex-v4/tree/master/releases)
-
-**Now With New UI**
-![Refreshing New Home Look](https://github.com/tks18/gindex-v4/blob/dark-mode-0-1/imgs/home.png?raw=true)
-![Refreshing New Home Look](https://github.com/tks18/gindex-v4/blob/dark-mode-0-1/imgs/home2.png?raw=true)
-![Refreshing New Home Look](https://github.com/tks18/gindex-v4/blob/dark-mode-0-1/imgs/home-nolog.png?raw=true)
-
-**Important** - _This Site Requires My GIndex Live Backend Server to be Running Otherwise the Site will Never Open._
-
-**Important** - _For Setting up of Backend. Visit my Wiki for Help in Setting Up._
-
-#### Site Features Other than Aicirou's:
-
-1. This GIndex is Not Like Basic GIndex which Depends on Basic Auth Headers to Authenticate the Users. Rather this has its Own Backend Through Which Users will be Authenticated.
-2. Automated Email Verification with OTP.
-3. Uses Custom Video Player - Plyr to Stream Videos.
-4. Uses Custom Audio Player - Plyr
-5. Complete Dark theme.
-6. User Role Based Authentication.
-7. No Public can Access Site's Content Without Logging in.
-8. Uses JWT to Verify User's Login on Each Route.
-9. JWT is Valid for a Week. After Expiry the User will get Automatically Logged out.
-10. Also User's JWT Token is Stored in LocalStorage as AES 256 Encrypted Key . This will be Decrypted on Demand. So that No One Can Access the User Details even if they have the Key.
-11. Fully Material Redesign of all Pages. (Under Progress).
-12. Has 3 Roles - User, Admins, Superadmins
- - Users - Can Only View Content.
- - Admins - Can Accept Users based on their Request
- - Superadmins - Can Accept Admin Requests.
-13. Uses MongoDB for User Database.
-14. Full Access Control of Backend from Frontend Based on User's Role.
-
-#### Site Shots:
-**1. Home - Logged In**
-![HomeLog](imgs/home.png)
-
-**2. Home - Logged Out**
-![homeout](imgs/homelogout.jpg)
-
-**4. Video Page**
-![video](imgs/videoPlayer.jpg)
-
-**5. Video Player - Extended**
-![video](imgs/videplayer2.jpg)
-
-**6. Video Player - External Players**
-![video](imgs/videoPlayer%20Modal.jpg)
-
-**7. Settings**
-![settings](imgs/settings.jpg)
-
-**8. Admin Page**
-![admin](imgs/adminpage.jpg)
-
-**9. Admin - User Registration Page**
-![register](imgs/newuserregister.jpg)
-
-**10. Pending Requests - Modal**
-![pending](imgs/pendinguser.jpeg)
-
-**11. User Request Page**
-![request](imgs/request.jpeg)
-
-**12. User Verify Page**
-![verify](imgs/verify.jpeg)
-
-
-#### Thanks - Support Me
-
- Google Drive Index by Sudharshan TK is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. Based on a work at https://github.com/tks18/gindex-v4
diff --git a/SECURITY.md b/SECURITY.md
deleted file mode 100644
index fa7d2a1c5..000000000
--- a/SECURITY.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# Security Policy
-
-## Supported Versions
-
-Use this section to tell people about which versions of your project are
-currently being supported with security updates.
-
-| Version | Supported |
-| ------- | ------------------ |
-| 7.3.0 | :white_check_mark: |
-
-## Reporting a Vulnerability
-
-Use this section to tell people how to report a vulnerability.
-
-Tell them where to go, how often they can expect to get an update on a
-reported vulnerability, what to expect if the vulnerability is accepted or
-declined, etc.
diff --git a/app.js b/app.js
new file mode 100644
index 000000000..e7af75bc1
--- /dev/null
+++ b/app.js
@@ -0,0 +1,45 @@
+#!/usr/bin/env node
+
+require('dotenv').config();
+const yargs = require('yargs');
+const { hideBin } = require('yargs/helpers');
+const spinner = require('./helpers/spinner');
+const { checkArgs, handlePublish } = require('./publish');
+const versionInfo = require('../version.json');
+
+const catchFunc = (error, spinner) => {
+ spinner.stop();
+ console.log(error);
+ console.log('Failed');
+};
+
+yargs(hideBin(process.argv)).command(
+ 'publish [type] [repo] [branch] [dev]',
+ 'Publish Frontend, Backend, CLI-Tool, Version Control, Worker Version Automatically with Diff',
+ {},
+ (args) => {
+ spinner('Inititalizing App', (baseSpinner) => {
+ const checks = checkArgs(args, versionInfo);
+ baseSpinner.stop();
+ if (checks.passes) {
+ handlePublish(checks)
+ .then((result) => {
+ if (result && !result.error) {
+ console.log('Successfully Deployed the Release');
+ } else {
+ console.log('Failed to Deploy the Release');
+ }
+ })
+ .catch((err) => {
+ console.log(err);
+ });
+ } else {
+ console.log('Wrong Options Given Try Again');
+ }
+ });
+ },
+);
+
+if (yargs.argv._.length < 1) {
+ yargs.showHelp();
+}
diff --git a/backend/.gitignore b/backend/.gitignore
deleted file mode 100644
index 8769fdf04..000000000
--- a/backend/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-node_modules
-glorydb
-.env
diff --git a/backend/Procfile b/backend/Procfile
deleted file mode 100644
index 28fe750b8..000000000
--- a/backend/Procfile
+++ /dev/null
@@ -1 +0,0 @@
-web: npm run start
diff --git a/backend/README.md b/backend/README.md
deleted file mode 100644
index de81d8521..000000000
--- a/backend/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
- Google Drive Index by Sudharshan TK is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. Based on a work at https://github.com/tks18/gindex-v4
-
-##### What if Someone Violates my License ?
-
-A CC license terminates automatically when its conditions are violated. For example, if a reuser of CC-licensed material does not provide the attribution required when sharing the work, then the user no longer has the right to continue using the material and may be liable for copyright infringement. The license is terminated for the user who violated the license. However, all other users still have a valid license, so long as they are in compliance.
-
-Under the 4.0 licenses, a licensee automatically gets these rights back if she fixes the violation within 30 days of discovering it.
-
-If you apply a Creative Commons license and a user violates the license conditions, you may opt to contact the person directly to ask them to rectify the situation or consult a lawyer to act on your behalf. Creative Commons is not a law firm and cannot represent you or give you legal advice, but there are lawyers who have identified themselves as interested in representing people in CC-related matters.
-
-# gindex-backend
-Backend for gindex for Maintaining User Database
-
-**Support Group can be Found Here - [Here](https://t.me/joinchat/LVLR1U5Gs_9lmHGNGqpxIw)**
-Any Issues / Help Regarding Setup, Contact Through the telegram Group
-
-##### without this the Main GIndex wont work, Both should run simultaneously.
-
-#### Deploy to Heroku Directly:
-[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://dashboard.heroku.com/new?template=https%3A%2F%2Fgithub.com%2Ftks18%2Fgindex-backend%2Ftree%2Fmaster)
diff --git a/backend/app.js b/backend/app.js
deleted file mode 100644
index bc19d3492..000000000
--- a/backend/app.js
+++ /dev/null
@@ -1,39 +0,0 @@
-// Inititalisation
-require('dotenv').config();
-const express = require("express");
-var ping = require('ping');
-const cors = require('cors');
-const bodyParser = require("body-parser");
-const mongoose = require("mongoose");
-const keepAlive = require("./plugins/keepAlive");
-const deletePlugin = require('./plugins/deleteAll');
-const app = express();
-
-app.use(express.static("public"));
-app.set("view engine", "ejs");
-app.use(bodyParser.urlencoded({extended: false}));
-app.use(bodyParser.json());
-app.use(cors());
-
-mongoose.connect(process.env.DBURL, {useNewUrlParser: true, useUnifiedTopology: true, useCreateIndex: true})
-
-//Routes
-app.use('/', require('./routes/index'));
-app.use('/login', require('./routes/login'));
-app.use('/ping', require('./routes/ping'));
-app.use('/request', require('./routes/request'));
-app.use('/user', require('./routes/user'));
-app.use('/media', require('./routes/media'));
-app.use('/posters', require('./routes/poster'));
-app.use('/register', require('./routes/register'));
-app.use('/invite', require('./routes/invite'));
-app.use('/delete', require('./routes/delete'));
-app.use('/settings', require('./routes/settings'));
-app.use('/get', require('./routes/get'));
-app.use('/spam', require('./routes/spam'));
-
-deletePlugin();
-keepAlive();
-const PORT = process.env.PORT || 3000;
-
-app.listen(PORT, console.log('Server Started on ' + PORT ));
diff --git a/backend/app.json b/backend/app.json
deleted file mode 100644
index 59607d5af..000000000
--- a/backend/app.json
+++ /dev/null
@@ -1,73 +0,0 @@
-{
- "name": "G-Index Backend",
- "description": "This is the Live Backend Server for G-Index for Authenticating Users",
- "repository": "https://github.com/tks18/gindex-backend",
- "keywords": ["gindex-backend"],
- "env": {
- "DBURL": {
- "description": "MongoDB Atlas Connect URL for Your Database",
- "required": true
- },
- "SITE": {
- "description": "This is your Heroku's Backend Site Address. This is to Keep the Site Alive Every Half Hour.",
- "required": true
- },
- "EMAILID": {
- "description": "EmailID From Which OTP and Verification Emails will be Sent.",
- "required": true
- },
- "EMAILPASS": {
- "description": "Above Email ID's Password",
- "required": true
- },
- "EMAILSMTP": {
- "description": "SMTP Domain of your Email Service Provider",
- "required": true
- },
- "EMAILPORT": {
- "description": "Port of Your Email Service Provider",
- "required": true
- },
- "EMAILSERVICE": {
- "description": "Name of Your Email Service Provider. Example: Google, Yandex.., etc. Like that",
- "required": true
- },
- "ADMINEMAIL": {
- "description": "Whenever a User Registers or Verifies them. Their Details will be Sent to this Mail. Can be Same as Above Email ID",
- "required": true
- },
- "REPLYTOMAIL": {
- "description": "Whenver a User Replies to a Mail. That will be Sent to this Email ID",
- "required": true
- },
- "SITESECRET": {
- "description": "Can be Anything. This will be Asked When you are Setting up the Root User in Backend to Verify that its You.",
- "required": true
- },
- "FRONTENDSITENAME": {
- "description": "Your G-Index Name. Can be Anything",
- "required": true
- },
- "TMDBAPI": {
- "description": "Give Your TMDB V3 API Key for Automatic pulling of Video Data.",
- "required": false
- },
- "FRONTENDURL": {
- "description": "Your G-index Domain. This is Must, Otherwise Authentication will Fail.",
- "required": true
- },
- "TOKENSECRET": {
- "description": "Can be Anything. This will be Used to Issue JSON Web Tokens and Verify it. Recommended to Have Minimum 20 Characters. That will be Safe.",
- "required": true
- },
- "MAXSESSIONS": {
- "description": "Number of Sessions a User can Login",
- "required": true
- }
- },
- "buildpacks": [
- {
- "url": "heroku/nodejs"
- }
- ]
-}
diff --git a/backend/models/categoryPost.js b/backend/models/categoryPost.js
deleted file mode 100644
index 051a23e02..000000000
--- a/backend/models/categoryPost.js
+++ /dev/null
@@ -1,25 +0,0 @@
-const mongoose = require('mongoose');
-
-// Category Posters Schema
-const categoryPostSchema = {
- root: {
- type: Number,
- required: true,
- },
- title: {
- type: String,
- required: true,
- },
- poster: {
- type: String,
- required: true,
- },
- link: {
- type: String,
- required: true,
- },
-}
-
-const CategoryPost = mongoose.model("CategoryPost", categoryPostSchema);
-
-module.exports = CategoryPost;
diff --git a/backend/models/heroPost.js b/backend/models/heroPost.js
deleted file mode 100644
index 34b907c87..000000000
--- a/backend/models/heroPost.js
+++ /dev/null
@@ -1,29 +0,0 @@
-const mongoose = require('mongoose');
-
-// Hero Posters Schema
-const heroPostSchema = {
- root: {
- type: Number,
- required: true,
- },
- title: {
- type: String,
- required: true,
- },
- subtitle: {
- type: String,
- required: true,
- },
- poster: {
- type: String,
- required: true,
- },
- link: {
- type: String,
- required: true,
- },
-}
-
-const HeroPost = mongoose.model("HeroPost", heroPostSchema);
-
-module.exports = HeroPost;
diff --git a/backend/models/invitedUser.js b/backend/models/invitedUser.js
deleted file mode 100644
index 8ab9e0949..000000000
--- a/backend/models/invitedUser.js
+++ /dev/null
@@ -1,35 +0,0 @@
-const mongoose = require('mongoose');
-
-const invitedUserSchema = {
- name: {
- type: String,
- required: true
- },
- post: {
- type: String,
- required: true
- },
- email: {
- type: String,
- lowercase: true,
- required: true,
- unique: true
- },
- invitedDate: {
- type: Number,
- required: true,
- default: Date.now,
- },
- message: {
- type: String
- },
- invitedby: {
- type: String,
- lowercase: true,
- required: true
- }
-};
-
-const InvitedUser = mongoose.model("InvitedUser", invitedUserSchema);
-
-module.exports = InvitedUser;
diff --git a/backend/models/pendingUser.js b/backend/models/pendingUser.js
deleted file mode 100644
index 1718a5361..000000000
--- a/backend/models/pendingUser.js
+++ /dev/null
@@ -1,34 +0,0 @@
-const mongoose = require('mongoose');
-
-// Pending User Database Model
-const pendingUserSchema = {
- name: {
- type: String,
- required: true
- },
- post: {
- type: String,
- required: true
- },
- drive: {
- type: Number,
- required: true,
- },
- pendingFrom: {
- type: Number,
- required: true,
- default: Date.now,
- },
- email: {
- type: String,
- lowercase: true,
- required: true,
- unique: true },
- message: {
- type: String
- }
-};
-
-const PendingUser = mongoose.model("PendingUser", pendingUserSchema);
-
-module.exports = PendingUser;
diff --git a/backend/models/quickLink.js b/backend/models/quickLink.js
deleted file mode 100644
index d5862807f..000000000
--- a/backend/models/quickLink.js
+++ /dev/null
@@ -1,21 +0,0 @@
-const mongoose = require('mongoose');
-
-// Category Posters Schema
-const quickLinkSchema = {
- root: {
- type: Number,
- required: true,
- },
- title: {
- type: String,
- required: true,
- },
- link: {
- type: String,
- required: true,
- },
-}
-
-const QuickLink = mongoose.model("QuickLink", quickLinkSchema);
-
-module.exports = QuickLink;
diff --git a/backend/models/sessionSchema.js b/backend/models/sessionSchema.js
deleted file mode 100644
index fd3577fb9..000000000
--- a/backend/models/sessionSchema.js
+++ /dev/null
@@ -1,22 +0,0 @@
-const mongoose = require('mongoose');
-
-const sessionSchema = new mongoose.Schema({
- ip: {
- type: String,
- required: true
- },
- sessionid: {
- type: String,
- required: true
- },
- token: {
- type: String,
- required: true
- },
- time: {
- type: Number,
- required: true,
- }
-})
-
-module.exports = sessionSchema;
diff --git a/backend/models/siteSettings.js b/backend/models/siteSettings.js
deleted file mode 100644
index c6a2f4b4f..000000000
--- a/backend/models/siteSettings.js
+++ /dev/null
@@ -1,28 +0,0 @@
-const mongoose = require('mongoose');
-
-const siteSettingsSchema = {
- cId: {
- type: String,
- required: true,
- default: process.env.FRONTENDSITENAME
- },
- requests: {
- type: Boolean,
- required: true,
- default: true,
- },
- adminRequests: {
- type: Boolean,
- required: true,
- default: true,
- },
- tmdb: {
- type: Boolean,
- required: true,
- default: false,
- }
-}
-
-const Settings = mongoose.model("Settings", siteSettingsSchema);
-
-module.exports = Settings;
diff --git a/backend/models/spamUser.js b/backend/models/spamUser.js
deleted file mode 100644
index 01f670a2a..000000000
--- a/backend/models/spamUser.js
+++ /dev/null
@@ -1,31 +0,0 @@
-const mongoose = require('mongoose');
-
-const spamUserSchema = {
- name: {
- type: String,
- required: true
- },
- email: {
- type: String,
- required: true,
- unique: true,
- lowercase: true
- },
- post: {
- type: String,
- required: true
- },
- flaggedby: {
- type: String,
- required: true,
- lowercase: true
- },
- reason: {
- type: String,
- required: true
- }
-}
-
-const SpamUser = mongoose.model("SpamUser", spamUserSchema);
-
-module.exports = SpamUser;
diff --git a/backend/models/trendingPost.js b/backend/models/trendingPost.js
deleted file mode 100644
index af4dc323f..000000000
--- a/backend/models/trendingPost.js
+++ /dev/null
@@ -1,25 +0,0 @@
-const mongoose = require('mongoose');
-
-// Trending Posters Schema
-const trendingPostSchema = {
- root: {
- type: Number,
- required: true,
- },
- title: {
- type: String,
- required: true,
- },
- poster: {
- type: String,
- required: true,
- },
- link: {
- type: String,
- required: true,
- },
-}
-
-const TrendingPost = mongoose.model("TrendingPost", trendingPostSchema);
-
-module.exports = TrendingPost;
diff --git a/backend/models/user.js b/backend/models/user.js
deleted file mode 100644
index 610258987..000000000
--- a/backend/models/user.js
+++ /dev/null
@@ -1,61 +0,0 @@
-const mongoose = require('mongoose');
-const Sessions = require('./sessionSchema');
-
-// User Database Model
-const userSchema = {
- name: {
- type: String,
- required: true
- },
- email: {
- type: String,
- lowercase: true,
- required: true,
- unique: true
- },
- avatar: {
- type: String,
- lowercase: true,
- },
- registeredDate: {
- type: Number,
- required: true,
- default: Date.now,
- },
- password: {
- type: String,
- default: null
- },
- temppassword: {
- type: String
- },
- temprestricted: {
- type: Boolean,
- default: false
- },
- role: {
- type: String,
- required: true,
- default: 'user'
- },
- sessions: [Sessions],
- admin: {
- type: Boolean,
- required: true,
- default: false
- },
- superadmin: {
- type: Boolean,
- required: true,
- default: false
- },
- verified: {
- type: Boolean,
- required: true,
- default: false
- },
-};
-
-const User = mongoose.model("User", userSchema);
-
-module.exports = User;
diff --git a/backend/package-lock.json b/backend/package-lock.json
deleted file mode 100644
index 81388b198..000000000
--- a/backend/package-lock.json
+++ /dev/null
@@ -1,2128 +0,0 @@
-{
- "name": "g-index-backend",
- "version": "2.2.5",
- "lockfileVersion": 1,
- "requires": true,
- "dependencies": {
- "@sindresorhus/is": {
- "version": "0.14.0",
- "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz",
- "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ=="
- },
- "@szmarczak/http-timer": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz",
- "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==",
- "requires": {
- "defer-to-connect": "^1.0.1"
- }
- },
- "@types/color-name": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
- "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ=="
- },
- "abbrev": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
- "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
- },
- "accepts": {
- "version": "1.3.7",
- "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
- "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
- "requires": {
- "mime-types": "~2.1.24",
- "negotiator": "0.6.2"
- }
- },
- "ansi-align": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz",
- "integrity": "sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==",
- "requires": {
- "string-width": "^3.0.0"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
- "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg=="
- },
- "is-fullwidth-code-point": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
- "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
- },
- "string-width": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
- "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
- "requires": {
- "emoji-regex": "^7.0.1",
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^5.1.0"
- }
- },
- "strip-ansi": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
- "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
- "requires": {
- "ansi-regex": "^4.1.0"
- }
- }
- }
- },
- "ansi-regex": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
- },
- "ansi-styles": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
- "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
- "requires": {
- "@types/color-name": "^1.1.1",
- "color-convert": "^2.0.1"
- }
- },
- "anymatch": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
- "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==",
- "requires": {
- "normalize-path": "^3.0.0",
- "picomatch": "^2.0.4"
- }
- },
- "aproba": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
- "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw=="
- },
- "are-we-there-yet": {
- "version": "1.1.5",
- "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
- "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
- "requires": {
- "delegates": "^1.0.0",
- "readable-stream": "^2.0.6"
- }
- },
- "array-flatten": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
- "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
- },
- "array-uniq": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.2.tgz",
- "integrity": "sha1-X8w3OSB3VyPP1k1lxkvvU7+eum0="
- },
- "async": {
- "version": "0.9.2",
- "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz",
- "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0="
- },
- "axios": {
- "version": "0.19.2",
- "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz",
- "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==",
- "requires": {
- "follow-redirects": "1.5.10"
- }
- },
- "balanced-match": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
- "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
- },
- "bcrypt": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-5.0.0.tgz",
- "integrity": "sha512-jB0yCBl4W/kVHM2whjfyqnxTmOHkCX4kHEa5nYKSoGeYe8YrjTYTc87/6bwt1g8cmV0QrbhKriETg9jWtcREhg==",
- "requires": {
- "node-addon-api": "^3.0.0",
- "node-pre-gyp": "0.15.0"
- }
- },
- "binary-extensions": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz",
- "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow=="
- },
- "bl": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz",
- "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==",
- "requires": {
- "readable-stream": "^2.3.5",
- "safe-buffer": "^5.1.1"
- }
- },
- "bluebird": {
- "version": "3.5.1",
- "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz",
- "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA=="
- },
- "body-parser": {
- "version": "1.19.0",
- "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz",
- "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==",
- "requires": {
- "bytes": "3.1.0",
- "content-type": "~1.0.4",
- "debug": "2.6.9",
- "depd": "~1.1.2",
- "http-errors": "1.7.2",
- "iconv-lite": "0.4.24",
- "on-finished": "~2.3.0",
- "qs": "6.7.0",
- "raw-body": "2.4.0",
- "type-is": "~1.6.17"
- },
- "dependencies": {
- "debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "requires": {
- "ms": "2.0.0"
- }
- },
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
- }
- }
- },
- "boxen": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz",
- "integrity": "sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==",
- "requires": {
- "ansi-align": "^3.0.0",
- "camelcase": "^5.3.1",
- "chalk": "^3.0.0",
- "cli-boxes": "^2.2.0",
- "string-width": "^4.1.0",
- "term-size": "^2.1.0",
- "type-fest": "^0.8.1",
- "widest-line": "^3.1.0"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg=="
- },
- "emoji-regex": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
- },
- "is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
- },
- "string-width": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
- "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
- "requires": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.0"
- }
- },
- "strip-ansi": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
- "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
- "requires": {
- "ansi-regex": "^5.0.0"
- }
- }
- }
- },
- "brace-expansion": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
- "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
- "requires": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
- }
- },
- "braces": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
- "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
- "requires": {
- "fill-range": "^7.0.1"
- }
- },
- "bson": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.4.tgz",
- "integrity": "sha512-S/yKGU1syOMzO86+dGpg2qGoDL0zvzcb262G+gqEy6TgP6rt6z6qxSFX/8X6vLC91P7G7C3nLs0+bvDzmvBA3Q=="
- },
- "buffer-equal-constant-time": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
- "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk="
- },
- "bytes": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz",
- "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg=="
- },
- "cacheable-request": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz",
- "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==",
- "requires": {
- "clone-response": "^1.0.2",
- "get-stream": "^5.1.0",
- "http-cache-semantics": "^4.0.0",
- "keyv": "^3.0.0",
- "lowercase-keys": "^2.0.0",
- "normalize-url": "^4.1.0",
- "responselike": "^1.0.2"
- },
- "dependencies": {
- "get-stream": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz",
- "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==",
- "requires": {
- "pump": "^3.0.0"
- }
- },
- "lowercase-keys": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz",
- "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA=="
- }
- }
- },
- "camelcase": {
- "version": "5.3.1",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
- "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg=="
- },
- "chalk": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
- "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "dependencies": {
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
- },
- "supports-color": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
- "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
- "requires": {
- "has-flag": "^4.0.0"
- }
- }
- }
- },
- "chokidar": {
- "version": "3.4.0",
- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.0.tgz",
- "integrity": "sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ==",
- "requires": {
- "anymatch": "~3.1.1",
- "braces": "~3.0.2",
- "fsevents": "~2.1.2",
- "glob-parent": "~5.1.0",
- "is-binary-path": "~2.1.0",
- "is-glob": "~4.0.1",
- "normalize-path": "~3.0.0",
- "readdirp": "~3.4.0"
- }
- },
- "chownr": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
- "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="
- },
- "ci-info": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz",
- "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ=="
- },
- "cli-boxes": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.0.tgz",
- "integrity": "sha512-gpaBrMAizVEANOpfZp/EEUixTXDyGt7DFzdK5hU+UbWt/J0lB0w20ncZj59Z9a93xHb9u12zF5BS6i9RKbtg4w=="
- },
- "clone-response": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz",
- "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=",
- "requires": {
- "mimic-response": "^1.0.0"
- }
- },
- "code-point-at": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
- "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "concat-map": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
- },
- "configstore": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz",
- "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==",
- "requires": {
- "dot-prop": "^5.2.0",
- "graceful-fs": "^4.1.2",
- "make-dir": "^3.0.0",
- "unique-string": "^2.0.0",
- "write-file-atomic": "^3.0.0",
- "xdg-basedir": "^4.0.0"
- }
- },
- "console-control-strings": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
- "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4="
- },
- "content-disposition": {
- "version": "0.5.3",
- "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz",
- "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==",
- "requires": {
- "safe-buffer": "5.1.2"
- }
- },
- "content-type": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
- "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
- },
- "cookie": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz",
- "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg=="
- },
- "cookie-signature": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
- "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
- },
- "core-util-is": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
- "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
- },
- "cors": {
- "version": "2.8.5",
- "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
- "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
- "requires": {
- "object-assign": "^4",
- "vary": "^1"
- }
- },
- "crypto-random-string": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz",
- "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA=="
- },
- "debug": {
- "version": "3.2.6",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
- "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
- "requires": {
- "ms": "^2.1.1"
- }
- },
- "decompress-response": {
- "version": "3.3.0",
- "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz",
- "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=",
- "requires": {
- "mimic-response": "^1.0.0"
- }
- },
- "deep-extend": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
- "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA=="
- },
- "defer-to-connect": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz",
- "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ=="
- },
- "delegates": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
- "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o="
- },
- "denque": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/denque/-/denque-1.4.1.tgz",
- "integrity": "sha512-OfzPuSZKGcgr96rf1oODnfjqBFmr1DVoc/TrItj3Ohe0Ah1C5WX5Baquw/9U9KovnQ88EqmJbD66rKYUQYN1tQ=="
- },
- "depd": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
- "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="
- },
- "destroy": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
- "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
- },
- "detect-libc": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
- "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups="
- },
- "dot-prop": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.2.0.tgz",
- "integrity": "sha512-uEUyaDKoSQ1M4Oq8l45hSE26SnTxL6snNnqvK/VWx5wJhmff5z0FUVJDKDanor/6w3kzE3i7XZOk+7wC0EXr1A==",
- "requires": {
- "is-obj": "^2.0.0"
- }
- },
- "dotenv": {
- "version": "8.2.0",
- "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz",
- "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw=="
- },
- "duplexer3": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz",
- "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI="
- },
- "ecdsa-sig-formatter": {
- "version": "1.0.11",
- "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
- "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==",
- "requires": {
- "safe-buffer": "^5.0.1"
- }
- },
- "ee-first": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
- "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
- },
- "ejs": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.3.tgz",
- "integrity": "sha512-wmtrUGyfSC23GC/B1SMv2ogAUgbQEtDmTIhfqielrG5ExIM9TP4UoYdi90jLF1aTcsWCJNEO0UrgKzP0y3nTSg==",
- "requires": {
- "jake": "^10.6.1"
- }
- },
- "emoji-regex": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
- "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA=="
- },
- "encodeurl": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
- "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k="
- },
- "end-of-stream": {
- "version": "1.4.4",
- "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
- "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
- "requires": {
- "once": "^1.4.0"
- }
- },
- "escape-goat": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz",
- "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q=="
- },
- "escape-html": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
- "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
- },
- "escape-string-regexp": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
- "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
- },
- "etag": {
- "version": "1.8.1",
- "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
- "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc="
- },
- "express": {
- "version": "4.17.1",
- "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz",
- "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==",
- "requires": {
- "accepts": "~1.3.7",
- "array-flatten": "1.1.1",
- "body-parser": "1.19.0",
- "content-disposition": "0.5.3",
- "content-type": "~1.0.4",
- "cookie": "0.4.0",
- "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.2",
- "fresh": "0.5.2",
- "merge-descriptors": "1.0.1",
- "methods": "~1.1.2",
- "on-finished": "~2.3.0",
- "parseurl": "~1.3.3",
- "path-to-regexp": "0.1.7",
- "proxy-addr": "~2.0.5",
- "qs": "6.7.0",
- "range-parser": "~1.2.1",
- "safe-buffer": "5.1.2",
- "send": "0.17.1",
- "serve-static": "1.14.1",
- "setprototypeof": "1.1.1",
- "statuses": "~1.5.0",
- "type-is": "~1.6.18",
- "utils-merge": "1.0.1",
- "vary": "~1.1.2"
- },
- "dependencies": {
- "debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "requires": {
- "ms": "2.0.0"
- }
- },
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
- }
- }
- },
- "filelist": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.1.tgz",
- "integrity": "sha512-8zSK6Nu0DQIC08mUC46sWGXi+q3GGpKydAG36k+JDba6VRpkevvOWUW5a/PhShij4+vHT9M+ghgG7eM+a9JDUQ==",
- "requires": {
- "minimatch": "^3.0.4"
- }
- },
- "fill-range": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
- "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
- "requires": {
- "to-regex-range": "^5.0.1"
- }
- },
- "finalhandler": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
- "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==",
- "requires": {
- "debug": "2.6.9",
- "encodeurl": "~1.0.2",
- "escape-html": "~1.0.3",
- "on-finished": "~2.3.0",
- "parseurl": "~1.3.3",
- "statuses": "~1.5.0",
- "unpipe": "~1.0.0"
- },
- "dependencies": {
- "debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "requires": {
- "ms": "2.0.0"
- }
- },
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
- }
- }
- },
- "follow-redirects": {
- "version": "1.5.10",
- "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
- "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==",
- "requires": {
- "debug": "=3.1.0"
- },
- "dependencies": {
- "debug": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
- "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
- "requires": {
- "ms": "2.0.0"
- }
- },
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
- }
- }
- },
- "forwarded": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
- "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
- },
- "fresh": {
- "version": "0.5.2",
- "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
- "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
- },
- "fs-minipass": {
- "version": "1.2.7",
- "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz",
- "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==",
- "requires": {
- "minipass": "^2.6.0"
- }
- },
- "fs.realpath": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
- "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
- },
- "fsevents": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz",
- "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==",
- "optional": true
- },
- "gauge": {
- "version": "2.7.4",
- "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
- "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
- "requires": {
- "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-stream": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
- "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
- "requires": {
- "pump": "^3.0.0"
- }
- },
- "glob": {
- "version": "7.1.6",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
- "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
- "requires": {
- "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"
- }
- },
- "glob-parent": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz",
- "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==",
- "requires": {
- "is-glob": "^4.0.1"
- }
- },
- "global-dirs": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.0.1.tgz",
- "integrity": "sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A==",
- "requires": {
- "ini": "^1.3.5"
- }
- },
- "got": {
- "version": "9.6.0",
- "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz",
- "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==",
- "requires": {
- "@sindresorhus/is": "^0.14.0",
- "@szmarczak/http-timer": "^1.1.2",
- "cacheable-request": "^6.0.0",
- "decompress-response": "^3.3.0",
- "duplexer3": "^0.1.4",
- "get-stream": "^4.1.0",
- "lowercase-keys": "^1.0.1",
- "mimic-response": "^1.0.1",
- "p-cancelable": "^1.0.0",
- "to-readable-stream": "^1.0.0",
- "url-parse-lax": "^3.0.0"
- }
- },
- "graceful-fs": {
- "version": "4.2.4",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz",
- "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw=="
- },
- "has-flag": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
- "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
- },
- "has-unicode": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
- "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk="
- },
- "has-yarn": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz",
- "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw=="
- },
- "http-cache-semantics": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz",
- "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ=="
- },
- "http-errors": {
- "version": "1.7.2",
- "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz",
- "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==",
- "requires": {
- "depd": "~1.1.2",
- "inherits": "2.0.3",
- "setprototypeof": "1.1.1",
- "statuses": ">= 1.5.0 < 2",
- "toidentifier": "1.0.0"
- },
- "dependencies": {
- "inherits": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
- "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
- }
- }
- },
- "iconv-lite": {
- "version": "0.4.24",
- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
- "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
- "requires": {
- "safer-buffer": ">= 2.1.2 < 3"
- }
- },
- "ignore-by-default": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
- "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk="
- },
- "ignore-walk": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz",
- "integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==",
- "requires": {
- "minimatch": "^3.0.4"
- }
- },
- "import-lazy": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz",
- "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM="
- },
- "imurmurhash": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
- "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o="
- },
- "inflight": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
- "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
- "requires": {
- "once": "^1.3.0",
- "wrappy": "1"
- }
- },
- "inherits": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
- "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
- },
- "ini": {
- "version": "1.3.7",
- "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz",
- "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ=="
- },
- "ipaddr.js": {
- "version": "1.9.1",
- "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
- "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="
- },
- "is-binary-path": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
- "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
- "requires": {
- "binary-extensions": "^2.0.0"
- }
- },
- "is-ci": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz",
- "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==",
- "requires": {
- "ci-info": "^2.0.0"
- }
- },
- "is-extglob": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
- "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI="
- },
- "is-fullwidth-code-point": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
- "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
- "requires": {
- "number-is-nan": "^1.0.0"
- }
- },
- "is-glob": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
- "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
- "requires": {
- "is-extglob": "^2.1.1"
- }
- },
- "is-installed-globally": {
- "version": "0.3.2",
- "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.2.tgz",
- "integrity": "sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==",
- "requires": {
- "global-dirs": "^2.0.1",
- "is-path-inside": "^3.0.1"
- }
- },
- "is-npm": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-4.0.0.tgz",
- "integrity": "sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig=="
- },
- "is-number": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
- "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="
- },
- "is-obj": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
- "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w=="
- },
- "is-path-inside": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.2.tgz",
- "integrity": "sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg=="
- },
- "is-typedarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
- "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
- },
- "is-yarn-global": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz",
- "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw=="
- },
- "isarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
- },
- "jake": {
- "version": "10.8.2",
- "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.2.tgz",
- "integrity": "sha512-eLpKyrfG3mzvGE2Du8VoPbeSkRry093+tyNjdYaBbJS9v17knImYGNXQCUV0gLxQtF82m3E8iRb/wdSQZLoq7A==",
- "requires": {
- "async": "0.9.x",
- "chalk": "^2.4.2",
- "filelist": "^1.0.1",
- "minimatch": "^3.0.4"
- },
- "dependencies": {
- "ansi-styles": {
- "version": "3.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
- "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
- "requires": {
- "color-convert": "^1.9.0"
- }
- },
- "chalk": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
- "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
- "requires": {
- "ansi-styles": "^3.2.1",
- "escape-string-regexp": "^1.0.5",
- "supports-color": "^5.3.0"
- }
- },
- "color-convert": {
- "version": "1.9.3",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
- "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
- "requires": {
- "color-name": "1.1.3"
- }
- },
- "color-name": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
- "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
- }
- }
- },
- "json-buffer": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz",
- "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg="
- },
- "jsonwebtoken": {
- "version": "8.5.1",
- "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz",
- "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==",
- "requires": {
- "jws": "^3.2.2",
- "lodash.includes": "^4.3.0",
- "lodash.isboolean": "^3.0.3",
- "lodash.isinteger": "^4.0.4",
- "lodash.isnumber": "^3.0.3",
- "lodash.isplainobject": "^4.0.6",
- "lodash.isstring": "^4.0.1",
- "lodash.once": "^4.0.0",
- "ms": "^2.1.1",
- "semver": "^5.6.0"
- }
- },
- "jwa": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz",
- "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==",
- "requires": {
- "buffer-equal-constant-time": "1.0.1",
- "ecdsa-sig-formatter": "1.0.11",
- "safe-buffer": "^5.0.1"
- }
- },
- "jws": {
- "version": "3.2.2",
- "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz",
- "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==",
- "requires": {
- "jwa": "^1.4.1",
- "safe-buffer": "^5.0.1"
- }
- },
- "kareem": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.1.tgz",
- "integrity": "sha512-l3hLhffs9zqoDe8zjmb/mAN4B8VT3L56EUvKNqLFVs9YlFA+zx7ke1DO8STAdDyYNkeSo1nKmjuvQeI12So8Xw=="
- },
- "keyv": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz",
- "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==",
- "requires": {
- "json-buffer": "3.0.0"
- }
- },
- "latest-version": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz",
- "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==",
- "requires": {
- "package-json": "^6.3.0"
- }
- },
- "lodash.includes": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
- "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8="
- },
- "lodash.isboolean": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz",
- "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY="
- },
- "lodash.isinteger": {
- "version": "4.0.4",
- "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz",
- "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M="
- },
- "lodash.isnumber": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz",
- "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w="
- },
- "lodash.isplainobject": {
- "version": "4.0.6",
- "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
- "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs="
- },
- "lodash.isstring": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
- "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE="
- },
- "lodash.once": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz",
- "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w="
- },
- "lowercase-keys": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz",
- "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA=="
- },
- "make-dir": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
- "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",
- "requires": {
- "semver": "^6.0.0"
- },
- "dependencies": {
- "semver": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
- }
- }
- },
- "media-typer": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
- "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
- },
- "memory-pager": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz",
- "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==",
- "optional": true
- },
- "merge-descriptors": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
- "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
- },
- "methods": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
- "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4="
- },
- "mime": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
- "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="
- },
- "mime-db": {
- "version": "1.44.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz",
- "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg=="
- },
- "mime-types": {
- "version": "2.1.27",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz",
- "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==",
- "requires": {
- "mime-db": "1.44.0"
- }
- },
- "mimic-response": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz",
- "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ=="
- },
- "minimatch": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
- "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
- "requires": {
- "brace-expansion": "^1.1.7"
- }
- },
- "minimist": {
- "version": "1.2.5",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
- "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
- },
- "minipass": {
- "version": "2.9.0",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz",
- "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==",
- "requires": {
- "safe-buffer": "^5.1.2",
- "yallist": "^3.0.0"
- }
- },
- "minizlib": {
- "version": "1.3.3",
- "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz",
- "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==",
- "requires": {
- "minipass": "^2.9.0"
- }
- },
- "mkdirp": {
- "version": "0.5.5",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
- "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
- "requires": {
- "minimist": "^1.2.5"
- }
- },
- "mongodb": {
- "version": "3.5.9",
- "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.5.9.tgz",
- "integrity": "sha512-vXHBY1CsGYcEPoVWhwgxIBeWqP3dSu9RuRDsoLRPTITrcrgm1f0Ubu1xqF9ozMwv53agmEiZm0YGo+7WL3Nbug==",
- "requires": {
- "bl": "^2.2.0",
- "bson": "^1.1.4",
- "denque": "^1.4.1",
- "require_optional": "^1.0.1",
- "safe-buffer": "^5.1.2",
- "saslprep": "^1.0.0"
- }
- },
- "mongoose": {
- "version": "5.9.25",
- "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.9.25.tgz",
- "integrity": "sha512-vz/DqJ3mrHqEIlfRbKmDZ9TzQ1a0hCtSQpjHScIxr4rEtLs0tjsXDeEWcJ/vEEc3oLfP6vRx9V+uYSprXDUvFQ==",
- "requires": {
- "bson": "^1.1.4",
- "kareem": "2.3.1",
- "mongodb": "3.5.9",
- "mongoose-legacy-pluralize": "1.0.2",
- "mpath": "0.7.0",
- "mquery": "3.2.2",
- "ms": "2.1.2",
- "regexp-clone": "1.0.0",
- "safe-buffer": "5.2.1",
- "sift": "7.0.1",
- "sliced": "1.0.1"
- },
- "dependencies": {
- "safe-buffer": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
- "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
- }
- }
- },
- "mongoose-legacy-pluralize": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz",
- "integrity": "sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ=="
- },
- "mpath": {
- "version": "0.7.0",
- "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.7.0.tgz",
- "integrity": "sha512-Aiq04hILxhz1L+f7sjGyn7IxYzWm1zLNNXcfhDtx04kZ2Gk7uvFdgZ8ts1cWa/6d0TQmag2yR8zSGZUmp0tFNg=="
- },
- "mquery": {
- "version": "3.2.2",
- "resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.2.tgz",
- "integrity": "sha512-XB52992COp0KP230I3qloVUbkLUxJIu328HBP2t2EsxSFtf4W1HPSOBWOXf1bqxK4Xbb66lfMJ+Bpfd9/yZE1Q==",
- "requires": {
- "bluebird": "3.5.1",
- "debug": "3.1.0",
- "regexp-clone": "^1.0.0",
- "safe-buffer": "5.1.2",
- "sliced": "1.0.1"
- },
- "dependencies": {
- "debug": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
- "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
- "requires": {
- "ms": "2.0.0"
- }
- },
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
- }
- }
- },
- "ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
- },
- "nan": {
- "version": "2.14.1",
- "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz",
- "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw=="
- },
- "needle": {
- "version": "2.5.0",
- "resolved": "https://registry.npmjs.org/needle/-/needle-2.5.0.tgz",
- "integrity": "sha512-o/qITSDR0JCyCKEQ1/1bnUXMmznxabbwi/Y4WwJElf+evwJNFNwIDMCCt5IigFVxgeGBJESLohGtIS9gEzo1fA==",
- "requires": {
- "debug": "^3.2.6",
- "iconv-lite": "^0.4.4",
- "sax": "^1.2.4"
- }
- },
- "negotiator": {
- "version": "0.6.2",
- "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
- "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw=="
- },
- "node-addon-api": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.0.0.tgz",
- "integrity": "sha512-sSHCgWfJ+Lui/u+0msF3oyCgvdkhxDbkCS6Q8uiJquzOimkJBvX6hl5aSSA7DR1XbMpdM8r7phjcF63sF4rkKg=="
- },
- "node-pre-gyp": {
- "version": "0.15.0",
- "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.15.0.tgz",
- "integrity": "sha512-7QcZa8/fpaU/BKenjcaeFF9hLz2+7S9AqyXFhlH/rilsQ/hPZKK32RtR5EQHJElgu+q5RfbJ34KriI79UWaorA==",
- "requires": {
- "detect-libc": "^1.0.2",
- "mkdirp": "^0.5.3",
- "needle": "^2.5.0",
- "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.4.2"
- }
- },
- "nodemailer": {
- "version": "6.4.11",
- "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.4.11.tgz",
- "integrity": "sha512-BVZBDi+aJV4O38rxsUh164Dk1NCqgh6Cm0rQSb9SK/DHGll/DrCMnycVDD7msJgZCnmVa8ASo8EZzR7jsgTukQ=="
- },
- "nodemon": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.4.tgz",
- "integrity": "sha512-Ltced+hIfTmaS28Zjv1BM552oQ3dbwPqI4+zI0SLgq+wpJhSyqgYude/aZa/3i31VCQWMfXJVxvu86abcam3uQ==",
- "requires": {
- "chokidar": "^3.2.2",
- "debug": "^3.2.6",
- "ignore-by-default": "^1.0.1",
- "minimatch": "^3.0.4",
- "pstree.remy": "^1.1.7",
- "semver": "^5.7.1",
- "supports-color": "^5.5.0",
- "touch": "^3.1.0",
- "undefsafe": "^2.0.2",
- "update-notifier": "^4.0.0"
- }
- },
- "nopt": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz",
- "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==",
- "requires": {
- "abbrev": "1",
- "osenv": "^0.1.4"
- }
- },
- "normalize-path": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
- "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="
- },
- "normalize-url": {
- "version": "4.5.0",
- "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz",
- "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ=="
- },
- "npm-bundled": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.1.tgz",
- "integrity": "sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==",
- "requires": {
- "npm-normalize-package-bin": "^1.0.1"
- }
- },
- "npm-normalize-package-bin": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz",
- "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA=="
- },
- "npm-packlist": {
- "version": "1.4.8",
- "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.8.tgz",
- "integrity": "sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==",
- "requires": {
- "ignore-walk": "^3.0.1",
- "npm-bundled": "^1.0.1",
- "npm-normalize-package-bin": "^1.0.1"
- }
- },
- "npmlog": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
- "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
- "requires": {
- "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": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
- "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
- },
- "object-assign": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
- "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
- },
- "on-finished": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
- "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
- "requires": {
- "ee-first": "1.1.1"
- }
- },
- "once": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
- "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
- "requires": {
- "wrappy": "1"
- }
- },
- "os-homedir": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
- "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M="
- },
- "os-tmpdir": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
- "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
- },
- "osenv": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
- "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
- "requires": {
- "os-homedir": "^1.0.0",
- "os-tmpdir": "^1.0.0"
- }
- },
- "p-cancelable": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz",
- "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw=="
- },
- "package-json": {
- "version": "6.5.0",
- "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz",
- "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==",
- "requires": {
- "got": "^9.6.0",
- "registry-auth-token": "^4.0.0",
- "registry-url": "^5.0.0",
- "semver": "^6.2.0"
- },
- "dependencies": {
- "semver": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
- }
- }
- },
- "parseurl": {
- "version": "1.3.3",
- "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
- "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="
- },
- "path-is-absolute": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
- "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
- },
- "path-to-regexp": {
- "version": "0.1.7",
- "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
- "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
- },
- "picomatch": {
- "version": "2.2.2",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz",
- "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg=="
- },
- "ping": {
- "version": "0.2.3",
- "resolved": "https://registry.npmjs.org/ping/-/ping-0.2.3.tgz",
- "integrity": "sha512-UiwPl9kpzYIE0iz+EUSjISoVCyg44YckaT3BQ60j4xYuRrxGKH4w3ICSyw6xe3va2zgzD9T0yB8h220PM0Elhg==",
- "requires": {
- "q": "1.x",
- "underscore": "^1.8.3"
- }
- },
- "prepend-http": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz",
- "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc="
- },
- "process-nextick-args": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
- "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
- },
- "proxy-addr": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz",
- "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==",
- "requires": {
- "forwarded": "~0.1.2",
- "ipaddr.js": "1.9.1"
- }
- },
- "pstree.remy": {
- "version": "1.1.8",
- "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",
- "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w=="
- },
- "pump": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
- "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
- "requires": {
- "end-of-stream": "^1.1.0",
- "once": "^1.3.1"
- }
- },
- "pupa": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.0.1.tgz",
- "integrity": "sha512-hEJH0s8PXLY/cdXh66tNEQGndDrIKNqNC5xmrysZy3i5C3oEoLna7YAOad+7u125+zH1HNXUmGEkrhb3c2VriA==",
- "requires": {
- "escape-goat": "^2.0.0"
- }
- },
- "q": {
- "version": "1.5.1",
- "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
- "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc="
- },
- "qs": {
- "version": "6.7.0",
- "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
- "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ=="
- },
- "randomstring": {
- "version": "1.1.5",
- "resolved": "https://registry.npmjs.org/randomstring/-/randomstring-1.1.5.tgz",
- "integrity": "sha1-bfBij3XL1ZMpMNn+OrTpVqGFGMM=",
- "requires": {
- "array-uniq": "1.0.2"
- }
- },
- "range-parser": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
- "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="
- },
- "raw-body": {
- "version": "2.4.0",
- "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz",
- "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==",
- "requires": {
- "bytes": "3.1.0",
- "http-errors": "1.7.2",
- "iconv-lite": "0.4.24",
- "unpipe": "1.0.0"
- }
- },
- "rc": {
- "version": "1.2.8",
- "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
- "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
- "requires": {
- "deep-extend": "^0.6.0",
- "ini": "~1.3.0",
- "minimist": "^1.2.0",
- "strip-json-comments": "~2.0.1"
- }
- },
- "readable-stream": {
- "version": "2.3.7",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
- "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
- "requires": {
- "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": {
- "version": "3.4.0",
- "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz",
- "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==",
- "requires": {
- "picomatch": "^2.2.1"
- }
- },
- "regexp-clone": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz",
- "integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw=="
- },
- "registry-auth-token": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.1.1.tgz",
- "integrity": "sha512-9bKS7nTl9+/A1s7tnPeGrUpRcVY+LUh7bfFgzpndALdPfXQBfQV77rQVtqgUV3ti4vc/Ik81Ex8UJDWDQ12zQA==",
- "requires": {
- "rc": "^1.2.8"
- }
- },
- "registry-url": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz",
- "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==",
- "requires": {
- "rc": "^1.2.8"
- }
- },
- "require_optional": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz",
- "integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==",
- "requires": {
- "resolve-from": "^2.0.0",
- "semver": "^5.1.0"
- }
- },
- "resolve-from": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz",
- "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c="
- },
- "responselike": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz",
- "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=",
- "requires": {
- "lowercase-keys": "^1.0.0"
- }
- },
- "rimraf": {
- "version": "2.7.1",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
- "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
- "requires": {
- "glob": "^7.1.3"
- }
- },
- "safe-buffer": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
- "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
- },
- "safer-buffer": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
- "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
- },
- "saslprep": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz",
- "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==",
- "optional": true,
- "requires": {
- "sparse-bitfield": "^3.0.3"
- }
- },
- "sax": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
- "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
- },
- "semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
- },
- "semver-diff": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz",
- "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==",
- "requires": {
- "semver": "^6.3.0"
- },
- "dependencies": {
- "semver": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
- }
- }
- },
- "send": {
- "version": "0.17.1",
- "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz",
- "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==",
- "requires": {
- "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.7.2",
- "mime": "1.6.0",
- "ms": "2.1.1",
- "on-finished": "~2.3.0",
- "range-parser": "~1.2.1",
- "statuses": "~1.5.0"
- },
- "dependencies": {
- "debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "requires": {
- "ms": "2.0.0"
- },
- "dependencies": {
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
- }
- }
- },
- "ms": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
- "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
- }
- }
- },
- "serve-static": {
- "version": "1.14.1",
- "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz",
- "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==",
- "requires": {
- "encodeurl": "~1.0.2",
- "escape-html": "~1.0.3",
- "parseurl": "~1.3.3",
- "send": "0.17.1"
- }
- },
- "set-blocking": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
- "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
- },
- "setprototypeof": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz",
- "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw=="
- },
- "sift": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/sift/-/sift-7.0.1.tgz",
- "integrity": "sha512-oqD7PMJ+uO6jV9EQCl0LrRw1OwsiPsiFQR5AR30heR+4Dl7jBBbDLnNvWiak20tzZlSE1H7RB30SX/1j/YYT7g=="
- },
- "signal-exit": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",
- "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA=="
- },
- "sliced": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz",
- "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E="
- },
- "sparse-bitfield": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
- "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=",
- "optional": true,
- "requires": {
- "memory-pager": "^1.0.2"
- }
- },
- "sqlite3": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-4.2.0.tgz",
- "integrity": "sha512-roEOz41hxui2Q7uYnWsjMOTry6TcNUNmp8audCx18gF10P2NknwdpF+E+HKvz/F2NvPKGGBF4NGc+ZPQ+AABwg==",
- "requires": {
- "nan": "^2.12.1",
- "node-pre-gyp": "^0.11.0"
- },
- "dependencies": {
- "node-pre-gyp": {
- "version": "0.11.0",
- "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.11.0.tgz",
- "integrity": "sha512-TwWAOZb0j7e9eGaf9esRx3ZcLaE5tQ2lvYy1pb5IAaG1a2e2Kv5Lms1Y4hpj+ciXJRofIxxlt5haeQ/2ANeE0Q==",
- "requires": {
- "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"
- }
- }
- }
- },
- "statuses": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
- "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow="
- },
- "string-width": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
- "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
- "requires": {
- "code-point-at": "^1.0.0",
- "is-fullwidth-code-point": "^1.0.0",
- "strip-ansi": "^3.0.0"
- }
- },
- "string_decoder": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
- "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
- "requires": {
- "safe-buffer": "~5.1.0"
- }
- },
- "strip-ansi": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
- "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
- "requires": {
- "ansi-regex": "^2.0.0"
- }
- },
- "strip-json-comments": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
- "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo="
- },
- "supports-color": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
- "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
- "requires": {
- "has-flag": "^3.0.0"
- }
- },
- "tar": {
- "version": "4.4.13",
- "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz",
- "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==",
- "requires": {
- "chownr": "^1.1.1",
- "fs-minipass": "^1.2.5",
- "minipass": "^2.8.6",
- "minizlib": "^1.2.1",
- "mkdirp": "^0.5.0",
- "safe-buffer": "^5.1.2",
- "yallist": "^3.0.3"
- }
- },
- "term-size": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.0.tgz",
- "integrity": "sha512-a6sumDlzyHVJWb8+YofY4TW112G6p2FCPEAFk+59gIYHv3XHRhm9ltVQ9kli4hNWeQBwSpe8cRN25x0ROunMOw=="
- },
- "to-readable-stream": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz",
- "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q=="
- },
- "to-regex-range": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
- "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
- "requires": {
- "is-number": "^7.0.0"
- }
- },
- "toidentifier": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
- "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw=="
- },
- "touch": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz",
- "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==",
- "requires": {
- "nopt": "~1.0.10"
- },
- "dependencies": {
- "nopt": {
- "version": "1.0.10",
- "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz",
- "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=",
- "requires": {
- "abbrev": "1"
- }
- }
- }
- },
- "type-fest": {
- "version": "0.8.1",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",
- "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA=="
- },
- "type-is": {
- "version": "1.6.18",
- "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
- "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
- "requires": {
- "media-typer": "0.3.0",
- "mime-types": "~2.1.24"
- }
- },
- "typedarray-to-buffer": {
- "version": "3.1.5",
- "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz",
- "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==",
- "requires": {
- "is-typedarray": "^1.0.0"
- }
- },
- "undefsafe": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.3.tgz",
- "integrity": "sha512-nrXZwwXrD/T/JXeygJqdCO6NZZ1L66HrxM/Z7mIq2oPanoN0F1nLx3lwJMu6AwJY69hdixaFQOuoYsMjE5/C2A==",
- "requires": {
- "debug": "^2.2.0"
- },
- "dependencies": {
- "debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "requires": {
- "ms": "2.0.0"
- }
- },
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
- }
- }
- },
- "underscore": {
- "version": "1.10.2",
- "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.10.2.tgz",
- "integrity": "sha512-N4P+Q/BuyuEKFJ43B9gYuOj4TQUHXX+j2FqguVOpjkssLUUrnJofCcBccJSCoeturDoZU6GorDTHSvUDlSQbTg=="
- },
- "unique-string": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz",
- "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==",
- "requires": {
- "crypto-random-string": "^2.0.0"
- }
- },
- "unpipe": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
- "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
- },
- "update-notifier": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.0.tgz",
- "integrity": "sha512-w3doE1qtI0/ZmgeoDoARmI5fjDoT93IfKgEGqm26dGUOh8oNpaSTsGNdYRN/SjOuo10jcJGwkEL3mroKzktkew==",
- "requires": {
- "boxen": "^4.2.0",
- "chalk": "^3.0.0",
- "configstore": "^5.0.1",
- "has-yarn": "^2.1.0",
- "import-lazy": "^2.1.0",
- "is-ci": "^2.0.0",
- "is-installed-globally": "^0.3.1",
- "is-npm": "^4.0.0",
- "is-yarn-global": "^0.3.0",
- "latest-version": "^5.0.0",
- "pupa": "^2.0.1",
- "semver-diff": "^3.1.1",
- "xdg-basedir": "^4.0.0"
- }
- },
- "url-parse-lax": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz",
- "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=",
- "requires": {
- "prepend-http": "^2.0.0"
- }
- },
- "util-deprecate": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
- "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
- },
- "utils-merge": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
- "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
- },
- "vary": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
- "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
- },
- "wide-align": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
- "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
- "requires": {
- "string-width": "^1.0.2 || 2"
- }
- },
- "widest-line": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz",
- "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==",
- "requires": {
- "string-width": "^4.0.0"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg=="
- },
- "emoji-regex": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
- },
- "is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
- },
- "string-width": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
- "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
- "requires": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.0"
- }
- },
- "strip-ansi": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
- "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
- "requires": {
- "ansi-regex": "^5.0.0"
- }
- }
- }
- },
- "wrappy": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
- },
- "write-file-atomic": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz",
- "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==",
- "requires": {
- "imurmurhash": "^0.1.4",
- "is-typedarray": "^1.0.0",
- "signal-exit": "^3.0.2",
- "typedarray-to-buffer": "^3.1.5"
- }
- },
- "xdg-basedir": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz",
- "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q=="
- },
- "yallist": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
- "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
- }
- }
-}
diff --git a/backend/package.json b/backend/package.json
deleted file mode 100644
index 07ad2e94f..000000000
--- a/backend/package.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "name": "g-index-backend",
- "version": "2.2.5",
- "description": "",
- "main": "app.js",
- "scripts": {
- "start": "set NODE_ENV=production && node app",
- "develop": "set NODE_ENV=development && nodemon app.js",
- "test": "echo \"Error: no test specified\" && exit 1"
- },
- "author": "",
- "license": "ISC",
- "dependencies": {
- "axios": "^0.19.2",
- "bcrypt": "^5.0.0",
- "body-parser": "^1.19.0",
- "cors": "^2.8.5",
- "dotenv": "^8.2.0",
- "ejs": "^3.1.3",
- "express": "^4.17.1",
- "jsonwebtoken": "^8.5.1",
- "mongoose": "^5.9.25",
- "nodemailer": "^6.4.11",
- "nodemon": "^2.0.4",
- "ping": "^0.2.3",
- "randomstring": "^1.1.5",
- "sqlite3": "^4.2.0"
- }
-}
diff --git a/backend/parsers/torrent-name-parser-one/index.js b/backend/parsers/torrent-name-parser-one/index.js
deleted file mode 100644
index b56ed1dca..000000000
--- a/backend/parsers/torrent-name-parser-one/index.js
+++ /dev/null
@@ -1,11 +0,0 @@
-const Parser = require("./src/parser").Parser;
-const handlers = require("./src/handlers");
-
-const defaultParser = new Parser();
-
-handlers.addDefaults(defaultParser);
-
-exports.addDefaults = handlers.addDefaults;
-exports.addHandler = (handlerName, handler, options) => defaultParser.addHandler(handlerName, handler, options);
-exports.parse = title => defaultParser.parse(title);
-exports.Parser = Parser;
diff --git a/backend/parsers/torrent-name-parser-one/src/handlers.js b/backend/parsers/torrent-name-parser-one/src/handlers.js
deleted file mode 100644
index b0649d93c..000000000
--- a/backend/parsers/torrent-name-parser-one/src/handlers.js
+++ /dev/null
@@ -1,100 +0,0 @@
-exports.addDefaults = /** @type Parser */ parser => {
-
- // Year
- parser.addHandler("year", /(?!^)[([]?((?:19[0-9]|20[012])[0-9])[)\]]?/, { type: "integer" });
-
- // Resolution
- parser.addHandler("resolution", /([0-9]{3,4}[pi])/i, { type: "lowercase" });
- parser.addHandler("resolution", /(4k)/i, { type: "lowercase" });
-
- // Extended
- parser.addHandler("extended", /EXTENDED/, { type: "boolean" });
-
- // Convert
- parser.addHandler("convert", /CONVERT/, { type: "boolean" });
-
- // Hardcoded
- parser.addHandler("hardcoded", /HC|HARDCODED/, { type: "boolean" });
-
- // Proper
- parser.addHandler("proper", /(?:REAL.)?PROPER/, { type: "boolean" });
-
- // Repack
- parser.addHandler("repack", /REPACK|RERIP/, { type: "boolean" });
-
- // Retail
- parser.addHandler("retail", /\bRetail\b/i, { type: "boolean" });
-
- // Remastered
- parser.addHandler("remastered", /\bRemaster(?:ed)?\b/i, { type: "boolean" });
-
- // Unrated
- parser.addHandler("unrated", /\bunrated|uncensored\b/i, { type: "boolean" });
-
- // Region
- parser.addHandler("region", /R[0-9]/);
-
- // Container
- parser.addHandler("container", /\b(MKV|AVI|MP4)\b/i, { type: "lowercase" });
-
- // Source
- parser.addHandler("source", /\b(?:HD-?)?CAM\b/, { type: "lowercase" });
- parser.addHandler("source", /\b(?:HD-?)?T(?:ELE)?S(?:YNC)?\b/i, { value: "telesync" });
- parser.addHandler("source", /\bHD-?Rip\b/i, { type: "lowercase" });
- parser.addHandler("source", /\bBRRip\b/i, { type: "lowercase" });
- parser.addHandler("source", /\bBDRip\b/i, { type: "lowercase" });
- parser.addHandler("source", /\bDVDRip\b/i, { type: "lowercase" });
- parser.addHandler("source", /\bDVD(?:R[0-9])?\b/i, { value: "dvd" });
- parser.addHandler("source", /\bDVDscr\b/i, { type: "lowercase" });
- parser.addHandler("source", /\b(?:HD-?)?TVRip\b/i, { type: "lowercase" });
- parser.addHandler("source", /\bTC\b/, { type: "lowercase" });
- parser.addHandler("source", /\bPPVRip\b/i, { type: "lowercase" });
- parser.addHandler("source", /\bR5\b/i, { type: "lowercase" });
- parser.addHandler("source", /\bVHSSCR\b/i, { type: "lowercase" });
- parser.addHandler("source", /\bBluray\b/i, { type: "lowercase" });
- parser.addHandler("source", /\bWEB-?DL\b/i, { type: "lowercase" });
- parser.addHandler("source", /\bWEB-?Rip\b/i, { type: "lowercase" });
- parser.addHandler("source", /\b(?:DL|WEB|BD|BR)MUX\b/i, { type: "lowercase" });
- parser.addHandler("source", /\b(DivX|XviD)\b/, { type: "lowercase" });
- parser.addHandler("source", /HDTV/i, { type: "lowercase" });
-
- // Codec
- parser.addHandler("codec", /dvix|mpeg2|divx|xvid|[xh][-. ]?26[45]|avc|hevc/i, { type: "lowercase" });
- parser.addHandler("codec", ({ result }) => {
- if (result.codec) {
- result.codec = result.codec.replace(/[ .-]/, "");
- }
- });
-
- // Audio
- parser.addHandler("audio", /MD|MP3|mp3|FLAC|Atmos|DTS(?:-HD)?|TrueHD/, { type: "lowercase" });
- parser.addHandler("audio", /Dual[- ]Audio/i, { type: "lowercase" });
- parser.addHandler("audio", /AC-?3(?:\.5\.1)?/i, { value: "ac3" });
- parser.addHandler("audio", /DD5[. ]?1/i, { value: "dd5.1" });
- parser.addHandler("audio", /AAC(?:[. ]?2[. ]0)?/, { value: "aac" });
-
- // Group
- parser.addHandler("group", /- ?([^\-. ]+)$/);
-
- // Season
- parser.addHandler("season", /S([0-9]{1,2}) ?E[0-9]{1,2}/i, { type: "integer" });
- parser.addHandler("season", /([0-9]{1,2})x[0-9]{1,2}/, { type: "integer" });
- parser.addHandler("season", /(?:Saison|Season)[. _-]?([0-9]{1,2})/i, { type: "integer" });
-
- // Episode
- parser.addHandler("episode", /S[0-9]{1,2} ?E([0-9]{1,2})/i, { type: "integer" });
- parser.addHandler("episode", /[0-9]{1,2}x([0-9]{1,2})/, { type: "integer" });
- parser.addHandler("episode", /[ée]p(?:isode)?[. _-]?([0-9]{1,3})/i, { type: "integer" });
-
- // Language
- parser.addHandler("language", /\bRUS\b/i, { type: "lowercase" });
- parser.addHandler("language", /\bNL\b/, { type: "lowercase" });
- parser.addHandler("language", /\bFLEMISH\b/, { type: "lowercase" });
- parser.addHandler("language", /\bGERMAN\b/, { type: "lowercase" });
- parser.addHandler("language", /\bDUBBED\b/, { type: "lowercase" });
- parser.addHandler("language", /\b(ITA(?:LIAN)?|iTALiAN)\b/, { value: "ita" });
- parser.addHandler("language", /\bFR(?:ENCH)?\b/, { type: "lowercase" });
- parser.addHandler("language", /\bTruefrench|VF(?:[FI])\b/i, { type: "lowercase" });
- parser.addHandler("language", /\bVOST(?:(?:F(?:R)?)|A)?|SUBFRENCH\b/i, { type: "lowercase" });
- parser.addHandler("language", /\bMULTi(?:Lang|-VF2)?\b/i, { type: "lowercase" });
-};
diff --git a/backend/parsers/torrent-name-parser-one/src/parser.js b/backend/parsers/torrent-name-parser-one/src/parser.js
deleted file mode 100644
index 7875a5784..000000000
--- a/backend/parsers/torrent-name-parser-one/src/parser.js
+++ /dev/null
@@ -1,116 +0,0 @@
-function extendOptions(options) {
- options = options || {};
-
- const defaultOptions = {
- skipIfAlreadyFound: true,
- type: "string",
- };
-
- options.skipIfAlreadyFound = options.skipIfAlreadyFound || defaultOptions.skipIfAlreadyFound;
- options.type = options.type || defaultOptions.type;
-
- return options;
-}
-
-function createHandlerFromRegExp(name, regExp, options) {
- let transformer;
-
- if (!options.type) {
- transformer = input => input;
- } else if (options.type.toLowerCase() === "lowercase") {
- transformer = input => input.toLowerCase();
- } else if (options.type.toLowerCase().slice(0, 4) === "bool") {
- transformer = () => true;
- } else if (options.type.toLowerCase().slice(0, 3) === "int") {
- transformer = input => parseInt(input, 10);
- } else {
- transformer = input => input;
- }
-
- function handler({ title, result }) {
- if (result[name] && options.skipIfAlreadyFound) {
- return null;
- }
-
- const match = title.match(regExp);
- const [rawMatch, cleanMatch] = match || [];
-
- if (rawMatch) {
- result[name] = options.value || transformer(cleanMatch || rawMatch);
- return match.index;
- }
-
- return null;
- }
-
- handler.handlerName = name;
-
- return handler;
-}
-
-function cleanTitle(rawTitle) {
- let cleanedTitle = rawTitle;
-
- if (cleanedTitle.indexOf(" ") === -1 && cleanedTitle.indexOf(".") !== -1) {
- cleanedTitle = cleanedTitle.replace(/\./g, " ");
- }
-
- cleanedTitle = cleanedTitle.replace(/_/g, " ");
- cleanedTitle = cleanedTitle.replace(/([(_]|- )$/, "").trim();
-
- return cleanedTitle;
-}
-
-class Parser {
-
- constructor() {
- this.handlers = [];
- }
-
- addHandler(handlerName, handler, options) {
- if (typeof handler === "undefined" && typeof handlerName === "function") {
-
- // If no name is provided and a function handler is directly given
- handler = handlerName;
- handler.handlerName = "unknown";
-
- } else if (typeof handlerName === "string" && handler instanceof RegExp) {
-
- // If the handler provided is a regular expression
- options = extendOptions(options);
- handler = createHandlerFromRegExp(handlerName, handler, options);
-
- } else if (typeof handler === "function") {
-
- // If the handler is a function
- handler.handlerName = handlerName;
-
- } else {
-
- // If the handler is neither a function nor a regular expression, throw an error
- throw new Error(`Handler for ${handlerName} should be a RegExp or a function. Got: ${typeof handler}`);
-
- }
-
- this.handlers.push(handler);
- }
-
- parse(title) {
- const result = {};
- let endOfTitle = title.length;
-
- for (const handler of this.handlers) {
- const matchIndex = handler({ title, result });
-
- if (matchIndex && matchIndex < endOfTitle) {
- endOfTitle = matchIndex;
- }
- }
-
- result.title = cleanTitle(title.slice(0, endOfTitle));
-
- return result;
- }
-}
-
-exports.Parser = Parser;
diff --git a/backend/parsers/torrent-name-parser-two/core.js b/backend/parsers/torrent-name-parser-two/core.js
deleted file mode 100644
index 33528a007..000000000
--- a/backend/parsers/torrent-name-parser-two/core.js
+++ /dev/null
@@ -1,36 +0,0 @@
-'use strict';
-
-var EventEmitter = require('events').EventEmitter;
-
-var Core = function() {
- EventEmitter.call(this);
-
- var parts;
-
- this.getParts = function() {
- return parts;
- };
-
- this.on('setup', function () {
- parts = {};
- });
-
- this.on('part', function (part) {
- parts[part.name] = part.clean;
- });
-};
-
-Core.prototype = Object.create(EventEmitter.prototype);
-Core.prototype.constructor = EventEmitter;
-
-Core.prototype.exec = function(name) {
- this.emit('setup', {
- name: name
- });
- this.emit('start');
- this.emit('end');
-
- return this.getParts();
-};
-
-module.exports = new Core();
diff --git a/backend/parsers/torrent-name-parser-two/index.js b/backend/parsers/torrent-name-parser-two/index.js
deleted file mode 100644
index 500a4d93d..000000000
--- a/backend/parsers/torrent-name-parser-two/index.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-require('./parts/common');
-require('./parts/title');
-require('./parts/excess');
-
-module.exports = function(name) {
- return require('./core').exec(name);
-};
diff --git a/backend/parsers/torrent-name-parser-two/parts/common.js b/backend/parsers/torrent-name-parser-two/parts/common.js
deleted file mode 100644
index 794db42e9..000000000
--- a/backend/parsers/torrent-name-parser-two/parts/common.js
+++ /dev/null
@@ -1,107 +0,0 @@
-'use strict';
-
-var core = require('../core');
-
-/**
- * Pattern should contain either none or two capturing groups.
- * In case of two groups - 1st is raw, 2nd is clean.
- */
-var patterns = {
- season: /([Ss]?([0-9]{1,2}))[Eex]/,
- episode: /([Eex]([0-9]{2})(?:[^0-9]|$))/,
- year: /([\[\(]?((?:19[0-9]|20[01])[0-9])[\]\)]?)/,
- resolution: /(([0-9]{3,4}p))[^M]/,
- quality: /(?:PPV\.)?[HP]DTV|(?:HD)?CAM|B[rR]Rip|TS|(?:PPV )?WEB-?DL(?: DVDRip)?|H[dD]Rip|DVDRip|DVDRiP|DVDRIP|CamRip|W[EB]B[rR]ip|[Bb]lu[Rr]ay|DvDScr|hdtv/,
- codec: /xvid|x264|h\.?264/i,
- audio: /MP3|DD5\.?1|Dual[\- ]Audio|LiNE|DTS|AAC(?:\.?2\.0)?|AC3(?:\.5\.1)?/,
- group: /(- ?([^-]+(?:-={[^-]+-?$)?))$/,
- region: /R[0-9]/,
- extended: /EXTENDED/,
- hardcoded: /HC/,
- proper: /PROPER/,
- repack: /REPACK/,
- container: /MKV|AVI/,
- widescreen: /WS/,
- website: /^(\[ ?([^\]]+?) ?\])/,
- language: /rus\.eng/,
- garbage: /1400Mb|3rd Nov| ((Rip))/
-};
-var types = {
- season: 'integer',
- episode: 'integer',
- year: 'integer',
- extended: 'boolean',
- hardcoded: 'boolean',
- proper: 'boolean',
- repack: 'boolean',
- widescreen: 'boolean'
-};
-var torrent;
-
-core.on('setup', function (data) {
- torrent = data;
-});
-
-core.on('start', function() {
- var key, match, index, clean, part;
-
- for(key in patterns) {
- if(patterns.hasOwnProperty(key)) {
- if(!(match = torrent.name.match(patterns[key]))) {
- continue;
- }
-
- index = {
- raw: match[1] ? 1 : 0,
- clean: match[1] ? 2 : 0
- };
-
- if(types[key] && types[key] === 'boolean') {
- clean = true;
- }
- else {
- clean = match[index.clean];
-
- if(types[key] && types[key] === 'integer') {
- clean = parseInt(clean, 10);
- }
- }
-
- if(key === 'group') {
- if(clean.match(patterns.codec) || clean.match(patterns.quality)) {
- continue;
- }
-
- if(clean.match(/[^ ]+ [^ ]+ .+/)) {
- key = 'episodeName';
- }
- }
-
- part = {
- name: key,
- match: match,
- raw: match[index.raw],
- clean: clean
- };
-
- if(key === 'episode') {
- core.emit('map', torrent.name.replace(part.raw, '{episode}'));
- }
-
- core.emit('part', part);
- }
- }
-
- core.emit('common');
-});
-
-core.on('late', function (part) {
- if(part.name === 'group') {
- core.emit('part', part);
- }
- else if(part.name === 'episodeName') {
- part.clean = part.clean.replace(/[\._]/g, ' ');
- part.clean = part.clean.replace(/_+$/, '').trim();
- core.emit('part', part);
- }
-});
diff --git a/backend/parsers/torrent-name-parser-two/parts/excess.js b/backend/parsers/torrent-name-parser-two/parts/excess.js
deleted file mode 100644
index c7f05143d..000000000
--- a/backend/parsers/torrent-name-parser-two/parts/excess.js
+++ /dev/null
@@ -1,69 +0,0 @@
-'use strict';
-
-var core = require('../core');
-
-var torrent, raw, groupRaw;
-var escapeRegex = function(string) {
- return string.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&');
-};
-
-core.on('setup', function (data) {
- torrent = data;
- raw = torrent.name;
- groupRaw = '';
-});
-
-core.on('part', function (part) {
- if(part.name === 'excess') {
- return;
- }
- else if(part.name === 'group') {
- groupRaw = part.raw;
- }
-
- // remove known parts from the excess
- raw = raw.replace(part.raw, '');
-});
-
-core.on('map', function (map) {
- torrent.map = map;
-});
-
-core.on('end', function () {
- var clean, groupPattern, episodeNamePattern;
-
- // clean up excess
- clean = raw.replace(/(^[-\. ]+)|([-\. ]+$)/g, '');
- clean = clean.replace(/[\(\)\/]/g, ' ');
- clean = clean.split(/\.\.+| +/).filter(Boolean);
-
- if(clean.length !== 0) {
- groupPattern = escapeRegex(clean[clean.length - 1] + groupRaw) + '$';
-
- if(torrent.name.match(new RegExp(groupPattern))) {
- core.emit('late', {
- name: 'group',
- clean: clean.pop() + groupRaw
- });
- }
-
- if(torrent.map && clean[0]) {
- episodeNamePattern = '{episode}' + escapeRegex(clean[0].replace(/_+$/, ''));
-
- if(torrent.map.match(new RegExp(episodeNamePattern))) {
- core.emit('late', {
- name: 'episodeName',
- clean: clean.shift()
- });
- }
- }
- }
-
- if(clean.length !== 0) {
- core.emit('part', {
- name: 'excess',
- raw: raw,
- clean: clean.length === 1 ? clean[0] : clean
- });
- }
-});
diff --git a/backend/parsers/torrent-name-parser-two/parts/title.js b/backend/parsers/torrent-name-parser-two/parts/title.js
deleted file mode 100644
index e59d516a6..000000000
--- a/backend/parsers/torrent-name-parser-two/parts/title.js
+++ /dev/null
@@ -1,51 +0,0 @@
-'use strict';
-
-var core = require('../core');
-
-require('./common');
-
-var torrent, start, end, raw;
-
-core.on('setup', function (data) {
- torrent = data;
- start = 0;
- end = undefined;
- raw = undefined;
-});
-
-core.on('part', function (part) {
- if(!part.match) {
- return;
- }
-
- if(part.match.index === 0) {
- start = part.match[0].length;
-
- return;
- }
-
- if(!end || part.match.index < end) {
- end = part.match.index;
- }
-});
-
-core.on('common', function () {
- var raw = end ? torrent.name.substr(start, end - start).split('(')[0] : torrent.name;
- var clean = raw;
-
- // clean up title
- clean = raw.replace(/^ -/, '');
-
- if(clean.indexOf(' ') === -1 && clean.indexOf('.') !== -1) {
- clean = clean.replace(/\./g, ' ');
- }
-
- clean = clean.replace(/_/g, ' ');
- clean = clean.replace(/([\(_]|- )$/, '').trim();
-
- core.emit('part', {
- name: 'title',
- raw: raw,
- clean: clean
- });
-});
diff --git a/backend/plugins/checkOrigin.js b/backend/plugins/checkOrigin.js
deleted file mode 100644
index d97117701..000000000
--- a/backend/plugins/checkOrigin.js
+++ /dev/null
@@ -1,8 +0,0 @@
-module.exports = function (origin){
- var allowedOrigins = process.env.FRONTENDURL.split(",");
- if (origin && allowedOrigins.indexOf(origin) > -1){
- return true
- } else {
- return false
- }
-}
diff --git a/backend/plugins/deleteAll.js b/backend/plugins/deleteAll.js
deleted file mode 100644
index 685dac0fb..000000000
--- a/backend/plugins/deleteAll.js
+++ /dev/null
@@ -1,13 +0,0 @@
-const deleteUsers = require('./deleteUsers');
-const deletePendingUsers = require('./deletePendingUsers');
-const deleteInvitedUsers = require('./deleteInvitedUsers');
-
-function deleteAll() {
- setInterval(async () => {
- await deleteUsers();
- await deletePendingUsers();
- await deleteInvitedUsers();
- }, (7200 * 1000))
-}
-
-module.exports = deleteAll;
diff --git a/backend/plugins/deleteInvitedUsers.js b/backend/plugins/deleteInvitedUsers.js
deleted file mode 100644
index c3ffe5152..000000000
--- a/backend/plugins/deleteInvitedUsers.js
+++ /dev/null
@@ -1,37 +0,0 @@
-const transport = require('./mailtransporter');
-const InvitedUser = require("../models/invitedUser");
-const toInvitedUserEmail = require('../templates/delete/invitedUsers/toAll');
-
-function deleteInvitedUsers() {
- console.log("Triggered Verification Check")
- InvitedUser.find({}, function(error, result){
- if(result){
- result.forEach((user, i) => {
- const currentTime = Date.now();
- const allowedTill = user.pendingFrom + (86400*1000);
- if(currentTime > allowedTill){
- InvitedUser.deleteOne({ email: user.email }, function(error){
- if(!error){
- const deleteMessage = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: user.invitedby,
- replyTo: process.env.REPLYTOMAIL,
- subject: `Regarding Your Invite to ${user.email}`,
- html: toInvitedUserEmail(user),
- };
- } else {
- console.log("Some Error While Trying to Deleting, Will be Deleted in Next Cycle.")
- }
- })
- } else {
- console.log("You Got Some Time Left")
- }
- });
-
- } else {
- console.log("No Invited Users")
- }
- })
-}
-
-module.exports = deleteInvitedUsers;
diff --git a/backend/plugins/deletePendingUsers.js b/backend/plugins/deletePendingUsers.js
deleted file mode 100644
index 8e70fbb81..000000000
--- a/backend/plugins/deletePendingUsers.js
+++ /dev/null
@@ -1,43 +0,0 @@
-const transport = require('./mailtransporter');
-const PendingUser = require("../models/pendingUser");
-const deletePendingUserTemplate = require('../templates/delete/pending/toAll');
-
-function deletePendingUsers() {
- console.log("Triggered Verification Check")
- PendingUser.find({}, function(error, result){
- if(result){
- result.forEach((user, i) => {
- const currentTime = Date.now();
- const allowedTill = user.pendingFrom + (86400*1000);
- if(currentTime > allowedTill){
- PendingUser.deleteOne({ email: user.email }, function(error){
- if(!error){
- const deleteMessage = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: user.email,
- replyTo: process.env.REPLYTOMAIL,
- subject: 'Regarding Your Request',
- html: deletePendingUserTemplate(user),
- };
- transport.sendMail(deleteMessage, function(err, info){
- if(err){
- console.log(err);
- } else {
- console.log(info)
- }
- })
- } else {
- console.log("Some Error While Trying to Deleting, Will be Deleted in Next Cycle.")
- }
- })
- } else {
- console.log("You Got Some Time Left")
- }
- });
- } else {
- console.log("No Pending Users")
- }
- })
-}
-
-module.exports = deletePendingUsers
diff --git a/backend/plugins/deleteUsers.js b/backend/plugins/deleteUsers.js
deleted file mode 100644
index 2ed4036dc..000000000
--- a/backend/plugins/deleteUsers.js
+++ /dev/null
@@ -1,44 +0,0 @@
-const transport = require('./mailtransporter');
-const User = require("../models/user");
-const nonVerfiedEmailTemplate = require('../templates/delete/users/toNonVerified.js');
-
-function deleteTimeout() {
- console.log("Triggered Verification Check")
- User.find({ verified: false }, function(error, result){
- if(result){
- result.forEach((user, i) => {
- const currentDate = Date.now();
- const expiryDate = user.registeredDate + (10800 * 1000);
- console.log(currentDate, expiryDate);
- if(currentDate > expiryDate){
- User.deleteOne({ email: user.email }, function(error){
- if(error){
- console.log(error)
- } else {
- const deleteMessage = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: user.email,
- replyTo: process.env.REPLYTOMAIL,
- subject: 'Deletion of Your Account.',
- html: nonVerfiedEmailTemplate(user), // Plain text body
- };
- transport.sendMail(deleteMessage, function(err, info){
- if(err){
- console.log(err);
- } else {
- console.log(info)
- }
- })
- }
- })
- } else {
- console.log("You Got Time to Get Verified.")
- }
- });
- } else {
- console.log("All Users are Verified.")
- }
- })
-}
-
-module.exports = deleteTimeout;
diff --git a/backend/plugins/jwtVerify.js b/backend/plugins/jwtVerify.js
deleted file mode 100644
index 39f54bd85..000000000
--- a/backend/plugins/jwtVerify.js
+++ /dev/null
@@ -1,17 +0,0 @@
-const jwt = require("jsonwebtoken");
-
-function verify(token){
- if(token){
- return jwt.verify(token, process.env.TOKENSECRET, function(error, decoded){
- if(decoded){
- return true
- } else {
- return false
- }
- });
- } else {
- return false
- }
-}
-
-module.exports = verify
diff --git a/backend/plugins/keepAlive.js b/backend/plugins/keepAlive.js
deleted file mode 100644
index d80361ae3..000000000
--- a/backend/plugins/keepAlive.js
+++ /dev/null
@@ -1,20 +0,0 @@
-// Keep Site Online By Pinging every 25 Minutes.
-const site = process.env.SITE;
-const axios = require('axios');
-
-function keepalive() {
- if (site) {
- try {
- setInterval(async () => {
- const data = await axios.get(site);
- console.log(data.config.url, "status:"+''+ data.status , "Text:"+' '+data.statusText);
- }, 1560000);
- } catch(e) {
- console.log(e);
- }
- } else {
- console.warn("Set site env var");
- }
-}
-
-module.exports = keepalive;
diff --git a/backend/plugins/mailtransporter.js b/backend/plugins/mailtransporter.js
deleted file mode 100644
index b55117463..000000000
--- a/backend/plugins/mailtransporter.js
+++ /dev/null
@@ -1,14 +0,0 @@
-const nodemailer = require('nodemailer');
-
-// Define Mail Transporter
-let transport = nodemailer.createTransport({
- host: process.env.EMAILSMTP,
- port: process.env.EMAILPORT,
- service:process.env.EMAILSERVICE,
- auth: {
- user: process.env.EMAILID,
- pass: process.env.EMAILPASS
- }
-});
-
-module.exports = transport;
diff --git a/backend/public/css/styles.css b/backend/public/css/styles.css
deleted file mode 100644
index 842160328..000000000
--- a/backend/public/css/styles.css
+++ /dev/null
@@ -1,22 +0,0 @@
-.bd-placeholder-img {
- font-size: 1.125rem;
- text-anchor: middle;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
-}
-
-@media (min-width: 768px) {
- .bd-placeholder-img-lg {
- font-size: 3.5rem;
- }
-}
-
-.data {
- text-align: center;
-}
-
-.lead {
- font-weight: bold;
-}
diff --git a/backend/routes/approve/index.js b/backend/routes/approve/index.js
deleted file mode 100644
index ba2b14bb5..000000000
--- a/backend/routes/approve/index.js
+++ /dev/null
@@ -1,229 +0,0 @@
-const express = require("express");
-const router = express.Router();
-const transport = require('../../plugins/mailtransporter')
-const bcrypt = require("bcrypt");
-const checkOrigin = require("../../plugins/checkOrigin");
-const jwtVerify = require('../../plugins/jwtVerify');
-const verifiedUserTemplate = require('../../templates/register/toVerifiedUser');
-const promotedUserTemplate = require('../../templates/register/toPromotedUsers');
-
-//Model Imports
-const User = require("../../models/user");
-const PendingUser = require("../../models/pendingUser");
-const InvitedUser = require("../../models/invitedUser");
-
-router.post('/otp', function(req, res){
- if(checkOrigin(req.headers.origin)){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- var tempPassIsThere = result.temppassword != null ? true : false;
- var passNotThere = result.password == null ? true : false;
- if(tempPassIsThere && passNotThere){
- if(req.body.otp && req.body.otp != null && result.temppassword && result.temppassword != null){
- bcrypt.compare(req.body.otp, result.temppassword, function(err, synced){
- if(synced){
- var newPass = req.body.newpassword;
- bcrypt.hash(newPass, 10, function(err, hashedPass){
- if(hashedPass){
- User.updateOne({ email: req.body.email }, {$set: { password: hashedPass, temppassword: null, verified: true }}, function(error){
- if(!error){
- const otpMessage = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: req.body.email,
- bcc: process.env.ADMINEMAIL,
- replyTo: process.env.REPLYTOMAIL,
- subject: 'Account Verified',
- html: verifiedUserTemplate(result)
- };
- transport.sendMail(otpMessage, function(err, info){
- if(err){
- console.log(err);
- } else {
- console.log(info);
- }
- });
- res.status(200).send({ auth: true, registered: true, changed: true, message: `Your email ${req.body.email} has been Verified.`});
- } else {
- res.status(200).send({ auth: true, registered: true, changed: false, message: 'Error While Changing password'})
- }
- })
- } else {
- res.status(200).send({ auth: true, registered: true, changed: false, message: 'Error While Hashing Password, Please Try Again Now.'})
- }
- })
- } else {
- res.status(200).send({ auth: true, registered: true, changed: false, message: "Wrong OTP" })
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: true, token: null, message: "Password is Null. Please Enter Your Password" });
- }
- } else {
- res.status(200).send({ auth: true, registered: true, changed: false, message: "It Looks Like You Already Have been Verified" })
- }
- } else {
- res.status(200).send({ auth: false, registered: false, changed: false, message: "Bad Request" })
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-});
-
-router.post('/admin', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- PendingUser.findOne({ email: req.body.email, post: "Admin" }, function(error, result){
- if(result){
- User.findOne({ email: req.body.adminuseremail }, function(error, result){
- if(result){
- if(result.admin && result.superadmin){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- if(result.superadmin){
- res.status(200).send({ auth: true, changed: false, message: "User is Already a Super Admin" });
- } else if(result.admin) {
- res.status(200).send({ auth: true, changed: false, message: "User is Already a Admin" });
- } else {
- User.updateOne({ email: req.body.email }, { $set: { admin: true, role: "Admin" } }, function(error){
- if(!error){
- const promoteMessage = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: req.body.email,
- bcc: req.body.ADMINEMAIL,
- replyTo: process.env.REPLYTOMAIL,
- subject: 'Account Promoted to Admin Status.',
- html: promotedUserTemplate(result, req.body.adminuseremail, "Admin")
- };
- transport.sendMail(promoteMessage, function(error, info){
- if(error){
- console.log(error);
- } else {
- console.log(info);
- }
- })
- InvitedUser.deleteOne({ email: req.body.email, post: "Admin" }, function(error){
- if(error){
- console.log(error)
- } else {
- console.log("Not Found");
- }
- })
- PendingUser.deleteOne({ email: req.body.email, post: "Admin" }, function(error){
- if(error){
- console.log(error)
- } else {
- console.log("Not Found");
- }
- })
- res.status(200).send({ auth: true, registered: true, changed: true, message: "User has been Promoted to Admin" });
- } else {
- res.status(200).send({ auth: true, registered: true, changed: false, message: "Some Error Pinging the Servers. Try Again Later." });
- }
- })
- }
- } else {
- res.status(200).send({ auth: true, registered: true, changed: false, message: "No User Found with this Email" });
- }
- });
- } else {
- res.status(200).send({ auth: false, registered: false, changed: false, message: "You are Unauthorized" });
- }
- } else {
- res.status(200).send({ auth: false, registered: false, changed: false, message: "BAD REQUEST" });
- }
- })
- } else {
- res.status(200).send({ auth: true, changed: false, message: "A User has to Specifically Request to Become a Admin to Promote Him. This is to Ensure Participation from Both Sides." });
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-});
-
-router.post('/superadmin', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- PendingUser.findOne({ email: req.body.email, post: "SuperAdmin" }, function(error, result){
- if(result){
- User.findOne({ email: req.body.adminuseremail }, function(error, result){
- if(result){
- if(result.admin && result.superadmin){
- if(result.temprestricted){
- res.status(200).send({ auth: false, registered: true, changed: false, message: "You Have been Temporarily Restricted from Modifying Permissions of Users." });
- } else {
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- if(result.admin){
- if(result.superadmin){
- res.status(200).send({ auth: true, registered: true, changed: false, message: "User is already a Super Admin" });
- } else {
- User.updateOne({ email: req.body.email }, { $set: { superadmin: true, role: "Super Admin" } }, function(error){
- if(error){
- res.status(200).send({ auth: true, registered: true, changed: false, message: "Some Error Pinging the Servers. Try Again Later." });
- } else {
- const promoteMessage = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: req.body.email,
- bcc: req.body.ADMINEMAIL,
- replyTo: process.env.REPLYTOMAIL,
- subject: 'Account Promoted to Super Admin Status.',
- html: promotedUserTemplate(result, req.body.adminuseremail, "Super Admin")
- };
- transport.sendMail(promoteMessage, function(error, info){
- if(error){
- console.log(error);
- } else {
- console.log(info);
- }
- });
- InvitedUser.deleteOne({ email: req.body.email, post: "SuperAdmin" }, function(error){
- if(error){
- console.log(error)
- } else {
- console.log("Not Found");
- }
- })
- PendingUser.deleteOne({ email: req.body.email, post: "SuperAdmin" }, function(error){
- if(error){
- console.log(error)
- } else {
- console.log(error)
- }
- })
- res.status(200).send({ auth: true, registered: true, changed: true, message: "User has been Promoted to Super Admin" });
- }
- })
- }
- } else {
- res.status(200).send({ auth: true, registered: true, changed: false, message: "User Should be a Admin to be Promoted to Super Admin" });
- }
- } else {
- res.status(200).send({ auth: true, registered: false, changed: false, message: "No User Found with this Email" });
- }
- })
- }
- } else {
- res.status(200).send({ auth: false, registered: false, changed: false, message: "You are Unauthorized" });
- }
- } else {
- res.status(200).send({ auth: false, token: false, registered: false, changed: false, message: "BAD REQUEST" });
- }
- })
- } else {
- res.status(200).send({ auth: true, changed: false, message: "A User has to Specifically Request to Become a Super Admin to Promote Him. This is to Ensure Participation from Both Sides." });
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-module.exports = router;
diff --git a/backend/routes/delete.js b/backend/routes/delete.js
deleted file mode 100644
index 1659dde74..000000000
--- a/backend/routes/delete.js
+++ /dev/null
@@ -1,122 +0,0 @@
-const express = require("express");
-const router = express.Router();
-const transport = require('../plugins/mailtransporter');
-const bcrypt = require("bcrypt");
-const checkOrigin = require("../plugins/checkOrigin");
-const jwtVerify = require('../plugins/jwtVerify');
-const deleteMailTemplate = require("../templates/delete/users/toUsers");
-
-//Model Imports
-const User = require("../models/user");
-
-router.post('/user', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.adminuseremail }, function(error, result){
- if(result){
- if(result.admin){
- if(result.temprestricted){
- res.status(200).send({ auth: false, registered: true, deleted: false, message: "You Have been Temporarily Restricted from Modifying Permissions of Users." });
- } else {
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- if(result.admin){
- res.status(200).send({ auth: false, registered: true, deleted: false, message: "You are Trying to Remove a Admin. Permission Scope Not there." });
- } else {
- User.deleteOne({ email: req.body.email }, function(error){
- if(error){
- res.status(200).send({ auth: true, registered: true, deleted: false, message: "Some Error Pinging the Servers. Try Again Later." });
- } else {
- const deleteMessage = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`, // Sender address
- to: req.body.email,
- bcc: req.body.ADMINEMAIL,
- replyTo: process.env.REPLYTOMAIL,
- subject: 'Account has been Deleted.',
- html: deleteMailTemplate(result, req.body.ADMINEMAIL)
- };
- transport.sendMail(deleteMessage, function(error, info){
- if(error){
- console.log(error);
- } else {
- console.log(info);
- }
- })
- res.status(200).send({ auth: true, registered: true, deleted: true, message: "User has been deleted" });
- }
- })
- }
- } else {
- res.status(200).send({ auth: true, registered: true, deleted: false, message: "No User Found with this Email" });
- }
- })
- }
- } else {
- res.status(200).send({ auth: false, registered: false, deleted: false, message: "You are Unauthorized" });
- }
- } else {
- res.status(200).send({ auth: false, registered: false, deleted: false, message: "BAD REQUEST" });
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-});
-
-router.post('/admin', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.adminuseremail }, function(error, result){
- if(result){
- if(result.admin && result.superadmin){
- if(result.temprestricted){
- res.status(200).send({ auth: false, registered: true, deleted: false, message: "You Have been Temporarily Restricted from Modifying Permissions of Users." });
- } else {
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- User.deleteOne({ email: req.body.email }, function(error){
- if(error){
- res.status(200).send({ auth: true, token: true, registered: true, deleted: false, message: "Some Error Pinging the Servers. Try Again Later." });
- } else {
- const deleteMessage = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: req.body.email,
- bcc: req.body.ADMINEMAIL,
- replyTo: process.env.REPLYTOMAIL,
- subject: 'Account has been Deleted.',
- html: deleteMailTemplate(result, req.body.ADMINEMAIL)
- };
- transport.sendMail(deleteMessage, function(error, info){
- if(error){
- console.log(error);
- } else {
- console.log(info);
- }
- });
- res.status(200).send({ auth: true, registered: true, deleted: true, message: "User has been deleted" });
- }
- })
- } else {
- res.status(200).send({ auth: true, registered: true, deleted: false, message: "No User Found with this Email" });
- }
- })
- }
- } else {
- res.status(200).send({ auth: false, registered: false, deleted: false, message: "You are Unauthorized" });
- }
- } else {
- res.status(200).send({ auth: false, registered: false, deleted: false, message: "BAD REQUEST" });
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-module.exports = router;
diff --git a/backend/routes/get.js b/backend/routes/get.js
deleted file mode 100644
index 1d842499d..000000000
--- a/backend/routes/get.js
+++ /dev/null
@@ -1,209 +0,0 @@
-const express = require("express");
-const router = express.Router();
-const checkOrigin = require("../plugins/checkOrigin");
-const jwtVerify = require('../plugins/jwtVerify');
-
-//Model Imports
-const User = require("../models/user");
-const PendingUser = require("../models/pendingUser");
-const SpamUser = require("../models/spamUser");
-const InvitedUser = require("../models/invitedUser");
-const Settings = require("../models/siteSettings");
-
-router.post('/all', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- if(result.admin){
- if(result.superadmin){
- User.find({}, function(error, result){
- if(result){
- if(result.length == 0){
- res.status(200).send({ auth: false, registered: false, message: "No Users Found" });
- } else {
- const filteredUsers = result.filter(user => {
- return user.email != req.body.email;
- })
- const secureUsers = filteredUsers.map(item => {
- return {
- name: item['name'],
- email: item['email'],
- admin: item['admin'],
- superadmin: item['superadmin'],
- verified: item['verified'],
- role: item['role']
- }
- })
- res.status(200).send({ auth: true, registered: true, users: secureUsers });
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "Error Processing Your Request" });
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: false, message: "You are Unauthorized" });
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "You are Unauthorized" });
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" });
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.post('/users', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- if(result.admin){
- User.find({ admin: false, superadmin: false }, function(error, result){
- if(result){
- if(result.length == 0){
- res.status(200).send({ auth: false, registered: false, message: "No Users Found" });
- } else {
- const filteredUsers = result.filter(user => {
- return user.email != req.body.email;
- });
- const secureUsers = filteredUsers.map(item => {
- return {
- name: item['name'],
- email: item['email'],
- admin: item['admin'],
- superadmin: item['superadmin'],
- verified: item['verified'],
- role: item['role']
- }
- })
- res.status(200).send({ auth: true, registered: true, users: secureUsers });
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "Error Processing Your Request" });
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: false, message: "You are Unauthorized" });
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" });
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.post('/admins', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- if(result.admin){
- if(result.superadmin){
- User.find({ admin: true, superadmin: false }, function(error, result){
- if(result){
- if(result.length == 0){
- res.status(200).send({ auth: false, registered: false, message: "No Users Found" });
- } else {
- const filteredUsers = result.filter(user => {
- return user.email != req.body.email;
- });
- const secureUsers = filteredUsers.map(item => {
- return {
- name: item['name'],
- email: item['email'],
- admin: item['admin'],
- superadmin: item['superadmin'],
- verified: item['verified'],
- role: item['role']
- }
- })
- res.status(200).send({ auth: true, registered: true, users: secureUsers });
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "Error Processing Your Request" });
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: false, message: "You are Unauthorized" });
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "You are Unauthorized" });
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" });
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.post('/superadmins', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- if(result.admin){
- if(result.superadmin){
- User.find({ admin: true, superadmin: true }, function(error, result){
- if(result){
- if(result.length == 0){
- res.status(200).send({ auth: false, registered: false, message: "No Users Found" });
- } else {
- const filteredUsers = result.filter(user => {
- return user.email != req.body.email;
- });
- const secureUsers = filteredUsers.map(item => {
- return {
- name: item['name'],
- email: item['email'],
- admin: item['admin'],
- superadmin: item['superadmin'],
- verified: item['verified'],
- role: item['role']
- }
- })
- res.status(200).send({ auth: true, registered: true, users: secureUsers });
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "Error Processing Your Request" });
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: false, message: "You are Unauthorized" });
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "You are Unauthorized" });
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" });
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.use('/pending', require('./pending'));
-router.use('/spam', require('./getspam'));
-
-
-module.exports = router;
diff --git a/backend/routes/getspam/index.js b/backend/routes/getspam/index.js
deleted file mode 100644
index 325d730ac..000000000
--- a/backend/routes/getspam/index.js
+++ /dev/null
@@ -1,151 +0,0 @@
-const express = require("express");
-const router = express.Router();
-const checkOrigin = require("../../plugins/checkOrigin");
-const jwtVerify = require('../../plugins/jwtVerify');
-
-//Model Imports
-const User = require("../../models/user");
-const SpamUser = require("../../models/spamUser");
-
-router.post('/all', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.adminuseremail }, function(error, result){
- if(result){
- if(result.admin){
- if(result.superadmin){
- SpamUser.find({}, function(error, result){
- if(result){
- if(result.length == 0){
- res.status(200).send({ auth: false, registered: true, message: "No Users Found" })
- } else {
- res.status(200).send({ auth: true, registered: true, users: result })
- }
- } else {
- res.status(200).send({ auth: false, registered: true, message: "No Users Found." })
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: true, message: "You are Unauthorized" })
- }
- } else {
- res.status(200).send({ auth: false, registered: true, message: "You are Unauthorized" })
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" })
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- };
-})
-
-router.post('/users', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.adminuseremail }, function(error, result){
- if(result){
- if(result.admin){
- SpamUser.find({ post: "User"}, function(error, result){
- if(result){
- if(result.length == 0){
- res.status(200).send({ auth: false, registered: true, message: "No Users Found" })
- } else {
- res.status(200).send({ auth: true, registered: true, users: result })
- }
- } else {
- res.status(200).send({ auth: false, registered: true, message: "No Users Found." })
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: true, message: "You are Unauthorized" })
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" })
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.post('/admins', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.adminuseremail }, function(error, result){
- if(result){
- if(result.admin){
- if(result.superadmin){
- SpamUser.find({ post: "Admin"}, function(error, result){
- if(result){
- if(result.length == 0){
- res.status(200).send({ auth: false, registered: true, message: "No Users Found" })
- } else {
- res.status(200).send({ auth: true, registered: true, users: result })
- }
- } else {
- res.status(200).send({ auth: false, registered: true, message: "No Users Found." })
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: true, message: "You are Unauthorized" })
- }
- } else {
- res.status(200).send({ auth: false, registered: true, message: "You are Unauthorized" })
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" })
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.post('/superadmins', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.adminuseremail }, function(error, result){
- if(result){
- if(result.admin){
- if(result.superadmin){
- SpamUser.find({ post: "SuperAdmin"}, function(error, result){
- if(result){
- if(result.length == 0){
- res.status(200).send({ auth: false, registered: true, message: "No Users Found" })
- } else {
- res.status(200).send({ auth: true, registered: true, users: result })
- }
- } else {
- res.status(200).send({ auth: false, registered: true, message: "No Users Found." })
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: true, message: "You are Unauthorized" })
- }
- } else {
- res.status(200).send({ auth: false, registered: true, message: "You are Unauthorized" })
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" })
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-
-module.exports = router;
diff --git a/backend/routes/index.js b/backend/routes/index.js
deleted file mode 100644
index 536fd4b76..000000000
--- a/backend/routes/index.js
+++ /dev/null
@@ -1,64 +0,0 @@
-const express = require('express');
-const router = express.Router();
-const bcrypt = require('bcrypt');
-
-//Model Imports
-const User = require("../models/user");
-const PendingUser = require("../models/pendingUser");
-const SpamUser = require("../models/spamUser");
-const InvitedUser = require("../models/invitedUser");
-const checkOrigin = require("../plugins/checkOrigin");
-
-router.get('/', function(req, res){
- User.findOne({ superadmin: true }, function(error, result){
- if(result){
- res.render("dashboard.ejs", { user: false, showPass: false, data: "This is a Backend for G-Index. This has Been Already Setup. So Nothing Exists Here Afterwards. Use Your Frontend to Communicate.", fronturl: process.env.FRONTENDURL.split(",")[0] });
- } else {
- res.render("signup.ejs");
- }
- })
-});
-
-router.get('/generate', function(req, res){
- res.render("generate.ejs");
-});
-
-router.post('/generate', function(req, res){
- bcrypt.hash(req.body.password, 10, function(err, hashedPass){
- if(hashedPass){
- res.render("dashboard.ejs", {user: false, showPass: true, hybrid: hashedPass})
- }
- })
-});
-
-router.post('/checkmail', function(req, res){
- if(checkOrigin(req.headers.origin)){
- SpamUser.findOne({ email: req.body.email }, function(err, result){
- if(result){
- res.status(200).send({ auth: false, user: false, status: "Spammed User" })
- } else {
- PendingUser.findOne({ email: req.body.email }, function(err ,result){
- if(result){
- res.status(200).send({ auth: false, user: false, status: "Pending Confirmation from Admins." })
- } else {
- User.findOne({ email: req.body.email }, function(err, result){
- if(result){
- if(result.verified){
- res.status(200).send({ auth: true, user: true, status: "User Present & Verified" })
- } else {
- res.status(200).send({ auth: false, user:true, status: "User Present & Not Verified" })
- }
- } else {
- res.status(200).send({ auth: false, user: false, status: "User Not Present" })
- }
- })
- }
- })
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-module.exports = router;
diff --git a/backend/routes/invite.js b/backend/routes/invite.js
deleted file mode 100644
index 4850b4565..000000000
--- a/backend/routes/invite.js
+++ /dev/null
@@ -1,227 +0,0 @@
-const express = require("express");
-const router = express.Router();
-const transport = require('../plugins/mailtransporter');
-const checkOrigin = require("../plugins/checkOrigin");
-const userInviteTemplate = require('../templates/invite/toUsers');
-const jwtVerify = require('../plugins/jwtVerify');
-
-//Model Imports
-const User = require("../models/user");
-const InvitedUser = require("../models/invitedUser");
-
-router.post('/user', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- InvitedUser.findOne({ email: req.body.email, post: "User" }, function(error, result){
- if(result){
- res.status(200).send({ auth: false, registered: true, message: 'User is Already Invited. Do not Send Another Time.'});
- } else {
- User.findOne({ email: req.body.adminuseremail }, function(error, result){
- if(result){
- if(result.admin){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- if(result.superadmin){
- res.status(200).send({ auth: false, registered: true, message: "User is Already Present & he is a Super Admin." })
- } else {
- if(result.admin){
- res.status(200).send({ auth: false, registered: true, message: "User is Already Present & he is a Admin." })
- } else {
- res.status(200).send({ auth: false, registered: true, message: "User is Already Present" })
- }
- }
- } else {
- const newInvitedAdmin = new InvitedUser({
- name: req.body.name,
- email: req.body.email,
- post: "User",
- message: req.body.message,
- invitedby: req.body.adminuseremail
- })
- newInvitedAdmin.save(function(error, doc){
- if(error){
- res.status(200).send({ auth: false, registered: true, message: "Error Processing Your Request." })
- } else {
- const message = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: req.body.email,
- replyTo: process.env.REPLYTOMAIL,
- subject: `You have been Invited to ${process.env.FRONTENDSITENAME}`,
- html: userInviteTemplate(doc, req.body.adminuseremail, "User", req.body.message)
- };
- transport.sendMail(message, function(err, info){
- if(err){
- console.log(err);
- } else {
- console.log(info);
- }
- })
- res.status(200).send({ auth: true, registered: true, message: 'An Invite Email has been Sent to his Email Address.'});
- }
- })
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: true, message: "You are Unauthorized" })
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" })
- }
- })
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.post('/admin', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- InvitedUser.findOne({ email: req.body.email, post: "Admin" }, function(error, result){
- if(result){
- res.status(200).send({ auth: false, registered: true, message: 'User is Already Invited. Do not Send Another Time.'});
- } else {
- User.findOne({ email: req.body.adminuseremail }, function(error, result){
- if(result){
- if(result.admin){
- if(result.superadmin){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- if(result.superadmin){
- res.status(200).send({ auth: false, registered: true, message: "User is Already a Super Admin." })
- } else {
- if(result.admin){
- res.status(200).send({ auth: false, registered: true, message: "User is Already a Admin." })
- } else {
- const newInvitedAdmin = new InvitedUser({
- name: result.name,
- email: result.email,
- post: "Admin",
- message: req.body.message,
- invitedby: req.body.adminuseremail
- })
- newInvitedAdmin.save(function(error, doc){
- if(error){
- res.status(200).send({ auth: false, registered: true, message: "Error Processing Your Request." })
- } else {
- const message = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: req.body.email,
- replyTo: process.env.REPLYTOMAIL,
- subject: 'You have been Invited for Admin Post',
- html: userInviteTemplate(doc, req.body.adminuseremail, "Admin", req.body.message)
- };
- transport.sendMail(message, function(err, info){
- if(err){
- console.log(err);
- } else {
- console.log(info);
- }
- })
- res.status(200).send({ auth: true, registered: true, message: 'An Invite Email has been Sent to his Email Address.'});
- }
- })
- }
- }
- } else {
- res.status(200).send({ auth: false, registered: true, message: "No User Found with This Email." })
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: true, message: "You are Unauthorized" })
- }
- } else {
- res.status(200).send({ auth: false, registered: true, message: "You are Unauthorized" })
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" })
- }
- })
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.post('/superadmin', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- InvitedUser.findOne({ email: req.body.email, post: "SuperAdmin"}, function(error,result){
- if(result){
- res.status(200).send({ auth: false, registered: true, message: 'User is Already Invited. Do not Send Another Time.'});
- } else {
- User.findOne({ email: req.body.adminuseremail }, function(error, result){
- if(result){
- if(result.admin){
- if(result.superadmin){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- if(result.superadmin){
- res.status(200).send({ auth: false, registered: true, message: "User is Already a Super Admin." })
- } else {
- if(result.admin){
- const newInvitedAdmin = new InvitedUser({
- name: result.name,
- email: result.email,
- post: "SuperAdmin",
- message: req.body.message,
- invitedby: req.body.adminuseremail
- })
- newInvitedAdmin.save(function(error, doc){
- if(error){
- res.status(200).send({ auth: false, registered: true, message: "Error Processing Your Request." })
- } else {
- const message = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: req.body.email,
- replyTo: process.env.REPLYTOMAIL,
- subject: 'You have been Invited for SuperAdmin Post',
- html: userInviteTemplate(doc, req.body.adminuseremail, "Super Admin", req.body.message)
- };
- transport.sendMail(message, function(err, info){
- if(err){
- console.log(err);
- } else {
- console.log(info);
- }
- })
- res.status(200).send({ auth: true, registered: true, message: 'An Invite Email has been Sent to his Email Address.'});
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: true, message: "User Should be an Admin to become a Superadmin" })
- }
- }
- } else {
- res.status(200).send({ auth: false, registered: true, message: "No User Found with This Email." })
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: true, message: "You are Unauthorized" })
- }
- } else {
- res.status(200).send({ auth: false, registered: true, message: "You are Unauthorized" })
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" })
- }
- })
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-module.exports = router;
diff --git a/backend/routes/login.js b/backend/routes/login.js
deleted file mode 100644
index ab05ff09e..000000000
--- a/backend/routes/login.js
+++ /dev/null
@@ -1,127 +0,0 @@
-const express = require('express');
-const bcrypt = require("bcrypt");
-const jwt = require("jsonwebtoken");
-const checkOrigin = require("../plugins/checkOrigin");
-const router = express.Router();
-
-//Model Imports
-const User = require("../models/user");
-const PendingUser = require("../models/pendingUser");
-const SpamUser = require("../models/spamUser");
-
-router.post('/', function(req, res){
- if(checkOrigin(req.headers.origin)){
- PendingUser.findOne({ email: req.body.email, post: "User" }, function(error, result){
- if(result){
- res.status(200).send({ auth: false, registered: true, token: null, message: "Your Email is Currently Pending Request. Please Wait till Accepting." });
- } else {
- SpamUser.findOne({ email: req.body.email }, function(error, result){
- if(result){
- res.status(200).send({ auth: false, registered: true, token: null, message: "You are Added to Spam List Due to Violation by a Admin. Contact Through Email for Support." });
- } else {
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- var tempPassIsThere = result.temppassword != null ? true : false;
- var passNotThere = result.password == null ? true : false;
- if(!tempPassIsThere && !passNotThere){
- if(req.body.password != null && result.password){
- bcrypt.compare(req.body.password, result.password, function(err, synced){
- if(synced){
- if(result.sessions.length > process.env.MAXSESSIONS-1){
- User.updateOne({ email: req.body.email }, { $pull :{ sessions : { _id: result.sessions[0]._id}}}, function(error){
- if(!error){
- const existUser = result;
- existUser.sessions = [{
- ip: req.connection.remoteAddress,
- time: Date.now()
- }];
- let token = jwt.sign({ existUser }, process.env.TOKENSECRET, {expiresIn: 604800});
- let sessionToken = jwt.sign({ name: result.name, email: result.email, ip: req.connection.remoteAddress, time: Date.now() }, process.env.TOKENSECRET, {expiresIn: 604800});
- let sessionData = result.sessions.create({
- sessionid: sessionToken,
- ip: req.connection.remoteAddress,
- token: token,
- time: Date.now()
- });
- User.updateOne({ email: req.body.email }, {$push: { sessions: sessionData}}, function(error){
- if(!error){
- var issueUnix = Math.floor(Date.now() / 1000)
- var expiryUnix = issueUnix + 604800;
- var expiryUnixTime = expiryUnix * 1000;
- var issuedUnixTime = issueUnix * 1000;
- const userData = {
- email: existUser.email,
- name: existUser.name,
- admin: existUser.admin,
- role: existUser.role,
- superadmin: existUser.superadmin,
- verified: existUser.verified,
- }
- res.status(200).send({ auth: true, registered: true, token: token, tokenuser:userData, sessiondata: sessionData, issuedat: issuedUnixTime, expiryat: expiryUnixTime });
- } else {
- res.status(200).send({ auth: false, registered: true, token: null, message: "Session Data Wrongly Saved. Please Try Later" });
- }
- })
- } else {
- console.log(error);
- res.status(200).send({ auth: false, registered: true, token: null, message: "Session Data Wrongly Saved. Please Try Later" });
- }
- })
- } else {
- const existUser = result;
- existUser.sessions = [{
- ip: req.connection.remoteAddress,
- time: Date.now()
- }];
- let token = jwt.sign({ existUser }, process.env.TOKENSECRET, {expiresIn: 604800});
- let sessionToken = jwt.sign({ name: result.name, email: result.email, ip: req.connection.remoteAddress, time: Date.now() }, process.env.TOKENSECRET, {expiresIn: 604800});
- let sessionData = result.sessions.create({
- sessionid: sessionToken,
- ip: req.connection.remoteAddress,
- token: token,
- time: Date.now()
- });
- User.updateOne({ email: req.body.email }, {$push: { sessions: sessionData}}, function(error){
- if(!error){
- var issueUnix = Math.floor(Date.now() / 1000)
- var expiryUnix = issueUnix + 604800;
- var expiryUnixTime = expiryUnix * 1000;
- var issuedUnixTime = issueUnix * 1000;
- const userData = {
- email: existUser.email,
- name: existUser.name,
- admin: existUser.admin,
- role: existUser.role,
- superadmin: existUser.superadmin,
- verified: existUser.verified,
- }
- res.status(200).send({ auth: true, registered: true, token: token, tokenuser:userData, sessiondata: sessionData, issuedat: issuedUnixTime, expiryat: expiryUnixTime });
- } else {
- res.status(200).send({ auth: false, registered: true, token: null, message: "Session Data Wrongly Saved. Please Try Later" });
- }
- })
- }
- } else {
- res.status(200).send({ auth: false, registered: true, token: null, message: "User Password is Wrong" });
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: true, token: null, message: "Password is Null. Please Enter Your Password" });
- }
- } else {
- res.status(200).send({auth: false, registered: false, token: null, message: "Please Verify your Account Before Logging in." });
- }
- } else {
- res.status(200).send({auth: false, registered: false, token: null, message: "User Not Found with this Email." });
- }
- })
- }
- })
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-});
-
-module.exports = router;
diff --git a/backend/routes/media.js b/backend/routes/media.js
deleted file mode 100644
index 5744b3ebb..000000000
--- a/backend/routes/media.js
+++ /dev/null
@@ -1,485 +0,0 @@
-const express = require("express");
-const router = express.Router();
-const jwt = require("jsonwebtoken");
-const checkOrigin = require("../plugins/checkOrigin");
-const jwtVerify = require('../plugins/jwtVerify');
-const axios = require('axios');
-const firstParser = require('../parsers/torrent-name-parser-one');
-const secondParser = require('../parsers/torrent-name-parser-two');
-
-//Model Imports
-const User = require("../models/user");
-const Settings = require("../models/siteSettings");
-
-router.post('/generate', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- let mediaToken = jwt.sign({ result }, process.env.TOKENSECRET, {expiresIn: 10800});
- res.status(200).send({ auth: true, registered: true, token: mediaToken });
- } else {
- res.status(200).send({auth: false, registered: false, tokenuser: false});
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.post('/verify', function(req, res){
- if(checkOrigin(req.headers.origin)){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- jwt.verify(req.body.token, process.env.TOKENSECRET, function(error, decoded){
- if(decoded){
- let activeSessions = result.sessions;
- if(activeSessions.map(session => {
- return session.sessionid
- }).indexOf(req.body.sessionId) > -1){
- jwt.verify(req.body.sessionId, process.env.TOKENSECRET, function(error, sessionDec){
- if(sessionDec){
- res.status(200).send({ auth: true, registered: true, tokenuser: decoded });
- } else {
- res.status(200).send({auth: false, registered: false, tokenuser: null});
- }
- })
- } else {
- res.status(200).send({auth: false, registered: false, tokenuser: null});
- }
- } else {
- res.status(200).send({auth: false, registered: false, tokenuser: null});
- }
- });
- } else {
- res.status(200).send({auth: false, registered: false, tokenuser: false});
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-});
-
-router.post('/data', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- Settings.findOne({ cId: process.env.FRONTENDSITENAME }, function(error, settingsData){
- if(settingsData && settingsData.tmdb){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- try {
- const firstParsed = firstParser.parse(req.body.title);
- const titleRegex = /^[^<>:;,?\[\]\(\)@`~!#$%^+=}{|.\\_\-"*|/]+$/
- var parsed;
- let searchPoint = {
- tv: "https://api.themoviedb.org/3/search/tv",
- movie: "https://api.themoviedb.org/3/search/movie",
- };
- let dataEndPoint = {
- tv: "https://api.themoviedb.org/3/tv",
- movie: "https://api.themoviedb.org/3/movie",
- };
- let mediaEndPoint = {
- image: "https://image.tmdb.org/t/p/w500",
- video: "https://www.youtube.com/watch?v=",
- }
- let imageKey = "https://image.tmdb.org/t/p/w500";
- let videoKey = "https://www.youtube.com/watch?v=";
- if(titleRegex.test(firstParsed.title)){
- parsed = firstParsed;
- } else {
- const secondParsed = secondParser(req.body.title);
- parsed = secondParsed;
- }
- if(parsed.title){
- if(parsed.season){
- axios.get(`${searchPoint.tv}?api_key=${process.env.TMDBAPI}&page=1&query=${encodeURI(parsed.title.toLowerCase())}&include_adult=false`).then(response => {
- if(response.data.results.length < 1){
- axios.get(`${searchPoint.movie}?api_key=${process.env.TMDBAPI}&query=${encodeURI(parsed.title.toLowerCase())}&page=1&include_adult=false&primary_release_year=${parsed.year}`).then(response => {
- if(response.data.results.length < 1){
- res.status(200).send({ auth: true, registered: true, data: false });
- } else {
- axios.get(`${dataEndPoint.movie}/${response.data.results[0].id}?api_key=${process.env.TMDBAPI}&append_to_response=videos,images,reviews,people,networks,companies,collections,credits`).then(response => {
- let resp = response.data;
- if(resp.created_by){
- resp.created_by.forEach((item, i) => {
- if(item.profile_path && item.profile_path != null){
- resp.created_by[i].profile_path = mediaEndPoint.image+item.profile_path;
- }
- });
- }
- if(resp.belongs_to_collection){
- resp.belongs_to_collection.poster_path = mediaEndPoint.image+resp.belongs_to_collection.poster_path;
- resp.belongs_to_collection.backdrop_path = mediaEndPoint.image+resp.belongs_to_collection.backdrop_path;
- }
- if(resp.revenue){
- resp.revenue = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD', maximumSignificantDigits: 8 }).format(resp.revenue);
- }
- if(resp.budget){
- resp.budget = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD', maximumSignificantDigits: 8 }).format(resp.budget);
- }
- if(resp.networks){
- resp.networks.forEach((item, i) => {
- if(item.logo_path && item.logo_path != null){
- resp.networks[i].logo_path = mediaEndPoint.image+item.logo_path;
- }
- });
- }
- if(resp.backdrop_path){
- resp.backdrop_path = mediaEndPoint.image+resp.backdrop_path;
- }
- if(resp.poster_path){
- resp.poster_path = mediaEndPoint.image+resp.poster_path;
- }
- if(resp.production_companies){
- resp.production_companies.forEach((item, i) => {
- if(item.logo_path && item.logo_path != null){
- resp.production_companies[i].logo_path = mediaEndPoint.image+item.logo_path;
- }
- });
- }
- if(resp.videos){
- resp.videos.results.forEach((item, i) => {
- if(item.key && item.key != null){
- resp.videos.results[i].key = mediaEndPoint.video+item.key;
- }
- });
- }
- if(resp.images){
- if(resp.images.backdrops.length > 0){
- resp.images.backdrops.forEach((item, i) => {
- if(item.file_path && item.file_path != null){
- resp.images.backdrops[i].file_path = mediaEndPoint.image+item.file_path;
- }
- });
- }
- if(resp.images.posters.length > 0){
- resp.images.posters.forEach((item, i) => {
- if(item.file_path && item.file_path != null){
- resp.images.posters[i].file_path = mediaEndPoint.image+item.file_path;
- }
- });
- }
- }
- if(resp.credits){
- if(resp.credits.cast){
- resp.credits.cast.forEach((item, i) => {
- if(item.profile_path && item.profile_path != null){
- resp.credits.cast[i].profile_path = mediaEndPoint.image+item.profile_path;
- }
- });
- }
- if(resp.credits.crew){
- resp.credits.crew.forEach((item, i) => {
- if(item.profile_path && item.profile_path != null){
- resp.credits.crew[i].profile_path = mediaEndPoint.image+item.profile_path;
- }
- });
- }
- }
- res.status(200).send({ auth: true, registered: true, data: true, result: resp, parsedData: parsed });
- })
- }
- })
- } else {
- axios.get(`${dataEndPoint.tv}/${response.data.results[0].id}?api_key=${process.env.TMDBAPI}&append_to_response=videos,images,reviews,people,networks,companies,collections,credits`).then(response => {
- let resp = response.data;
- if(resp.created_by){
- resp.created_by.forEach((item, i) => {
- if(item.profile_path && item.profile_path != null){
- resp.created_by[i].profile_path = mediaEndPoint.image+item.profile_path;
- }
- });
- }
- if(resp.belongs_to_collection){
- resp.belongs_to_collection.poster_path = mediaEndPoint.image+resp.belongs_to_collection.poster_path;
- res.resp.belongs_to_collection.backdrop_path = mediaEndPoint.image+res.resp.belongs_to_collection.backdrop_path;
- }
- if(resp.last_episode_to_air){
- resp.last_episode_to_air.still_path = mediaEndPoint.image+resp.last_episode_to_air.still_path
- }
- if(resp.networks){
- resp.networks.forEach((item, i) => {
- if(item.logo_path && item.logo_path != null){
- resp.networks[i].logo_path = mediaEndPoint.image+item.logo_path;
- }
- });
- }
- if(resp.revenue){
- resp.revenue = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD', maximumSignificantDigits: 8 }).format(resp.revenue);
- }
- if(resp.budget){
- resp.budget = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD', maximumSignificantDigits: 8 }).format(resp.budget);
- }
- if(resp.seasons){
- resp.seasons.forEach((item, i) => {
- if(item.poster_path && item.poster_path != null){
- resp.seasons[i].poster_path = mediaEndPoint.image+item.poster_path;
- }
- });
- }
- if(resp.backdrop_path){
- resp.backdrop_path = mediaEndPoint.image+resp.backdrop_path;
- }
- if(resp.poster_path){
- resp.poster_path = mediaEndPoint.image+resp.poster_path;
- }
- if(resp.production_companies){
- resp.production_companies.forEach((item, i) => {
- if(item.logo_path && item.logo_path != null){
- resp.production_companies[i].logo_path = mediaEndPoint.image+item.logo_path;
- }
- });
- }
- if(resp.videos){
- resp.videos.results.forEach((item, i) => {
- if(item.key && item.key != null){
- resp.videos.results[i].key = mediaEndPoint.video+item.key;
- }
- });
- }
- if(resp.images){
- if(resp.images.backdrops.length > 0){
- resp.images.backdrops.forEach((item, i) => {
- if(item.file_path && item.file_path != null){
- resp.images.backdrops[i].file_path = mediaEndPoint.image+item.file_path;
- }
- });
- }
- if(resp.images.posters.length > 0){
- resp.images.posters.forEach((item, i) => {
- if(item.file_path && item.file_path != null){
- resp.images.posters[i].file_path = mediaEndPoint.image+item.file_path;
- }
- });
- }
- }
- if(resp.credits){
- if(resp.credits.cast){
- resp.credits.cast.forEach((item, i) => {
- if(item.profile_path && item.profile_path != null){
- resp.credits.cast[i].profile_path = mediaEndPoint.image+item.profile_path;
- }
- });
- }
- if(resp.credits.crew){
- resp.credits.crew.forEach((item, i) => {
- if(item.profile_path && item.profile_path != null){
- resp.credits.crew[i].profile_path = mediaEndPoint.image+item.profile_path;
- }
- });
- }
- }
- res.status(200).send({ auth: true, registered: true, data: true, result: resp, parsedData: parsed });
- })
- }
- })
- } else {
- axios.get(`${searchPoint.movie}?api_key=${process.env.TMDBAPI}&query=${encodeURI(parsed.title.toLowerCase())}&page=1&include_adult=false&primary_release_year=${parsed.year}`).then(response => {
- if(response.data.results.length < 1){
- axios.get(`${searchPoint.tv}?api_key=${process.env.TMDBAPI}&page=1&query=${encodeURI(parsed.title.toLowerCase())}&include_adult=false`).then(response => {
- if(response.data.results.length < 1){
- res.status(200).send({ auth: true, registered: true, data: false });
- } else {
- axios.get(`${dataEndPoint.tv}/${response.data.results[0].id}?api_key=${process.env.TMDBAPI}&append_to_response=videos,images,reviews,people,networks,companies,collections,credits`).then(response => {
- let resp = response.data;
- if(resp.created_by){
- resp.created_by.forEach((item, i) => {
- if(item.profile_path && item.profile_path != null){
- resp.created_by[i].profile_path = mediaEndPoint.image+item.profile_path;
- }
- });
- }
- if(resp.belongs_to_collection){
- resp.belongs_to_collection.poster_path = mediaEndPoint.image+resp.belongs_to_collection.poster_path;
- res.resp.belongs_to_collection.backdrop_path = mediaEndPoint.image+res.resp.belongs_to_collection.backdrop_path;
- }
- if(resp.last_episode_to_air){
- resp.last_episode_to_air.still_path = mediaEndPoint.image+resp.last_episode_to_air.still_path
- }
- if(resp.networks){
- resp.networks.forEach((item, i) => {
- if(item.logo_path && item.logo_path != null){
- resp.networks[i].logo_path = mediaEndPoint.image+item.logo_path;
- }
- });
- }
- if(resp.revenue){
- resp.revenue = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD', maximumSignificantDigits: 8 }).format(resp.revenue);
- }
- if(resp.budget){
- resp.budget = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD', maximumSignificantDigits: 8 }).format(resp.budget);
- }
- if(resp.seasons){
- resp.seasons.forEach((item, i) => {
- if(item.poster_path && item.poster_path != null){
- resp.seasons[i].poster_path = mediaEndPoint.image+item.poster_path;
- }
- });
- }
- if(resp.backdrop_path){
- resp.backdrop_path = mediaEndPoint.image+resp.backdrop_path;
- }
- if(resp.poster_path){
- resp.poster_path = mediaEndPoint.image+resp.poster_path;
- }
- if(resp.production_companies){
- resp.production_companies.forEach((item, i) => {
- if(item.logo_path && item.logo_path != null){
- resp.production_companies[i].logo_path = mediaEndPoint.image+item.logo_path;
- }
- });
- }
- if(resp.videos){
- resp.videos.results.forEach((item, i) => {
- if(item.key && item.key != null){
- resp.videos.results[i].key = mediaEndPoint.video+item.key;
- }
- });
- }
- if(resp.images){
- if(resp.images.backdrops.length > 0){
- resp.images.backdrops.forEach((item, i) => {
- if(item.file_path && item.file_path != null){
- resp.images.backdrops[i].file_path = mediaEndPoint.image+item.file_path;
- }
- });
- }
- if(resp.images.posters.length > 0){
- resp.images.posters.forEach((item, i) => {
- if(item.file_path && item.file_path != null){
- resp.images.posters[i].file_path = mediaEndPoint.image+item.file_path;
- }
- });
- }
- }
- if(resp.credits){
- if(resp.credits.cast){
- resp.credits.cast.forEach((item, i) => {
- if(item.profile_path && item.profile_path != null){
- resp.credits.cast[i].profile_path = mediaEndPoint.image+item.profile_path;
- }
- });
- }
- if(resp.credits.crew){
- resp.credits.crew.forEach((item, i) => {
- if(item.profile_path && item.profile_path != null){
- resp.credits.crew[i].profile_path = mediaEndPoint.image+item.profile_path;
- }
- });
- }
- }
- res.status(200).send({ auth: true, registered: true, data: true, result: resp, parsedData: parsed });
- })
- }
- })
- } else {
- axios.get(`${dataEndPoint.movie}/${response.data.results[0].id}?api_key=${process.env.TMDBAPI}&append_to_response=videos,images,reviews,people,networks,companies,collections,credits`).then(response => {
- let resp = response.data;
- if(resp.created_by){
- resp.created_by.forEach((item, i) => {
- if(item.profile_path && item.profile_path != null){
- resp.created_by[i].profile_path = mediaEndPoint.image+item.profile_path;
- }
- });
- }
- if(resp.belongs_to_collection){
- resp.belongs_to_collection.poster_path = mediaEndPoint.image+resp.belongs_to_collection.poster_path;
- resp.belongs_to_collection.backdrop_path = mediaEndPoint.image+resp.belongs_to_collection.backdrop_path;
- }
- if(resp.revenue){
- resp.revenue = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD', maximumSignificantDigits: 8 }).format(resp.revenue);
- }
- if(resp.budget){
- resp.budget = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD', maximumSignificantDigits: 8 }).format(resp.budget);
- }
- if(resp.networks){
- resp.networks.forEach((item, i) => {
- if(item.logo_path && item.logo_path != null){
- resp.networks[i].logo_path = mediaEndPoint.image+item.logo_path;
- }
- });
- }
- if(resp.backdrop_path){
- resp.backdrop_path = mediaEndPoint.image+resp.backdrop_path;
- }
- if(resp.poster_path){
- resp.poster_path = mediaEndPoint.image+resp.poster_path;
- }
- if(resp.production_companies){
- resp.production_companies.forEach((item, i) => {
- if(item.logo_path && item.logo_path != null){
- resp.production_companies[i].logo_path = mediaEndPoint.image+item.logo_path;
- }
- });
- }
- if(resp.videos){
- resp.videos.results.forEach((item, i) => {
- if(item.key && item.key != null){
- resp.videos.results[i].key = mediaEndPoint.video+item.key;
- }
- });
- }
- if(resp.images){
- if(resp.images.backdrops.length > 0){
- resp.images.backdrops.forEach((item, i) => {
- if(item.file_path && item.file_path != null){
- resp.images.backdrops[i].file_path = mediaEndPoint.image+item.file_path;
- }
- });
- }
- if(resp.images.posters.length > 0){
- resp.images.posters.forEach((item, i) => {
- if(item.file_path && item.file_path != null){
- resp.images.posters[i].file_path = mediaEndPoint.image+item.file_path;
- }
- });
- }
- }
- if(resp.credits){
- if(resp.credits.cast){
- resp.credits.cast.forEach((item, i) => {
- if(item.profile_path && item.profile_path != null){
- resp.credits.cast[i].profile_path = mediaEndPoint.image+item.profile_path;
- }
- });
- }
- if(resp.credits.crew){
- resp.credits.crew.forEach((item, i) => {
- if(item.profile_path && item.profile_path != null){
- resp.credits.crew[i].profile_path = mediaEndPoint.image+item.profile_path;
- }
- });
- }
- }
- res.status(200).send({ auth: true, registered: true, data: true, result: resp, parsedData: parsed });
- })
- }
- })
- }
- } else {
- res.status(200).send({ auth: true, registered: true, data: false });
- }
- } catch(e) {
- res.status(200).send({ auth: true, registered: true, data: false, message: e });
- }
- } else {
- res.status(200).send({auth: false, registered: false, message: "You are Unauthorised"});
- }
- })
- } else {
- res.status(200).send({ auth: true, registered: true, data: false, message: "TMDB has been Turned Off." });
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-module.exports = router;
diff --git a/backend/routes/pending/index.js b/backend/routes/pending/index.js
deleted file mode 100644
index f65e22d5c..000000000
--- a/backend/routes/pending/index.js
+++ /dev/null
@@ -1,102 +0,0 @@
-const express = require("express");
-const router = express.Router();
-const checkOrigin = require("../../plugins/checkOrigin");
-const jwtVerify = require('../../plugins/jwtVerify');
-
-//Model Imports
-const User = require("../../models/user");
-const PendingUser = require("../../models/pendingUser");
-
-router.post('/users', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.adminuseremail }, function(error, result){
- if(result){
- if(result.admin){
- PendingUser.find({ post: "User" }, function(error, result){
- if(result.length == 0){
- res.status(200).send({ auth: false, registered: true, message: "No Pending Users" })
- } else {
- res.status(200).send({ auth: true, registered: true, users: result })
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: true, message: "You are Unauthorized" })
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" })
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-});
-
-router.post('/admins', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.adminuseremail }, function(error, result){
- if(result){
- if(result.admin){
- if(result.superadmin){
- PendingUser.find({ post: "Admin" }, function(error, result){
- if(result.length == 0){
- res.status(200).send({ auth: false, registered: true, message: "No Pending Users" })
- } else {
- res.status(200).send({ auth: true, registered: true, users: result })
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: true, message: "You are Unauthorized" })
- }
- } else {
- res.status(200).send({ auth: false, registered: true, message: "You are Unauthorized" })
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" })
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.post('/superadmins', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.adminuseremail }, function(error, result){
- if(result){
- if(result.admin){
- if(result.superadmin){
- PendingUser.find({ post: "SuperAdmin" }, function(error, result){
- if(result.length == 0){
- res.status(200).send({ auth: false, registered: true, message: "No Pending Users" })
- } else {
- res.status(200).send({ auth: true, registered: true, users: result })
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: true, message: "You are Unauthorized" })
- }
- } else {
- res.status(200).send({ auth: false, registered: true, message: "You are Unauthorized" })
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" })
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-module.exports = router;
diff --git a/backend/routes/ping.js b/backend/routes/ping.js
deleted file mode 100644
index ccc53a5e3..000000000
--- a/backend/routes/ping.js
+++ /dev/null
@@ -1,12 +0,0 @@
-const express = require("express");
-const router = express.Router();
-var ping = require('ping');
-
-router.post('/', async function(req, res){
- let pinged = await ping.promise.probe(req.body.pingsite, {
- timeout: 10,
- });
- res.send(pinged);
-})
-
-module.exports = router;
diff --git a/backend/routes/poster.js b/backend/routes/poster.js
deleted file mode 100644
index 7ddd475a9..000000000
--- a/backend/routes/poster.js
+++ /dev/null
@@ -1,48 +0,0 @@
-const express = require("express");
-const router = express.Router();
-const checkOrigin = require("../plugins/checkOrigin");
-const jwtVerify = require('../plugins/jwtVerify');
-
-//Model Imports
-const User = require("../models/user");
-const CategoryPost = require("../models/categoryPost");
-const HeroPost = require("../models/heroPost");
-const TrendingPost = require("../models/trendingPost");
-const QuickLink = require("../models/quickLink");
-
-router.post("/all", function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- TrendingPost.find({ root: req.body.root }, function(error, trendingPosts){
- HeroPost.find({ root: req.body.root }, function(error, heroPosts){
- CategoryPost.find({ root: req.body.root }, function(error, categoryPosts){
- QuickLink.find({ root: req.body.root }, function(error, quicklinks){
- if(quicklinks && trendingPosts.length < 1 && heroPosts.length < 1 && categoryPosts.length < 1){
- res.status(200).send({ auth: false, registered: true, message: "No Posts Found in Your DB" });
- } else {
- res.status(200).send({ auth: true, registered: true, root: req.body.root, quicklink: quicklinks, hero: heroPosts, category: categoryPosts, trending: trendingPosts });
- }
- })
- })
- })
- })
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" });
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.use("/categories", require("./posters/categories"));
-router.use("/hero", require("./posters/hero"));
-router.use("/trending", require("./posters/trending"));
-router.use("/quicklinks", require("./posters/quicklinks"));
-
-module.exports = router
diff --git a/backend/routes/posters/categories/index.js b/backend/routes/posters/categories/index.js
deleted file mode 100644
index dbfc056e2..000000000
--- a/backend/routes/posters/categories/index.js
+++ /dev/null
@@ -1,121 +0,0 @@
-const express = require("express");
-const router = express.Router();
-const checkOrigin = require("../../../plugins/checkOrigin");
-const jwtVerify = require('../../../plugins/jwtVerify');
-
-//Model Imports
-const User = require("../../../models/user");
-const CategoryPost = require("../../../models/categoryPost");
-
-router.post("/get", function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- CategoryPost.find({ root: req.body.root }, function(error, categories){
- if(categories){
- if(categories.length > 0){
- res.status(200).send({ auth: true, registered: true, root: req.body.root, posts: categories });
- } else {
- res.status(200).send({ auth: false, registered: true, message: "No Posts Found in Your DB" });
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "Error Processing Your Request" });
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" });
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.post("/set", function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- if(result.admin){
- CategoryPost.findOne({ _id: req.body.postId }, function(error, catpost){
- if(catpost){
- CategoryPost.updateOne({ _id: req.body.postId }, { $set: req.body.post }, function(error){
- if(!error){
- console.log("Updated Posts");
- res.status(200).send({ auth: true, registered: true, changed: true, message: "Successfully Updated Posts" });
- } else {
- console.log("Error Changing Settings");
- res.status(200).send({ auth: true, registered: true, changed: false, message: "Error Updating Posts" });
- }
- })
- } else {
- let reqPost = req.body.post;
- const newPost = new CategoryPost({
- root: reqPost.root,
- title: reqPost.title,
- poster: reqPost.poster,
- link: reqPost.link
- })
- newPost.save(function(error, doc){
- if(!error){
- res.status(200).send({ auth: true, registered: true, changed: true, message: "Successfully Added Posts" });
- } else {
- res.status(200).send({ auth: true, registered: true, changed: false, message: "Error Saving New Post" });
- }
- })
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: false, message: "You dont Have Sufficient Permission to Access this Api." });
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" });
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.post("/delete", function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- if(result.admin){
- CategoryPost.findOne({ _id: req.body.postId }, function(error, catpost){
- if(catpost){
- CategoryPost.deleteOne({ _id: req.body.postId }, function(error){
- if(!error){
- res.status(200).send({ auth: true, registered: true, message: "Your Post has been Successfully Deleted" });
- } else {
- res.status(200).send({ auth: false, registered: true, message: "Error While Deleting Post" });
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: true, message: "No Post Found with this ID" });
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: false, message: "You dont Have Sufficient Permission to Access this Api." });
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" });
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-module.exports = router
diff --git a/backend/routes/posters/hero/index.js b/backend/routes/posters/hero/index.js
deleted file mode 100644
index ba72a9c03..000000000
--- a/backend/routes/posters/hero/index.js
+++ /dev/null
@@ -1,122 +0,0 @@
-const express = require("express");
-const router = express.Router();
-const checkOrigin = require("../../../plugins/checkOrigin");
-const jwtVerify = require('../../../plugins/jwtVerify');
-
-//Model Imports
-const User = require("../../../models/user");
-const HeroPost = require("../../../models/heroPost");
-
-router.post("/get", function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- HeroPost.find({ root: req.body.root }, function(error, heroPosts){
- if(heroPosts){
- if(heroPosts.length > 0){
- res.status(200).send({ auth: true, registered: true, root: req.body.root, posts: heroPosts });
- } else {
- res.status(200).send({ auth: false, registered: true, message: "No Posts Found in Your DB" });
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "Error Processing Your Request" });
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" });
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.post("/set", function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- if(result.admin){
- HeroPost.findOne({ _id: req.body.postId }, function(error, heropost){
- if(heropost){
- HeroPost.updateOne({ _id: req.body.postId }, { $set: req.body.post }, function(error){
- if(!error){
- console.log("Updated Posts");
- res.status(200).send({ auth: true, registered: true, changed: true, message: "Successfully Updated Posts" });
- } else {
- console.log("Error Changing Settings");
- res.status(200).send({ auth: true, registered: true, changed: false, message: "Error Updating Posts" });
- }
- })
- } else {
- let reqPost = req.body.post;
- const newPost = new HeroPost({
- root: reqPost.root,
- title: reqPost.title,
- subtitle: reqPost.subtitle,
- poster: reqPost.poster,
- link: reqPost.link
- })
- newPost.save(function(error, doc){
- if(!error){
- res.status(200).send({ auth: true, registered: true, changed: true, message: "Successfully Added Posts" });
- } else {
- res.status(200).send({ auth: true, registered: true, changed: false, message: "Error Saving New Post" });
- }
- })
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: false, message: "You dont Have Sufficient Permission to Access this Api." });
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" });
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.post("/delete", function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- if(result.admin){
- HeroPost.findOne({ _id: req.body.postId }, function(error, heropost){
- if(heropost){
- HeroPost.deleteOne({ _id: req.body.postId }, function(error){
- if(!error){
- res.status(200).send({ auth: true, registered: true, message: "Your Post has been Successfully Deleted" });
- } else {
- res.status(200).send({ auth: false, registered: true, message: "Error While Deleting Post" });
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: true, message: "No Post Found with this ID" });
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: false, message: "You dont Have Sufficient Permission to Access this Api." });
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" });
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-module.exports = router
diff --git a/backend/routes/posters/quicklinks/index.js b/backend/routes/posters/quicklinks/index.js
deleted file mode 100644
index 739913644..000000000
--- a/backend/routes/posters/quicklinks/index.js
+++ /dev/null
@@ -1,120 +0,0 @@
-const express = require("express");
-const router = express.Router();
-const checkOrigin = require("../../../plugins/checkOrigin");
-const jwtVerify = require('../../../plugins/jwtVerify');
-
-//Model Imports
-const User = require("../../../models/user");
-const QuickLink = require("../../../models/quickLink");
-
-router.post("/get", function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- QuickLink.find({ root: req.body.root }, function(error, quicklinks){
- if(quicklinks){
- if(quicklinks.length > 0){
- res.status(200).send({ auth: true, registered: true, root: req.body.root, posts: quicklinks });
- } else {
- res.status(200).send({ auth: false, registered: true, message: "No Posts Found in Your DB" });
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "Error Processing Your Request" });
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" });
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.post("/set", function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- if(result.admin){
- QuickLink.findOne({ _id: req.body.postId }, function(error, quicklinks){
- if(quicklinks){
- QuickLink.updateOne({ _id: req.body.postId }, { $set: req.body.post }, function(error){
- if(!error){
- console.log("Updated Posts");
- res.status(200).send({ auth: true, registered: true, changed: true, message: "Successfully Updated Posts" });
- } else {
- console.log("Error Changing Settings");
- res.status(200).send({ auth: true, registered: true, changed: false, message: "Error Updating Posts" });
- }
- })
- } else {
- let reqPost = req.body.post;
- const newPost = new QuickLink({
- root: reqPost.root,
- title: reqPost.title,
- link: reqPost.link
- })
- newPost.save(function(error, doc){
- if(!error){
- res.status(200).send({ auth: true, registered: true, changed: true, message: "Successfully Added Posts" });
- } else {
- res.status(200).send({ auth: true, registered: true, changed: false, message: "Error Saving New Post" });
- }
- })
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: false, message: "You dont Have Sufficient Permission to Access this Api." });
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" });
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.post("/delete", function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- if(result.admin){
- QuickLink.findOne({ _id: req.body.postId }, function(error, quicklinks){
- if(quicklinks){
- QuickLink.deleteOne({ _id: req.body.postId }, function(error){
- if(!error){
- res.status(200).send({ auth: true, registered: true, message: "Your Post has been Successfully Deleted" });
- } else {
- res.status(200).send({ auth: false, registered: true, message: "Error While Deleting Post" });
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: true, message: "No Post Found with this ID" });
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: false, message: "You dont Have Sufficient Permission to Access this Api." });
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" });
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-module.exports = router
diff --git a/backend/routes/posters/trending/index.js b/backend/routes/posters/trending/index.js
deleted file mode 100644
index 750721a28..000000000
--- a/backend/routes/posters/trending/index.js
+++ /dev/null
@@ -1,121 +0,0 @@
-const express = require("express");
-const router = express.Router();
-const checkOrigin = require("../../../plugins/checkOrigin");
-const jwtVerify = require('../../../plugins/jwtVerify');
-
-//Model Imports
-const User = require("../../../models/user");
-const TrendingPost = require("../../../models/trendingPost");
-
-router.post("/get", function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- TrendingPost.find({ root: req.body.root }, function(error, trendingPosts){
- if(trendingPosts){
- if(trendingPosts.length > 0){
- res.status(200).send({ auth: true, registered: true, root: req.body.root, posts: trendingPosts });
- } else {
- res.status(200).send({ auth: false, registered: true, message: "No Posts Found in Your DB" });
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "Error Processing Your Request" });
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" });
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.post("/set", function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- if(result.admin){
- TrendingPost.findOne({ _id: req.body.postId }, function(error, trendpost){
- if(trendpost){
- TrendingPost.updateOne({ _id: req.body.postId }, { $set: req.body.post }, function(error){
- if(!error){
- console.log("Updated Posts");
- res.status(200).send({ auth: true, registered: true, changed: true, message: "Successfully Updated Posts" });
- } else {
- console.log("Error Changing Settings");
- res.status(200).send({ auth: true, registered: true, changed: false, message: "Error Updating Posts" });
- }
- })
- } else {
- let reqPost = req.body.post;
- const newPost = new TrendingPost({
- root: reqPost.root,
- title: reqPost.title,
- poster: reqPost.poster,
- link: reqPost.link
- })
- newPost.save(function(error, doc){
- if(!error){
- res.status(200).send({ auth: true, registered: true, changed: true, message: "Successfully Added Posts" });
- } else {
- res.status(200).send({ auth: true, registered: true, changed: false, message: "Error Saving New Post" });
- }
- })
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: false, message: "You dont Have Sufficient Permission to Access this Api." });
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" });
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.post("/delete", function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- if(result.admin){
- TrendingPost.findOne({ _id: req.body.postId }, function(error, trendpost){
- if(trendpost){
- TrendingPost.deleteOne({ _id: req.body.postId }, function(error){
- if(!error){
- res.status(200).send({ auth: true, registered: true, message: "Your Post has been Successfully Deleted" });
- } else {
- res.status(200).send({ auth: false, registered: true, message: "Error While Deleting Post" });
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: true, message: "No Post Found with this ID" });
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: false, message: "You dont Have Sufficient Permission to Access this Api." });
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" });
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-module.exports = router
diff --git a/backend/routes/register.js b/backend/routes/register.js
deleted file mode 100644
index 634c05af2..000000000
--- a/backend/routes/register.js
+++ /dev/null
@@ -1,162 +0,0 @@
-const express = require("express");
-const router = express.Router();
-const bcrypt = require("bcrypt");
-const transport = require('../plugins/mailtransporter');
-const checkOrigin = require("../plugins/checkOrigin");
-const randomstring = require('randomstring');
-const registerNewUserTemplate = require('../templates/register/toUsers');
-const jwtVerify = require('../plugins/jwtVerify');
-
-//Model Imports
-const User = require("../models/user");
-const PendingUser = require("../models/pendingUser");
-const SpamUser = require("../models/spamUser");
-const InvitedUser = require("../models/invitedUser");
-
-router.post('/user', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.adminuseremail }, function(error, result){
- if(result){
- if(result.admin){
- PendingUser.findOne({ email: req.body.email }, function(pendingUser, pendingResult){
- if(pendingResult){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- res.status(200).send({ auth: false, registered: true, message: "User Already Exists with this Email" });
- } else if(!result) {
- var temporaryPass = randomstring.generate({ length: 8, charset: 'alphanumeric' });
- bcrypt.hash(temporaryPass, 10, function(err, hashedPass){
- if(hashedPass){
- const newUser = new User({
- name: req.body.name,
- email: req.body.email,
- registeredDate: Date.now(),
- temppassword: hashedPass,
- password: null,
- role: "User",
- admin: false,
- superadmin: false,
- verified: false,
- })
- newUser.save(function(error, doc){
- if(!error){
- const message = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: req.body.email,
- replyTo: process.env.REPLYTOMAIL,
- subject: 'We Have Accepted Your Request.',
- html: registerNewUserTemplate(doc, temporaryPass)
- };
- PendingUser.deleteOne({ email: req.body.email }, function(pendingError){
- if(!pendingError){
- transport.sendMail(message, function(err, info) {
- if (err) {
- User.deleteOne({ email: req.body.email}, function(error){
- if(error){
- console.log(error);
- } else {
- SpamUser.findOne({ email: req.body.email }, function(spamError, spamResult){
- if(spamResult){
- console.log(spamResult);
- } else {
- const newSpamUser = new SpamUser({
- name: req.body.name,
- email: req.body.email,
- post: "User",
- reason: "His Email Looks Like a Spam",
- flaggedby: req.body.adminuseremail
- })
- newSpamUser.save(function(error, doc){
- if(!error){
- console.log(error)
- } else {
- console.log(error);
- }
- })
- }
- });
- res.status(200).send({ auth: false, registered: false, message: "It Looks like the Recipient Mail is Spam." })
- }
- });
- } else {
- res.status(200).send({ auth: true, registered: true, message: 'User Successfully Registered.One Time Password has been sent to Recipient Mail that is Valid for 3 hours. In case the Recipient Did\'t Signup within this Period. Their Account will be Automatically Deleted.'});
- }
- });
- } else {
- res.status(200).send({ auth: true, registered: false, message: 'Error While Moving User Database Record. Please Try Again Later.' })
- }
- })
- } else {
- res.status(200).send({ auth: true, registered: false, message: "Error Saving User" });
- }
- });
- } else {
- res.status(200).send({ auth: true, registered: false, message: "Error While Hashing Password, Please Try Again Now" });
- }
- })
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: true, message: "A User has to Request in Order for Being Added. This is To Ensure that a User is a Human and Not a Spam Bot. Also to Control Admins Adding Multiple Users." });
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: true, message: "You are Unauthorized" })
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" })
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-});
-
-router.post('/rootuser', function(req, res){
- User.findOne({ $or: [ { email: req.body.email }, { superadmin: true } ] }, function(error, result){
- if(result){
- res.render("dashboard.ejs", {user:false, showPass: false, data: "SuperAdmin Already Exists. You Cannot Proceed Here afterwards. Continue Through Your Frontend"})
- } else {
- if(process.env.SITESECRET == req.body.secret){
- if(req.body.password != null){
- bcrypt.hash(req.body.password, 10, function(err, hashedPass){
- if(hashedPass){
- const newRootUser = new User({
- name: req.body.name,
- email: req.body.email,
- temppassword: null,
- registeredDate: Date.now(),
- password: hashedPass,
- role: "Super Admin",
- admin: true,
- superadmin: true,
- verified: true,
- })
- newRootUser.save(function(error, doc){
- if(!error){
- res.render("dashboard.ejs", {user:true, showPass: false, details: newRootUser, fronturl: process.env.FRONTENDURL})
- } else {
- res.render("dashboard.ejs", {user:false, showPass: false, data: "There's an Error While Saving your Details. Please Try Again."})
- }
- })
- } else {
- res.render("dashboard.ejs", {user:false, showPass: false, data: "There's an Error while Hashing Your Password, Please Try Again Now."})
- }
- })
- } else {
- res.render("dashboard.ejs", {user:false, showPass: false, data: "Password is Null. Please try Again Entering Your Password"})
- }
- } else {
- res.render("dashboard.ejs", {user:false, showPass: false, data: "Your Secret Doesn't Match."})
- }
- }
- })
-})
-
-router.use('/approve', require('./approve'));
-
-module.exports = router;
diff --git a/backend/routes/remove/index.js b/backend/routes/remove/index.js
deleted file mode 100644
index accca1518..000000000
--- a/backend/routes/remove/index.js
+++ /dev/null
@@ -1,232 +0,0 @@
-const express = require("express");
-const router = express.Router();
-const transport = require('../../plugins/mailtransporter');
-const checkOrigin = require("../../plugins/checkOrigin");
-const deletePendingUserTemplate = require('../../templates/delete/pending/toAll');
-const jwtVerify = require('../../plugins/jwtVerify');
-
-//Model Imports
-const User = require("../../models/user");
-const PendingUser = require("../../models/pendingUser");
-
-router.post('/user', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- PendingUser.findOne({ email: req.body.email, post: "User" }, function(error, pendingResult){
- if(pendingResult){
- User.findOne({ email: req.body.adminuseremail }, function(error, result){
- if(result){
- if(result.admin){
- PendingUser.deleteOne({ email: req.body.email, post: "User" }, function(error){
- if(error){
- res.status(200).send({
- auth: true,
- removed: false,
- message: "Some Error Processing Your Request. Please Try again Now."
- });
- } else {
- const deleteMessage = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: pendingResult.email,
- replyTo: process.env.REPLYTOMAIL,
- subject: 'Regarding Your Request',
- html: deletePendingUserTemplate(pendingResult),
- };
- transport.sendMail(deleteMessage, function(err, info){
- if(err){
- console.log(err);
- } else {
- console.log(info)
- }
- })
- res.status(200).send({
- auth: true,
- removed: true,
- message: "Request has been Deleted"
- });
- }
- })
- } else {
- res.status(200).send({
- auth: true,
- removed: false,
- message: "You Need to be a Admin."
- });
- }
- } else {
- res.status(200).send({
- auth: true,
- removed: false,
- message: "You are Unauthorized."
- });
- }
- })
- } else {
- res.status(200).send({
- auth: true,
- removed: false,
- message: "BAD REQUEST"
- });
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.post('/admin', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- PendingUser.findOne({ email: req.body.email, post: "Admin" }, function(error, pendingResult){
- if(pendingResult){
- User.findOne({ email: req.body.adminemail }, function(error, result){
- if(result){
- if(result.admin){
- if(result.superadmin){
- PendingUser.deleteOne({ email: req.body.email, post: "Admin" }, function(error){
- if(error){
- res.status(200).send({
- auth: true,
- removed: false,
- message: "Some Error Processing Your Request. Please Try again Now."
- });
- } else {
- const deleteMessage = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: pendingResult.email,
- replyTo: process.env.REPLYTOMAIL,
- subject: 'Regarding Your Request',
- html: deletePendingUserTemplate(pendingResult),
- };
- transport.sendMail(deleteMessage, function(err, info){
- if(err){
- console.log(err);
- } else {
- console.log(info)
- }
- })
- res.status(200).send({
- auth: true,
- removed: true,
- message: "Request has been Deleted"
- });
- }
- })
- } else {
- res.status(200).send({
- auth: true,
- removed: false,
- message: "You Need to be a SuperAdmin."
- });
- }
- } else {
- res.status(200).send({
- auth: true,
- removed: false,
- message: "You Need to be a Admin."
- });
- }
- } else {
- res.status(200).send({
- auth: true,
- removed: false,
- message: "You are Unauthorized."
- });
- }
- })
- } else {
- res.status(200).send({
- auth: true,
- removed: false,
- message: "BAD REQUEST"
- });
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.post('/superadmin', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- PendingUser.findOne({ email: req.body.email, post: "SuperAdmin" }, function(error, pendingResult){
- if(pendingResult){
- User.findOne({ email: req.body.adminemail }, function(error, result){
- if(result){
- if(result.admin){
- if(result.superadmin){
- PendingUser.deleteOne({ email: req.body.email, post: "SuperAdmin" }, function(error){
- if(error){
- res.status(200).send({
- auth: true,
- removed: false,
- message: "Some Error Processing Your Request. Please Try again Now."
- });
- } else {
- const deleteMessage = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: pendingResult.email,
- replyTo: process.env.REPLYTOMAIL,
- subject: 'Regarding Your Request',
- html: deletePendingUserTemplate(pendingResult),
- };
- transport.sendMail(deleteMessage, function(err, info){
- if(err){
- console.log(err);
- } else {
- console.log(info)
- }
- })
- res.status(200).send({
- auth: true,
- removed: true,
- message: "Request has been Deleted"
- });
- }
- })
- } else {
- res.status(200).send({
- auth: true,
- removed: false,
- message: "You Need to be a SuperAdmin."
- });
- }
- } else {
- res.status(200).send({
- auth: true,
- removed: false,
- message: "You Need to be a Admin."
- });
- }
- } else {
- res.status(200).send({
- auth: true,
- removed: false,
- message: "You are Unauthorized."
- });
- }
- })
- } else {
- res.status(200).send({
- auth: true,
- removed: false,
- message: "BAD REQUEST"
- });
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-module.exports = router;
diff --git a/backend/routes/remove/spam.js b/backend/routes/remove/spam.js
deleted file mode 100644
index 93908a294..000000000
--- a/backend/routes/remove/spam.js
+++ /dev/null
@@ -1,389 +0,0 @@
-const express = require("express");
-const router = express.Router();
-const bcrypt = require("bcrypt");
-const transport = require('../../plugins/mailtransporter');
-const checkOrigin = require("../../plugins/checkOrigin");
-const removeSpamUser = require('../../templates/spam/removeUser.js');
-const jwtVerify = require('../../plugins/jwtVerify');
-
-//Model Imports
-const User = require("../../models/user");
-const SpamUser = require("../../models/spamUser");
-
-router.post('/user', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.adminuseremail }, function(error, user){
- if(user){
- if(user.admin){
- User.findOne({ email: req.body.email }, function(error, resultUser){
- if(resultUser){
- if(resultUser.superadmin){
- res.status(200).send({
- auth: false,
- deleted: false,
- message: "You are Not Authorized to Delete this User"
- })
- } else {
- if(resultUser.admin){
- res.status(200).send({
- auth: false,
- deleted: false,
- message: "You are Not Authorized to Delete this User"
- })
- } else {
- SpamUser.findOne({ email: req.body.email }, function(error, spamUser){
- if(spamUser){
- SpamUser.deleteOne({ email: req.body.email }, function(error){
- if(error){
- res.status(200).send({
- auth: true,
- deleted: false,
- message: "Error Occured while Removing the User. Please Try Again Later."
- })
- } else {
- const message = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: req.body.email,
- replyTo: process.env.REPLYTOMAIL,
- subject: 'You have been Allowed to Login',
- html: removeSpamUser(spamUser)
- };
- transport.sendMail(message, function(err, info){
- if(err){
- console.log(err);
- } else {
- console.log(info);
- }
- })
- res.status(200).send({
- auth: true,
- deleted: true,
- message: "Successfully Removed the User from Spam List. Now he Can Login."
- })
- }
- })
- } else {
- res.status(200).send({
- auth: false,
- deleted: false,
- message: "He is Not in Spam List"
- })
- }
- })
- }
- }
- } else {
- SpamUser.findOne({ email: req.body.email }, function(error, spamUser){
- if(spamUser){
- SpamUser.deleteOne({ email: req.body.email }, function(error){
- if(error){
- res.status(200).send({
- auth: true,
- deleted: false,
- message: "Error Occured while Removing the User. Please Try Again Later."
- })
- } else {
- const message = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: req.body.email,
- replyTo: process.env.REPLYTOMAIL,
- subject: 'You have been Allowed to Login',
- html: removeSpamUser(spamUser)
- };
- transport.sendMail(message, function(err, info){
- if(err){
- console.log(err);
- } else {
- console.log(info);
- }
- })
- res.status(200).send({
- auth: true,
- deleted: true,
- message: "Successfully Removed the User from Spam List. Now he Can Login."
- })
- }
- })
- } else {
- res.status(200).send({
- auth: false,
- deleted: false,
- message: "He is Not in Spam List"
- })
- }
- })
- }
- })
- } else {
- res.status(200).send({
- auth: false,
- deleted: false,
- message: "You are Unauthorized"
- })
- }
- } else {
- res.status(200).send({
- auth: false,
- deleted: false,
- message: "BAD REQUEST"
- })
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.post('/admin', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.adminuseremail }, function(error, user){
- if(user){
- if(user.admin){
- if(user.superadmin){
- User.findOne({ email: req.body.email }, function(error, resultUser){
- if(resultUser){
- if(resultUser.superadmin){
- res.status(200).send({
- auth: false,
- deleted: false,
- message: "You are Not Authorized to Delete this User"
- })
- } else {
- SpamUser.findOne({ email: req.body.email }, function(error, spamUser){
- if(spamUser){
- SpamUser.deleteOne({ email: req.body.email }, function(error){
- if(error){
- res.status(200).send({
- auth: true,
- deleted: false,
- message: "Error Occured while Removing the User. Please Try Again Later."
- })
- } else {
- const message = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: req.body.email,
- replyTo: process.env.REPLYTOMAIL,
- subject: 'You have been Allowed to Login',
- html: removeSpamUser(spamUser)
- };
- transport.sendMail(message, function(err, info){
- if(err){
- console.log(err);
- } else {
- console.log(info);
- }
- })
- res.status(200).send({
- auth: true,
- deleted: true,
- message: "Successfully Removed the User from Spam List. Now he Can Login."
- })
- }
- })
- } else {
- res.status(200).send({
- auth: false,
- deleted: false,
- message: "He is Not in Spam List"
- })
- }
- })
- }
- } else {
- SpamUser.findOne({ email: req.body.email }, function(error, spamUser){
- if(spamUser){
- SpamUser.deleteOne({ email: req.body.email }, function(error){
- if(error){
- res.status(200).send({
- auth: true,
- deleted: false,
- message: "Error Occured while Removing the User. Please Try Again Later."
- })
- } else {
- const message = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: req.body.email,
- replyTo: process.env.REPLYTOMAIL,
- subject: 'You have been Allowed to Login',
- html: removeSpamUser(spamUser)
- };
- transport.sendMail(message, function(err, info){
- if(err){
- console.log(err);
- } else {
- console.log(info);
- }
- })
- res.status(200).send({
- auth: true,
- deleted: true,
- message: "Successfully Removed the User from Spam List. Now he Can Login."
- })
- }
- })
- } else {
- res.status(200).send({
- auth: false,
- deleted: false,
- message: "He is Not in Spam List"
- })
- }
- })
- }
- })
- } else {
- res.status(200).send({
- auth: false,
- deleted: false,
- message: "You are Unauthorized"
- })
- }
- } else {
- res.status(200).send({
- auth: false,
- deleted: false,
- message: "You are Unauthorized"
- })
- }
- } else {
- res.status(200).send({
- auth: false,
- deleted: false,
- message: "BAD REQUEST"
- })
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.post('/superadmin', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.adminuseremail }, function(error, user){
- if(user){
- if(user.admin){
- if(user.superadmin){
- User.findOne({ email: req.body.email }, function(error, resultUser){
- if(resultUser){
- SpamUser.findOne({ email: req.body.email }, function(error, spamUser){
- if(spamUser){
- SpamUser.deleteOne({ email: req.body.email }, function(error){
- if(error){
- res.status(200).send({
- auth: true,
- deleted: false,
- message: "Error Occured while Removing the User. Please Try Again Later."
- })
- } else {
- const message = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: req.body.email,
- replyTo: process.env.REPLYTOMAIL,
- subject: 'You have been Allowed to Login',
- html: removeSpamUser(spamUser)
- };
- transport.sendMail(message, function(err, info){
- if(err){
- console.log(err);
- } else {
- console.log(info);
- }
- })
- res.status(200).send({
- auth: true,
- deleted: true,
- message: "Successfully Removed the User from Spam List. Now he Can Login."
- })
- }
- })
- } else {
- res.status(200).send({
- auth: false,
- deleted: false,
- message: "He is Not in Spam List"
- })
- }
- })
- } else {
- SpamUser.findOne({ email: req.body.email }, function(error, spamUser){
- if(spamUser){
- SpamUser.deleteOne({ email: req.body.email }, function(error){
- if(error){
- res.status(200).send({
- auth: true,
- deleted: false,
- message: "Error Occured while Removing the User. Please Try Again Later."
- })
- } else {
- const message = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: req.body.email,
- replyTo: process.env.REPLYTOMAIL,
- subject: 'You have been Allowed to Login',
- html: removeSpamUser(spamUser)
- };
- transport.sendMail(message, function(err, info){
- if(err){
- console.log(err);
- } else {
- console.log(info);
- }
- })
- res.status(200).send({
- auth: true,
- deleted: true,
- message: "Successfully Removed the User from Spam List. Now he Can Login."
- })
- }
- })
- } else {
- res.status(200).send({
- auth: false,
- deleted: false,
- message: "He is Not in Spam List"
- })
- }
- })
- }
- })
- } else {
- res.status(200).send({
- auth: false,
- deleted: false,
- message: "You are Unauthorized"
- })
- }
- } else {
- res.status(200).send({
- auth: false,
- deleted: false,
- message: "You are Unauthorized"
- })
- }
- } else {
- res.status(200).send({
- auth: false,
- deleted: false,
- message: "BAD REQUEST"
- })
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-module.exports = router;
diff --git a/backend/routes/request.js b/backend/routes/request.js
deleted file mode 100644
index e6eab6993..000000000
--- a/backend/routes/request.js
+++ /dev/null
@@ -1,358 +0,0 @@
-const express = require("express");
-const router = express.Router();
-const transport = require('../plugins/mailtransporter');
-const checkOrigin = require("../plugins/checkOrigin");
-const newRequestToAdminTemplate = require('../templates/request/newUser/toAdmin');
-const newRequestToUserTemplate = require('../templates/request/newUser/toUser');
-const existingRequestToAdminTemplate = require('../templates/request/existing/toAdmin');
-const existingRequestToUserTemplate = require('../templates/request/existing/toUser');
-const jwtVerify = require('../plugins/jwtVerify');
-
-//Model Imports
-const User = require("../models/user");
-const PendingUser = require("../models/pendingUser");
-const SpamUser = require("../models/spamUser");
-const InvitedUser = require("../models/invitedUser");
-const Settings = require("../models/siteSettings");
-
-router.post('/user', function(req, res){
- if(checkOrigin(req.headers.origin)){
- Settings.findOne({ cId: process.env.FRONTENDSITENAME }, function(error, settingsData){
- if(!settingsData || settingsData.requests){
- PendingUser.findOne({ email: req.body.email }, function(pendingError, pendingResult){
- if(pendingResult){
- res.status(200).send({auth: false, registered: false, message: "You Have Already Requested to Join. Please Wait While We Accept." });
- } else {
- SpamUser.findOne({ email: req.body.email }, function(spamError, spamResult){
- if(spamResult){
- res.status(200).send({
- auth: false,
- registered: false,
- message: "You Already Have an Account and Also You are in our Spam List. Contact through Email to Login."
- });
- } else {
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- res.status(200).send({
- auth: false,
- registered: false,
- message: "User already Registered with this Email."
- });
- } else {
- InvitedUser.findOne({ email: req.body.email, post: "User" }, function(error, result){
- if(result){
- InvitedUser.deleteOne({ email: req.body.email, post: "User" }, function(error){
- if(error){
- console.log(error);
- } else {
- console.log("Deleted");
- }
- })
- } else {
- console.log("Request Not Found");
- }
- })
- User.find({ admin: true }, function(error, result){
- let adminEmails = [];
- result.forEach((admin, i) => {
- adminEmails.push(admin.email)
- });
- const newPendingUser = new PendingUser({
- name: req.body.name,
- email:req.body.email,
- drive: req.body.drives,
- post: "User",
- message: req.body.message
- });
- newPendingUser.save(function(error, doc){
- if(!error){
- const adminMessage = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: adminEmails,
- replyTo: process.env.REPLYTOMAIL,
- subject: `${process.env.FRONTENDSITENAME} - Access Request`,
- html: newRequestToAdminTemplate(req.body)
- };
- const userMessage = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: req.body.email,
- replyTo: process.env.REPLYTOMAIL,
- subject: 'Your Request is Pending Confirmation.',
- html: newRequestToUserTemplate(req.body),
- };
- transport.sendMail(adminMessage, function(error, info){
- if(error){
- console.log(error);
- } else {
- console.log(info);
- }
- })
- transport.sendMail(userMessage, function(error, info){
- if(error){
- console.log(error);
- } else {
- console.log(info);
- }
- })
- res.status(200).send({
- auth: true,
- registered: true,
- message: "Your Request has been Sent to our Admins for Processing"
- });
- } else {
- res.status(200).send({
- auth: false,
- registered: true,
- message: "Ther's an Error Processing Your Request. Please Try Again Later."
- });
- }
- })
- })
- }
- })
- }
- })
- }
- })
- } else {
- res.status(200).send({
- auth: false,
- registered: true,
- message: "User Requests are Closed by the Admin. Please Try Afterwards or Contact Admins."
- });
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.post('/admin', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- Settings.findOne({ cId: process.env.FRONTENDSITENAME }, function(err, settingsData){
- if(!settingsData || settingsData.adminRequests){
- PendingUser.findOne({ email: req.body.email, post: "Admin" }, function(error, result){
- if(result){
- res.status(200).send({
- auth: true,
- changed: false,
- message: "You are Allowed to Request only One Time.Please Wait"
- });
- } else {
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- if(result.superadmin){
- res.status(200).send({
- auth: true,
- changed: false,
- message: "You are a Already a Super Admin"
- });
- } else {
- if(result.admin){
- res.status(200).send({
- auth: true,
- changed: false,
- message: "You are Already an Admin."
- });
- } else {
- User.find({ superadmin: true }, function(error, result){
- let adminEmails = [];
- result.forEach((admin, i) => {
- adminEmails.push(admin.email)
- });
- const newPendingUser = new PendingUser({
- name: req.body.name,
- email: req.body.email,
- drive: 0,
- post: "Admin",
- message: req.body.message
- })
- newPendingUser.save(function(error, doc){
- if(error){
- res.status(200).send({
- auth: true,
- changed: false,
- message: "Error Sending Your Request."
- });
- } else {
- const adminMessage = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: adminEmails,
- replyTo: process.env.REPLYTOMAIL,
- subject: `${process.env.FRONTENDSITENAME} - Admin Request`,
- html: existingRequestToAdminTemplate(req.body, "Admin")
- };
- const userMessage = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: req.body.email,
- replyTo: process.env.REPLYTOMAIL,
- subject: 'Your Request is Pending Confirmation.',
- html: existingRequestToUserTemplate(req.body, "Admin"),
- };
- transport.sendMail(adminMessage, function(error, info){
- if(error){
- console.log(error);
- } else {
- console.log(info);
- }
- })
- transport.sendMail(userMessage, function(error, info){
- if(error){
- console.log(error);
- } else {
- console.log(info);
- }
- })
- res.status(200).send({
- auth: true,
- registered: true,
- message: "Your Request has been Sent to our Admins for Processing"
- });
- }
- })
- })
- }
- }
- } else {
- res.status(200).send({
- auth: true,
- changed: false,
- message: "BAD REQUEST"
- });
- }
- })
- }
- })
- } else {
- res.status(200).send({
- auth: false,
- registered: true,
- message: "User Requests are Closed by the Admin. Please Try Afterwards or Contact Admins."
- });
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.post('/superadmin', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- Settings.findOne({ cId: process.env.FRONTENDSITENAME }, function(err, settingsData){
- if(!settingsData || settingsData.adminRequests){
- PendingUser.findOne({ email: req.body.email, post: "SuperAdmin" }, function(error, result){
- if(result){
- res.status(200).send({
- auth: true,
- changed: false,
- message: "You are Allowed to Request only One Time.Please Wait"
- });
- } else {
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- if(result.superadmin){
- res.status(200).send({
- auth: true,
- changed: false,
- message: "You are a Already a Super Admin"
- });
- } else {
- if(result.admin){
- User.find({ superadmin: true }, function(error, result){
- let adminEmails = [];
- result.forEach((admin, i) => {
- adminEmails.push(admin.email)
- });
- const newPendingUser = new PendingUser({
- name: req.body.name,
- email: req.body.email,
- post: "SuperAdmin",
- drive: 0,
- message: req.body.message
- })
- newPendingUser.save(function(error, doc){
- if(error){
- res.status(200).send({
- auth: true,
- changed: false,
- message: "Error Sending Your Request."
- });
- } else {
- const adminMessage = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: adminEmails,
- replyTo: process.env.REPLYTOMAIL,
- subject: `${process.env.FRONTENDSITENAME} - Admin Request`,
- html: existingRequestToAdminTemplate(req.body, "Superadmin")
- };
- const userMessage = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: req.body.email,
- replyTo: process.env.REPLYTOMAIL,
- subject: 'Your Request is Pending Confirmation.',
- html: existingRequestToUserTemplate(req.body, "Admin"),
- };
- transport.sendMail(adminMessage, function(error, info){
- if(error){
- console.log(error);
- } else {
- console.log(info);
- }
- })
- transport.sendMail(userMessage, function(error, info){
- if(error){
- console.log(error);
- } else {
- console.log(info);
- }
- })
- res.status(200).send({
- auth: true,
- registered: true,
- message: "Your Request has been Sent to our Admins for Processing"
- });
- }
- })
- })
- } else {
- res.status(200).send({
- auth: true,
- changed: false,
- message: "You Need to be a Admin to Request to be a Super Admin."
- });
- }
- }
- } else {
- res.status(200).send({
- auth: true,
- changed: false,
- message: "BAD REQUEST"
- });
- }
- })
- }
- })
- } else {
- res.status(200).send({
- auth: false,
- registered: true,
- message: "User Requests are Closed by the Admin. Please Try Afterwards or Contact Admins."
- });
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.use('/remove', require('./remove'));
-
-module.exports = router;
diff --git a/backend/routes/settings.js b/backend/routes/settings.js
deleted file mode 100644
index f72dc81ce..000000000
--- a/backend/routes/settings.js
+++ /dev/null
@@ -1,63 +0,0 @@
-const express = require("express");
-const router = express.Router();
-const checkOrigin = require("../plugins/checkOrigin");
-const jwtVerify = require('../plugins/jwtVerify');
-
-//Model Imports
-const User = require("../models/user");
-const Settings = require("../models/siteSettings");
-
-router.post('/set', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- if(result.admin && result.superadmin){
- Settings.findOne({ cId: process.env.FRONTENDSITENAME }, function(error, settingsData){
- if(settingsData){
- Settings.updateOne({ cId: process.env.FRONTENDSITENAME }, { $set: req.body.settings }, function(error){
- if(!error){
- res.status(200).send({ auth: true, registered: true, changed: true, message: "Your Preferences have been Saved." });
- } else {
- res.status(200).send({ auth: true, registered: true, changed: false, message: "Error Occured while Saving Your Preferences" });
- }
- })
- } else {
- const newData = new Settings(req.body.settings);
- newData.save(function(error, doc){
- if(!error){
- res.status(200).send({ auth: true, registered: true, changed: true, data: doc, message: "Your Preferences have been Saved." });
- }
- })
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: true, changed: false, message: "You don't Have Enough Permissions." })
- }
- } else {
- res.status(200).send({ auth: false, registered: false, changed: false, message: "Account Doesn't Exists" })
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.post("/get", function(req, res){
- if(checkOrigin(req.headers.origin)){
- Settings.findOne({ cId: process.env.FRONTENDSITENAME }, function(error, result){
- if(result){
- res.status(200).send({ auth: true, registered: true, data: result });
- } else {
- res.status(200).send({ auth: false, registered: true, message: "There's an Error while Getting Site Details." });
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-module.exports = router;
diff --git a/backend/routes/spam.js b/backend/routes/spam.js
deleted file mode 100644
index 541139e33..000000000
--- a/backend/routes/spam.js
+++ /dev/null
@@ -1,274 +0,0 @@
-const express = require("express");
-const router = express.Router();
-const bcrypt = require("bcrypt");
-const transport = require('../plugins/mailtransporter');
-const checkOrigin = require("../plugins/checkOrigin");
-const spamUserTemplate = require('../templates/spam/toAll.js');
-const jwtVerify = require('../plugins/jwtVerify');
-
-//Model Imports
-const User = require("../models/user");
-const SpamUser = require("../models/spamUser");
-
-router.post('/user', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.adminuseremail }, function(error, result){
- if(result){
- if(result.admin){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- const spamUser = new SpamUser({
- name: result.name,
- email: result.email,
- post: "User",
- flaggedby: req.body.adminuseremail,
- reason: req.body.message
- })
- spamUser.save(function(error, doc){
- if(error){
- res.status(200).send({ auth: true, registered: false, message: "Error Processing Request. Try Again Later" });
- } else {
- const message = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: req.body.email,
- replyTo: process.env.REPLYTOMAIL,
- subject: 'You Have Been Flagged',
- html: spamUserTemplate(doc, req.body.adminuseremail, req.body.message)
- };
- transport.sendMail(message, function(err, info){
- if(err){
- console.log(err);
- } else {
- console.log(info);
- }
- })
- res.status(200).send({ auth: true, registered: true, message: 'User has Been Added to Spam User Database.'});
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" })
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: true, message: "You are Unauthorized" })
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" })
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.post('/quickadd', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.adminuseremail }, function(error, result){
- if(result){
- if(result.admin){
- if(result.superadmin){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- const spamUser = new SpamUser({
- name: result.name,
- email: req.body.email,
- post: "User",
- flaggedby: req.body.adminuseremail,
- reason: "Quick Spam Handle - From Frontend"
- })
- spamUser.save(function(error, doc){
- if(error){
- res.status(200).send({ auth: true, registered: false, message: "Error Processing Request. Try Again Later" });
- } else {
- const message = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: req.body.email,
- replyTo: process.env.REPLYTOMAIL,
- subject: 'You Have Been Flagged',
- html: spamUserTemplate(doc, req.body.adminuseremail, "Quick Spam Handle - From Frontend")
- };
- transport.sendMail(message, function(err, info){
- if(err){
- console.log(err);
- } else {
- console.log(info);
- }
- })
- res.status(200).send({ auth: true, registered: true, message: 'User has Been Added to Spam User Database.'});
- }
- })
- } else {
- const spamUser = new SpamUser({
- name: "Unregistered User",
- email: req.body.email,
- post: "User",
- flaggedby: req.body.adminuseremail,
- reason: "Quick Spam Handle - From Frontend"
- })
- spamUser.save(function(error, doc){
- if(error){
- res.status(200).send({ auth: true, registered: false, message: "Error Processing Request. Try Again Later" });
- } else {
- const message = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: req.body.email,
- replyTo: process.env.REPLYTOMAIL,
- subject: 'You Have Been Flagged',
- html: spamUserTemplate(doc, req.body.adminuseremail, "Quick Spam Handle - From Frontend")
- };
- transport.sendMail(message, function(err, info){
- if(err){
- console.log(err);
- } else {
- console.log(info);
- }
- })
- res.status(200).send({ auth: true, registered: true, message: 'User has Been Added to Spam User Database.'});
- }
- })
- }
- })
- } else {
-
- }
- } else {
- res.status(200).send({ auth: false, registered: true, message: "You are Unauthorized" })
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" })
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.post('/admin', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.adminuseremail }, function(error, result){
- if(result){
- if(result.admin){
- if(result.superadmin){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- const spamUser = new SpamUser({
- name: result.name,
- email: result.email,
- post: "Admin",
- flaggedby: req.body.adminuseremail,
- reason: req.body.message
- })
- spamUser.save(function(error, doc){
- if(error){
- res.status(200).send({ auth: true, registered: false, message: "Error Processing Request. Try Again Later" });
- } else {
- const message = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: req.body.email,
- replyTo: process.env.REPLYTOMAIL,
- subject: 'You Have Been Flagged',
- html: spamUserTemplate(doc, req.body.adminuseremail, req.body.message)
- };
- transport.sendMail(message, function(err, info){
- if(err){
- console.log(err);
- } else {
- console.log(info);
- }
- })
- res.status(200).send({ auth: true, registered: true, message: 'Admin has Been Added to Spam User Database.'});
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" })
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: true, message: "You are Unauthorized" })
- }
- } else {
- res.status(200).send({ auth: false, registered: true, message: "You are Unauthorized" })
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" })
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.post('/superadmin', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.adminuseremail }, function(error, result){
- if(result){
- if(result.admin){
- if(result.superadmin){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- const spamUser = new SpamUser({
- name: result.name,
- email: result.email,
- post: "SuperAdmin",
- flaggedby: req.body.adminuseremail,
- reason: req.body.message
- })
- spamUser.save(function(error, doc){
- if(error){
- res.status(200).send({ auth: true, registered: false, message: "Error Processing Request. Try Again Later" });
- } else {
- const message = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: req.body.email,
- replyTo: process.env.REPLYTOMAIL,
- subject: 'You Have Been Flagged',
- html: spamUserTemplate(doc, req.body.adminuseremail, req.body.message)
- };
- transport.sendMail(message, function(err, info){
- if(err){
- console.log(err);
- } else {
- console.log(info);
- }
- })
- res.status(200).send({ auth: true, registered: true, message: 'Admin has Been Added to Spam User Database.'});
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" })
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: true, message: "You are Unauthorized" })
- }
- } else {
- res.status(200).send({ auth: false, registered: true, message: "You are Unauthorized" })
- }
- } else {
- res.status(200).send({ auth: false, registered: false, message: "BAD REQUEST" })
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.use('/remove', require('./remove/spam'));
-
-module.exports = router;
diff --git a/backend/routes/user.js b/backend/routes/user.js
deleted file mode 100644
index 9eb5d7d5f..000000000
--- a/backend/routes/user.js
+++ /dev/null
@@ -1,178 +0,0 @@
-const express = require("express");
-const router = express.Router();
-const jwt = require("jsonwebtoken");
-const bcrypt = require("bcrypt");
-const transport = require('../plugins/mailtransporter');
-const randomstring = require('randomstring');
-const checkOrigin = require("../plugins/checkOrigin");
-const jwtVerify = require('../plugins/jwtVerify');
-const selfDeleteEmail = require('../templates/delete/users/toSelf');
-const forgotPassEmail = require('../templates/request/existing/forgotPass');
-
-//Model Imports
-const User = require("../models/user");
-const Settings = require("../models/siteSettings");
-
-router.post('/verify', function(req, res){
- if(checkOrigin(req.headers.origin)){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- jwt.verify(req.body.token, process.env.TOKENSECRET, function(error, decoded){
- if(decoded){
- let activeSessions = result.sessions;
- if(activeSessions.map(session => {
- return session.sessionid
- }).indexOf(req.body.sessionId) > -1){
- jwt.verify(req.body.sessionId, process.env.TOKENSECRET, function(error, sessionDec){
- if(sessionDec){
- var expiryUnixTime = decoded.exp * 1000;
- var issuedUnixTime = decoded.iat * 1000;
- const issueDate = new Date(issuedUnixTime).toLocaleString();
- const expiryDate = new Date(expiryUnixTime).toLocaleString();
- res.status(200).send({ auth: true, registered: true, tokenuser: decoded, issuedate: issueDate, expirydate: expiryDate });
- } else {
- res.status(200).send({auth: false, registered: false, tokenuser: null});
- }
- })
- } else {
- res.status(200).send({auth: false, registered: false, tokenuser: null});
- }
- } else {
- res.status(200).send({auth: false, registered: false, tokenuser: null});
- }
- });
- } else {
- res.status(200).send({auth: false, registered: false, tokenuser: false});
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-});
-
-router.post('/changepassword', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- if(result.password != null && req.body.oldpassword != null){
- bcrypt.compare(req.body.oldpassword, result.password, function(err, synced){
- if(synced){
- var newPass = req.body.newpassword;
- User.updateOne({ email: req.body.email }, {$set: { password: bcrypt.hashSync(newPass, 10), temppassword: null }}, function(error){
- if(!error){
- res.status(200).send({ auth: true, registered: true, changed: true, message: 'Password Successfully Changed'});
- } else {
- res.status(200).send({ auth: true, registered: true, changed: false, message: 'Error While Changing password'})
- }
- })
- } else {
- res.status(200).send({ auth: true, registered: true, changed: false, message: "Paswords Do not Match with Our Records" })
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: true, changed: false, message: "Password is Null. Please Enter Your Password" });
- }
- } else {
- res.status(200).send({ auth: false, registered: false, changed: false, message: "Bad Request" })
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-});
-
-router.post('/forgotpass', function(req, res){
- if(checkOrigin(req.headers.origin)){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- var temporaryPass = randomstring.generate({ length: 8, charset: 'alphanumeric' });
- bcrypt.hash(temporaryPass, 10, function(err, hashedPass){
- if(hashedPass){
- User.updateOne({ email: req.body.email }, {$set: { password: null, temppassword: hashedPass, verified: false }}, function(error){
- if(!error){
- const otpMessage = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: req.body.email,
- replyTo: process.env.REPLYTOMAIL,
- subject: 'Reset Your Password',
- html: forgotPassEmail(result, temporaryPass),
- }
- transport.sendMail(otpMessage, function(error, info){
- if(error){
- console.log(error);
- } else {
- console.log(info);
- }
- })
- res.status(200).send({auth: true, registered: true, changed: true, message: "OTP has been Sent to Your Email. Reset Your Password by entering the OTP." })
- } else {
- res.status(200).send({ auth: false, registered: false, changed: false, message: "Error Occured While Generating OTP. Please Try Again Later." });
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: false, changed: false, message: "Error Occured While Generating OTP. Please Try Again Later." });
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: false, changed: false, message: "Account Doesn't Exists" })
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-})
-
-router.post('/delete', function(req, res){
- if(checkOrigin(req.headers.origin)){
- if(jwtVerify(req.headers.token)){
- User.findOne({ email: req.body.email }, function(error, result){
- if(result){
- if(result.password != null && req.body.pass != null){
- bcrypt.compare(req.body.pass, result.password, function(err, synced){
- if(synced){
- User.deleteOne({ email: req.body.email }, function(error){
- if(error){
- res.status(200).send({ auth: true, registered: true, deleted: false, message: "Some Error Pinging the Servers. Try Again Later." });
- } else {
- const deleteMessage = {
- from: `"${process.env.FRONTENDSITENAME} - Support"<${process.env.EMAILID}>`,
- to: req.body.email,
- bcc: req.body.ADMINEMAIL,
- replyTo: process.env.REPLYTOMAIL,
- subject: 'Account has been Deleted.',
- html: selfDeleteEmail(result)
- };
- transport.sendMail(deleteMessage, function(error, info){
- if(error){
- console.log(error);
- } else {
- console.log(info);
- }
- })
- res.status(200).send({ auth: true, registered: true, deleted: true, message: "Your Account has been deleted" });
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: true, deleted: false, message: "Your Admin Password is Wrong" });
- }
- })
- } else {
- res.status(200).send({ auth: false, registered: true, deleted: false, message: "Password is Null. Please Enter Your Password" });
- }
- } else {
- res.status(200).send({ auth: false, registered: false, deleted: false, message: "BAD REQUEST" });
- }
- })
- } else {
- res.status(200).send({ auth: false, message: "Bearer Token Not Valid" })
- }
- } else {
- res.status(200).send({ auth: false, message: "UNAUTHORIZED" })
- }
-});
-
-module.exports = router;
diff --git a/backend/templates/delete/invitedUsers/toAll.js b/backend/templates/delete/invitedUsers/toAll.js
deleted file mode 100644
index 7ed74464a..000000000
--- a/backend/templates/delete/invitedUsers/toAll.js
+++ /dev/null
@@ -1,299 +0,0 @@
-function returnTemplate(userDetails) {
- return `
-
-
-
-
-
-
-
-
-
-
-
- Material Email Template
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ${process.env.FRONTENDSITENAME}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Regarding Your Invite to ${userDetails.email}
-
-
-
-
- It Looks Like that Person didn't Register/ Request. Please Use this Feature Wisely. Any Issues, Reply to this Mail, We Will Help Resolve Your Issue.
-
- Enjoy! :)
-
- Thanks and Regards from,
-
- ${process.env.FRONTENDSITENAME}
-
- Regarding Your Request to ${process.env.FRONTENDSITENAME}
-
-
-
-
- It Looks Like Our Admins Have Rejected your Request. In Case You Know Any Admin, Contact Him to get Registered in this Website. Any Issues, Reply to this Mail, We Will Help Resolve Your Issue.
-
- Enjoy! :)
-
- Thanks and Regards from,
-
- ${process.env.FRONTENDSITENAME}
-
- This is to Inform you that your Account has been Deleted Automatically, Since You didn't Use the Sent One Time Password. Any Issues, Reply to this Mail, We Will Help Resolve Your Issue.
-
- Enjoy! :)
-
- Thanks and Regards from,
-
- ${process.env.FRONTENDSITENAME}
-
- You Have been Invited for ${post} by Admin - ${admin} to ${process.env.FRONTENDSITENAME}.His Message to You - ${message}. Any Issues, Reply to this Mail, We Will Help Resolve Your Issue.
-
- Enjoy! :)
-
- Thanks and Regards from,
-
- ${process.env.FRONTENDSITENAME}
-
- Your Account has been Promoted to ${post} by Super Admin - ${admin}, Please Use your Admin Powers Wisely. Any Issues, Reply to this Mail, We Will Help Resolve Your Issue.
-
- Enjoy! :)
-
- Thanks and Regards from,
-
- ${process.env.FRONTENDSITENAME}
-
- As Per Your Request We have Registered you in Our Website. Now You can Login with Your Email. The Following One Time Password is Valid for only 3 Hours. Any Issues, Reply to this Mail, We Will Help Resolve Your Issue.
-
- Your One Time Password - ${temppass}
-
- Enjoy! :)
-
- Thanks and Regards from,
-
- ${process.env.FRONTENDSITENAME}
-
- Your email ${userDetails.email} has been Verified. Now you can Login with Your Password. Any Issues, Reply to this Mail, We Will Help Resolve Your Issue.
-
- Enjoy! :)
-
- Thanks and Regards from,
-
- ${process.env.FRONTENDSITENAME}
-
- As you Forgot the Password, Please Verify your Account with OTP and Set a New Password. The Following One Time Password is Valid for only 3 Hours. Any Issues, Reply to this Mail, We Will Help Resolve Your Issue.
-
- Your One Time Password - ${temppass}
-
- Enjoy! :)
-
- Thanks and Regards from,
-
- ${process.env.FRONTENDSITENAME}
-
- The Following Person has Requested ${post} Previlage to ${process.env.FRONTENDSITENAME}. Any Issues, Reply to this Mail, We Will Help Resolve Your Issue.
-
- We have Received Your Request for ${post} Previlage in ${process.env.FRONTENDSITENAME}.Your Request is Pending Confirmation from Superadmins.Till we Process the Data, Please be Patient. Any Issues, Reply to this Mail, We Will Help Resolve Your Issue.
-
- Enjoy! :)
-
- Thanks and Regards from,
-
- ${process.env.FRONTENDSITENAME}
-
- The Following Person has Requested Access to ${process.env.FRONTENDSITENAME} Content. If You Know him it is Well and Good, but Don't Accept Unwanted Request and Bloat the Website. Any Issues, Reply to this Mail, We Will Help Resolve Your Issue.
-
- We have Received Your Request for Accessing Content in ${process.env.FRONTENDSITENAME}.Your Request is Pending Confirmation from Admins.Till we Process the Data, Please be Patient. On Confirmation You will get a Email regarding Confirmation and a OTP will be Sent to Activate your Account.You have to Activate Your Account within 3 Hours of Confirmation Mail, Otherwise your Account will be deleted Automatically. Any Issues, Reply to this Mail, We Will Help Resolve Your Issue.
-
- Enjoy! :)
-
- Thanks and Regards from,
-
- ${process.env.FRONTENDSITENAME}
-
- You Have been Flagged by Admin - ${admin} for the Reason - ${message}. Hereafter You will not be able to Login Unless the Your email is Removed from Spam User List. Any Issues, Reply to this Mail, We Will Help Resolve Your Issue.
-
- Enjoy! :)
-
- Thanks and Regards from,
-
- ${process.env.FRONTENDSITENAME}
-