-
+
+
{item.items.map((page, index) => (
-
- {page}
-
+ to={page.href}
+ className="bg-dark-soft text-white hover:text-white hover:bg-dark-light px-4 py-2 lg:bg-white lg:text-dark-hard lg:hover:bg-dark-hard"
+ >
+ {page.title}
+
))}
@@ -61,17 +61,47 @@ const NavItem = ({ item }) => {
};
const Header = () => {
+ const { t, i18n } = useTranslation();
+
+ const navigate = useNavigate();
+ const dispatch = useDispatch();
const [navIsVisible, setNavIsVisible] = useState(false);
+ const userState = useSelector((state) => state.user);
+ const [profileDropdown, setprofileDropdown] = useState(false);
+
+ const changeLanguage = (lng) => {
+ i18n.changeLanguage(lng);
+ };
+
const navVisibilityHandler = () => {
setNavIsVisible((curState) => !curState);
};
+ const logOutHandler = () => {
+ dispatch(logOut());
+ };
+
+ const navItemsInfo = [
+ { name: t("navBar.home"), type: "link", href: "/" },
+ { name: t("navBar.blog"), type: "link", href: "/blog" },
+ /*{
+ name: t("navBar.pages.main"),
+ type: "dropdown",
+ items: [
+ { title: t("navBar.pages.about"), href: "/about" },
+ { title: t("navBar.pages.contact"), href: "/contact" },
+ ],
+ },
+ { name: t("navBar.pricing"), type: "link", href: "/pricing" },
+ { name: t("navBar.faq"), type: "link", href: "/faq" }, */
+ ];
+
return (
-
-
-

-
+
+
+
+
-
+
{navItemsInfo.map((item, index) => (
))}
+
+ -
+
+ /
+
+
+
+
-
+ {userState.userInfo ? (
+
+
+
+
+
+
+ {userState.userInfo?.admin && (
+
+ )}
+
+
+
+
+
+
+
+
+ ) : (
+
+ )}
+
diff --git a/client/src/components/MainLayout.jsx b/client/src/components/MainLayout.jsx
index 69ac84f..3b5fea6 100644
--- a/client/src/components/MainLayout.jsx
+++ b/client/src/components/MainLayout.jsx
@@ -1,11 +1,14 @@
-import Header from "./Header"
-import Footer from "./Footer"
-const MainLayout = ({children}) => {
+import Header from "./Header"
+import Footer from "./Footer"
+
+const MainLayout = ({ children }) => {
+
+
return (
-
- {children}
-
+
+ {children}
+
)
}
diff --git a/client/src/components/Pagination.jsx b/client/src/components/Pagination.jsx
new file mode 100644
index 0000000..c1dcb6f
--- /dev/null
+++ b/client/src/components/Pagination.jsx
@@ -0,0 +1,102 @@
+import React from "react";
+import { usePagination, DOTS } from "../hooks/usePagination";
+
+const Pagination = ({
+ onPageChange,
+ currentPage,
+ siblingCount = 1,
+ totalPageCount,
+}) => {
+ const paginationRange = usePagination({
+ currentPage,
+ siblingCount,
+ totalPageCount,
+ });
+
+ if (currentPage === 0 || paginationRange.length < 2) return null;
+
+ const onNext = () => {
+ onPageChange(currentPage + 1);
+ };
+
+ const onPrevious = () => {
+ onPageChange(currentPage - 1);
+ };
+
+ let lastPage = paginationRange[paginationRange.length - 1];
+
+ return (
+
+
+ {/* Prev */}
+
+ {/* Numbers */}
+ {paginationRange.map((pageNumber, index) => {
+ if (pageNumber === DOTS) {
+ return (
+
+ );
+ }
+ return (
+
+ );
+ })}
+
+ {/* Next */}
+
+
+
+ );
+};
+
+export default Pagination;
diff --git a/client/src/components/ProfilePicture.jsx b/client/src/components/ProfilePicture.jsx
new file mode 100644
index 0000000..821aa00
--- /dev/null
+++ b/client/src/components/ProfilePicture.jsx
@@ -0,0 +1,157 @@
+import React, { useState } from "react";
+import { createPortal } from "react-dom";
+import { HiOutlineCamera } from "react-icons/hi";
+
+import stables from "../constants/stables";
+import CropEasy from "./crop/CropEasy";
+import { toast } from "react-hot-toast";
+import { useDispatch, useSelector } from "react-redux";
+import { useMutation, useQueryClient } from "@tanstack/react-query";
+import { updateProfilePicture } from "../services/index/users";
+import { userActions } from "../store/reducers/userReducers";
+import { images } from "../constants";
+import { useTranslation } from "react-i18next";
+
+
+
+const ProfilePicture = ({ avatar }) => {
+ const { t } = useTranslation();
+ const [showConfirmationModal, setShowConfirmationModal] = useState(false);
+
+ const queryClient = useQueryClient();
+ const dispatch = useDispatch();
+ const userState = useSelector((state) => state.user);
+
+ const [openCrop, setOpenCrop] = useState(false);
+ const [photo, setPhoto] = useState(null);
+
+ const openConfirmationModal = () => {
+ setShowConfirmationModal(true);
+ };
+
+ const closeConfirmationModal = () => {
+ setShowConfirmationModal(false);
+ };
+
+ const { mutate, isLoading } = useMutation({
+ mutationFn: ({ token, formData }) => {
+ return updateProfilePicture({
+ token: token,
+ formData: formData,
+ });
+ },
+ onSuccess: (data) => {
+ dispatch(userActions.setUserInfo(data));
+ setOpenCrop(false);
+ localStorage.setItem("account", JSON.stringify(data));
+ queryClient.invalidateQueries("profile");
+ toast.success("Profile Photo removed successfully");
+ },
+ onError: (error) => {
+ toast.error(error.message);
+ },
+ });
+
+ const handleFileChange = (e) => {
+ const file = e.target.files[0];
+ if (file) {
+ setPhoto({ url: URL.createObjectURL(file), file: file });
+ setOpenCrop(true);
+ }
+ };
+ const handleDeleteImage = () => {
+ openConfirmationModal();
+ };
+
+ const confirmDeleteProfilePicture = () => {
+ try {
+ const formData = new FormData();
+ formData.append("profilePicture", undefined);
+ mutate({ token: userState.userInfo.token, formData: formData });
+ } catch (err) {
+ toast.error(err.message);
+ console.log(err);
+ }
+ finally {
+ closeConfirmationModal();
+ }
+ }
+
+ return (
+
+ {showConfirmationModal && (
+
+
+
+ {t("profile.deletePicture")}
+
+
{t("profile.deletePictureConfirmation")}
+
+
+
+
+
+
+ )}
+ {openCrop &&
+ createPortal(
+
,
+ document.querySelector("#portal")
+ )}
+
+
+
{t("profile.maxImageSize")}
+
+
+
+
+
+
+
+
+ );
+};
+
+export default ProfilePicture;
diff --git a/client/src/components/SocialShareButtons.jsx b/client/src/components/SocialShareButtons.jsx
new file mode 100644
index 0000000..7db41ab
--- /dev/null
+++ b/client/src/components/SocialShareButtons.jsx
@@ -0,0 +1,44 @@
+import React from "react";
+import {
+ FaFacebookSquare,
+ FaTwitterSquare,
+ FaWhatsappSquare,
+ FaLinkedin,
+} from "react-icons/fa";
+
+const SocialShareButtons = ({ url, title }) => {
+ return (
+
+ );
+};
+
+export default SocialShareButtons;
diff --git a/client/src/components/comments/Comment.jsx b/client/src/components/comments/Comment.jsx
new file mode 100644
index 0000000..1d999d8
--- /dev/null
+++ b/client/src/components/comments/Comment.jsx
@@ -0,0 +1,162 @@
+import React from "react";
+import { FiMessageSquare, FiEdit2, FiTrash } from "react-icons/fi";
+
+import CommentForm from "./CommentForm";
+import { images, stable } from "../../constants";
+import { BsCheckLg } from "react-icons/bs";
+import { AiOutlineClose } from "react-icons/ai";
+import { useTranslation } from "react-i18next";
+import { Link } from "react-router-dom";
+
+const Comment = ({
+ comment,
+ loggedInUserId,
+ affectedComment,
+ setAffectedComment,
+ addComment,
+ parentId = null,
+ updateComment,
+ deleteComment,
+ replies,
+}) => {
+ const { t } = useTranslation();
+ const isUserLoggined = loggedInUserId;
+ const commentBelongsToUser = loggedInUserId === comment.user._id;
+ const isReplying =
+ affectedComment &&
+ affectedComment.type === "replying" &&
+ affectedComment._id === comment._id;
+ const isEditing =
+ affectedComment &&
+ affectedComment.type === "editing" &&
+ affectedComment._id === comment._id;
+ const repliedCommentId = parentId ? parentId : comment._id;
+ const replyOnUserId = comment.user._id;
+
+ return (
+
+ );
+};
+
+export default Comment;
diff --git a/client/src/components/comments/CommentForm.jsx b/client/src/components/comments/CommentForm.jsx
new file mode 100644
index 0000000..e9d8c34
--- /dev/null
+++ b/client/src/components/comments/CommentForm.jsx
@@ -0,0 +1,56 @@
+import React from "react";
+import { useState } from "react";
+import { useTranslation } from "react-i18next";
+
+const CommentForm = ({
+ btnLabel,
+ formSubmitHanlder,
+ formCancelHandler = null,
+ initialText = "",
+ loading = false,
+}) => {
+ const {t } = useTranslation();
+ const [value, setValue] = useState(initialText);
+
+ const submitHandler = (event) => {
+ event.preventDefault();
+ formSubmitHanlder(value);
+ setValue("");
+ };
+
+ return (
+
+ );
+};
+
+export default CommentForm;
diff --git a/client/src/components/comments/CommentsContainer.jsx b/client/src/components/comments/CommentsContainer.jsx
new file mode 100644
index 0000000..724eacd
--- /dev/null
+++ b/client/src/components/comments/CommentsContainer.jsx
@@ -0,0 +1,121 @@
+import React, { useState } from "react";
+import { useMutation, useQueryClient } from "@tanstack/react-query";
+
+import CommentForm from "./CommentForm";
+import Comment from "./Comment";
+import {
+ createNewComment,
+ deleteComment,
+ updateComment,
+} from "../../services/index/comments";
+import { useSelector } from "react-redux";
+import { toast } from "react-hot-toast";
+import { useTranslation } from "react-i18next";
+
+const CommentsContainer = ({
+ className,
+ loggedInUserId,
+ comments,
+ postSlug,
+}) => {
+ const { t } = useTranslation();
+ const queryClient = useQueryClient();
+ const userState = useSelector((state) => state.user);
+ const [affectedComment, setAffectedComment] = useState(null);
+
+ const { mutate: mutateNewComment, isLoading: isLoadingNewComment } =
+ useMutation({
+ mutationFn: ({ token, desc, slug, parent, replyOnUser }) => {
+ return createNewComment({ token, desc, slug, parent, replyOnUser });
+ },
+ onSuccess: () => {
+ toast.success("Comment added successfully");
+ },
+ onError: (error) => {
+ toast.error(error.message);
+ },
+ });
+
+ const { mutate: mutateUpdateComment } = useMutation({
+ mutationFn: ({ token, desc, commentId }) => {
+ return updateComment({ token, desc, commentId });
+ },
+ onSuccess: () => {
+ toast.success("Comment updated successfully");
+ queryClient.invalidateQueries(["blog", postSlug]);
+ },
+ onError: (error) => {
+ toast.error(error.message);
+ console.log(error);
+ },
+ });
+
+ const { mutate: mutateDeleteComment } = useMutation({
+ mutationFn: ({ token, commentId }) => {
+ return deleteComment({ token, commentId });
+ },
+ onSuccess: () => {
+ toast.success("Comment deleted successfully");
+ queryClient.invalidateQueries(["blog", postSlug]);
+ },
+ onError: (error) => {
+ toast.error(error.message);
+ console.log(error);
+ },
+ });
+
+ const addCommentHandler = (value, parent = null, replyOnUser = null) => {
+ mutateNewComment({
+ desc: value,
+ parent,
+ replyOnUser,
+ token: userState.userInfo.token,
+ slug: postSlug,
+ });
+
+ setAffectedComment(null);
+ queryClient.invalidateQueries(["blog", postSlug]);
+ };
+
+ const updateCommentHandler = (value, commentId) => {
+ mutateUpdateComment({
+ token: userState.userInfo.token,
+ desc: value,
+ commentId,
+ });
+ setAffectedComment(null);
+ };
+
+ const deleteCommentHandler = (commentId) => {
+ mutateDeleteComment({ token: userState.userInfo.token, commentId });
+ };
+
+ return (
+
+
addCommentHandler(value)}
+ loading={isLoadingNewComment}
+ />
+
+ {comments.map((c, index) => {
+ return (
+
+ );
+ })}
+
+
+ );
+};
+
+export default CommentsContainer;
diff --git a/client/src/components/crop/CropEasy.jsx b/client/src/components/crop/CropEasy.jsx
new file mode 100644
index 0000000..a8554df
--- /dev/null
+++ b/client/src/components/crop/CropEasy.jsx
@@ -0,0 +1,115 @@
+import React, { useState } from "react";
+import Cropper from "react-easy-crop";
+
+import getCroppedImg from "./cropImage";
+import { useMutation, useQueryClient } from "@tanstack/react-query";
+import { toast } from "react-hot-toast";
+import { updateProfilePicture } from "../../services/index/users";
+import { useDispatch, useSelector } from "react-redux";
+import { userActions } from "../../store/reducers/userReducers";
+
+const CropEasy = ({ photo, setOpenCrop }) => {
+ const userState = useSelector((state) => state.user);
+ const queryClient = useQueryClient();
+ const dispatch = useDispatch();
+ const [crop, setCrop] = useState({ x: 0, y: 0 });
+ const [zoom, setZoom] = useState(1);
+ const [croppedAreaPixels, setCroppedAreaPixels] = useState(null);
+
+ const { mutate, isLoading } = useMutation({
+ mutationFn: ({ token, formData }) => {
+ return updateProfilePicture({
+ token: token,
+ formData: formData,
+ });
+ },
+ onSuccess: (data) => {
+ dispatch(userActions.setUserInfo(data));
+ setOpenCrop(false);
+ localStorage.setItem("account", JSON.stringify(data));
+ queryClient.invalidateQueries("profile");
+ toast.success("Profile Photo updated successfully");
+ },
+ onError: (error) => {
+ toast.error(error.message);
+ },
+ });
+
+ const handleCropImage = async () => {
+ try {
+ const cropImg = await getCroppedImg(photo.url, croppedAreaPixels);
+ const file = new File([cropImg.file], `${photo.file.name}`, {
+ type: photo?.file.type,
+ });
+
+ const formData = new FormData();
+ formData.append("profilePicture", file);
+ mutate({ token: userState.userInfo.token, formData: formData });
+ } catch (err) {
+ toast.error(err.message);
+ console.log(err);
+ }
+ };
+
+ const handleCropComplete = (croppedArea, croppedAreaPixels) => {
+ setCroppedAreaPixels(croppedAreaPixels);
+ };
+ return (
+
+
+
Crop Image
+
+
+
+
+
+ {
+ setZoom(e.target.value);
+ }}
+ className="w-full h-1 mb-6 bg-gray-200 rounded-lg appearance-none cursor-pointer range-sm"
+ />
+
+
+
+
+
+
+
+ );
+};
+
+export default CropEasy;
diff --git a/client/src/components/crop/cropImage.jsx b/client/src/components/crop/cropImage.jsx
new file mode 100644
index 0000000..ee93d6a
--- /dev/null
+++ b/client/src/components/crop/cropImage.jsx
@@ -0,0 +1,101 @@
+export const createImage = (url) =>
+ new Promise((resolve, reject) => {
+ const image = new Image();
+ image.addEventListener("load", () => resolve(image));
+ image.addEventListener("error", (error) => reject(error));
+ image.setAttribute("crossOrigin", "anonymous"); // needed to avoid cross-origin issues on CodeSandbox
+ image.src = url;
+ });
+
+export function getRadianAngle(degreeValue) {
+ return (degreeValue * Math.PI) / 180;
+}
+
+/**
+ * Returns the new bounding area of a rotated rectangle.
+ */
+export function rotateSize(width, height, rotation) {
+ const rotRad = getRadianAngle(rotation);
+
+ return {
+ width:
+ Math.abs(Math.cos(rotRad) * width) + Math.abs(Math.sin(rotRad) * height),
+ height:
+ Math.abs(Math.sin(rotRad) * width) + Math.abs(Math.cos(rotRad) * height),
+ };
+}
+
+/**
+ * This function was adapted from the one in the ReadMe of https://github.com/DominicTobias/react-image-crop
+ */
+export default async function getCroppedImg(
+ imageSrc,
+ pixelCrop,
+ rotation = 0,
+ flip = { horizontal: false, vertical: false }
+) {
+ const image = await createImage(imageSrc);
+ const canvas = document.createElement("canvas");
+ const ctx = canvas.getContext("2d");
+
+ if (!ctx) {
+ return null;
+ }
+
+ const rotRad = getRadianAngle(rotation);
+
+ // calculate bounding box of the rotated image
+ const { width: bBoxWidth, height: bBoxHeight } = rotateSize(
+ image.width,
+ image.height,
+ rotation
+ );
+
+ // set canvas size to match the bounding box
+ canvas.width = bBoxWidth;
+ canvas.height = bBoxHeight;
+
+ // translate canvas context to a central location to allow rotating and flipping around the center
+ ctx.translate(bBoxWidth / 2, bBoxHeight / 2);
+ ctx.rotate(rotRad);
+ ctx.scale(flip.horizontal ? -1 : 1, flip.vertical ? -1 : 1);
+ ctx.translate(-image.width / 2, -image.height / 2);
+
+ // draw rotated image
+ ctx.drawImage(image, 0, 0);
+
+ const croppedCanvas = document.createElement("canvas");
+
+ const croppedCtx = croppedCanvas.getContext("2d");
+
+ if (!croppedCtx) {
+ return null;
+ }
+
+ // Set the size of the cropped canvas
+ croppedCanvas.width = pixelCrop.width;
+ croppedCanvas.height = pixelCrop.height;
+
+ // Draw the cropped image onto the new canvas
+ croppedCtx.drawImage(
+ canvas,
+ pixelCrop.x,
+ pixelCrop.y,
+ pixelCrop.width,
+ pixelCrop.height,
+ 0,
+ 0,
+ pixelCrop.width,
+ pixelCrop.height
+ );
+
+ // As Base64 string
+ // return croppedCanvas.toDataURL('image/jpeg');
+
+ // As a blob
+ return new Promise((resolve, reject) => {
+ croppedCanvas.toBlob((file) => {
+ resolve({ url: URL.createObjectURL(file), file: file });
+ });
+ });
+}
diff --git a/client/src/components/editor/Editor.jsx b/client/src/components/editor/Editor.jsx
new file mode 100644
index 0000000..d1e5484
--- /dev/null
+++ b/client/src/components/editor/Editor.jsx
@@ -0,0 +1,31 @@
+import { EditorContent, useEditor } from "@tiptap/react";
+import "highlight.js/styles/atom-one-dark.css";
+import MenuBar from "./MenuBar";
+import { extensions } from "../../constants/tiptapExtensions";
+
+const Editor = ({ onDataChange, content, editable }) => {
+ const editor = useEditor({
+ editable,
+ extensions: extensions,
+ editorProps: {
+ attributes: {
+ class:
+ "min-h-[20em] rounded-lg !prose !dark:prose-invert prose-sm sm:prose-base !max-w-none mt-5 focus:outline-none prose-pre:bg-[#282c34] prose-pre:text-[#abb2bf]",
+ },
+ },
+ onUpdate: ({ editor }) => {
+ const json = editor.getJSON();
+ onDataChange(json);
+ },
+ content: content,
+ });
+
+ return (
+
+ {editable && }
+
+
+ );
+};
+
+export default Editor;
diff --git a/client/src/components/editor/MenuBar.jsx b/client/src/components/editor/MenuBar.jsx
new file mode 100644
index 0000000..b290e52
--- /dev/null
+++ b/client/src/components/editor/MenuBar.jsx
@@ -0,0 +1,203 @@
+import { useCallback } from "react";
+import {
+ AiOutlineBold,
+ AiOutlineClose,
+ AiOutlineEnter,
+ AiOutlineItalic,
+ AiOutlineOrderedList,
+ AiOutlineRedo,
+ AiOutlineStrikethrough,
+ AiOutlineUndo,
+ AiOutlineUnorderedList,
+} from "react-icons/ai";
+import { BiParagraph } from "react-icons/bi";
+import { FiCode } from "react-icons/fi";
+import { MdOutlineLayersClear } from "react-icons/md";
+import { PiCodeBlock, PiQuotes, PiImageSquareBold } from "react-icons/pi";
+import { TbSpacingVertical } from "react-icons/tb";
+
+const MenuBar = ({ editor }) => {
+ const addImage = useCallback(() => {
+ const url = window.prompt("URL");
+
+ if (url) {
+ editor.chain().focus().setImage({ src: url }).run();
+ }
+ }, [editor]);
+
+ if (!editor) {
+ return null;
+ }
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+};
+
+export default MenuBar;
diff --git a/client/src/components/select-dropdown/MultiSelectTagDropdown.jsx b/client/src/components/select-dropdown/MultiSelectTagDropdown.jsx
new file mode 100644
index 0000000..1a145cd
--- /dev/null
+++ b/client/src/components/select-dropdown/MultiSelectTagDropdown.jsx
@@ -0,0 +1,24 @@
+import React from "react";
+import { useTranslation } from "react-i18next";
+import AsyncSelect from "react-select/async";
+
+const MultiSelectTagDropdown = ({
+ defaultValue,
+ loadOptions,
+ onChange,
+}) => {
+ const { t } = useTranslation();
+ return (
+
+ );
+};
+
+export default MultiSelectTagDropdown;
diff --git a/client/src/config/index.js b/client/src/config/index.js
new file mode 100644
index 0000000..6b0c6e1
--- /dev/null
+++ b/client/src/config/index.js
@@ -0,0 +1,4 @@
+export const settings = {
+ isUnderConstruction: false,
+ isDbConnected: true,
+}
\ No newline at end of file
diff --git a/client/src/constants/images.jsx b/client/src/constants/images.jsx
index c92c6bb..5ce6a9f 100644
--- a/client/src/constants/images.jsx
+++ b/client/src/constants/images.jsx
@@ -1,16 +1,16 @@
-import Logo from "../assets/Logo.svg"
-import HeroImg from "../assets/HeroImg.svg"
-import Post1 from "../assets/posts/Post1.jpg"
-import PostProfile from "../assets/posts/PostProfile.svg"
-import CTAImg from "../assets/CTAImg.jpg"
-const images = {
- Logo,
- HeroImg,
- Post1,
- PostProfile,
- CTAImg,
-
+import Logo from "../assets/Logo.svg";
+import HeroImg from "../assets/HeroImg.svg";
+import CTAImg from "../assets/CTAImgRobot.jpg";
+
+const defaultProfile = "/img/defaultProfile.jpg";
+const samplePostImage = "/img/sample.jpg";
-}
+const images = {
+ Logo,
+ HeroImg,
+ CTAImg,
+ samplePostImage,
+ defaultProfile,
+};
-export default images
\ No newline at end of file
+export default images;
diff --git a/client/src/constants/index.jsx b/client/src/constants/index.jsx
index b495c48..d50279a 100644
--- a/client/src/constants/index.jsx
+++ b/client/src/constants/index.jsx
@@ -1 +1,2 @@
export { default as images } from "./images.jsx";
+export { default as stable } from "./stables.jsx";
\ No newline at end of file
diff --git a/client/src/constants/stables.jsx b/client/src/constants/stables.jsx
new file mode 100644
index 0000000..793ed53
--- /dev/null
+++ b/client/src/constants/stables.jsx
@@ -0,0 +1,17 @@
+import { settings } from "../config";
+
+const LOCAL_URL = "http://localhost:5000/";
+const SOCIALMULTIMEDIA_URL = settings.isDbConnected ? "https://blog-production-8da6.up.railway.app/" : "https://msm-api.vercel.app/";
+
+const isProduction = import.meta.env.VITE_NODE_ENV === "production";
+
+const BASE_URL = isProduction ? SOCIALMULTIMEDIA_URL : LOCAL_URL;
+
+const UPLOAD_FOLDER_BASE_URL = `${BASE_URL}uploads/`;
+
+const stables = {
+ UPLOAD_FOLDER_BASE_URL,
+ BASE_URL,
+};
+
+export default stables;
diff --git a/client/src/constants/tiptapExtensions.jsx b/client/src/constants/tiptapExtensions.jsx
new file mode 100644
index 0000000..3062c46
--- /dev/null
+++ b/client/src/constants/tiptapExtensions.jsx
@@ -0,0 +1,47 @@
+import { Color } from "@tiptap/extension-color";
+import ListItem from "@tiptap/extension-list-item";
+import TextStyle from "@tiptap/extension-text-style";
+import StarterKit from "@tiptap/starter-kit";
+import CodeBlockLowlight from "@tiptap/extension-code-block-lowlight";
+import { lowlight } from "lowlight";
+import css from "highlight.js/lib/languages/css";
+import js from "highlight.js/lib/languages/javascript";
+import ts from "highlight.js/lib/languages/typescript";
+import html from "highlight.js/lib/languages/xml";
+import Dropcursor from "@tiptap/extension-dropcursor";
+import Image from "@tiptap/extension-image";
+import Link from "@tiptap/extension-link";
+
+
+lowlight.registerLanguage("html", html);
+lowlight.registerLanguage("css", css);
+lowlight.registerLanguage("js", js);
+lowlight.registerLanguage("ts", ts);
+
+export const extensions = [
+ Color.configure({ types: [TextStyle.name, ListItem.name] }),
+ TextStyle.configure({ types: [ListItem.name] }),
+ StarterKit.configure({
+ bulletList: {
+ keepMarks: true,
+ keepAttributes: false, // TODO : Making this as `false` becase marks are not preserved when I try to preserve attrs, awaiting a bit of help
+ },
+ orderedList: {
+ keepMarks: true,
+ keepAttributes: false, // TODO : Making this as `false` becase marks are not preserved when I try to preserve attrs, awaiting a bit of help
+ },
+ }),
+ CodeBlockLowlight.configure({
+ lowlight,
+ }),
+ Dropcursor,
+ Image,
+ Link.configure({
+ autolink: true,
+ HTMLAttributes: {
+ class: "text-primary",
+ target: "_blank",
+ rel: "noopener noreferrer",
+ },
+ }),
+];
diff --git a/client/src/data/comments.jsx b/client/src/data/comments.jsx
new file mode 100644
index 0000000..66ffc0f
--- /dev/null
+++ b/client/src/data/comments.jsx
@@ -0,0 +1,52 @@
+export const getCommentsData = async () => {
+ return [
+ {
+ _id: "10",
+ user: {
+ _id: "a",
+ name: "Mohammad Rezaii",
+ },
+ desc: "it was a nice post, Thank you!",
+ post: "1",
+ parent: null,
+ replyOnUser: null,
+ createdAt: "2023-12-31T17:22:05.092+0000",
+ },
+ {
+ _id: "11",
+ user: {
+ _id: "b",
+ name: "Paul M. Williams",
+ },
+ desc: "a reply for Mohammad",
+ post: "1",
+ parent: "10",
+ replyOnUser: "a",
+ createdAt: "2023-12-31T17:22:05.092+0000",
+ },
+ {
+ _id: "12",
+ user: {
+ _id: "b",
+ name: "Paul M. Williams",
+ },
+ desc: "keep it up bro <3",
+ post: "1",
+ parent: null,
+ replyOnUser: null,
+ createdAt: "2023-12-31T17:22:05.092+0000",
+ },
+ {
+ _id: "13",
+ user: {
+ _id: "c",
+ name: "Jessica C. Stephens",
+ },
+ desc: "I'm always interested in your content :)",
+ post: "1",
+ parent: null,
+ replyOnUser: null,
+ createdAt: "2023-12-31T17:22:05.092+0000",
+ },
+ ];
+};
diff --git a/client/src/hooks/useDataTable.jsx b/client/src/hooks/useDataTable.jsx
new file mode 100644
index 0000000..cb4f412
--- /dev/null
+++ b/client/src/hooks/useDataTable.jsx
@@ -0,0 +1,76 @@
+import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
+import { useSelector } from "react-redux";
+import { useEffect, useState } from "react";
+import { toast } from "react-hot-toast";
+
+let isFirstRun = true;
+
+export const useDataTable = ({
+ dataQueryFn,
+ dataQueryKey,
+ mutateDeleteFn,
+ deleteDataMessage,
+}) => {
+ const queryClient = useQueryClient();
+ const userState = useSelector((state) => state.user);
+ const [searchKeyword, setSearchKeyword] = useState("");
+ const [currentPage, setCurrentPage] = useState(1);
+
+ const { data, isLoading, isFetching, refetch } = useQuery({
+ queryFn: dataQueryFn,
+ queryKey: [dataQueryKey],
+ });
+
+ const { mutate: mutateDeletePost, isLoading: isLoadingDeleteData } =
+ useMutation({
+ mutationFn: mutateDeleteFn,
+ onSuccess: () => {
+ queryClient.invalidateQueries([dataQueryKey]);
+ toast.success(deleteDataMessage);
+ },
+ onError: (error) => {
+ toast.error(error.message);
+ console.log(error);
+ },
+ });
+
+ useEffect(() => {
+ if (isFirstRun) {
+ isFirstRun = false;
+ return;
+ }
+ refetch();
+ }, [refetch, currentPage]);
+
+ const searchKeywordHandler = (e) => {
+ const { value } = e.target;
+ setSearchKeyword(value);
+ };
+
+ const submitSearchKeywordHandler = (e) => {
+ e.preventDefault();
+ setCurrentPage(1);
+ refetch();
+ };
+
+ const deleteDataHandler = ({ slug, token }) => {
+ if (window.confirm("Do you want to delete this record?")) {
+ mutateDeletePost({ slug, token });
+ }
+ };
+
+ return {
+ userState,
+ currentPage,
+ searchKeyword,
+ data,
+ isLoading,
+ isFetching,
+ isLoadingDeleteData,
+ queryClient,
+ searchKeywordHandler,
+ submitSearchKeywordHandler,
+ deleteDataHandler,
+ setCurrentPage,
+ };
+};
\ No newline at end of file
diff --git a/client/src/hooks/usePagination.jsx b/client/src/hooks/usePagination.jsx
new file mode 100644
index 0000000..c603bcd
--- /dev/null
+++ b/client/src/hooks/usePagination.jsx
@@ -0,0 +1,64 @@
+import { useMemo } from "react";
+export const DOTS = "...";
+
+export const usePagination = ({
+ totalCount,
+ pageSize,
+ siblingCount = 1,
+ currentPage,
+ totalPageCount,
+}) => {
+ const paginationRange = useMemo(() => {
+ const totalPageNumbers = siblingCount + 5;
+
+ /* < 1 2 3 4 5 > */
+ if (totalPageNumbers >= totalPageCount) {
+ return range(1, totalPageCount);
+ }
+
+ const leftSiblingIndex = Math.max(currentPage - siblingCount, 1);
+ const rightSiblingIndex = Math.min(
+ currentPage + siblingCount,
+ totalPageCount
+ );
+
+ const shouldShowLeftDots = leftSiblingIndex > 2;
+ const shouldShowRightDots = rightSiblingIndex < totalPageCount - 2;
+
+ const firstPageIndex = 1;
+ const lastPageIndex = totalPageCount;
+
+ /* < 1 2 3 4 5 ... 80 > */
+ if (!shouldShowLeftDots && shouldShowRightDots) {
+ let leftItemCount = 3 + 2 * siblingCount;
+ let leftRange = range(1, leftItemCount);
+
+ return [...leftRange, DOTS, lastPageIndex];
+ }
+
+ /* < 1 ... 76 77 78 79 80 > */
+ if (shouldShowLeftDots && !shouldShowRightDots) {
+ let rightItemCount = 3 + 2 * siblingCount;
+ let rightRange = range(
+ totalPageCount - rightItemCount + 1,
+ totalPageCount
+ );
+
+ return [firstPageIndex, DOTS, ...rightRange];
+ }
+
+ /* < 1 ... 24 25 26 ... 80 > */
+ if (shouldShowLeftDots && shouldShowRightDots) {
+ let middleRange = range(leftSiblingIndex, rightSiblingIndex);
+
+ return [firstPageIndex, DOTS, ...middleRange, DOTS, lastPageIndex];
+ }
+ }, [totalCount, pageSize, siblingCount, currentPage, totalPageCount]);
+
+ return paginationRange;
+};
+
+function range(start, end) {
+ const length = end - start + 1;
+ return Array.from({ length }, (_, i) => start + i);
+}
diff --git a/client/src/i18n.jsx b/client/src/i18n.jsx
new file mode 100644
index 0000000..5210d39
--- /dev/null
+++ b/client/src/i18n.jsx
@@ -0,0 +1,612 @@
+import i18n from 'i18next';
+import { initReactI18next } from 'react-i18next';
+
+// Define las traducciones
+const resources = {
+ es: {
+ translation: {
+ admin: {
+ common: {
+ optional: "(opcional)",
+ select: 'Seleccionar...',
+ filter: 'Filtrar',
+ loading: 'Cargando...',
+ noData: 'No hay datos',
+ actions: {
+ cancel: 'Cancelar',
+ update: 'Actualizar',
+ publish: 'Publicar',
+ delete: 'Eliminar',
+ edit: 'Editar',
+ reply: 'Responder',
+ },
+ verified: 'Verificado',
+ notVerified: 'No verificado',
+ table: {
+ author: 'Autor',
+ title: 'Título',
+ userName: 'Nombre',
+ mail: 'Email',
+ verified: 'Verificado',
+ admin: 'Admin',
+ category: 'Categoría',
+ tags: 'Etiquetas',
+ comment: 'Comentario',
+ inResponseTo: 'En respuesta a',
+ createdAt: 'Creado el',
+ actions: {
+ title: "",
+ approve: 'Aprobar',
+ unapprove: 'Desaprobar',
+ delete: 'Eliminar',
+ edit: 'Editar',
+ show: 'Mostrar',
+ hide: 'Ocultar',
+ },
+ replyOn: 'En respuesta a',
+ }
+ },
+ mainMenu: {
+ title: 'Menú principal',
+ },
+ dashboard: {
+ title: 'Panel de admin',
+ paragraph: '¡Bienvenid@ al gestor de contenido de MSM! Aquí podrás administrar los comentarios en tus posts, editar, crear y eliminar posts, así como también crear y eliminar categorías, y gestionar usuarios de la red.',
+ },
+ comments: {
+ title: 'Comentarios',
+ manage: 'Administrar Comentarios',
+ filterPlaceholder: 'Buscar comentarios...',
+ },
+ posts: {
+ title: 'Posts',
+ manage: {
+ title: 'Administrar Posts',
+ filterPlaceholder: 'Buscar posts...',
+ noTags: 'No hay etiquetas',
+ uncategorized: 'Sin categoría',
+ },
+ new: {
+ isNewPostTooltip: 'Los posts nuevos no se muestran hasta ser publicados.',
+ isNewPost: 'Nuevo',
+ title: 'Editar Post',
+ create: 'Nuevo Post',
+ inputs: {
+ deleteImage: 'Eliminar imágen',
+ url: 'URL del Proyecto',
+ slug: 'Slug',
+ title: 'Título',
+ caption: 'Subtítulo',
+ categories: 'Categorías',
+ tags: 'Etiquetas',
+ select: 'Seleccionar',
+ },
+ placeholders: {
+ url: 'http://www.link-a-tu-proyecto.com',
+ }
+
+
+ },
+ categories: {
+ title: 'Categorías',
+ manage: 'Administrar Categorías',
+ add: 'Agregar Categoría Nueva',
+ addPlaceholder: 'Título de la categoría...',
+ addBtn: 'Agregar',
+ filterPlaceholder: 'Buscar categorías...',
+ update: 'Actualizar Categoría',
+
+ },
+ },
+ users: {
+ title: 'Usuarios',
+ manage: 'Administrar Usuarios',
+ filterPlaceholder: 'Buscar usuario...',
+ },
+ },
+ alerts: {
+ invalidUrl: 'URL no válida (http:// o https://)',
+ underConstruction: 'Sitio bajo construcción, algunas características aún no funcionan',
+ dbNotConnected: 'Debido a su costo, la base de datos no está almacenando imágenes. Si quieres ver la funcionalidad completa, por favor contáctanos.',
+ somethingWentWrong: 'Oops! Algo salió mal',
+ couldNotFetchPostDetails: 'No se pudieron obtener los detalles del post',
+ nothingHere: '¡Oops! No hay nada aquí',
+ },
+ navBar: {
+ home: 'Inicio',
+ blog: 'Blog',
+ pages: {
+ main: 'Páginas',
+ about: 'Sobre nosotros',
+ contact: 'Contáctanos',
+ },
+ pricing: 'Precios',
+ faq: 'FAQ',
+ account: {
+ main: 'Cuenta',
+ admin: 'Administración',
+ signin: 'Iniciar sesión',
+ logout: 'Cerrar sesión',
+ register: 'Registrarse',
+ profile: 'Perfil',
+ },
+ },
+ hero: {
+ welcomeMessage: 'Inspírate y colabora con los estudiantes de Diseño Multimedia de ORT en nuestra red social. ¡Únase hoy para crear juntos el diseño del mañana!',
+ searchPlaceholder: 'Buscar artículos',
+ searchBtn: 'Buscar',
+ searchSuggestions: 'Etiquetas populares',
+ altHeroImg: 'Imagen de bienvenida',
+ },
+ profile: {
+ maxImageSize: "Max 2MB",
+ deletePictureConfirmation: '¿Estás seguro de que quieres eliminar tu foto de perfil?',
+ user: "Usuario",
+ cancel: "Cancelar",
+ specializedIn: "Especialización",
+ noAnswer: "No especificado",
+ role: "Rol",
+ information: "Información",
+ account: "Cuenta",
+ contact: "Contacto",
+ personal: "Personal",
+ phone: "Teléfono",
+ deletePicture: "Eliminar",
+ aboutMe: "Sobre mí",
+ name: "Nombre",
+ email: "Email",
+ newPassword: "Nueva contraseña (opcional)",
+ update: "Actualizar",
+ placeholders: {
+ name: "Ingrese su nombre",
+ email: "Ingrese su email",
+ password: "Ingrese nueva contraseña",
+ specializedIn: "Ingrese su especialización",
+ phone: "Ingrese su teléfono",
+ bio: "Ingrese su biografía",
+ },
+ errors: {
+ name: {
+ required: "El nombre es requerido",
+ length: "El nombre debe tener al menos 1 caracter",
+ },
+ email: {
+ required: "El email es requerido",
+ pattern: "Ingrese un email válido",
+ },
+ password: {
+ required: "La contraseña es requerida",
+ length: "La contraseña debe tener al menos 6 caracteres",
+ },
+ }
+ },
+ articles: {
+ moreArticles: "Más artículos",
+ projectLink: "Link al proyecto",
+ },
+ blog: {
+ categoryFilter: 'Filtrar por categoría',
+ },
+ cta: {
+ title: "¡Conviértete en creador de contenido!",
+ success: "¡Gracias por tu interés! Nos pondremos en contacto pronto...",
+ inputMailPlaceholder: "Tu Email",
+ inputNamePlaceholder: "Tu Nombre",
+ button: "Empezar",
+ response: "Recibe una respuesta mañana si envías antes de las 9pm hoy. Si recibimos después de las 9pm, recibiremos una respuesta al día siguiente.",
+ future: "El futuro del trabajo",
+ futureDescription: "La mayoría de las personas trabajarán en empleos que hoy no existen."
+
+ },
+ footer: {
+ shortDescription: "Inspirate y colabora con los estudiantes de Diseño Multimedia de ORT en nuestra red social.",
+ product: {
+ title: "Producto",
+ landingPage: "Página de inicio",
+ features: "Características",
+ documentation: "Documentación",
+ referalProgram: "Programa de referidos",
+ pricing: "Precios",
+ },
+ services: {
+ title: "Servicios",
+ documentation: "Documentación",
+ design: "Diseño",
+ themes: "Temas",
+ illustrations: "Ilustraciones",
+ uiKit: "UI Kit",
+ },
+ company: {
+ title: "Compañía",
+ about: "Acerca de",
+ terms: "Términos",
+ privacyPolicy: "Política de privacidad",
+ careers: "Carreras",
+ },
+ more: {
+ title: "Más",
+ documentation: "Documentación",
+ license: "Licencia",
+ changelog: "Changelog",
+ },
+ },
+ article: {
+ suggestedPosts: "Últimos artículos",
+ share: "Compartir",
+ tags: "Etiquetas",
+ noTags: "No hay etiquetas",
+ comments: {
+ placeholder: "Escribe un comentario...",
+ send: "Enviar",
+ reply: "Responder",
+ edit: "Editar",
+ delete: "Eliminar",
+ update: "Actualizar",
+ cancel: "Cancelar",
+ }
+ },
+ login: {
+ title: "Iniciar sesión",
+ email: "Email",
+ emailPlaceholder: "Ingrese su email",
+ passwordPlaceholder: "Ingrese su contraseña",
+ password: "Contraseña",
+ button: "Iniciar sesión",
+ noAccount: "¿No tienes cuenta?",
+ register: "Regístrate aquí",
+ forgetPassword: "¿Olvidaste tu contraseña?",
+ errors: {
+ email: {
+ required: "El email es requerido",
+ pattern: "Ingrese un email válido",
+ },
+ password: {
+ required: "La contraseña es requerida",
+ length: "La contraseña debe tener al menos 6 caracteres",
+ },
+ }
+ },
+ register: {
+ title: "Registrarse",
+ name: "Nombre",
+ namePlaceholder: "Ingrese su nombre",
+ email: "Email",
+ emailPlaceholder: "Ingrese su email",
+ passwordPlaceholder: "Ingrese su contraseña",
+ password: "Contraseña",
+ confirmPassword: "Confirmar contraseña",
+ confirmPasswordPlaceholder: "Confirme su contraseña",
+ button: "Registrarse",
+ haveAccount: "¿Ya tienes una cuenta?",
+ login: "Inicia sesión aquí",
+ errors: {
+ email: {
+ required: "El email es requerido",
+ pattern: "Ingrese un email válido",
+ },
+ password: {
+ required: "La contraseña es requerida",
+ length: "La contraseña debe tener al menos 6 caracteres",
+ },
+ confirmPassword: {
+ required: "La confirmación de la contraseña es requerida",
+ validate: "Las contraseñas no coinciden",
+ },
+ name: {
+ required: "El nombre es requerido",
+ length: "El nombre debe tener al menos 1 caracter",
+ }
+ }
+ },
+ // Agrega más traducciones aquí
+ },
+ },
+ en: {
+ translation: {
+ admin: {
+ common: {
+ optional: "(optional)",
+ select: 'Select...',
+ filter: 'Filter',
+ loading: 'Loading...',
+ noData: 'No data',
+ verified: 'Verified',
+ notVerified: 'Unverified',
+ actions: {
+ cancel: 'Cancel',
+ update: 'Update',
+ publish: 'Publish',
+ delete: 'Delete',
+ edit: 'Edit',
+
+ },
+ table: {
+ author: 'Author',
+ title: 'Title',
+ userName: 'Username',
+ mail: 'Email',
+ verified: 'Verified',
+ admin: 'Admin',
+ category: 'Category',
+ tags: 'Tags',
+ comment: 'Comment',
+ inResponseTo: 'In response to',
+ createdAt: 'Created at',
+ actions: {
+ title: "",
+ approve: 'Approve',
+ unapprove: 'Unapprove',
+ delete: 'Delete',
+ edit: 'Edit',
+ show: 'Show',
+ hide: 'Hide',
+ },
+ replyOn: 'In response to',
+ }
+ },
+ mainMenu: {
+ title: 'Main Menu',
+ },
+ dashboard: {
+ title: 'Admin Panel',
+ paragraph: 'Welcome to the MSM content manager! Here you can manage comments on your posts, edit, create and delete posts, as well as create and delete categories, and manage network users.',
+ },
+ comments: {
+ title: 'Comments',
+ manage: 'Manage Comments',
+ filterPlaceholder: 'Search comments...',
+ },
+ posts: {
+ title: 'Posts',
+ manage: {
+ title: 'Manage Posts',
+ filterPlaceholder: 'Search posts...',
+ noTags: 'No tags',
+ uncategorized: 'Uncategorized',
+ },
+ new: {
+ isNewPostTooltip: 'New posts are not shown until published.',
+ isNewPost: 'New',
+ title: 'Edit Post',
+ create: 'New Post',
+ inputs: {
+ deleteImage: 'Delete image',
+ url: 'Project URL',
+ slug: 'Slug',
+ title: 'Title',
+ caption: 'Caption',
+ categories: 'Categories',
+ tags: 'Tags',
+ select: 'Select',
+ },
+ placeholders: {
+ url: 'http://www.link-to-your-project.com',
+ }
+
+ },
+ categories: {
+ title: 'Categories',
+ manage: 'Manage Categories',
+ add: 'Add New Category',
+ addPlaceholder: 'Category title...',
+ addBtn: 'Add',
+ filterPlaceholder: 'Search categories...',
+ update: 'Update Category',
+ },
+ },
+ users: {
+ title: 'Users',
+ manage: 'Manage Users',
+ filterPlaceholder: 'Search user...',
+ },
+ },
+ alerts: {
+ invalidUrl: 'URL is not valid (http:// or https://)',
+ underConstruction: 'Site under construction, some features are not working yet',
+ dbNotConnected: 'Due to its cost, the database is not storaging pictures. If you want to see the full functionality, please contact us.',
+ somethingWentWrong: 'Oops! Something went wrong',
+ couldNotFetchPostDetails: 'Could not fetch post details',
+ nothingHere: 'Oops! Nothing here',
+
+ },
+ navBar: {
+ home: 'Home',
+ blog: 'Blog',
+ pages: {
+ main: 'Pages',
+ about: 'About us',
+ contact: 'Contact us',
+ },
+ pricing: 'Prices',
+ faq: 'FAQ',
+ account: {
+ main: 'Account',
+ admin: 'Admin dashboard',
+ signin: 'Sign In',
+ logout: 'Logout',
+ register: 'Register',
+ profile: 'Profile Page',
+ },
+ },
+ hero: {
+ welcomeMessage: "Get inspired and collaborate with ORT Multimedia Design students on our social network. Join today to create tomorrow's design together!",
+ searchPlaceholder: "Search articles",
+ searchBtn: "Search",
+ searchSuggestions: "Popular tags",
+ altHeroImg: "Welcome image",
+ },
+ profile: {
+ maxImageSize: "Max 2MB",
+ deletePictureConfirmation: "Are you sure you want to delete your profile picture?",
+ user: "User",
+ cancel: "Cancel",
+ specializedIn: "Specialization",
+ role: "Role",
+ information: "Information",
+ account: "Account",
+ contact: "Contact",
+ personal: "Personal",
+ phone: "Phone",
+ noPhone: "Not specified",
+ deletePicture: "Delete",
+ aboutMe: "About me",
+ name: "Name",
+ email: "Email",
+ newPassword: "New password (optional)",
+ update: "Update",
+ placeholders: {
+ name: "Enter name",
+ email: "Enter email",
+ password: "Enter new password",
+ specializedIn: "Enter specialization",
+ phone: "Enter phone",
+ bio: "Enter bio",
+ },
+ errors: {
+ name: {
+ required: "Name is required",
+ length: "Name must be at least 1 character long",
+ },
+ email: {
+ required: "Email is required",
+ pattern: "Enter a valid email address",
+ },
+ password: {
+ required: "Password is required",
+ length: "Password must be at least 6 characters long",
+ },
+ }
+ },
+ articles: {
+ moreArticles: "More articles",
+ projectLink: "Project link",
+ },
+ blog: {
+ categoryFilter: 'Filter by category',
+ },
+ cta: {
+ title: "Become a content creator today!",
+ success: "Thank you for your interest! We'll be in touch soon.",
+ inputMailPlaceholder: "Your Email",
+ inputNamePlaceholder: "Your Name",
+ button: "Get started",
+ response: "Get a response tomorrow if you submit by 9pm today. If we received after 9pm will get a reponse the following day.",
+ future: "Future of Work",
+ futureDescription: "Majority of peole will work in jobs that don’t exist today."
+ },
+ footer: {
+ shortDescription: "Get inspired and collaborate with ORT Multimedia Design students on our social network.",
+ product: {
+ title: "Product",
+ landingPage: "Landing Page",
+ features: "Features",
+ documentation: "Documentation",
+ referalProgram: "Referal Program",
+ pricing: "Pricing",
+ },
+ services: {
+ title: "Services",
+ documentation: "Documentation",
+ design: "Design",
+ themes: "Themes",
+ illustrations: "Illustrations",
+ uiKit: "UI Kit",
+ },
+ company: {
+ title: "Company",
+ about: "About",
+ terms: "Terms",
+ privacyPolicy: "Privacy Policy",
+ careers: "Careers",
+ },
+ more: {
+ title: "More",
+ documentation: "Documentation",
+ license: "License",
+ changelog: "Changelog",
+ },
+ },
+ article: {
+ suggestedPosts: "Latest articles",
+ share: "Share",
+ tags: "Tags",
+ noTags: "No tags",
+ comments: {
+ placeholder: "Write a comment...",
+ send: "Send",
+ reply: "Reply",
+ edit: "Edit",
+ delete: "Delete",
+ update: "Update",
+ cancel: "Cancel",
+ }
+ },
+ login: {
+ title: "Sign In",
+ email: "Email",
+ emailPlaceholder: "Enter your email",
+ passwordPlaceholder: "Enter your password",
+ password: "Password",
+ button: "Sign In",
+ noAccount: "Don't have an account?",
+ register: "Register here",
+ forgetPassword: "Forgot your password?",
+ errors: {
+ email: {
+ required: "Email is required",
+ pattern: "Enter a valid email address",
+ },
+ password: {
+ required: "Password is required",
+ length: "Password must be at least 6 characters long",
+ },
+ }
+ },
+ register: {
+ title: "Register",
+ name: "Name",
+ namePlaceholder: "Enter your name",
+ email: "Email",
+ emailPlaceholder: "Enter your email",
+ passwordPlaceholder: "Enter your password",
+ password: "Password",
+ confirmPassword: "Confirm password",
+ confirmPasswordPlaceholder: "Confirm your password",
+ button: "Register",
+ haveAccount: "Already have an account?",
+ login: "Sign in here",
+ errors: {
+ email: {
+ required: "Email is required",
+ pattern: "Enter a valid email address",
+ },
+ password: {
+ required: "Password is required",
+ length: "Password must be at least 6 characters long",
+ },
+ confirmPassword: {
+ required: "Password confirmation is required",
+ validate: "Passwords do not match",
+ },
+ name: {
+ required: "Name is required",
+ length: "Name must be at least 1 character long",
+ }
+ }
+ }
+ // Agrega más traducciones aquí
+ },
+ },
+};
+
+i18n
+ .use(initReactI18next)
+ .init({
+ resources,
+ lng: 'es', // idioma predeterminado
+ interpolation: {
+ escapeValue: false, // react already safes from xss
+ },
+ });
+
+export default i18n;
diff --git a/client/src/index.css b/client/src/index.css
index bd6213e..b2b70a5 100644
--- a/client/src/index.css
+++ b/client/src/index.css
@@ -1,3 +1,40 @@
@tailwind base;
@tailwind components;
-@tailwind utilities;
\ No newline at end of file
+@tailwind utilities;
+
+@layer components {
+ .editor-btn {
+ @apply flex justify-center items-center text-slate-700 rounded-lg w-8 aspect-square;
+ }
+
+ .active-editor-btn {
+ @apply bg-slate-800 bg-slate-200;
+ }
+
+ /* Estilo general del scrollbar */
+::-webkit-scrollbar {
+ width: 6px; /* Ancho del scrollbar */
+ height: 6px;
+}
+
+/* Estilo de la barra de seguimiento (track) */
+::-webkit-scrollbar-track {
+ @apply bg-slate-100 /* Color de fondo del track */
+}
+
+/* Estilo del "thumb" o manija del scrollbar */
+::-webkit-scrollbar-thumb {
+ @apply bg-primary/40 rounded-full
+}
+
+/* Estilo del thumb al pasar el mouse sobre él */
+::-webkit-scrollbar-thumb:hover {
+ @apply bg-primary-hover /* Cambiar el color al pasar el mouse */
+}
+
+}
+
+.ProseMirror[contenteditable="false"] {
+ min-height: 5em;
+}
+
diff --git a/client/src/main.jsx b/client/src/main.jsx
index 54b39dd..0888655 100644
--- a/client/src/main.jsx
+++ b/client/src/main.jsx
@@ -1,10 +1,27 @@
-import React from 'react'
-import ReactDOM from 'react-dom/client'
-import App from './App.jsx'
-import './index.css'
+import ReactDOM from "react-dom/client";
+import App from "./App.jsx";
+import "./index.css";
+import { BrowserRouter } from "react-router-dom";
+import { Provider } from "react-redux";
+import { QueryClientProvider, QueryClient } from "@tanstack/react-query";
-ReactDOM.createRoot(document.getElementById('root')).render(
-
-
- ,
-)
+import store from "./store";
+
+const queryClient = new QueryClient({
+ defaultOptions: {
+ queries: {
+ refetchOnWindowFocus: false,
+ },
+ }
+}
+);
+
+ReactDOM.createRoot(document.getElementById("root")).render(
+
+
+
+
+
+
+
+);
diff --git a/client/src/pages/Home/Container/Articles.jsx b/client/src/pages/Home/Container/Articles.jsx
deleted file mode 100644
index cd8822b..0000000
--- a/client/src/pages/Home/Container/Articles.jsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import React from "react";
-import {FaArrowRight} from "react-icons/fa";
-
-import ArticleCard from "../../../components/ArticleCard";
-
-const Articles = () => {
- return (
-
-
-
-
- );
-};
-
-export default Articles;
diff --git a/client/src/pages/Home/Container/CTA.jsx b/client/src/pages/Home/Container/CTA.jsx
deleted file mode 100644
index 97a9ffe..0000000
--- a/client/src/pages/Home/Container/CTA.jsx
+++ /dev/null
@@ -1,73 +0,0 @@
-import React from "react";
-import images from "../../../constants/images";
-
-const CTA = () => {
- return (
- <>
-
-
-
-
-
- Get our stories delivered From us to your inbox weekly.
-
-
-
-
-
-
-
- Get a response tomorrow {" "}
-
- if you submit by 9pm today. If we received after 9pm will get a
- reponse the following day.
-
-
-
-
-
-
-
-

-
-
- Future of Work
-
-
- Majority of peole will work in jobs that don’t exist today.
-
-
-
-
-
-
-
- >
- );
-};
-
-export default CTA;
diff --git a/client/src/pages/Home/Container/Hero.jsx b/client/src/pages/Home/Container/Hero.jsx
deleted file mode 100644
index 7ef6ee2..0000000
--- a/client/src/pages/Home/Container/Hero.jsx
+++ /dev/null
@@ -1,54 +0,0 @@
-import React from "react";
-import { FiSearch } from "react-icons/fi";
-
-import { images } from "../../../constants";
-
-const Hero = () => {
- return (
-
-
-
- Read the most interesting articles
-
-
- Lorem ipsum dolor sit amet consectetur adipisicing elit. Cumque ipsa,
- ipsam quaerat.
-
-
-
-
- Popular Tags
-
-
- -
- Design
-
- -
- User Experience
-
- -
- User Interfaces
-
-
-
-
-
-

-
-
- );
-};
-
-export default Hero;
diff --git a/client/src/pages/Home/HomePage.jsx b/client/src/pages/Home/HomePage.jsx
deleted file mode 100644
index 9b2a769..0000000
--- a/client/src/pages/Home/HomePage.jsx
+++ /dev/null
@@ -1,17 +0,0 @@
-import React from "react";
-import MainLayout from "../../components/MainLayout";
-import Hero from "./Container/Hero";
-import Articles from "./Container/Articles";
-import CTA from "./Container/CTA";
-
-const HomePage = () => {
- return (
-
-
-
-
-
- );
-};
-
-export default HomePage;
diff --git a/client/src/pages/admin/AdminLayout.jsx b/client/src/pages/admin/AdminLayout.jsx
new file mode 100644
index 0000000..0ae5153
--- /dev/null
+++ b/client/src/pages/admin/AdminLayout.jsx
@@ -0,0 +1,55 @@
+import React from "react";
+import HeaderAdmin from "./components/HeaderAdmin";
+import { Outlet, useNavigate } from "react-router-dom";
+import { useQuery } from "@tanstack/react-query";
+import { getUserProfile } from "../../services/index/users";
+import { useSelector } from "react-redux";
+import { toast } from "react-hot-toast";
+import { useTranslation } from "react-i18next";
+
+const AdminLayout = () => {
+ const { t } = useTranslation();
+ const navigate = useNavigate();
+ const userState = useSelector((state) => state.user);
+
+ const {
+ data: profileData,
+ isLoading: profileIsLoading,
+ isError: profileError,
+ } = useQuery({
+ queryFn: () => {
+ return getUserProfile({ token: userState.userInfo.token });
+ },
+ queryKey: ["profile"],
+ onSuccess: (data) => {
+ if (!data?.admin) {
+ navigate("/");
+ toast.error("You are not allowed to access admin panel");
+ }
+ },
+ onError: (error) => {
+ console.log(error);
+ navigate("/");
+ toast.error("You are not allowed to access admin panel");
+ },
+ });
+
+ if (profileIsLoading) {
+ return (
+
+
{t('admin.common.loading')}
+
+ );
+ }
+
+ return (
+
+
+
+
+
+
+ );
+};
+
+export default AdminLayout;
diff --git a/client/src/pages/admin/components/DataTable.jsx b/client/src/pages/admin/components/DataTable.jsx
new file mode 100644
index 0000000..9e259d1
--- /dev/null
+++ b/client/src/pages/admin/components/DataTable.jsx
@@ -0,0 +1,110 @@
+/* eslint-disable react/prop-types */
+import Pagination from "../../../components/Pagination";
+import { useTranslation } from "react-i18next";
+
+const DataTable = ({
+ pageTitle,
+ dataListName,
+ searchKeywordOnSubmitHandler,
+ searchInputPlaceHolder,
+ searchKeywordOnChangeHandler,
+ searchKeyword,
+ tableHeaderTitleList,
+ isLoading,
+ isFetching,
+ data,
+ children,
+ setCurrentPage,
+ currentPage,
+ headers,
+}) => {
+ const { t } = useTranslation();
+ return (
+
+
{pageTitle}
+
+
+
+
{dataListName}
+
+
+
+
+
+
+
+
+
+ {tableHeaderTitleList.map((title, index) => (
+ |
+ {title}
+ |
+ ))}
+
+
+
+ {isLoading || isFetching ? (
+
+ |
+ {t("admin.common.loading")}
+ |
+
+ ) : data?.length === 0 ? (
+
+ |
+ {t("admin.common.noData")}
+ |
+
+ ) : (
+ children?.length ?
+ children
+ :
+
+ |
+ {t("admin.common.noData")}
+ |
+
+ )}
+
+
+ {/* Pagination */}
+ {!isLoading && (
+
setCurrentPage(page)}
+ currentPage={currentPage}
+ totalPageCount={JSON.parse(headers?.["x-totalpagecount"])}
+ />
+ )}
+
+
+
+
+
+ );
+};
+
+export default DataTable;
diff --git a/client/src/pages/admin/components/HeaderAdmin.jsx b/client/src/pages/admin/components/HeaderAdmin.jsx
new file mode 100644
index 0000000..c900ca9
--- /dev/null
+++ b/client/src/pages/admin/components/HeaderAdmin.jsx
@@ -0,0 +1,154 @@
+import { useEffect, useState } from "react";
+import { Link, useNavigate, useLocation } from "react-router-dom";
+import { useWindowSize } from "@uidotdev/usehooks";
+
+import { images } from "../../../constants";
+import { AiFillDashboard, AiOutlineClose, AiOutlineMenu } from "react-icons/ai";
+import { FaComments, FaUser } from "react-icons/fa";
+import { MdDashboard } from "react-icons/md";
+import NavItem from "./NavItem";
+import NavItemCollapse from "./NavItemCollapse";
+import { useMutation, useQueryClient } from "@tanstack/react-query";
+import toast from "react-hot-toast";
+import { useSelector } from "react-redux";
+import { createPost } from "../../../services/index/posts";
+import { useTranslation } from "react-i18next";
+
+const HeaderAdmin = () => {
+ let { pathname } = useLocation();
+ const { t } = useTranslation();
+ const navigate = useNavigate();
+ const queryClient = useQueryClient();
+ const [isMenuActive, setIsMenuActive] = useState(false);
+ const [activeNavName, setActiveNavName] = useState(pathname.split("/")[2] || "dashboard");
+ const windowSize = useWindowSize();
+
+ const userState = useSelector((state) => state.user);
+
+ const { mutate: mutateCreatePost, isLoading: isLoadingCreatePost } =
+ useMutation({
+ mutationFn: ({ token }) => {
+ return createPost({
+ token,
+ });
+ },
+ onSuccess: (data) => {
+ queryClient.invalidateQueries("posts");
+ navigate(`/admin/posts/manage/edit/${data.slug}`);
+ },
+ onError: (error) => {
+ toast.error(error.message);
+ },
+ });
+
+ const toggleMenuHandler = () => {
+ setIsMenuActive((prevState) => !prevState);
+ };
+
+ useEffect(() => {
+ if (windowSize.width < 1024) {
+ setIsMenuActive(false);
+ } else {
+ setIsMenuActive(true);
+ }
+ }, [windowSize.width]);
+
+ useEffect(() => {
+ if (pathname.includes("categories")) {
+ setActiveNavName("posts");
+ } else {
+ setActiveNavName(pathname.split("/")[2] || "dashboard");
+ }
+ }, [pathname]);
+
+ const handleCreateNewPost = ({ token }) => {
+ mutateCreatePost({ token });
+ };
+
+
+ return (
+
+ {/* Logo */}
+
+
+
+ {/* Menu */}
+
+ {isMenuActive ? (
+
+ ) : (
+
+ )}
+
+ {/* Sidebar container */}
+
+ {/* Underlay */}
+
+ {/* Sidebar */}
+
+
+

+
+
{t('admin.mainMenu.title')}
+ {/* Menu Items */}
+
+ }
+ name="dashboard"
+ activeNavName={activeNavName}
+ setActiveNavName={setActiveNavName}
+ />
+
+ }
+ name="comments"
+ activeNavName={activeNavName}
+ setActiveNavName={setActiveNavName}
+ />
+ }
+ name="posts"
+ activeNavName={activeNavName}
+ setActiveNavName={setActiveNavName}
+ >
+ {t('admin.posts.manage.title')}
+
+ {t('admin.posts.categories.title')}
+
+
+ }
+ name="users"
+ activeNavName={activeNavName}
+ setActiveNavName={setActiveNavName}
+ />
+
+
+
+
+ );
+};
+
+export default HeaderAdmin;
diff --git a/client/src/pages/admin/components/NavItem.jsx b/client/src/pages/admin/components/NavItem.jsx
new file mode 100644
index 0000000..32cddf2
--- /dev/null
+++ b/client/src/pages/admin/components/NavItem.jsx
@@ -0,0 +1,29 @@
+/* eslint-disable react/prop-types */
+import React from "react";
+import { NavLink } from "react-router-dom";
+
+const NavItem = ({
+ link,
+ title,
+ icon,
+ name,
+ activeNavName,
+ setActiveNavName,
+}) => {
+ return (
+
setActiveNavName(name)}
+ >
+ {icon}
+ {title}
+
+ );
+};
+
+export default NavItem;
\ No newline at end of file
diff --git a/client/src/pages/admin/components/NavItemCollapse.jsx b/client/src/pages/admin/components/NavItemCollapse.jsx
new file mode 100644
index 0000000..433c2d5
--- /dev/null
+++ b/client/src/pages/admin/components/NavItemCollapse.jsx
@@ -0,0 +1,48 @@
+import React, { useEffect, useState } from "react";
+
+const NavItemCollapse = ({
+ title,
+ children,
+ icon,
+ name,
+ activeNavName,
+ setActiveNavName,
+}) => {
+ const [isChecked, setIsChecked] = useState(false);
+
+ useEffect(() => {
+ if (activeNavName !== name) {
+ setIsChecked(false);
+ }
+ }, [activeNavName, name]);
+
+ return (
+
+
{
+ setActiveNavName(name);
+ setIsChecked(!isChecked);
+ }}
+ />
+
+ {icon}
+ {title}
+
+
+
+ );
+};
+
+export default NavItemCollapse;
\ No newline at end of file
diff --git a/client/src/pages/admin/screens/admin/Admin.jsx b/client/src/pages/admin/screens/admin/Admin.jsx
new file mode 100644
index 0000000..6449089
--- /dev/null
+++ b/client/src/pages/admin/screens/admin/Admin.jsx
@@ -0,0 +1,16 @@
+import React from "react";
+import { useTranslation } from "react-i18next";
+
+const Admin = () => {
+ const { t } = useTranslation();
+ return (
+
+
{t("admin.dashboard.title")}
+
+ {t("admin.dashboard.paragraph")}
+
+
+ );
+};
+
+export default Admin;
diff --git a/client/src/pages/admin/screens/categories/Categories.jsx b/client/src/pages/admin/screens/categories/Categories.jsx
new file mode 100644
index 0000000..5b372d4
--- /dev/null
+++ b/client/src/pages/admin/screens/categories/Categories.jsx
@@ -0,0 +1,155 @@
+import React, { useState } from "react";
+import DataTable from "../../components/DataTable";
+import { useDataTable } from "../../../../hooks/useDataTable";
+import {
+ createCategory,
+ deleteCategory,
+ getAllCategories,
+} from "../../../../services/index/postCategories";
+import { Link } from "react-router-dom";
+import { useMutation } from "@tanstack/react-query";
+import toast from "react-hot-toast";
+import { useTranslation } from "react-i18next";
+
+const Categories = () => {
+ const { t } = useTranslation();
+ const [categoryTitle, setCategoryTitle] = useState("");
+
+ const { mutate: mutateCreateCategory, isLoading: isLoadingCreateCategory } =
+ useMutation({
+ mutationFn: ({ token, title }) => {
+ return createCategory({
+ token,
+ title,
+ });
+ },
+ onSuccess: (data) => {
+ queryClient.invalidateQueries(["categories"]);
+ toast.success("Category created!");
+ },
+ onError: (error) => {
+ toast.error(error.message);
+ },
+ });
+
+ const {
+ userState,
+ currentPage,
+ setCurrentPage,
+ searchKeyword,
+ data: categoriesData,
+ isLoading,
+ isFetching,
+ isLoadingDeleteData,
+ queryClient,
+ searchKeywordHandler,
+ submitSearchKeywordHandler,
+ deleteDataHandler,
+ } = useDataTable({
+ dataQueryFn: () => getAllCategories(searchKeyword, currentPage),
+ dataQueryKey: "categories",
+ mutateDeleteFn: ({ slug, token }) => {
+ return deleteCategory({ slug, token });
+ },
+ deleteDataMessage: "Category deleted successfully",
+ });
+
+ const handleUpdateCategory = () => {
+ mutateCreateCategory({
+ token: userState.userInfo.token,
+ title: categoryTitle,
+ });
+ };
+
+
+ return (
+
+
+
{t('admin.posts.categories.add')}
+
+ {
+ setCategoryTitle(e.target.value);
+ }}
+ type="text"
+ value={categoryTitle}
+ placeholder={t('admin.posts.categories.addPlaceholder')}
+ maxLength={50}
+ className="d-input mt-6 d-input-bordered bg-white border-slate-300 !outline-slate-300 text-xl w-full font-medium font-roboto text-dark-hard"
+ />
+
+
+
+
+
+ {categoriesData?.data.map((category, index) => (
+
+
+
+
+ {category?.title}
+
+
+ |
+
+
+ {new Date(category?.createdAt).toLocaleDateString()}
+
+ |
+
+
+
+
+ {t('admin.common.table.actions.edit')}
+
+ |
+
+ ))}
+
+
+
+ );
+};
+
+export default Categories;
diff --git a/client/src/pages/admin/screens/categories/EditCategories.jsx b/client/src/pages/admin/screens/categories/EditCategories.jsx
new file mode 100644
index 0000000..e733fdf
--- /dev/null
+++ b/client/src/pages/admin/screens/categories/EditCategories.jsx
@@ -0,0 +1,88 @@
+import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
+import { useState } from "react";
+import toast from "react-hot-toast";
+import {
+ getSingleCategory,
+ updateCategory,
+} from "../../../../services/index/postCategories";
+import { useNavigate, useParams } from "react-router-dom";
+import { useSelector } from "react-redux";
+import { useTranslation } from "react-i18next";
+
+const EditCategories = () => {
+ const { t } = useTranslation();
+ const [categoryTitle, setCategoryTitle] = useState("");
+ const queryClient = useQueryClient();
+ const navigate = useNavigate();
+ const { slug } = useParams();
+ const userState = useSelector((state) => state.user);
+
+ const { isLoading, isError } = useQuery({
+ queryFn: () => getSingleCategory({ slug }),
+ queryKey: ["categories", slug],
+ onSuccess: (data) => {
+ setCategoryTitle(data?.title);
+ },
+ refetchOnWindowFocus: false,
+ });
+
+ const { mutate: mutateUpdateCategory, isLoading: isLoadingUpdateCategory } =
+ useMutation({
+ mutationFn: ({ title, slug, token }) => {
+ return updateCategory({
+ title,
+ slug,
+ token,
+ });
+ },
+ onSuccess: (data) => {
+ queryClient.invalidateQueries(["categories", slug]);
+ toast.success("Category updated");
+ navigate(`/admin/categories/manage/edit/${data?._id}`, {
+ replace: true,
+ });
+ },
+ onError: (error) => {
+ toast.error(error.message);
+ console.log(error);
+ },
+ });
+
+ const handleUpdateCategory = () => {
+ if (!categoryTitle) return;
+
+ mutateUpdateCategory({
+ title: categoryTitle,
+ slug,
+ token: userState.userInfo.token,
+ });
+ };
+
+ return (
+
+
{t("admin.posts.categories.update")}
+
+ {
+ setCategoryTitle(e.target.value);
+ }}
+ type="text"
+ value={categoryTitle}
+ placeholder="Category title"
+ maxLength={50}
+ className="d-input mt-6 d-input-bordered bg-white border-slate-300 !outline-slate-300 text-xl w-full font-medium font-roboto text-dark-hard"
+ />
+
+
+
+ );
+};
+
+export default EditCategories;
diff --git a/client/src/pages/admin/screens/comments/Comments.jsx b/client/src/pages/admin/screens/comments/Comments.jsx
new file mode 100644
index 0000000..8442ac5
--- /dev/null
+++ b/client/src/pages/admin/screens/comments/Comments.jsx
@@ -0,0 +1,185 @@
+import { useDataTable } from "../../../../hooks/useDataTable";
+import DataTable from "../../../admin/components/DataTable";
+import {
+ deleteComment,
+ getAllComments,
+ updateComment,
+} from "../../../../services/index/comments";
+import { Link } from "react-router-dom";
+import stables from "../../../../constants/stables";
+import { images } from "../../../../constants";
+import { useMutation } from "@tanstack/react-query";
+import toast from "react-hot-toast";
+import { useTranslation } from "react-i18next";
+
+const Comments = () => {
+ const { t } = useTranslation();
+ const {
+ userState,
+ currentPage,
+ setCurrentPage,
+ searchKeyword,
+ data: commentsData,
+ isLoading,
+ isFetching,
+ isLoadingDeleteData,
+ queryClient,
+ searchKeywordHandler,
+ submitSearchKeywordHandler,
+ deleteDataHandler,
+ } = useDataTable({
+ dataQueryFn: () =>
+ getAllComments(userState.userInfo.token, searchKeyword, currentPage),
+ dataQueryKey: "comments",
+ mutateDeleteFn: ({ token, slug }) => {
+ return deleteComment({ token, commentId: slug });
+ },
+ deleteDataMessage: "Comment deleted successfully",
+ });
+
+ const {
+ mutate: mutateUpdateCommentCheck,
+ isLoading: isLoadingUpdateCommentCheck,
+ } = useMutation({
+ mutationFn: ({ token, check, commentId }) => {
+ return updateComment({ token, check, commentId });
+ },
+ onSuccess: (data) => {
+ queryClient.invalidateQueries(["comments"]);
+ toast.success(
+ data?.check
+ ? "Comment approved successfully"
+ : "Comment unapproved successfully"
+ );
+ },
+ onError: (error) => {
+ toast.error(error.message);
+ console.log(error);
+ },
+ });
+
+ return (
+
+ {commentsData?.data?.map((comment, index) => (
+
+
+
+
+
+  {
+ e.target.onerror = null;
+ e.target.src = images.defaultProfile;
+ }}
+ />
+
+
+
+
+ {comment?.user?.name}
+
+
+
+ |
+
+ {comment?.replyOnUser !== null && (
+
+ {t('admin.common.table.replyOn')} {" "}
+
+ {comment?.replyOnUser?.name}
+
+
+ )}
+ {comment?.desc}
+ |
+
+
+
+ {comment?.post?.title}
+
+
+ |
+
+
+ {new Date(comment?.createdAt).toLocaleDateString("en-US", {
+ year: "2-digit",
+ month: "2-digit",
+ day: "2-digit",
+ hour: "numeric",
+ minute: "numeric",
+ })}
+
+ |
+
+
+
+ |
+
+ ))}
+
+ );
+};
+
+export default Comments;
diff --git a/client/src/pages/admin/screens/posts/EditPost.jsx b/client/src/pages/admin/screens/posts/EditPost.jsx
new file mode 100644
index 0000000..fd9f8ab
--- /dev/null
+++ b/client/src/pages/admin/screens/posts/EditPost.jsx
@@ -0,0 +1,357 @@
+import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
+import React, { useState } from "react";
+import {
+ deletePost,
+ getSinglePost,
+ updatePost,
+} from "../../../../services/index/posts";
+import CreatableSelect from "react-select/creatable";
+import { Link, useNavigate, useParams } from "react-router-dom";
+import ArticleDetailSkeleton from "../../../articleDetail/components/ArticleDetailSkeleton";
+import ErrorMessage from "../../../../components/ErrorMessage";
+import { images, stable } from "../../../../constants";
+import { HiOutlineCamera } from "react-icons/hi";
+import { toast } from "react-hot-toast";
+import { useSelector } from "react-redux";
+import Editor from "../../../../components/editor/Editor";
+import MultiSelectTagDropdown from "../../../../components/select-dropdown/MultiSelectTagDropdown";
+import { getAllCategories } from "../../../../services/index/postCategories";
+import {
+ categoryToOption,
+ filterCategories,
+} from "../../../../utils/multiSelectTagUtils";
+import { useTranslation } from "react-i18next";
+
+const promiseOptions = async (inputValue) => {
+ const { data: categoriesData } = await getAllCategories();
+ return filterCategories(inputValue, categoriesData);
+};
+
+const EditPost = () => {
+ const { t } = useTranslation();
+ const { slug } = useParams();
+ const navigate = useNavigate();
+ const queryClient = useQueryClient();
+ const userState = useSelector((state) => state.user);
+ const [initialPhoto, setInitialPhoto] = useState(null);
+ const [photo, setPhoto] = useState(null);
+ const [body, setBody] = useState(null);
+ const [title, setTitle] = useState("");
+ const [caption, setCaption] = useState("");
+ const [categories, setCategories] = useState(null);
+ const [isHiddenPost, setIsHiddenPost] = useState(false);
+ const [isNewPostPost, setisNewPostPost] = useState(true);
+ const [tags, setTags] = useState(null);
+ const [url, setUrl] = useState("");
+ const [postSlug, setPostSlug] = useState(slug);
+ const [isDeleteImage, setIsDeleteImage] = useState(false);
+
+
+ const { data, isLoading, isError } = useQuery({
+ queryFn: () => getSinglePost({ slug }),
+ queryKey: ["blog", slug],
+ onSuccess: (data) => {
+ setInitialPhoto(data?.photo);
+ setTitle(data?.title);
+ setCaption(data?.caption);
+ setCategories(data?.categories.map((category) => category._id));
+ setIsHiddenPost(data?.isHidden);
+ setisNewPostPost(data?.isNewPost);
+ setTags(data?.tags);
+ setUrl(data?.url);
+ },
+ refetchOnWindowFocus: false,
+ });
+
+ const {
+ mutate: mutateUpdatePostDetail,
+ isLoading: isLoadingUpdatePostDetail,
+ } = useMutation({
+ mutationFn: ({ updatedData, slug, token }) => {
+ return updatePost({
+ updatedData,
+ slug,
+ token,
+ });
+ },
+ onSuccess: (data) => {
+ queryClient.invalidateQueries(["blog", slug]);
+ toast.success(isNewPostPost ? "Post created" : "Post updated");
+ navigate(`/admin/posts/manage/edit/${data?.slug}`, { replace: true });
+ },
+ onError: (error) => {
+ toast.error(error.message);
+ console.log(error);
+ },
+ });
+
+ const handleFileChange = (e) => {
+ const file = e.target.files[0];
+ if (initialPhoto) {
+ setInitialPhoto(null);
+ setPhoto(file);
+ } else {
+ setPhoto(file);
+ }
+ };
+
+
+ const handleUpdatePost = async () => {
+ let updatedData = new FormData();
+
+ if (!initialPhoto && photo) {
+ updatedData.append("postPicture", photo);
+ } else if (initialPhoto && !photo) {
+ const urlToObject = async (url) => {
+ let reponse = await fetch(url);
+ let blob = await reponse.blob();
+ const file = new File([blob], initialPhoto, { type: blob.type });
+ return file;
+ };
+ const picture = await urlToObject(
+ stable.UPLOAD_FOLDER_BASE_URL + data?.photo
+ );
+
+ updatedData.append("postPicture", picture);
+ }
+ // eslint-disable-next-line no-useless-escape
+ const urlPattern = /^(https?:\/\/)[A-Za-z0-9.-]+((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?/;
+ if (url && !urlPattern.test(url)) {
+ toast.error(t("alerts.invalidUrl"));
+ return;
+ }
+
+ updatedData.append("isDeleteImage", isDeleteImage ? "T" : "F");
+
+ updatedData.append(
+ "document",
+ JSON.stringify({ body, title, caption, categories, tags, slug: postSlug, url })
+ );
+
+ mutateUpdatePostDetail({
+ updatedData,
+ slug,
+ token: userState.userInfo.token,
+ });
+ };
+
+ const handleDeleteImage = () => {
+ if (window.confirm("Do you want to delete your post?")) {
+ setIsDeleteImage(true);
+ setPhoto(null);
+ setInitialPhoto(null);
+ }
+ };
+
+ const handleCancelPost = async () => {
+ if (data.isHidden) {
+ await deletePost({ slug, token: userState.userInfo.token }).then(() => {
+ toast.success("Post is deleted");
+ navigate("/admin/posts/manage");
+ });
+ } else {
+ toast.success("Canceled editing post");
+ navigate("/admin/posts/manage");
+ }
+ };
+
+ let isPostDataLoaded = !isLoading && !isError;
+ return (
+
+ {isLoading ? (
+
+ ) : isError ? (
+
+ ) : (
+
+ )}
+
+ );
+};
+
+export default EditPost;
diff --git a/client/src/pages/admin/screens/posts/ManagePosts.jsx b/client/src/pages/admin/screens/posts/ManagePosts.jsx
new file mode 100644
index 0000000..90f8bfa
--- /dev/null
+++ b/client/src/pages/admin/screens/posts/ManagePosts.jsx
@@ -0,0 +1,212 @@
+import { deletePost, getAllPosts, updatePost } from "../../../../services/index/posts";
+import { stable, images } from "../../../../constants";
+import Pagination from "../../../../components/Pagination";
+import { Link } from "react-router-dom";
+import { useDataTable } from "../../../../hooks/useDataTable";
+import DataTable from "../../components/DataTable";
+import { useTranslation } from "react-i18next";
+import { useMutation } from "@tanstack/react-query";
+import toast from "react-hot-toast";
+
+const ManagePosts = () => {
+ const { t } = useTranslation();
+ const {
+ userState,
+ currentPage,
+ setCurrentPage,
+ searchKeyword,
+ data: postsData,
+ isLoading,
+ isFetching,
+ isLoadingDeleteData,
+ queryClient,
+ searchKeywordHandler,
+ submitSearchKeywordHandler,
+ deleteDataHandler,
+ } = useDataTable({
+ dataQueryFn: () =>
+ getAllPosts(
+ searchKeyword,
+ currentPage,
+ 100000,
+ "",
+ userState.userInfo && !userState.userInfo.op
+ ? userState.userInfo._id
+ : "",
+ ),
+ dataQueryKey: "posts",
+ mutateDeleteFn: ({ slug, token }) => {
+ return deletePost({ slug, token });
+ },
+ deleteDataMessage: "Post deleted successfully",
+ });
+
+ const { mutate: mutateUpdatePost, isLoading: isLoadingPost } =
+ useMutation({
+ mutationFn: ({ updatedData, slug }) => {
+ return updatePost({
+ updatedData,
+ slug,
+ token: userState.userInfo.token,
+ });
+ },
+ onSuccess: (data) => {
+ queryClient.invalidateQueries(["posts"]);
+ toast.success("Post updated");
+ },
+ onError: (error) => {
+ toast.error(error.message);
+ console.log(error);
+
+ },
+ });
+
+
+ const togglePostVisibility = async ({ status, slug }) => {
+ let updatedData = new FormData();
+
+ updatedData.append(
+ "document",
+ JSON.stringify({ isHidden: status })
+ );
+ mutateUpdatePost({
+ updatedData,
+ slug,
+ });
+ }
+
+ return (
+
+ {postsData?.data.map((post, index) => (
+
+
+
+
+
+  {
+ e.target.onerror = null;
+ e.target.src = images.samplePostImage;
+ }}
+ />
+
+
+
+
+ |
+
+
+ {post.categories.length > 0
+ ? post.categories.slice(0, 3).map((category, index) => (
+
+ {category.title}
+
+ ))
+ : t('admin.posts.manage.uncategorized')}
+
+ |
+
+
+ {new Date(post?.createdAt).toLocaleDateString()}
+
+ |
+
+
+ {post.tags.length > 0 ? (
+ post.tags.map((tag, index) => (
+
+ {tag}
+ {post.tags.length - 1 !== index && ","}
+
+ ))
+ ) : (
+ {t('admin.posts.manage.noTags')}
+ )}
+
+ |
+
+
+
+
+ {t('admin.common.table.actions.edit')}
+
+
+
+ {post.isNewPost && (
+
+
+ {t('admin.posts.new.isNewPost')}
+
+ {t('admin.posts.new.isNewPostTooltip')}
+
+
+
+
+ )}
+ |
+
+ ))}
+
+ );
+};
+
+export default ManagePosts;
diff --git a/client/src/pages/admin/screens/users/Users.jsx b/client/src/pages/admin/screens/users/Users.jsx
new file mode 100644
index 0000000..35cd399
--- /dev/null
+++ b/client/src/pages/admin/screens/users/Users.jsx
@@ -0,0 +1,193 @@
+import { useDataTable } from '../../../../hooks/useDataTable';
+import { deleteUser, getAllUsers, updateProfile } from '../../../../services/index/users';
+import DataTable from '../../components/DataTable';
+import { Link } from 'react-router-dom';
+import { images, stable } from '../../../../constants';
+import { useMutation } from '@tanstack/react-query';
+import toast from 'react-hot-toast';
+import { useTranslation } from 'react-i18next';
+
+const Users = () => {
+ const { t } = useTranslation();
+ const {
+ userState,
+ currentPage,
+ setCurrentPage,
+ searchKeyword,
+ data: usersData,
+ isLoading,
+ isFetching,
+ isLoadingDeleteData,
+ queryClient,
+ searchKeywordHandler,
+ submitSearchKeywordHandler,
+ deleteDataHandler,
+ } = useDataTable({
+ dataQueryFn: () =>
+ getAllUsers(
+ userState.userInfo.token,
+ searchKeyword,
+ currentPage
+ ),
+ dataQueryKey: "users",
+ mutateDeleteFn: ({ slug, token }) => {
+ return deleteUser({ slug, token });
+ },
+ deleteDataMessage: "User deleted successfully",
+ });
+
+ const { mutate: mutateUpdateUser, isLoading: isLoadingUpdateUser } =
+ useMutation({
+ mutationFn: ({ userData, userId }) => {
+ return updateProfile({
+ token: userState.userInfo.token,
+ userData: userData,
+ userId,
+ });
+ },
+ onSuccess: (data) => {
+ queryClient.invalidateQueries(["users"]);
+ toast.success("User updated");
+ },
+ onError: (error) => {
+ toast.error(error.message);
+ console.log(error);
+
+ },
+ });
+
+ const handleAdminCheck = (e, userId) => {
+ const isAdmin = e.target.checked;
+ mutateUpdateUser({
+ userId,
+ userData: { admin: isAdmin },
+ });
+ };
+
+ const handleVerificationCheck = (e, userId) => {
+ const isVerified = e.target.checked;
+ mutateUpdateUser({
+ userId,
+ userData: { verified: isVerified },
+ });
+ };
+
+
+ return (
+
+ {usersData?.data.map((user) => (
+
+
+
+
+
+  {
+ e.target.onerror = null;
+ e.target.src = images.samplePostImage;
+ }}
+ />
+
+
+
+
+ |
+
+
+ {user?.email}
+
+ |
+
+
+ {new Date(user?.createdAt).toLocaleDateString()}
+
+ |
+
+ {user.op || user.admin ? ✅ :
+ { handleVerificationCheck(e, user._id) }}
+ className='checked:bg-[url("/img/check.png")] bg-cover checked:disabled:bg-none d-checkbox disabled:bg-orange-400 disabled:opacity-100' />
+ }
+ |
+
+ {user?.op ? (
+
+ 👑
+
+ ) : (
+ userState.userInfo.op ? (
+ { handleAdminCheck(e, user._id) }}
+ className='checked:bg-[url("/img/check.png")] bg-cover checked:disabled:bg-none d-checkbox disabled:bg-orange-400 disabled:opacity-100' />
+ ) : (
+ user.admin ? ✅ : ❌
+ )
+ )}
+ |
+
+
+
+ |
+
+ ))}
+
+ );
+}
+
+export default Users
\ No newline at end of file
diff --git a/client/src/pages/articleDetail/ArticleDetailPage.jsx b/client/src/pages/articleDetail/ArticleDetailPage.jsx
new file mode 100644
index 0000000..e1fd97d
--- /dev/null
+++ b/client/src/pages/articleDetail/ArticleDetailPage.jsx
@@ -0,0 +1,180 @@
+import React, { useEffect, useState } from "react";
+
+import MainLayout from "../../components/MainLayout";
+import BreadCrumbs from "../../components/BreadCrumbs";
+import { Link, useParams } from "react-router-dom";
+import { images, stable } from "../../constants";
+import SuggestedPosts from "./container/SuggestedPosts";
+import CommentsContainer from "../../components/comments/CommentsContainer";
+import SocialShareButtons from "../../components/SocialShareButtons";
+import { useQuery } from "@tanstack/react-query";
+import { getAllPosts, getSinglePost } from "../../services/index/posts";
+import ArticleDetailSkeleton from "./components/ArticleDetailSkeleton";
+import ErrorMessage from "../../components/ErrorMessage";
+import { useSelector } from "react-redux";
+import parseJsonToHtml from "../../utils/parseJsonToHtml";
+import Editor from "../../components/editor/Editor";
+import { useTranslation } from "react-i18next";
+import { BsCheckLg } from "react-icons/bs";
+import { AiOutlineClose } from "react-icons/ai";
+
+const ArticleDetailPage = () => {
+ const { t } = useTranslation();
+ const { slug } = useParams();
+ const userState = useSelector((state) => state.user);
+
+ const [breadCrumbsData, setBreadCrumbsData] = useState([]);
+
+ const [body, setBody] = useState(null);
+
+ const { data, isLoading, isError } = useQuery({
+ queryKey: ["blog", slug],
+ queryFn: () => getSinglePost({ slug }),
+ onSuccess: (data) => {
+ setBreadCrumbsData([
+ { name: "Home", link: "/" },
+ { name: "Blog", link: "/blog" },
+ { name: `${data.title}`, link: `/blog/${data.slug}` },
+ ]);
+ setBody(parseJsonToHtml(data?.body));
+ },
+ });
+
+ const { data: postsData } = useQuery({
+ queryFn: () => getAllPosts(),
+ queryKey: ["posts"],
+ });
+
+ useEffect(() => {
+ window.scrollTo({ top: 0 });
+ }, [])
+
+
+ console.log();
+
+ return (
+
+ {isLoading ? (
+
+ ) : isError ? (
+
+ ) : (
+
+
+
+
+
{
+ e.target.onerror = null;
+ e.target.src = images.defaultProfile;
+ }}
+
+ />
+
+
+ {data?.user && (
+ data?.user?.name
+ )}
+
+
+
+ {data?.user?.verified ? (
+
+ ) : (
+
+ )}
+
+
+ {data?.user?.verified ? t("admin.common.verified") : t("admin.common.notVerified")}
+
+
+
+
+
+
{
+ e.target.onerror = null;
+ e.target.src = images.samplePostImage;
+ }}
+ />
+
+ {data?.categories.map((category) => (
+
+ {category.title}
+
+ ))}
+
+
+
+
+ {!isLoading && !isError && (
+
+ )}
+
+
+
+
+
+
!post.isHidden && !post.isNewPost).slice(0, 3)}
+ tags={data?.tags}
+ className="mt-8 lg:mt-0 lg:max-w-xs"
+ />
+
+
+ {t("article.share")}
+
+
+
+
+
+ )}
+
+ );
+};
+
+export default ArticleDetailPage;
diff --git a/client/src/pages/articleDetail/components/ArticleDetailSkeleton.jsx b/client/src/pages/articleDetail/components/ArticleDetailSkeleton.jsx
new file mode 100644
index 0000000..e0acd80
--- /dev/null
+++ b/client/src/pages/articleDetail/components/ArticleDetailSkeleton.jsx
@@ -0,0 +1,65 @@
+import { BiImageAlt } from "react-icons/bi";
+
+const ArticleDetailSkeleton = ({ isManage = false }) => {
+ return (
+
+
+ {/* BreadCrumbs */}
+
+ {/* User */}
+
+ {/* post image */}
+
+
+
+ {/* title */}
+
+
+
+
+ {/* Suggested posts */}
+ {!isManage ? (
+
+ {/* title */}
+
+
+ {[...Array(6)].map((item, index) => (
+
+ {/* image */}
+
+
+ {/* post title */}
+
+
+
+
+ ))}
+
+
+ ) : (
+ <>>
+ )}
+
+ );
+};
+
+export default ArticleDetailSkeleton;
diff --git a/client/src/pages/articleDetail/container/SuggestedPosts.jsx b/client/src/pages/articleDetail/container/SuggestedPosts.jsx
new file mode 100644
index 0000000..2cc0b00
--- /dev/null
+++ b/client/src/pages/articleDetail/container/SuggestedPosts.jsx
@@ -0,0 +1,73 @@
+/* eslint-disable react/prop-types */
+import React from "react";
+import { Link } from "react-router-dom";
+import { images, stable } from "../../../constants";
+import { useTranslation } from "react-i18next";
+
+const SuggestedPosts = ({ className, header, posts = [], tags }) => {
+ const { t } = useTranslation();
+ console.log(posts);
+ return (
+
+
+ {header}
+
+
+ {posts.filter(post => !post.isHidden && !post.isNewPost).map((post) => (
+
+

{
+ e.target.onerror = null;
+ e.target.src = images.samplePostImage;
+ }}
+ alt={post.title}
+ className="aspect-square object-cover rounded-lg w-1/5"
+ />
+
+
+ {post.title}
+
+
+ {new Date(post.createdAt).toLocaleDateString("en-US", {
+ day: "numeric",
+ month: "short",
+ year: "numeric",
+ })}
+
+
+
+ ))}
+
+
+ {t("article.tags")}
+
+ {tags.length === 0 ? (
+
{t('article.noTags')}
+ ) : (
+
+ {tags.map((tag, index) => (
+
+ {tag}
+
+ ))}
+
+ )}
+
+ );
+};
+
+export default SuggestedPosts;
diff --git a/client/src/pages/blog/BlogPage.jsx b/client/src/pages/blog/BlogPage.jsx
new file mode 100644
index 0000000..35d2a66
--- /dev/null
+++ b/client/src/pages/blog/BlogPage.jsx
@@ -0,0 +1,148 @@
+import React, { useEffect, useRef, useState } from 'react';
+import ErrorMessage from '../../components/ErrorMessage';
+import { useTranslation } from 'react-i18next';
+import { useQuery } from '@tanstack/react-query';
+import { getAllPosts } from '../../services/index/posts';
+import toast from 'react-hot-toast';
+import ArticleCardSkeleton from '../../components/ArticleCardSkeleton';
+import ArticleCard from '../../components/ArticleCard';
+import MainLayout from '../../components/MainLayout';
+import Pagination from '../../components/Pagination';
+import { useSearchParams } from 'react-router-dom';
+import { FiSearch } from 'react-icons/fi';
+import { getAllCategories } from '../../services/index/postCategories';
+import MultiSelectTagDropdown from "../../components/select-dropdown/MultiSelectTagDropdown";
+import { filterCategories, categoryToOption } from '../../utils/multiSelectTagUtils';
+
+
+let isFirstRun = true;
+
+const BlogPage = () => {
+ const searchInputRef = useRef(null);
+ const [searchParams, setSearchParams] = useSearchParams();
+ const searchParamsValue = Object.fromEntries([...searchParams]);
+ const [currentPage, setCurrentPage] = useState(parseInt(searchParamsValue?.page) || 1);
+ const [searchQuery, setSearchQuery] = useState(searchParamsValue?.search || '');
+ const [category, setCategory] = useState(searchParamsValue?.category || '');
+ const { t } = useTranslation();
+ const { data, isLoading, isError, refetch } = useQuery({
+ queryFn: () => getAllPosts(searchQuery, currentPage, 12, category),
+ queryKey: ['posts'],
+ onError: (error) => {
+ toast.error(error.message);
+ },
+ });
+
+ const promiseOptions = async (inputValue) => {
+ const { data: categoriesData } = await getAllCategories();
+ const categoriesToFilter = category.split(',')
+ return filterCategories(inputValue, categoriesData.filter(c => !categoriesToFilter.includes(c.title)));
+ };
+
+ const { data: categoriesData } = useQuery({
+ queryFn: () => getAllCategories(),
+ queryKey: ['categories'],
+ });
+
+ useEffect(() => {
+ if (isFirstRun) {
+ isFirstRun = false;
+ return;
+ }
+ refetch({ page: currentPage, search: searchQuery, category });
+ }, [currentPage, refetch, searchQuery, category]);
+
+ const handlePageChange = (page) => {
+ setCurrentPage(page);
+ setSearchParams({ page, search: searchQuery, category });
+ };
+
+ const handleSearch = (search) => {
+ setSearchQuery(search);
+ setCurrentPage(1);
+ setSearchParams({ page: 1, search, category });
+ };
+
+ const handleCategoryChange = (selectedCategories) => {
+ const categoryNames = selectedCategories.map((category) => category.label).join(',');
+ setCategory(categoryNames);
+ setCurrentPage(1);
+ setSearchParams({ page: 1, search: searchQuery, category: categoryNames });
+ };
+
+
+ return (
+
+
+
+
+
+
+ handleSearch(e.target.value)}
+ value={searchQuery}
+ />
+
+
+
+ {categoriesData && (
+
+
+ {t('blog.categoryFilter')}:
+ ({ value: c, label: c })) : []}
+ loadOptions={promiseOptions}
+ onChange={handleCategoryChange}
+ />
+
)}
+
+
+
+
+ {isLoading ? (
+ [...Array(3)].map((item, index) => {
+ return (
+
+ );
+ })
+ ) : isError ? (
+
+ ) : (
+
+ data?.data.filter((post) => !post.isHidden && !post.isNewPost).length > 0 ? (
+ data?.data.sort((a, b) => new Date(b.createdAt) - new Date(a.createdAt))
+ .filter((post) => !post.isHidden).filter(p => !p.isNewPost)
+ .map((post) => (
+
+ ))
+ ) : (
+
{t("alerts.nothingHere")}
+ )
+ )}
+
+ {!isLoading && (
+ handlePageChange(page)}
+ currentPage={currentPage}
+ totalPageCount={JSON.parse(data?.headers?.['x-totalpagecount'])}
+ />
+ )}
+
+
+ );
+};
+
+export default BlogPage;
diff --git a/client/src/pages/home/HomePage.jsx b/client/src/pages/home/HomePage.jsx
new file mode 100644
index 0000000..75e731b
--- /dev/null
+++ b/client/src/pages/home/HomePage.jsx
@@ -0,0 +1,42 @@
+import MainLayout from "../../components/MainLayout";
+import Hero from "./container/Hero";
+import Articles from "./container/Articles";
+import CTA from "./container/CTA";
+import { useEffect } from "react";
+import { settings } from "../../config";
+import toast from "react-hot-toast";
+import { useTranslation } from "react-i18next";
+
+
+const HomePage = () => {
+ const { t } = useTranslation();
+
+ useEffect(() => {
+ window.scrollTo({ top: 0 });
+
+ }, []);
+
+/* useEffect(() => {
+
+ settings.isUnderConstruction && toast(t("alerts.underConstruction"), {
+ icon: '🚧'
+ }),
+ !settings.isDbConnected && toast(t("alerts.dbNotConnected"), {
+ icon: '🚫'
+ }),
+ [settings.underConstruction, settings.db]
+ }) */
+
+
+
+
+ return (
+
+
+
+
+
+ );
+};
+
+export default HomePage;
diff --git a/client/src/pages/home/container/Articles.jsx b/client/src/pages/home/container/Articles.jsx
new file mode 100644
index 0000000..7155268
--- /dev/null
+++ b/client/src/pages/home/container/Articles.jsx
@@ -0,0 +1,64 @@
+import React from "react";
+import { FaArrowRight } from "react-icons/fa";
+
+import ArticleCard from "../../../components/ArticleCard";
+import { useQuery } from "@tanstack/react-query";
+import { getAllPosts } from "../../../services/index/posts";
+import { toast } from "react-hot-toast";
+import ArticleCardSkeleton from "../../../components/ArticleCardSkeleton";
+import ErrorMessage from "../../../components/ErrorMessage";
+import { useTranslation } from "react-i18next";
+import { Link } from "react-router-dom";
+
+const Articles = () => {
+ const { t } = useTranslation();
+ const { data, isLoading, isError } = useQuery({
+ queryFn: () => getAllPosts("", 1),
+ queryKey: ["posts"],
+ onError: (error) => {
+ toast.error(error.message);
+ },
+ });
+
+ return (
+
+
+ {isLoading ? (
+ [...Array(3)].map((_, index) => {
+ return (
+
+ );
+ })
+ ) : isError ? (
+
+ ) : (
+ data?.data?.filter((post) => !post.isHidden && !post.isNewPost).length > 0 ? (
+ data?.data.sort((a, b) => new Date(b.createdAt) - new Date(a.createdAt))
+ .filter((post) => !post.isHidden).filter(p => !p.isNewPost)
+ .slice(0, 6)
+ .map((post) => {
+ return (
+
)
+ })
+ ) : (
+
{t("alerts.nothingHere")}
+ ))}
+
+
+ {t('articles.moreArticles')}
+
+
+
+ );
+};
+
+export default Articles;
diff --git a/client/src/pages/home/container/CTA.jsx b/client/src/pages/home/container/CTA.jsx
new file mode 100644
index 0000000..4084a2f
--- /dev/null
+++ b/client/src/pages/home/container/CTA.jsx
@@ -0,0 +1,110 @@
+import React from "react";
+import images from "../../../constants/images";
+import { useTranslation } from "react-i18next";
+import { useForm, ValidationError } from '@formspree/react';
+
+
+const CTA = () => {
+ const { t } = useTranslation();
+
+ const ContactForm = () => {
+ const [state, handleSubmit] = useForm(import.meta.env.VITE_FORMSPREE_FORM_ID);
+ if (state.succeeded) {
+ return
{t("cta.success")}
;
+ }
+ return (
+
+ );
+ }
+
+ return (
+ <>
+
+
+
+
+
+ {t("cta.title")}
+
+
+
+
+ {t('cta.response')}
+
+
+
+
+
+
+
+

+
+
+ {t("cta.future")}
+
+
+ {t("cta.futureDescription")}
+
+
+
+
+
+
+
+ >
+ );
+};
+
+export default CTA;
diff --git a/client/src/pages/home/container/Hero.jsx b/client/src/pages/home/container/Hero.jsx
new file mode 100644
index 0000000..f1171e1
--- /dev/null
+++ b/client/src/pages/home/container/Hero.jsx
@@ -0,0 +1,83 @@
+import { FiSearch } from "react-icons/fi";
+import { useTranslation } from 'react-i18next';
+
+
+import { images } from "../../../constants";
+import { useEffect, useState } from "react";
+import { Link, useNavigate } from "react-router-dom";
+import { getPopularTags } from "../../../services/index/postTags";
+
+const Hero = () => {
+ const [popularTags, setPopularTags] = useState([])
+ const [query, setQuery] = useState("")
+ const navigate = useNavigate();
+ const { t } = useTranslation();
+
+ /* Get popular tags */
+ useEffect(() => {
+ getPopularTags().then((data) => {
+ setPopularTags(data);
+ }).catch((error) => {
+ console.log(error);
+ setPopularTags([]);
+ });
+ }, [])
+
+ const handleInputChange = (e) => {
+ setQuery(e.target.value);
+ };
+
+ const handleSearch = () => {
+ navigate(`/blog?page=1&search=${query}`);
+ };
+
+ return (
+
+
+
+ Multimedia Social Media
+
+
+ {t('hero.welcomeMessage')}
+
+
+
+
+ {t('hero.searchSuggestions')}
+
+
+ {popularTags
+ .sort((a, b) => b.count - a.count)
+ .map(tag => (
+ -
+
+ {tag._id}
+
+
))
+ }
+
+
+
+
+

+
+
+ );
+};
+
+export default Hero;
diff --git a/client/src/pages/login/LoginPage.jsx b/client/src/pages/login/LoginPage.jsx
new file mode 100644
index 0000000..2bacc90
--- /dev/null
+++ b/client/src/pages/login/LoginPage.jsx
@@ -0,0 +1,151 @@
+import React, { useEffect } from "react";
+import { Link, useNavigate } from "react-router-dom";
+import { useForm } from "react-hook-form";
+import { useMutation } from "@tanstack/react-query";
+import { toast } from "react-hot-toast";
+import { useDispatch, useSelector } from "react-redux";
+
+import MainLayout from "../../components/MainLayout";
+import { logIn } from "../../services/index/users";
+import { userActions } from "../../store/reducers/userReducers";
+import { useTranslation } from "react-i18next";
+
+const LoginPage = () => {
+ const { t } = useTranslation();
+ const dispatch = useDispatch();
+ const userState = useSelector((state) => state.user);
+ const navigate = useNavigate();
+
+ const { mutate, isLoading } = useMutation({
+ mutationFn: ({ email, password }) => {
+ return logIn({ email, password });
+ },
+ onSuccess: (data) => {
+ dispatch(userActions.setUserInfo(data));
+ localStorage.setItem("account", JSON.stringify(data));
+ },
+ onError: (error) => {
+ toast.error(error.message);
+ },
+ });
+
+ useEffect(() => {
+ if (userState.userInfo) {
+ navigate("/");
+ }
+ }, [navigate, userState.userInfo]);
+
+ const {
+ register,
+ handleSubmit,
+ formState: { errors, isValid },
+ } = useForm({
+ defaultValues: {
+ email: "",
+ password: "",
+ },
+ mode: "onChange",
+ });
+ const submitHandler = (data) => {
+ const { email, password } = data;
+ mutate({ email, password });
+ };
+
+ return (
+
+
+
+
+ {t("login.title")}
+
+
+
+
+
+ );
+};
+
+export default LoginPage;
diff --git a/client/src/pages/profile/ProfileDetailPage.jsx b/client/src/pages/profile/ProfileDetailPage.jsx
new file mode 100644
index 0000000..ec9775f
--- /dev/null
+++ b/client/src/pages/profile/ProfileDetailPage.jsx
@@ -0,0 +1,148 @@
+import { useEffect } from "react";
+import { useParams } from "react-router-dom";
+import { useQuery } from "@tanstack/react-query";
+
+import MainLayout from "../../components/MainLayout";
+import { getUserById, updateProfile } from "../../services/index/users";
+import { useTranslation } from "react-i18next";
+import stables from "../../constants/stables";
+import { images } from "../../constants";
+import { BsCheckLg } from "react-icons/bs";
+import { AiOutlineClose } from "react-icons/ai";
+
+const ProfileDetailPage = () => {
+ const { t } = useTranslation();
+ const userId = useParams().id;
+
+ const { data: profileData, isLoading: profileIsLoading } = useQuery({
+ queryFn: () => {
+ return getUserById({ userId });
+ },
+ queryKey: ["profile"],
+ });
+
+ const getRole = () => {
+ if (profileData?.op) {
+ return
Op 👑;
+ } else if (profileData?.admin) {
+ return
Admin;
+ } else {
+ return t("profile.user");
+ }
+ };
+
+ useEffect(() => {
+ window.scrollTo({ top: 0 });
+ }, []);
+
+ return (
+
+
+
+
+
+ {profileData?.avatar ? (
+

{
+ e.target.onerror = null;
+ e.target.src = images.defaultProfile;
+ }}
+ />
+ ) : (
+

+ )}
+
+
+
+ {profileData?.name}
+
+
+ {profileData?.verified ? (
+
+ ) : (
+
+ )}
+
+
+ {profileData?.verified ? t("admin.common.verified") : t("admin.common.notVerified")}
+
+
+
+
+ {
+ profileData?.bio &&
+
+
+ {t("profile.aboutMe")}
+
+
+ {profileData?.bio}
+
+
+ }
+
+
+
+ {t("profile.information")}
+
+
+
+
+ {t("profile.specializedIn")}:
+
+
+ {profileData?.specialization || t("profile.noAnswer")}
+
+
+
+
+ {t("profile.role")}:
+
+
+ {getRole()}
+
+
+
+
+
+
+ {t("profile.contact")}
+
+
+
+
+
+ {t("profile.phone")}:
+
+
+ {profileData?.phone || t("profile.noAnswer")}
+
+
+
+
+
+
+
+
+
+ );
+};
+
+export default ProfileDetailPage;
diff --git a/client/src/pages/profile/ProfilePage.jsx b/client/src/pages/profile/ProfilePage.jsx
new file mode 100644
index 0000000..67f59bf
--- /dev/null
+++ b/client/src/pages/profile/ProfilePage.jsx
@@ -0,0 +1,257 @@
+import { useEffect } from "react";
+import { useForm } from "react-hook-form";
+import { useNavigate } from "react-router-dom";
+import { useDispatch, useSelector } from "react-redux";
+import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
+
+import MainLayout from "../../components/MainLayout";
+import { getUserProfile, updateProfile } from "../../services/index/users";
+import ProfilePicture from "../../components/ProfilePicture";
+import { userActions } from "../../store/reducers/userReducers";
+import { toast } from "react-hot-toast";
+import { useMemo } from "react";
+import { useTranslation } from "react-i18next";
+
+const ProfilePage = () => {
+ const { t } = useTranslation();
+ const navigate = useNavigate();
+ const dispatch = useDispatch();
+ const queryClient = useQueryClient();
+ const userState = useSelector((state) => state.user);
+
+ const { data: profileData, isLoading: profileIsLoading } = useQuery({
+ queryFn: () => {
+ return getUserProfile({ token: userState.userInfo.token });
+ },
+ queryKey: ["profile"],
+ });
+
+ const { mutate, isLoading: updateProfileIsLoading } = useMutation({
+ mutationFn: ({ name, email, password, bio, phone, specialization }) => {
+ return updateProfile({
+ token: userState.userInfo.token,
+ userData: { name, email, password, bio, phone, specialization },
+ userId: userState.userInfo._id,
+ });
+ },
+ onSuccess: (data) => {
+ dispatch(userActions.setUserInfo(data));
+ localStorage.setItem("account", JSON.stringify(data));
+ queryClient.invalidateQueries(["profile"]);
+ toast.success("Profile is updated");
+ },
+ onError: (error) => {
+ toast.error(error.message);
+ console.log(error);
+ },
+ });
+
+ useEffect(() => {
+ window.scrollTo({ top: 0 });
+ }, []);
+
+ useEffect(() => {
+ if (!userState.userInfo) {
+ navigate("/");
+ }
+ }, [navigate, userState.userInfo]);
+
+ const {
+ register,
+ handleSubmit,
+ formState: { errors, isValid },
+ } = useForm({
+ defaultValues: {
+ name: "",
+ email: "",
+ password: "",
+ bio: "",
+ phone: "",
+ specialization: "",
+ },
+ values: useMemo(() => {
+ return {
+ name: profileIsLoading ? "" : profileData?.name,
+ email: profileIsLoading ? "" : profileData?.email,
+ bio: profileIsLoading ? "" : profileData?.bio,
+ phone: profileIsLoading ? "" : profileData?.phone,
+ specialization: profileIsLoading ? "" : profileData?.specialization,
+ };
+ }, [profileData?.email, profileData?.name, profileData?.bio, profileData?.phone, profileData?.specialization, profileIsLoading]),
+ mode: "onChange",
+ });
+
+ const submitHandler = (data) => {
+ const { name, email, password, bio, phone, specialization } = data;
+ mutate({ name, email, password, bio, phone, specialization });
+ };
+
+ return (
+
+
+
+
+
+
+
+
+ );
+};
+
+export default ProfilePage;
diff --git a/client/src/pages/register/RegisterPage.jsx b/client/src/pages/register/RegisterPage.jsx
new file mode 100644
index 0000000..b0beb02
--- /dev/null
+++ b/client/src/pages/register/RegisterPage.jsx
@@ -0,0 +1,215 @@
+import React, { useEffect } from "react";
+import { Link, useNavigate } from "react-router-dom";
+import { useForm } from "react-hook-form";
+import { useMutation } from "@tanstack/react-query";
+import { toast } from "react-hot-toast";
+import { useDispatch, useSelector } from "react-redux";
+
+import MainLayout from "../../components/MainLayout";
+import { signUp } from "../../services/index/users";
+import { userActions } from "../../store/reducers/userReducers";
+import { useTranslation } from "react-i18next";
+
+const RegisterPage = () => {
+ const {t} = useTranslation();
+ const dispatch = useDispatch();
+ const userState = useSelector((state) => state.user);
+ const navigate = useNavigate();
+
+ const { mutate, isLoading } = useMutation({
+ mutationFn: ({ name, email, password }) => {
+ return signUp({ name, email, password });
+ },
+ onSuccess: (data) => {
+ dispatch(userActions.setUserInfo(data));
+ localStorage.setItem("account", JSON.stringify(data));
+ },
+ onError: (error) => {
+ toast.error(error.message);
+ },
+ });
+
+ useEffect(() => {
+ if (userState.userInfo) {
+ navigate("/");
+ }
+ }, [navigate, userState.userInfo]);
+
+ const {
+ register,
+ handleSubmit,
+ formState: { errors, isValid },
+ watch,
+ } = useForm({
+ defaultValues: {
+ name: "",
+ email: "",
+ password: "",
+ confirmPassword: "",
+ },
+ mode: "onChange",
+ });
+ const submitHandler = (data) => {
+ const { name, email, password } = data;
+ mutate({ name, email, password });
+ };
+
+ const password = watch("password");
+
+ return (
+
+
+
+
+ {t("register.title")}
+
+
+
+
+
+ );
+};
+
+export default RegisterPage;
diff --git a/client/src/services/index/comments.jsx b/client/src/services/index/comments.jsx
new file mode 100644
index 0000000..73bb16c
--- /dev/null
+++ b/client/src/services/index/comments.jsx
@@ -0,0 +1,110 @@
+import axios from "axios";
+import { stable } from "../../constants";
+
+const baseURL = stable.BASE_URL;
+
+const api = axios.create({
+ baseURL,
+});
+
+export const createNewComment = async ({
+ token,
+ desc,
+ slug,
+ parent,
+ replyOnUser,
+}) => {
+ try {
+ const config = {
+ headers: {
+ Authorization: `Bearer ${token}`,
+ },
+ };
+
+ const { data } = await api.post(
+ "/api/comments",
+ {
+ desc,
+ slug,
+ parent,
+ replyOnUser,
+ },
+ config
+ );
+ return data;
+ } catch (error) {
+ if (error.response && error.response.data.message) {
+ throw new Error(error.response.data.message);
+ }
+ throw new Error(error.message);
+ }
+};
+
+export const updateComment = async ({ token, desc, check, commentId }) => {
+ try {
+ const config = {
+ headers: {
+ Authorization: `Bearer ${token}`,
+ },
+ };
+
+ const { data } = await api.put(
+ `/api/comments/${commentId}`,
+ {
+ desc,
+ check,
+ },
+ config
+ );
+ return data;
+ } catch (error) {
+ if (error.response && error.response.data.message) {
+ throw new Error(error.response.data.message);
+ }
+ throw new Error(error.message);
+ }
+};
+
+export const deleteComment = async ({ token, commentId }) => {
+ try {
+ const config = {
+ headers: {
+ Authorization: `Bearer ${token}`,
+ },
+ };
+
+ const { data } = await api.delete(`/api/comments/${commentId}`, config);
+ return data;
+ } catch (error) {
+ if (error.response && error.response.data.message) {
+ throw new Error(error.response.data.message);
+ }
+ throw new Error(error.message);
+ }
+};
+
+export const getAllComments = async (
+ token,
+ searchKeyword = "",
+ page = 1,
+ limit = 10,
+ userId,
+) => {
+ try {
+ const config = {
+ headers: {
+ Authorization: `Bearer ${token}`,
+ },
+ };
+
+ const { data, headers } = await api.get(
+ `/api/comments?searchKeyword=${searchKeyword}&page=${page}&limit=${limit}`,
+ config
+ );
+ return { data, headers };
+ } catch (error) {
+ if (error.response && error.response.data.message)
+ throw new Error(error.response.data.message);
+ throw new Error(error.message);
+ }
+};
diff --git a/client/src/services/index/postCategories.jsx b/client/src/services/index/postCategories.jsx
new file mode 100644
index 0000000..485eeb8
--- /dev/null
+++ b/client/src/services/index/postCategories.jsx
@@ -0,0 +1,93 @@
+import axios from "axios";
+
+import { stable } from "../../constants";
+
+const baseURL = stable.BASE_URL;
+
+const api = axios.create({
+ baseURL,
+});
+
+export const getAllCategories = async (
+ searchKeyword = "",
+ page = 1,
+ limit = 10
+) => {
+ try {
+ const { data, headers } = await api.get(
+ `/api/post-categories?search=${searchKeyword}&page=${page}&limit=${limit}`
+ );
+ return { data, headers };
+ } catch (error) {
+ if (error.response && error.response.data.message) {
+ throw new Error(error.response.data.message);
+ }
+ throw new Error(error.message);
+ }
+};
+
+export const deleteCategory = async ({ slug, token }) => {
+ try {
+ const config = {
+ headers: {
+ Authorization: `Bearer ${token}`,
+ },
+ };
+
+ const { data } = await api.delete(`/api/post-categories/${slug}`, config);
+ return data;
+ } catch (error) {
+ if (error.response && error.response.data.message) {
+ throw new Error(error.response.data.message);
+ }
+ throw new Error(error.message);
+ }
+};
+
+export const createCategory = async ({ token, title }) => {
+ try {
+ const config = {
+ headers: {
+ Authorization: `Bearer ${token}`,
+ },
+ };
+
+ const { data } = await api.post(`/api/post-categories`, { title }, config);
+ return data;
+ } catch (error) {
+ if (error.response && error.response.data.message) {
+ throw new Error(error.response.data.message);
+ }
+ throw new Error(error.message);
+ }
+};
+
+export const updateCategory = async ({ token, title, slug }) => {
+ try {
+ const config = {
+ headers: {
+ Authorization: `Bearer ${token}`,
+ },
+ };
+
+ const { data } = await api.put(`/api/post-categories/${slug}`, { title }, config);
+ return data;
+ } catch (error) {
+ if (error.response && error.response.data.message) {
+ throw new Error(error.response.data.message);
+ }
+ throw new Error(error.message);
+ }
+};
+
+export const getSingleCategory = async ({ slug }) => {
+ try {
+ const { data } = await api.get(`/api/post-categories/${slug}`);
+ return data;
+ } catch (error) {
+ if (error.response && error.response.data.message) {
+ throw new Error(error.response.data.message);
+ }
+ throw new Error(error.message);
+ }
+};
diff --git a/client/src/services/index/postTags.jsx b/client/src/services/index/postTags.jsx
new file mode 100644
index 0000000..d133751
--- /dev/null
+++ b/client/src/services/index/postTags.jsx
@@ -0,0 +1,21 @@
+import axios from "axios";
+
+import { stable } from "../../constants";
+
+const baseURL = stable.BASE_URL;
+
+const api = axios.create({
+ baseURL,
+});
+
+export const getPopularTags = async () => {
+ try {
+ const { data } = await api.get(`/api/post-tags/popular`);
+ return data;
+ } catch (error) {
+ if (error.response && error.response.data.message) {
+ throw new Error(error.response.data.message);
+ }
+ throw new Error(error.message);
+ }
+ }
\ No newline at end of file
diff --git a/client/src/services/index/posts.jsx b/client/src/services/index/posts.jsx
new file mode 100644
index 0000000..cf385e1
--- /dev/null
+++ b/client/src/services/index/posts.jsx
@@ -0,0 +1,93 @@
+import axios from "axios";
+import { stable } from "../../constants";
+
+const baseURL = stable.BASE_URL;
+
+const api = axios.create({
+ baseURL,
+});
+
+export const getAllPosts = async (
+ searchKeyword = "",
+ page = 1,
+ limit = 10,
+ category = "",
+ userId = "",
+) => {
+ try {
+ const { data, headers } = await api.get(
+ `/api/posts?searchKeyword=${searchKeyword}&page=${page}&limit=${limit}&userId=${userId}&category=${category}`
+ );
+ return { data, headers };
+ } catch (error) {
+ if (error.response && error.response.data.message)
+ throw new Error(error.response.data.message);
+ throw new Error(error.message);
+ }
+};
+
+export const getSinglePost = async ({ slug }) => {
+ try {
+ const { data } = await api.get(`/api/posts/${slug}`);
+ return data;
+ } catch (error) {
+ if (error.response && error.response.data.message) {
+ throw new Error(error.response.data.message);
+ }
+ throw new Error(error.message);
+ }
+};
+
+export const deletePost = async ({ slug, token }) => {
+ try {
+ const config = {
+ headers: {
+ Authorization: `Bearer ${token}`,
+ },
+ };
+
+ const { data } = await api.delete(`/api/posts/${slug}`, config);
+ return data;
+ } catch (error) {
+ if (error.response && error.response.data.message) {
+ throw new Error(error.response.data.message);
+ }
+ throw new Error(error.message);
+ }
+};
+
+export const updatePost = async ({ updatedData, slug, token }) => {
+ try {
+ const config = {
+ headers: {
+ Authorization: `Bearer ${token}`,
+ },
+ };
+
+ const { data } = await api.put(`/api/posts/${slug}`, updatedData, config);
+ return data;
+ } catch (error) {
+ if (error.response && error.response.data.message) {
+ throw new Error(error.response.data.message);
+ }
+ throw new Error(error.message);
+ }
+};
+
+export const createPost = async ({ token }) => {
+ try {
+ const config = {
+ headers: {
+ Authorization: `Bearer ${token}`,
+ },
+ };
+
+ const { data } = await api.post(`/api/posts`, {}, config);
+ return data;
+ } catch (error) {
+ if (error.response && error.response.data.message) {
+ throw new Error(error.response.data.message);
+ }
+ throw new Error(error.message);
+ }
+};
diff --git a/client/src/services/index/users.jsx b/client/src/services/index/users.jsx
new file mode 100644
index 0000000..4889ecb
--- /dev/null
+++ b/client/src/services/index/users.jsx
@@ -0,0 +1,164 @@
+import axios from "axios";
+import { stable } from "../../constants";
+
+const baseURL = stable.BASE_URL;
+
+const api = axios.create({
+ baseURL,
+});
+
+export const signUp = async ({ name, email, password }) => {
+ try {
+ const { data } = await api.post("/api/users/register", {
+ name,
+ email,
+ password,
+ });
+ return data;
+ } catch (error) {
+ if (error.response && error.response.data.message) {
+ throw new Error(error.response.data.message);
+ }
+ throw new Error(error.message);
+ }
+};
+
+export const logIn = async ({ email, password }) => {
+ try {
+ const { data } = await api.post("/api/users/login", {
+ email,
+ password,
+ });
+ return data;
+ } catch (error) {
+ if (error.response && error.response.data.message) {
+ throw new Error(error.response.data.message);
+ }
+ throw new Error(error.message);
+ }
+};
+
+export const getUserProfile = async ({ token }) => {
+ try {
+ const config = {
+ headers: {
+ Authorization: `Bearer ${token}`,
+ },
+ };
+
+ const { data } = await api.get("/api/users/profile", config);
+ return data;
+ } catch (error) {
+ if (error.response && error.response.data.message) {
+ throw new Error(error.response.data.message);
+ }
+ throw new Error(error.message);
+ }
+};
+
+export const getUserById = async ({ token, userId }) => {
+ try {
+ const config = {
+ headers: {
+ Authorization: `Bearer ${token}`,
+ },
+ };
+
+ const { data } = await api.get(`/api/users/profile/${userId}`, config);
+ return data;
+ } catch (error) {
+ if (error.response && error.response.data.message) {
+ throw new Error(error.response.data.message);
+ }
+ throw new Error(error.message);
+ }
+};
+
+export const updateProfile = async ({ token, userData, userId }) => {
+ try {
+ const config = {
+ headers: {
+ Authorization: `Bearer ${token}`,
+ },
+ };
+
+ const { data } = await api.put(
+ `/api/users/updateProfile/${userId}`,
+ userData,
+ config
+ );
+ return data;
+ } catch (error) {
+ if (error.response && error.response.data.message) {
+ throw new Error(error.response.data.message);
+ }
+ throw new Error(error.message);
+ }
+};
+
+export const updateProfilePicture = async ({ token, formData }) => {
+ try {
+ const config = {
+ headers: {
+ "Content-Type": "multipart/form-data", // "application/json
+ Authorization: `Bearer ${token}`,
+ },
+ };
+
+ const { data } = await api.put(
+ "/api/users/updateProfilePicture",
+ formData,
+ config
+ );
+ return data;
+ } catch (error) {
+ if (error.response && error.response.data.message) {
+ throw new Error(error.response.data.message);
+ }
+ throw new Error(error.message);
+ }
+};
+
+export const getAllUsers = async (
+ token,
+ searchKeyword = "",
+ page = 1,
+ userId = "",
+ limit = 10
+) => {
+ try {
+ const config = {
+ headers: {
+ Authorization: `Bearer ${token}`,
+ },
+ };
+ const { data, headers } = await api.get(
+ `/api/users?searchKeyword=${searchKeyword}&page=${page}&limit=${limit}&userId=${userId}`, config
+ );
+ return { data, headers };
+ } catch (error) {
+ if (error.response && error.response.data.message)
+ throw new Error(error.response.data.message);
+ throw new Error(error.message);
+ }
+};
+
+export const deleteUser = async ({ slug, token }) => {
+ try {
+ const config = {
+ headers: {
+ Authorization: `Bearer ${token}`,
+ },
+ };
+
+ const { data } = await api.delete(`/api/users/${slug}`, config);
+ return data;
+ } catch (error) {
+ if (error.response && error.response.data.message) {
+ throw new Error(error.response.data.message);
+ }
+ throw new Error(error.message);
+ }
+};
+
+export default api;
diff --git a/client/src/store/actions/user.jsx b/client/src/store/actions/user.jsx
new file mode 100644
index 0000000..4c58d44
--- /dev/null
+++ b/client/src/store/actions/user.jsx
@@ -0,0 +1,6 @@
+import { userActions } from "../reducers/userReducers";
+
+export const logOut = () => (dispatch) => {
+ dispatch(userActions.resetUserInfo());
+ localStorage.removeItem("account");
+};
diff --git a/client/src/store/index.jsx b/client/src/store/index.jsx
new file mode 100644
index 0000000..2880567
--- /dev/null
+++ b/client/src/store/index.jsx
@@ -0,0 +1,19 @@
+import { configureStore } from "@reduxjs/toolkit";
+import { userReducer } from "./reducers/userReducers";
+
+const userInfoFromStorage = localStorage.getItem("account")
+ ? JSON.parse(localStorage.getItem("account"))
+ : null;
+
+const initialState = {
+ user: { userInfo: userInfoFromStorage },
+};
+
+const store = configureStore({
+ reducer: {
+ user: userReducer,
+ },
+ preloadedState: initialState,
+});
+
+export default store;
diff --git a/client/src/store/reducers/userReducers.jsx b/client/src/store/reducers/userReducers.jsx
new file mode 100644
index 0000000..3ef62cb
--- /dev/null
+++ b/client/src/store/reducers/userReducers.jsx
@@ -0,0 +1,21 @@
+import { createSlice } from "@reduxjs/toolkit";
+
+const userInitialState = { userInfo: null };
+
+const userSlice = createSlice({
+ name: "user",
+ initialState: userInitialState,
+ reducers: {
+ setUserInfo(state, action) {
+ state.userInfo = action.payload;
+ },
+ resetUserInfo(state, action) {
+ state.userInfo = null;
+ },
+ },
+});
+
+const userActions = userSlice.actions;
+const userReducer = userSlice.reducer;
+
+export { userActions, userReducer };
diff --git a/client/src/utils/multiSelectTagUtils.jsx b/client/src/utils/multiSelectTagUtils.jsx
new file mode 100644
index 0000000..75c748a
--- /dev/null
+++ b/client/src/utils/multiSelectTagUtils.jsx
@@ -0,0 +1,16 @@
+export const categoryToOption = (category) => {
+ return {
+ value: category._id,
+ label: category.title,
+ };
+};
+
+export const filterCategories = (inputValue, categoriesData) => {
+ const filteredOptions = categoriesData
+ .map(categoryToOption)
+ .filter((category) => {
+ return category.label.toLowerCase().includes(inputValue.toLowerCase());
+ });
+
+ return filteredOptions;
+};
diff --git a/client/src/utils/parseJsonToHtml.jsx b/client/src/utils/parseJsonToHtml.jsx
new file mode 100644
index 0000000..d6d2eeb
--- /dev/null
+++ b/client/src/utils/parseJsonToHtml.jsx
@@ -0,0 +1,9 @@
+import { generateHTML } from "@tiptap/react";
+import parse from "html-react-parser";
+import { extensions } from "../constants/tiptapExtensions";
+
+const parseJsonToHtml = (json) => {
+ parse(generateHTML(json, extensions));
+};
+
+export default parseJsonToHtml;
\ No newline at end of file
diff --git a/client/tailwind.config.js b/client/tailwind.config.js
index 1d3563e..44a8399 100644
--- a/client/tailwind.config.js
+++ b/client/tailwind.config.js
@@ -4,7 +4,10 @@ export default {
theme: {
extend: {
colors: {
- primary: "#4184E2",
+ primary: {
+ DEFAULT: "#4184E2",
+ hover: "#2261bb",
+ },
dark: {
hard: "#0D2436",
soft: "#183B56",
@@ -13,14 +16,26 @@ export default {
gray: {
placeholder: "#959EAD",
detail: "#B3BAC5",
+ background: "#F2F4F5",
+ border: "#C3CAD9",
+ },
+ green: {
+ success: "#36B37E",
+ dark: "#115C31",
},
- success: "#36B37E",
},
fontFamily: {
opensans: ["'Open Sans'", "sans-serif"],
roboto: ["'Roboto'", "sans-serif"],
},
},
- plugins: [],
+ },
+ plugins: [require("@tailwindcss/typography"), require("daisyui")],
+ daisyui: {
+ themes: [], //No themes
+ base: false, // applies background color and foreground color for root element by default
+ styled: true, // include daisyUI colors and design decisions for all components
+ utils: true, // adds responsive and modifier utility classes
+ prefix: 'd-'
},
};
diff --git a/client/vercel.json b/client/vercel.json
new file mode 100644
index 0000000..d8b552c
--- /dev/null
+++ b/client/vercel.json
@@ -0,0 +1 @@
+{ "routes": [{ "src": "/[^.]+", "dest": "/", "status": 200 }] }
diff --git a/client/vite.config.js b/client/vite.config.js
index 861b04b..d366e8c 100644
--- a/client/vite.config.js
+++ b/client/vite.config.js
@@ -1,7 +1,7 @@
-import { defineConfig } from 'vite'
-import react from '@vitejs/plugin-react-swc'
+import { defineConfig } from "vite";
+import react from "@vitejs/plugin-react-swc";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
-})
+});
diff --git a/server/.env b/server/.env
deleted file mode 100644
index a119ee2..0000000
--- a/server/.env
+++ /dev/null
@@ -1,3 +0,0 @@
-MONGO_URL = "mongodb+srv://PabloCarvalhoGimenez:Garcito1510.@socialapp.g9emadx.mongodb.net/?retryWrites=true&w=majority"
-PORT = 3001
-JWT_SECRET = "secret key by pablo"
\ No newline at end of file
diff --git a/server/controllers/auth.js b/server/controllers/auth.js
deleted file mode 100644
index b00004c..0000000
--- a/server/controllers/auth.js
+++ /dev/null
@@ -1,64 +0,0 @@
-import bcrypt from "bcryptjs";
-import jwt from "jsonwebtoken";
-import User from "../models/User.js";
-
-/* REGISTER USER */
-export const register = async (req, res) => {
- try {
- const {
- firstName,
- lastName,
- email,
- password,
- picture,
- friends,
- location,
- occupation,
- viewdProfileNumber,
- impressions,
- } = req.body;
-
- const salt = await bcrypt.genSalt();
- const passwordHash = await bcrypt.hash(password, salt);
-
- const newUser = new User({
- firstName,
- lastName,
- email,
- password: passwordHash,
- picture,
- friends,
- location,
- occupation,
- viewdProfileNumber,
- impressions,
- });
- } catch (e) {
- res.status(500).json({ message: e.message });
- }
-};
-
-/* LOGIN USER */
-export const login = async (req, res) => {
- try {
- const { email, password } = req.body;
- const user = await User.findOne({ email: email });
- if (!user) {
- return res.status(400).json({ message: "User does not exist." });
- }
-
- const isMatch = await bcrypt.compare(password, user.password);
-
- if (!isMatch) {
- return res.status(400).json({ message: "Wrong email or password." });
- }
- const token = jwt.sign({ id: user._id }, process.env.JWT_SECRET);
- delete user.password;
-
- res.status(200).json({ token, user });
-
-
- } catch (e) {
- res.status(500).json({ message: e.message });
- }
-};
diff --git a/server/controllers/users.js b/server/controllers/users.js
deleted file mode 100644
index ae981cc..0000000
--- a/server/controllers/users.js
+++ /dev/null
@@ -1,69 +0,0 @@
-import User from "../models/User";
-
-/* READ */
-export const getUser = async (req, res) => {
- try {
- const { id } = req.params;
- const user = await User.findById(id);
- res.status(200).json(user);
- } catch (e) {
- res.status(404).json({ message: e.message });
- }
-};
-
-export const getUserFriends = async (req, res) => {
- try {
- const { id } = req.params;
- const user = await User.findById(id);
-
- const friends = await Promise.all(
- user.friends.map((friendId) => {
- return User.findById(friendId);
- })
- );
-
- const formattedFriends = friends.map(
- ({ _id, firstName, lastName, occupation, location, picturePath }) => {
- return { _id, firstName, lastName, occupation, location, picturePath };
- }
- );
- res.status(200).json(formattedFriends);
- } catch (e) {
- res.status(404).json({ message: e.message });
- }
-};
-
-/* UPDATE */
-export const addRemoveFriend = async (req, res) => {
- try {
- const { id, friendId } = req.params;
- const user = await User.findById(id);
- const friend = await User.findById(friendId);
-
- if (user.friends.includes(friendId)) {
- user.friends = user.friends.filter((id) => id !== friendId);
- friend.friends = friend.friends.filter((id) => id !== id);
- } else {
- user.friends.push(friendId);
- friend.friends.push(id);
- }
- await user.save();
- await friend.save();
-
- const friends = await Promise.all(
- user.friends.map((friendId) => {
- return User.findById(friendId);
- })
- );
-
- const formattedFriends = friends.map(
- ({ _id, firstName, lastName, occupation, location, picturePath }) => {
- return { _id, firstName, lastName, occupation, location, picturePath };
- }
- );
-
- res.status(200).json(formattedFriends);
- } catch (e) {
- res.status(404).json({ message: e.message });
- }
-};
diff --git a/server/index.js b/server/index.js
deleted file mode 100644
index 554e7f5..0000000
--- a/server/index.js
+++ /dev/null
@@ -1,58 +0,0 @@
-import express from "express";
-import bodyParser from "body-parser";
-import mongoose from "mongoose";
-import cors from "cors";
-import dotenv from "dotenv"
-import multer from "multer";
-import helmet from "helmet";
-import morgan from "morgan";
-import path from "path";
-import { fileURLToPath } from "url";
-import authRoute from "./routes/auth.js";
-import userRoutes from "./routes/users.js";
-import { register } from "./controllers/auth";
-
-/* CONFIGS */
-const __filename = fileURLToPath(import.meta.url);
-const __dirname = path.dirname(__filename);
-dotenv.config();
-const app = express();
-app.use(express.json());
-app.use(helmet());
-app.use(helmet.crossOriginResourcePolicy({ policy: "cross-origin" }));
-app.use(morgan("common"));
-app.use(bodyParser.json({ limit: "30mb", extended: true }));
-app.use(bodyParser.urlencoded({ limit: "30mb", extended: true }));
-app.use(cors());
-app.use("/assets", express.static(path.join(__dirname, "public/assets")));
-
-/* FILE STORAGE */
-const storage = multer.diskStorage({
- destination: function (req, file, cb) {
- cb(null, "public/assets");
- },
- filename: function (req, file, cb) {
- cb(null, file.originalname);
- },
-});
-
-const upload = multer({ storage });
-
-/* ROUTES WITH FILES */
-app.post("auth/register", upload.single("picture"), register);
-
-
-/* ROUTES */
-app.use("/auth", authRoute);
-
-app.get("/users", userRoutes);
-
-/* MONGOOSE SETUP */
-const PORT = process.env.PORT || 6001;
-mongoose.connect(process.env.MONGO_URL, {
- useNewUrlParser: true,
- useUnifiedTopology: true,
-}).then(() => {
- app.listen(PORT, () => console.log(`Server Port: ${PORT}`))
-}).catch((e) => console.log(e, "Failed to conect"))
-
diff --git a/server/middleware/auth.js b/server/middleware/auth.js
deleted file mode 100644
index db66222..0000000
--- a/server/middleware/auth.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import jwt from "jsonwebtoken";
-
-export const verifyToken = async (req, res, next) => {
- try {
- let token = req.headers("Authorization");
-
- if (!token) {
- return res.status(403).json({ message: "You are not authorized." });
- }
- if (token.startsWith("Bearer ")) {
- token = token.slice(7, token.length).trimLeft();
- }
-
- const verified = jwt.verify(token, process.env.JWT_SECRET);
- if (!verified) {
- return res.status(401).json({ message: "Token verification failed." });
- }
- req.user = verified.id;
- next();
-
- } catch (e) {
- res.status(500).json({ error: e.message });
- }
-};
diff --git a/server/models/User.js b/server/models/User.js
deleted file mode 100644
index 7a92eb1..0000000
--- a/server/models/User.js
+++ /dev/null
@@ -1,21 +0,0 @@
-import mongoose from "mongoose";
-
-const UseSchema = new mongoose.Schema(
- {
- firstName: { type: String, required: true, min: 3, max: 20 },
- lastName: { type: String, required: true, min: 3, max: 20 },
- email: { type: String, required: true, unique: true, max: 50 },
- password: { type: String, required: true, min: 5 },
- picture: { type: String, default: "" },
- friends: { type: Array, default: [] },
- location: String,
- occupation: String,
- viewdProfileNumber: Number,
- impressions: Number,
- },
-
- { timestamps: true }
-);
-
-const User = mongoose.model("User", UseSchema);
-export default User;
diff --git a/server/node_modules/.bin/color-support b/server/node_modules/.bin/color-support
deleted file mode 100644
index 59e6506..0000000
--- a/server/node_modules/.bin/color-support
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
- *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
- exec "$basedir/node" "$basedir/../color-support/bin.js" "$@"
-else
- exec node "$basedir/../color-support/bin.js" "$@"
-fi
diff --git a/server/node_modules/.bin/color-support.cmd b/server/node_modules/.bin/color-support.cmd
deleted file mode 100644
index 005f9a5..0000000
--- a/server/node_modules/.bin/color-support.cmd
+++ /dev/null
@@ -1,17 +0,0 @@
-@ECHO off
-GOTO start
-:find_dp0
-SET dp0=%~dp0
-EXIT /b
-:start
-SETLOCAL
-CALL :find_dp0
-
-IF EXIST "%dp0%\node.exe" (
- SET "_prog=%dp0%\node.exe"
-) ELSE (
- SET "_prog=node"
- SET PATHEXT=%PATHEXT:;.JS;=;%
-)
-
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\color-support\bin.js" %*
diff --git a/server/node_modules/.bin/color-support.ps1 b/server/node_modules/.bin/color-support.ps1
deleted file mode 100644
index f5c9fe4..0000000
--- a/server/node_modules/.bin/color-support.ps1
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env pwsh
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
-
-$exe=""
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
- # Fix case when both the Windows and Linux builds of Node
- # are installed in the same directory
- $exe=".exe"
-}
-$ret=0
-if (Test-Path "$basedir/node$exe") {
- # Support pipeline input
- if ($MyInvocation.ExpectingInput) {
- $input | & "$basedir/node$exe" "$basedir/../color-support/bin.js" $args
- } else {
- & "$basedir/node$exe" "$basedir/../color-support/bin.js" $args
- }
- $ret=$LASTEXITCODE
-} else {
- # Support pipeline input
- if ($MyInvocation.ExpectingInput) {
- $input | & "node$exe" "$basedir/../color-support/bin.js" $args
- } else {
- & "node$exe" "$basedir/../color-support/bin.js" $args
- }
- $ret=$LASTEXITCODE
-}
-exit $ret
diff --git a/server/node_modules/.bin/mime b/server/node_modules/.bin/mime
deleted file mode 100644
index 0a62a1b..0000000
--- a/server/node_modules/.bin/mime
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
- *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
- exec "$basedir/node" "$basedir/../mime/cli.js" "$@"
-else
- exec node "$basedir/../mime/cli.js" "$@"
-fi
diff --git a/server/node_modules/.bin/mime.cmd b/server/node_modules/.bin/mime.cmd
deleted file mode 100644
index 54491f1..0000000
--- a/server/node_modules/.bin/mime.cmd
+++ /dev/null
@@ -1,17 +0,0 @@
-@ECHO off
-GOTO start
-:find_dp0
-SET dp0=%~dp0
-EXIT /b
-:start
-SETLOCAL
-CALL :find_dp0
-
-IF EXIST "%dp0%\node.exe" (
- SET "_prog=%dp0%\node.exe"
-) ELSE (
- SET "_prog=node"
- SET PATHEXT=%PATHEXT:;.JS;=;%
-)
-
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mime\cli.js" %*
diff --git a/server/node_modules/.bin/mime.ps1 b/server/node_modules/.bin/mime.ps1
deleted file mode 100644
index 2222f40..0000000
--- a/server/node_modules/.bin/mime.ps1
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env pwsh
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
-
-$exe=""
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
- # Fix case when both the Windows and Linux builds of Node
- # are installed in the same directory
- $exe=".exe"
-}
-$ret=0
-if (Test-Path "$basedir/node$exe") {
- # Support pipeline input
- if ($MyInvocation.ExpectingInput) {
- $input | & "$basedir/node$exe" "$basedir/../mime/cli.js" $args
- } else {
- & "$basedir/node$exe" "$basedir/../mime/cli.js" $args
- }
- $ret=$LASTEXITCODE
-} else {
- # Support pipeline input
- if ($MyInvocation.ExpectingInput) {
- $input | & "node$exe" "$basedir/../mime/cli.js" $args
- } else {
- & "node$exe" "$basedir/../mime/cli.js" $args
- }
- $ret=$LASTEXITCODE
-}
-exit $ret
diff --git a/server/node_modules/.bin/mkdirp b/server/node_modules/.bin/mkdirp
deleted file mode 100644
index 6ba5765..0000000
--- a/server/node_modules/.bin/mkdirp
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
- *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
- exec "$basedir/node" "$basedir/../mkdirp/bin/cmd.js" "$@"
-else
- exec node "$basedir/../mkdirp/bin/cmd.js" "$@"
-fi
diff --git a/server/node_modules/.bin/mkdirp.cmd b/server/node_modules/.bin/mkdirp.cmd
deleted file mode 100644
index a865dd9..0000000
--- a/server/node_modules/.bin/mkdirp.cmd
+++ /dev/null
@@ -1,17 +0,0 @@
-@ECHO off
-GOTO start
-:find_dp0
-SET dp0=%~dp0
-EXIT /b
-:start
-SETLOCAL
-CALL :find_dp0
-
-IF EXIST "%dp0%\node.exe" (
- SET "_prog=%dp0%\node.exe"
-) ELSE (
- SET "_prog=node"
- SET PATHEXT=%PATHEXT:;.JS;=;%
-)
-
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mkdirp\bin\cmd.js" %*
diff --git a/server/node_modules/.bin/mkdirp.ps1 b/server/node_modules/.bin/mkdirp.ps1
deleted file mode 100644
index 911e854..0000000
--- a/server/node_modules/.bin/mkdirp.ps1
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env pwsh
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
-
-$exe=""
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
- # Fix case when both the Windows and Linux builds of Node
- # are installed in the same directory
- $exe=".exe"
-}
-$ret=0
-if (Test-Path "$basedir/node$exe") {
- # Support pipeline input
- if ($MyInvocation.ExpectingInput) {
- $input | & "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
- } else {
- & "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
- }
- $ret=$LASTEXITCODE
-} else {
- # Support pipeline input
- if ($MyInvocation.ExpectingInput) {
- $input | & "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
- } else {
- & "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
- }
- $ret=$LASTEXITCODE
-}
-exit $ret
diff --git a/server/node_modules/.bin/node-pre-gyp b/server/node_modules/.bin/node-pre-gyp
deleted file mode 100644
index 004c3be..0000000
--- a/server/node_modules/.bin/node-pre-gyp
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
- *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
- exec "$basedir/node" "$basedir/../@mapbox/node-pre-gyp/bin/node-pre-gyp" "$@"
-else
- exec node "$basedir/../@mapbox/node-pre-gyp/bin/node-pre-gyp" "$@"
-fi
diff --git a/server/node_modules/.bin/node-pre-gyp.cmd b/server/node_modules/.bin/node-pre-gyp.cmd
deleted file mode 100644
index a2fc508..0000000
--- a/server/node_modules/.bin/node-pre-gyp.cmd
+++ /dev/null
@@ -1,17 +0,0 @@
-@ECHO off
-GOTO start
-:find_dp0
-SET dp0=%~dp0
-EXIT /b
-:start
-SETLOCAL
-CALL :find_dp0
-
-IF EXIST "%dp0%\node.exe" (
- SET "_prog=%dp0%\node.exe"
-) ELSE (
- SET "_prog=node"
- SET PATHEXT=%PATHEXT:;.JS;=;%
-)
-
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\@mapbox\node-pre-gyp\bin\node-pre-gyp" %*
diff --git a/server/node_modules/.bin/node-pre-gyp.ps1 b/server/node_modules/.bin/node-pre-gyp.ps1
deleted file mode 100644
index ed297ff..0000000
--- a/server/node_modules/.bin/node-pre-gyp.ps1
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env pwsh
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
-
-$exe=""
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
- # Fix case when both the Windows and Linux builds of Node
- # are installed in the same directory
- $exe=".exe"
-}
-$ret=0
-if (Test-Path "$basedir/node$exe") {
- # Support pipeline input
- if ($MyInvocation.ExpectingInput) {
- $input | & "$basedir/node$exe" "$basedir/../@mapbox/node-pre-gyp/bin/node-pre-gyp" $args
- } else {
- & "$basedir/node$exe" "$basedir/../@mapbox/node-pre-gyp/bin/node-pre-gyp" $args
- }
- $ret=$LASTEXITCODE
-} else {
- # Support pipeline input
- if ($MyInvocation.ExpectingInput) {
- $input | & "node$exe" "$basedir/../@mapbox/node-pre-gyp/bin/node-pre-gyp" $args
- } else {
- & "node$exe" "$basedir/../@mapbox/node-pre-gyp/bin/node-pre-gyp" $args
- }
- $ret=$LASTEXITCODE
-}
-exit $ret
diff --git a/server/node_modules/.bin/nopt b/server/node_modules/.bin/nopt
deleted file mode 100644
index f1ec43b..0000000
--- a/server/node_modules/.bin/nopt
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
- *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
- exec "$basedir/node" "$basedir/../nopt/bin/nopt.js" "$@"
-else
- exec node "$basedir/../nopt/bin/nopt.js" "$@"
-fi
diff --git a/server/node_modules/.bin/nopt.cmd b/server/node_modules/.bin/nopt.cmd
deleted file mode 100644
index a7f38b3..0000000
--- a/server/node_modules/.bin/nopt.cmd
+++ /dev/null
@@ -1,17 +0,0 @@
-@ECHO off
-GOTO start
-:find_dp0
-SET dp0=%~dp0
-EXIT /b
-:start
-SETLOCAL
-CALL :find_dp0
-
-IF EXIST "%dp0%\node.exe" (
- SET "_prog=%dp0%\node.exe"
-) ELSE (
- SET "_prog=node"
- SET PATHEXT=%PATHEXT:;.JS;=;%
-)
-
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\nopt\bin\nopt.js" %*
diff --git a/server/node_modules/.bin/nopt.ps1 b/server/node_modules/.bin/nopt.ps1
deleted file mode 100644
index 9d6ba56..0000000
--- a/server/node_modules/.bin/nopt.ps1
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env pwsh
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
-
-$exe=""
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
- # Fix case when both the Windows and Linux builds of Node
- # are installed in the same directory
- $exe=".exe"
-}
-$ret=0
-if (Test-Path "$basedir/node$exe") {
- # Support pipeline input
- if ($MyInvocation.ExpectingInput) {
- $input | & "$basedir/node$exe" "$basedir/../nopt/bin/nopt.js" $args
- } else {
- & "$basedir/node$exe" "$basedir/../nopt/bin/nopt.js" $args
- }
- $ret=$LASTEXITCODE
-} else {
- # Support pipeline input
- if ($MyInvocation.ExpectingInput) {
- $input | & "node$exe" "$basedir/../nopt/bin/nopt.js" $args
- } else {
- & "node$exe" "$basedir/../nopt/bin/nopt.js" $args
- }
- $ret=$LASTEXITCODE
-}
-exit $ret
diff --git a/server/node_modules/.bin/rimraf b/server/node_modules/.bin/rimraf
deleted file mode 100644
index b816825..0000000
--- a/server/node_modules/.bin/rimraf
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
- *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
- exec "$basedir/node" "$basedir/../rimraf/bin.js" "$@"
-else
- exec node "$basedir/../rimraf/bin.js" "$@"
-fi
diff --git a/server/node_modules/.bin/rimraf.cmd b/server/node_modules/.bin/rimraf.cmd
deleted file mode 100644
index 13f45ec..0000000
--- a/server/node_modules/.bin/rimraf.cmd
+++ /dev/null
@@ -1,17 +0,0 @@
-@ECHO off
-GOTO start
-:find_dp0
-SET dp0=%~dp0
-EXIT /b
-:start
-SETLOCAL
-CALL :find_dp0
-
-IF EXIST "%dp0%\node.exe" (
- SET "_prog=%dp0%\node.exe"
-) ELSE (
- SET "_prog=node"
- SET PATHEXT=%PATHEXT:;.JS;=;%
-)
-
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\rimraf\bin.js" %*
diff --git a/server/node_modules/.bin/rimraf.ps1 b/server/node_modules/.bin/rimraf.ps1
deleted file mode 100644
index 1716791..0000000
--- a/server/node_modules/.bin/rimraf.ps1
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env pwsh
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
-
-$exe=""
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
- # Fix case when both the Windows and Linux builds of Node
- # are installed in the same directory
- $exe=".exe"
-}
-$ret=0
-if (Test-Path "$basedir/node$exe") {
- # Support pipeline input
- if ($MyInvocation.ExpectingInput) {
- $input | & "$basedir/node$exe" "$basedir/../rimraf/bin.js" $args
- } else {
- & "$basedir/node$exe" "$basedir/../rimraf/bin.js" $args
- }
- $ret=$LASTEXITCODE
-} else {
- # Support pipeline input
- if ($MyInvocation.ExpectingInput) {
- $input | & "node$exe" "$basedir/../rimraf/bin.js" $args
- } else {
- & "node$exe" "$basedir/../rimraf/bin.js" $args
- }
- $ret=$LASTEXITCODE
-}
-exit $ret
diff --git a/server/node_modules/.bin/semver b/server/node_modules/.bin/semver
deleted file mode 100644
index 77443e7..0000000
--- a/server/node_modules/.bin/semver
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
- *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
- exec "$basedir/node" "$basedir/../semver/bin/semver.js" "$@"
-else
- exec node "$basedir/../semver/bin/semver.js" "$@"
-fi
diff --git a/server/node_modules/.bin/semver.cmd b/server/node_modules/.bin/semver.cmd
deleted file mode 100644
index 9913fa9..0000000
--- a/server/node_modules/.bin/semver.cmd
+++ /dev/null
@@ -1,17 +0,0 @@
-@ECHO off
-GOTO start
-:find_dp0
-SET dp0=%~dp0
-EXIT /b
-:start
-SETLOCAL
-CALL :find_dp0
-
-IF EXIST "%dp0%\node.exe" (
- SET "_prog=%dp0%\node.exe"
-) ELSE (
- SET "_prog=node"
- SET PATHEXT=%PATHEXT:;.JS;=;%
-)
-
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\semver\bin\semver.js" %*
diff --git a/server/node_modules/.bin/semver.ps1 b/server/node_modules/.bin/semver.ps1
deleted file mode 100644
index 314717a..0000000
--- a/server/node_modules/.bin/semver.ps1
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env pwsh
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
-
-$exe=""
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
- # Fix case when both the Windows and Linux builds of Node
- # are installed in the same directory
- $exe=".exe"
-}
-$ret=0
-if (Test-Path "$basedir/node$exe") {
- # Support pipeline input
- if ($MyInvocation.ExpectingInput) {
- $input | & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args
- } else {
- & "$basedir/node$exe" "$basedir/../semver/bin/semver.js" $args
- }
- $ret=$LASTEXITCODE
-} else {
- # Support pipeline input
- if ($MyInvocation.ExpectingInput) {
- $input | & "node$exe" "$basedir/../semver/bin/semver.js" $args
- } else {
- & "node$exe" "$basedir/../semver/bin/semver.js" $args
- }
- $ret=$LASTEXITCODE
-}
-exit $ret
diff --git a/server/node_modules/.package-lock.json b/server/node_modules/.package-lock.json
deleted file mode 100644
index 1f24443..0000000
--- a/server/node_modules/.package-lock.json
+++ /dev/null
@@ -1,1961 +0,0 @@
-{
- "name": "server",
- "version": "1.0.0",
- "lockfileVersion": 3,
- "requires": true,
- "packages": {
- "node_modules/@mapbox/node-pre-gyp": {
- "version": "1.0.11",
- "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz",
- "integrity": "sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==",
- "dependencies": {
- "detect-libc": "^2.0.0",
- "https-proxy-agent": "^5.0.0",
- "make-dir": "^3.1.0",
- "node-fetch": "^2.6.7",
- "nopt": "^5.0.0",
- "npmlog": "^5.0.1",
- "rimraf": "^3.0.2",
- "semver": "^7.3.5",
- "tar": "^6.1.11"
- },
- "bin": {
- "node-pre-gyp": "bin/node-pre-gyp"
- }
- },
- "node_modules/@types/body-parser": {
- "version": "1.19.2",
- "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz",
- "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==",
- "dependencies": {
- "@types/connect": "*",
- "@types/node": "*"
- }
- },
- "node_modules/@types/bson": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/@types/bson/-/bson-4.2.0.tgz",
- "integrity": "sha512-ELCPqAdroMdcuxqwMgUpifQyRoTpyYCNr1V9xKyF40VsBobsj+BbWNRvwGchMgBPGqkw655ypkjj2MEF5ywVwg==",
- "deprecated": "This is a stub types definition. bson provides its own type definitions, so you do not need this installed.",
- "dependencies": {
- "bson": "*"
- }
- },
- "node_modules/@types/connect": {
- "version": "3.4.35",
- "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz",
- "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==",
- "dependencies": {
- "@types/node": "*"
- }
- },
- "node_modules/@types/express": {
- "version": "4.17.17",
- "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz",
- "integrity": "sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==",
- "dependencies": {
- "@types/body-parser": "*",
- "@types/express-serve-static-core": "^4.17.33",
- "@types/qs": "*",
- "@types/serve-static": "*"
- }
- },
- "node_modules/@types/express-serve-static-core": {
- "version": "4.17.35",
- "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.35.tgz",
- "integrity": "sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg==",
- "dependencies": {
- "@types/node": "*",
- "@types/qs": "*",
- "@types/range-parser": "*",
- "@types/send": "*"
- }
- },
- "node_modules/@types/http-errors": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.1.tgz",
- "integrity": "sha512-/K3ds8TRAfBvi5vfjuz8y6+GiAYBZ0x4tXv1Av6CWBWn0IlADc+ZX9pMq7oU0fNQPnBwIZl3rmeLp6SBApbxSQ=="
- },
- "node_modules/@types/mime": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz",
- "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw=="
- },
- "node_modules/@types/mongodb": {
- "version": "3.6.20",
- "resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.6.20.tgz",
- "integrity": "sha512-WcdpPJCakFzcWWD9juKoZbRtQxKIMYF/JIAM4JrNHrMcnJL6/a2NWjXxW7fo9hxboxxkg+icff8d7+WIEvKgYQ==",
- "dependencies": {
- "@types/bson": "*",
- "@types/node": "*"
- }
- },
- "node_modules/@types/multer": {
- "version": "1.4.7",
- "resolved": "https://registry.npmjs.org/@types/multer/-/multer-1.4.7.tgz",
- "integrity": "sha512-/SNsDidUFCvqqcWDwxv2feww/yqhNeTRL5CVoL3jU4Goc4kKEL10T7Eye65ZqPNi4HRx8sAEX59pV1aEH7drNA==",
- "dependencies": {
- "@types/express": "*"
- }
- },
- "node_modules/@types/node": {
- "version": "20.4.5",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.5.tgz",
- "integrity": "sha512-rt40Nk13II9JwQBdeYqmbn2Q6IVTA5uPhvSO+JVqdXw/6/4glI6oR9ezty/A9Hg5u7JH4OmYmuQ+XvjKm0Datg=="
- },
- "node_modules/@types/pump": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/@types/pump/-/pump-1.1.1.tgz",
- "integrity": "sha512-wpRerjHDxFBQ4r8XNv3xHJZeuqrBBoeQ/fhgkooV2F7KsPIYRROb/+f9ODgZfOEyO5/w2ej4YQdpPPXipT8DAA==",
- "dependencies": {
- "@types/node": "*"
- }
- },
- "node_modules/@types/qs": {
- "version": "6.9.7",
- "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz",
- "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw=="
- },
- "node_modules/@types/range-parser": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz",
- "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw=="
- },
- "node_modules/@types/send": {
- "version": "0.17.1",
- "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.1.tgz",
- "integrity": "sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==",
- "dependencies": {
- "@types/mime": "^1",
- "@types/node": "*"
- }
- },
- "node_modules/@types/serve-static": {
- "version": "1.15.2",
- "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.2.tgz",
- "integrity": "sha512-J2LqtvFYCzaj8pVYKw8klQXrLLk7TBZmQ4ShlcdkELFKGwGMfevMLneMMRkMgZxotOD9wg497LpC7O8PcvAmfw==",
- "dependencies": {
- "@types/http-errors": "*",
- "@types/mime": "*",
- "@types/node": "*"
- }
- },
- "node_modules/@types/webidl-conversions": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
- "integrity": "sha512-xTE1E+YF4aWPJJeUzaZI5DRntlkY3+BCVJi0axFptnjGmAoWxkyREIh/XMrfxVLejwQxMCfDXdICo0VLxThrog=="
- },
- "node_modules/@types/whatwg-url": {
- "version": "8.2.2",
- "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz",
- "integrity": "sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==",
- "dependencies": {
- "@types/node": "*",
- "@types/webidl-conversions": "*"
- }
- },
- "node_modules/abbrev": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
- "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
- },
- "node_modules/accepts": {
- "version": "1.3.8",
- "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
- "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
- "dependencies": {
- "mime-types": "~2.1.34",
- "negotiator": "0.6.3"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/agent-base": {
- "version": "6.0.2",
- "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
- "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
- "dependencies": {
- "debug": "4"
- },
- "engines": {
- "node": ">= 6.0.0"
- }
- },
- "node_modules/agent-base/node_modules/debug": {
- "version": "4.3.4",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
- "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
- "dependencies": {
- "ms": "2.1.2"
- },
- "engines": {
- "node": ">=6.0"
- },
- "peerDependenciesMeta": {
- "supports-color": {
- "optional": true
- }
- }
- },
- "node_modules/agent-base/node_modules/ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
- },
- "node_modules/ansi-regex": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
- "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/append-field": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz",
- "integrity": "sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw=="
- },
- "node_modules/aproba": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz",
- "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ=="
- },
- "node_modules/are-we-there-yet": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz",
- "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==",
- "dependencies": {
- "delegates": "^1.0.0",
- "readable-stream": "^3.6.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/are-we-there-yet/node_modules/readable-stream": {
- "version": "3.6.2",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
- "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
- "dependencies": {
- "inherits": "^2.0.3",
- "string_decoder": "^1.1.1",
- "util-deprecate": "^1.0.1"
- },
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/are-we-there-yet/node_modules/string_decoder": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
- "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
- "dependencies": {
- "safe-buffer": "~5.2.0"
- }
- },
- "node_modules/array-flatten": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
- "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg=="
- },
- "node_modules/balanced-match": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
- "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
- },
- "node_modules/basic-auth": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz",
- "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==",
- "dependencies": {
- "safe-buffer": "5.1.2"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/basic-auth/node_modules/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=="
- },
- "node_modules/bcrypt": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-5.1.0.tgz",
- "integrity": "sha512-RHBS7HI5N5tEnGTmtR/pppX0mmDSBpQ4aCBsj7CEQfYXDcO74A8sIBYcJMuCsis2E81zDxeENYhv66oZwLiA+Q==",
- "hasInstallScript": true,
- "dependencies": {
- "@mapbox/node-pre-gyp": "^1.0.10",
- "node-addon-api": "^5.0.0"
- },
- "engines": {
- "node": ">= 10.0.0"
- }
- },
- "node_modules/body-parser": {
- "version": "1.20.2",
- "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz",
- "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==",
- "dependencies": {
- "bytes": "3.1.2",
- "content-type": "~1.0.5",
- "debug": "2.6.9",
- "depd": "2.0.0",
- "destroy": "1.2.0",
- "http-errors": "2.0.0",
- "iconv-lite": "0.4.24",
- "on-finished": "2.4.1",
- "qs": "6.11.0",
- "raw-body": "2.5.2",
- "type-is": "~1.6.18",
- "unpipe": "1.0.0"
- },
- "engines": {
- "node": ">= 0.8",
- "npm": "1.2.8000 || >= 1.4.16"
- }
- },
- "node_modules/brace-expansion": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
- "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
- "dependencies": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
- }
- },
- "node_modules/bson": {
- "version": "5.4.0",
- "resolved": "https://registry.npmjs.org/bson/-/bson-5.4.0.tgz",
- "integrity": "sha512-WRZ5SQI5GfUuKnPTNmAYPiKIof3ORXAF4IRU5UcgmivNIon01rWQlw5RUH954dpu8yGL8T59YShVddIPaU/gFA==",
- "engines": {
- "node": ">=14.20.1"
- }
- },
- "node_modules/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": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA=="
- },
- "node_modules/buffer-from": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
- "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="
- },
- "node_modules/busboy": {
- "version": "0.2.14",
- "resolved": "https://registry.npmjs.org/busboy/-/busboy-0.2.14.tgz",
- "integrity": "sha512-InWFDomvlkEj+xWLBfU3AvnbVYqeTWmQopiW0tWWEy5yehYm2YkGEc59sUmw/4ty5Zj/b0WHGs1LgecuBSBGrg==",
- "dependencies": {
- "dicer": "0.2.5",
- "readable-stream": "1.1.x"
- },
- "engines": {
- "node": ">=0.8.0"
- }
- },
- "node_modules/bytes": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
- "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/call-bind": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
- "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
- "dependencies": {
- "function-bind": "^1.1.1",
- "get-intrinsic": "^1.0.2"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/chownr": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",
- "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/color-support": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
- "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",
- "bin": {
- "color-support": "bin.js"
- }
- },
- "node_modules/concat-map": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="
- },
- "node_modules/concat-stream": {
- "version": "1.6.2",
- "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
- "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
- "engines": [
- "node >= 0.8"
- ],
- "dependencies": {
- "buffer-from": "^1.0.0",
- "inherits": "^2.0.3",
- "readable-stream": "^2.2.2",
- "typedarray": "^0.0.6"
- }
- },
- "node_modules/concat-stream/node_modules/isarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="
- },
- "node_modules/concat-stream/node_modules/readable-stream": {
- "version": "2.3.8",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz",
- "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==",
- "dependencies": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.3",
- "isarray": "~1.0.0",
- "process-nextick-args": "~2.0.0",
- "safe-buffer": "~5.1.1",
- "string_decoder": "~1.1.1",
- "util-deprecate": "~1.0.1"
- }
- },
- "node_modules/concat-stream/node_modules/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=="
- },
- "node_modules/concat-stream/node_modules/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==",
- "dependencies": {
- "safe-buffer": "~5.1.0"
- }
- },
- "node_modules/console-control-strings": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
- "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ=="
- },
- "node_modules/content-disposition": {
- "version": "0.5.4",
- "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
- "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
- "dependencies": {
- "safe-buffer": "5.2.1"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/content-type": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
- "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/cookie": {
- "version": "0.5.0",
- "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz",
- "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/cookie-signature": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
- "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ=="
- },
- "node_modules/core-util-is": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
- "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
- },
- "node_modules/cors": {
- "version": "2.8.5",
- "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
- "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
- "dependencies": {
- "object-assign": "^4",
- "vary": "^1"
- },
- "engines": {
- "node": ">= 0.10"
- }
- },
- "node_modules/debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "dependencies": {
- "ms": "2.0.0"
- }
- },
- "node_modules/delegates": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
- "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ=="
- },
- "node_modules/depd": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
- "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/destroy": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
- "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
- "engines": {
- "node": ">= 0.8",
- "npm": "1.2.8000 || >= 1.4.16"
- }
- },
- "node_modules/detect-libc": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz",
- "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/dicer": {
- "version": "0.2.5",
- "resolved": "https://registry.npmjs.org/dicer/-/dicer-0.2.5.tgz",
- "integrity": "sha512-FDvbtnq7dzlPz0wyYlOExifDEZcu8h+rErEXgfxqmLfRfC/kJidEFh4+effJRO3P0xmfqyPbSMG0LveNRfTKVg==",
- "dependencies": {
- "readable-stream": "1.1.x",
- "streamsearch": "0.1.2"
- },
- "engines": {
- "node": ">=0.8.0"
- }
- },
- "node_modules/dotenv": {
- "version": "16.3.1",
- "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz",
- "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==",
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/motdotla/dotenv?sponsor=1"
- }
- },
- "node_modules/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==",
- "dependencies": {
- "safe-buffer": "^5.0.1"
- }
- },
- "node_modules/ee-first": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
- "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
- },
- "node_modules/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=="
- },
- "node_modules/encodeurl": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
- "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/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==",
- "dependencies": {
- "once": "^1.4.0"
- }
- },
- "node_modules/escape-html": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
- "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
- },
- "node_modules/etag": {
- "version": "1.8.1",
- "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
- "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/express": {
- "version": "4.18.2",
- "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz",
- "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==",
- "dependencies": {
- "accepts": "~1.3.8",
- "array-flatten": "1.1.1",
- "body-parser": "1.20.1",
- "content-disposition": "0.5.4",
- "content-type": "~1.0.4",
- "cookie": "0.5.0",
- "cookie-signature": "1.0.6",
- "debug": "2.6.9",
- "depd": "2.0.0",
- "encodeurl": "~1.0.2",
- "escape-html": "~1.0.3",
- "etag": "~1.8.1",
- "finalhandler": "1.2.0",
- "fresh": "0.5.2",
- "http-errors": "2.0.0",
- "merge-descriptors": "1.0.1",
- "methods": "~1.1.2",
- "on-finished": "2.4.1",
- "parseurl": "~1.3.3",
- "path-to-regexp": "0.1.7",
- "proxy-addr": "~2.0.7",
- "qs": "6.11.0",
- "range-parser": "~1.2.1",
- "safe-buffer": "5.2.1",
- "send": "0.18.0",
- "serve-static": "1.15.0",
- "setprototypeof": "1.2.0",
- "statuses": "2.0.1",
- "type-is": "~1.6.18",
- "utils-merge": "1.0.1",
- "vary": "~1.1.2"
- },
- "engines": {
- "node": ">= 0.10.0"
- }
- },
- "node_modules/express/node_modules/body-parser": {
- "version": "1.20.1",
- "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz",
- "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==",
- "dependencies": {
- "bytes": "3.1.2",
- "content-type": "~1.0.4",
- "debug": "2.6.9",
- "depd": "2.0.0",
- "destroy": "1.2.0",
- "http-errors": "2.0.0",
- "iconv-lite": "0.4.24",
- "on-finished": "2.4.1",
- "qs": "6.11.0",
- "raw-body": "2.5.1",
- "type-is": "~1.6.18",
- "unpipe": "1.0.0"
- },
- "engines": {
- "node": ">= 0.8",
- "npm": "1.2.8000 || >= 1.4.16"
- }
- },
- "node_modules/express/node_modules/raw-body": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz",
- "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==",
- "dependencies": {
- "bytes": "3.1.2",
- "http-errors": "2.0.0",
- "iconv-lite": "0.4.24",
- "unpipe": "1.0.0"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/finalhandler": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
- "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==",
- "dependencies": {
- "debug": "2.6.9",
- "encodeurl": "~1.0.2",
- "escape-html": "~1.0.3",
- "on-finished": "2.4.1",
- "parseurl": "~1.3.3",
- "statuses": "2.0.1",
- "unpipe": "~1.0.0"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/flushwritable": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/flushwritable/-/flushwritable-1.0.0.tgz",
- "integrity": "sha512-3VELfuWCLVzt5d2Gblk8qcqFro6nuwvxwMzHaENVDHI7rxcBRtMCwTk/E9FXcgh+82DSpavPNDueA9+RxXJoFg=="
- },
- "node_modules/forwarded": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
- "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/fresh": {
- "version": "0.5.2",
- "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
- "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/fs-minipass": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
- "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",
- "dependencies": {
- "minipass": "^3.0.0"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/fs-minipass/node_modules/minipass": {
- "version": "3.3.6",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
- "dependencies": {
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/fs.realpath": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
- "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
- },
- "node_modules/function-bind": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
- "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
- },
- "node_modules/gauge": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz",
- "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==",
- "dependencies": {
- "aproba": "^1.0.3 || ^2.0.0",
- "color-support": "^1.1.2",
- "console-control-strings": "^1.0.0",
- "has-unicode": "^2.0.1",
- "object-assign": "^4.1.1",
- "signal-exit": "^3.0.0",
- "string-width": "^4.2.3",
- "strip-ansi": "^6.0.1",
- "wide-align": "^1.1.2"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/get-intrinsic": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz",
- "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==",
- "dependencies": {
- "function-bind": "^1.1.1",
- "has": "^1.0.3",
- "has-proto": "^1.0.1",
- "has-symbols": "^1.0.3"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/glob": {
- "version": "7.2.3",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
- "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
- "dependencies": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.1.1",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- },
- "engines": {
- "node": "*"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/gridfs-stream": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/gridfs-stream/-/gridfs-stream-1.1.1.tgz",
- "integrity": "sha512-EcELdPIjC7tpZUiZA/8trfmszLbcsZlFyDQ8DhMtyJIMDmuLi5Vzt/056OO6FqfvY/zwiTCo1eZAqwtqrhBGMQ==",
- "dependencies": {
- "flushwritable": "^1.0.0"
- },
- "engines": {
- "node": ">= 0.4.2"
- }
- },
- "node_modules/has": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
- "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
- "dependencies": {
- "function-bind": "^1.1.1"
- },
- "engines": {
- "node": ">= 0.4.0"
- }
- },
- "node_modules/has-own-prop": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/has-own-prop/-/has-own-prop-2.0.0.tgz",
- "integrity": "sha512-Pq0h+hvsVm6dDEa8x82GnLSYHOzNDt7f0ddFa3FqcQlgzEiptPqL+XrOJNavjOzSYiYWIrgeVYYgGlLmnxwilQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/has-proto": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz",
- "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==",
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/has-symbols": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
- "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/has-unicode": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
- "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ=="
- },
- "node_modules/helmet": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/helmet/-/helmet-7.0.0.tgz",
- "integrity": "sha512-MsIgYmdBh460ZZ8cJC81q4XJknjG567wzEmv46WOBblDb6TUd3z8/GhgmsM9pn8g2B80tAJ4m5/d3Bi1KrSUBQ==",
- "engines": {
- "node": ">=16.0.0"
- }
- },
- "node_modules/http-errors": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
- "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
- "dependencies": {
- "depd": "2.0.0",
- "inherits": "2.0.4",
- "setprototypeof": "1.2.0",
- "statuses": "2.0.1",
- "toidentifier": "1.0.1"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/https-proxy-agent": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
- "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
- "dependencies": {
- "agent-base": "6",
- "debug": "4"
- },
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/https-proxy-agent/node_modules/debug": {
- "version": "4.3.4",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
- "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
- "dependencies": {
- "ms": "2.1.2"
- },
- "engines": {
- "node": ">=6.0"
- },
- "peerDependenciesMeta": {
- "supports-color": {
- "optional": true
- }
- }
- },
- "node_modules/https-proxy-agent/node_modules/ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
- },
- "node_modules/iconv-lite": {
- "version": "0.4.24",
- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
- "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
- "dependencies": {
- "safer-buffer": ">= 2.1.2 < 3"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/inflight": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
- "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
- "dependencies": {
- "once": "^1.3.0",
- "wrappy": "1"
- }
- },
- "node_modules/inherits": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
- "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
- },
- "node_modules/ip": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz",
- "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ=="
- },
- "node_modules/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==",
- "engines": {
- "node": ">= 0.10"
- }
- },
- "node_modules/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==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/is-generator": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/is-generator/-/is-generator-1.0.3.tgz",
- "integrity": "sha512-G56jBpbJeg7ds83HW1LuShNs8J73Fv3CPz/bmROHOHlnKkN8sWb9ujiagjmxxMUywftgq48HlBZELKKqFLk0oA=="
- },
- "node_modules/is-promise": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz",
- "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ=="
- },
- "node_modules/isarray": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
- "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ=="
- },
- "node_modules/jsonwebtoken": {
- "version": "9.0.1",
- "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.1.tgz",
- "integrity": "sha512-K8wx7eJ5TPvEjuiVSkv167EVboBDv9PZdDoF7BgeQnBLVvZWW9clr2PsQHVJDTKaEIH5JBIwHujGcHp7GgI2eg==",
- "dependencies": {
- "jws": "^3.2.2",
- "lodash": "^4.17.21",
- "ms": "^2.1.1",
- "semver": "^7.3.8"
- },
- "engines": {
- "node": ">=12",
- "npm": ">=6"
- }
- },
- "node_modules/jsonwebtoken/node_modules/ms": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
- "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
- },
- "node_modules/jwa": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz",
- "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==",
- "dependencies": {
- "buffer-equal-constant-time": "1.0.1",
- "ecdsa-sig-formatter": "1.0.11",
- "safe-buffer": "^5.0.1"
- }
- },
- "node_modules/jws": {
- "version": "3.2.2",
- "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz",
- "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==",
- "dependencies": {
- "jwa": "^1.4.1",
- "safe-buffer": "^5.0.1"
- }
- },
- "node_modules/kareem": {
- "version": "2.5.1",
- "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.5.1.tgz",
- "integrity": "sha512-7jFxRVm+jD+rkq3kY0iZDJfsO2/t4BBPeEb2qKn2lR/9KhuksYk5hxzfRYWMPV8P/x2d0kHD306YyWLzjjH+uA==",
- "engines": {
- "node": ">=12.0.0"
- }
- },
- "node_modules/lodash": {
- "version": "4.17.21",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
- "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
- },
- "node_modules/lodash.isplainobject": {
- "version": "4.0.6",
- "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
- "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA=="
- },
- "node_modules/lru-cache": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
- "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
- "dependencies": {
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/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==",
- "dependencies": {
- "semver": "^6.0.0"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/make-dir/node_modules/semver": {
- "version": "6.3.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
- "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
- "bin": {
- "semver": "bin/semver.js"
- }
- },
- "node_modules/media-typer": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
- "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/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
- },
- "node_modules/merge-descriptors": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
- "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w=="
- },
- "node_modules/methods": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
- "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/mime": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
- "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
- "bin": {
- "mime": "cli.js"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/mime-db": {
- "version": "1.52.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
- "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/mime-types": {
- "version": "2.1.35",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
- "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
- "dependencies": {
- "mime-db": "1.52.0"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/minimatch": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
- "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
- "dependencies": {
- "brace-expansion": "^1.1.7"
- },
- "engines": {
- "node": "*"
- }
- },
- "node_modules/minimist": {
- "version": "1.2.8",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
- "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/minipass": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz",
- "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/minizlib": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz",
- "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==",
- "dependencies": {
- "minipass": "^3.0.0",
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/minizlib/node_modules/minipass": {
- "version": "3.3.6",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
- "dependencies": {
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/mkdirp": {
- "version": "0.5.6",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
- "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
- "dependencies": {
- "minimist": "^1.2.6"
- },
- "bin": {
- "mkdirp": "bin/cmd.js"
- }
- },
- "node_modules/mongodb": {
- "version": "5.7.0",
- "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-5.7.0.tgz",
- "integrity": "sha512-zm82Bq33QbqtxDf58fLWBwTjARK3NSvKYjyz997KSy6hpat0prjeX/kxjbPVyZY60XYPDNETaHkHJI2UCzSLuw==",
- "dependencies": {
- "bson": "^5.4.0",
- "mongodb-connection-string-url": "^2.6.0",
- "socks": "^2.7.1"
- },
- "engines": {
- "node": ">=14.20.1"
- },
- "optionalDependencies": {
- "saslprep": "^1.0.3"
- },
- "peerDependencies": {
- "@aws-sdk/credential-providers": "^3.201.0",
- "@mongodb-js/zstd": "^1.1.0",
- "kerberos": "^2.0.1",
- "mongodb-client-encryption": ">=2.3.0 <3",
- "snappy": "^7.2.2"
- },
- "peerDependenciesMeta": {
- "@aws-sdk/credential-providers": {
- "optional": true
- },
- "@mongodb-js/zstd": {
- "optional": true
- },
- "kerberos": {
- "optional": true
- },
- "mongodb-client-encryption": {
- "optional": true
- },
- "snappy": {
- "optional": true
- }
- }
- },
- "node_modules/mongodb-connection-string-url": {
- "version": "2.6.0",
- "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.6.0.tgz",
- "integrity": "sha512-WvTZlI9ab0QYtTYnuMLgobULWhokRjtC7db9LtcVfJ+Hsnyr5eo6ZtNAt3Ly24XZScGMelOcGtm7lSn0332tPQ==",
- "dependencies": {
- "@types/whatwg-url": "^8.2.1",
- "whatwg-url": "^11.0.0"
- }
- },
- "node_modules/mongodb-uri": {
- "version": "0.9.7",
- "resolved": "https://registry.npmjs.org/mongodb-uri/-/mongodb-uri-0.9.7.tgz",
- "integrity": "sha512-s6BdnqNoEYfViPJgkH85X5Nw5NpzxN8hoflKLweNa7vBxt2V7kaS06d74pAtqDxde8fn4r9h4dNdLiFGoNV0KA==",
- "engines": {
- "node": ">= 0.6.0"
- }
- },
- "node_modules/mongoose": {
- "version": "7.4.1",
- "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-7.4.1.tgz",
- "integrity": "sha512-o3E5KHHiHdaiwCJG3+9r70sncRKki71Ktf/TfXdW6myu+53rtZ56uLl5ylkQiCf60V3COJuOeekcxXVsjQ7cBA==",
- "dependencies": {
- "bson": "^5.4.0",
- "kareem": "2.5.1",
- "mongodb": "5.7.0",
- "mpath": "0.9.0",
- "mquery": "5.0.0",
- "ms": "2.1.3",
- "sift": "16.0.1"
- },
- "engines": {
- "node": ">=14.20.1"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/mongoose"
- }
- },
- "node_modules/mongoose/node_modules/ms": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
- "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
- },
- "node_modules/morgan": {
- "version": "1.10.0",
- "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz",
- "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==",
- "dependencies": {
- "basic-auth": "~2.0.1",
- "debug": "2.6.9",
- "depd": "~2.0.0",
- "on-finished": "~2.3.0",
- "on-headers": "~1.0.2"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/morgan/node_modules/on-finished": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
- "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==",
- "dependencies": {
- "ee-first": "1.1.1"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/mpath": {
- "version": "0.9.0",
- "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.9.0.tgz",
- "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==",
- "engines": {
- "node": ">=4.0.0"
- }
- },
- "node_modules/mquery": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/mquery/-/mquery-5.0.0.tgz",
- "integrity": "sha512-iQMncpmEK8R8ncT8HJGsGc9Dsp8xcgYMVSbs5jgnm1lFHTZqMJTUWTDx1LBO8+mK3tPNZWFLBghQEIOULSTHZg==",
- "dependencies": {
- "debug": "4.x"
- },
- "engines": {
- "node": ">=14.0.0"
- }
- },
- "node_modules/mquery/node_modules/debug": {
- "version": "4.3.4",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
- "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
- "dependencies": {
- "ms": "2.1.2"
- },
- "engines": {
- "node": ">=6.0"
- },
- "peerDependenciesMeta": {
- "supports-color": {
- "optional": true
- }
- }
- },
- "node_modules/mquery/node_modules/ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
- },
- "node_modules/ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
- },
- "node_modules/multer": {
- "version": "1.4.4",
- "resolved": "https://registry.npmjs.org/multer/-/multer-1.4.4.tgz",
- "integrity": "sha512-2wY2+xD4udX612aMqMcB8Ws2Voq6NIUPEtD1be6m411T4uDH/VtL9i//xvcyFlTVfRdaBsk7hV5tgrGQqhuBiw==",
- "deprecated": "Multer 1.x is affected by CVE-2022-24434. This is fixed in v1.4.4-lts.1 which drops support for versions of Node.js before 6. Please upgrade to at least Node.js 6 and version 1.4.4-lts.1 of Multer. If you need support for older versions of Node.js, we are open to accepting patches that would fix the CVE on the main 1.x release line, whilst maintaining compatibility with Node.js 0.10.",
- "dependencies": {
- "append-field": "^1.0.0",
- "busboy": "^0.2.11",
- "concat-stream": "^1.5.2",
- "mkdirp": "^0.5.4",
- "object-assign": "^4.1.1",
- "on-finished": "^2.3.0",
- "type-is": "^1.6.4",
- "xtend": "^4.0.0"
- },
- "engines": {
- "node": ">= 0.10.0"
- }
- },
- "node_modules/multer-gridfs-storage": {
- "version": "5.0.2",
- "resolved": "https://registry.npmjs.org/multer-gridfs-storage/-/multer-gridfs-storage-5.0.2.tgz",
- "integrity": "sha512-oYl70i792uyJfgpvOfJrZIru4MsjjAueDHLZXTDGix/yPJuk1/lfqdPHHnv/XVVGfVZb4G9jJqwEFf9JIX1SOQ==",
- "dependencies": {
- "@types/express": "^4.17.6",
- "@types/mongodb": "^3.5.25",
- "@types/multer": "^1.4.3",
- "@types/pump": "^1.1.0",
- "has-own-prop": "^2.0.0",
- "is-generator": "^1.0.3",
- "is-promise": "^4.0.0",
- "lodash.isplainobject": ">=0.8.0",
- "mongodb": ">=2",
- "mongodb-uri": "^0.9.7",
- "pump": "^3.0.0"
- },
- "engines": {
- "node": ">=12"
- },
- "peerDependencies": {
- "multer": "^1.4.2"
- }
- },
- "node_modules/negotiator": {
- "version": "0.6.3",
- "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
- "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/node-addon-api": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz",
- "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA=="
- },
- "node_modules/node-fetch": {
- "version": "2.6.12",
- "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz",
- "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==",
- "dependencies": {
- "whatwg-url": "^5.0.0"
- },
- "engines": {
- "node": "4.x || >=6.0.0"
- },
- "peerDependencies": {
- "encoding": "^0.1.0"
- },
- "peerDependenciesMeta": {
- "encoding": {
- "optional": true
- }
- }
- },
- "node_modules/node-fetch/node_modules/tr46": {
- "version": "0.0.3",
- "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
- "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
- },
- "node_modules/node-fetch/node_modules/webidl-conversions": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
- "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
- },
- "node_modules/node-fetch/node_modules/whatwg-url": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
- "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
- "dependencies": {
- "tr46": "~0.0.3",
- "webidl-conversions": "^3.0.0"
- }
- },
- "node_modules/nopt": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz",
- "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==",
- "dependencies": {
- "abbrev": "1"
- },
- "bin": {
- "nopt": "bin/nopt.js"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/npmlog": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz",
- "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==",
- "dependencies": {
- "are-we-there-yet": "^2.0.0",
- "console-control-strings": "^1.1.0",
- "gauge": "^3.0.0",
- "set-blocking": "^2.0.0"
- }
- },
- "node_modules/object-assign": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
- "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/object-inspect": {
- "version": "1.12.3",
- "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz",
- "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==",
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/on-finished": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
- "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
- "dependencies": {
- "ee-first": "1.1.1"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/on-headers": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz",
- "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/once": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
- "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
- "dependencies": {
- "wrappy": "1"
- }
- },
- "node_modules/parseurl": {
- "version": "1.3.3",
- "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
- "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/path-is-absolute": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
- "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/path-to-regexp": {
- "version": "0.1.7",
- "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
- "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ=="
- },
- "node_modules/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=="
- },
- "node_modules/proxy-addr": {
- "version": "2.0.7",
- "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
- "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
- "dependencies": {
- "forwarded": "0.2.0",
- "ipaddr.js": "1.9.1"
- },
- "engines": {
- "node": ">= 0.10"
- }
- },
- "node_modules/pump": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
- "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
- "dependencies": {
- "end-of-stream": "^1.1.0",
- "once": "^1.3.1"
- }
- },
- "node_modules/punycode": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz",
- "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/qs": {
- "version": "6.11.0",
- "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
- "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
- "dependencies": {
- "side-channel": "^1.0.4"
- },
- "engines": {
- "node": ">=0.6"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/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==",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/raw-body": {
- "version": "2.5.2",
- "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz",
- "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==",
- "dependencies": {
- "bytes": "3.1.2",
- "http-errors": "2.0.0",
- "iconv-lite": "0.4.24",
- "unpipe": "1.0.0"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/readable-stream": {
- "version": "1.1.14",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
- "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==",
- "dependencies": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.1",
- "isarray": "0.0.1",
- "string_decoder": "~0.10.x"
- }
- },
- "node_modules/rimraf": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
- "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
- "dependencies": {
- "glob": "^7.1.3"
- },
- "bin": {
- "rimraf": "bin.js"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/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==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ]
- },
- "node_modules/safer-buffer": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
- "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
- },
- "node_modules/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,
- "dependencies": {
- "sparse-bitfield": "^3.0.3"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/semver": {
- "version": "7.5.4",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
- "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
- "dependencies": {
- "lru-cache": "^6.0.0"
- },
- "bin": {
- "semver": "bin/semver.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/send": {
- "version": "0.18.0",
- "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz",
- "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==",
- "dependencies": {
- "debug": "2.6.9",
- "depd": "2.0.0",
- "destroy": "1.2.0",
- "encodeurl": "~1.0.2",
- "escape-html": "~1.0.3",
- "etag": "~1.8.1",
- "fresh": "0.5.2",
- "http-errors": "2.0.0",
- "mime": "1.6.0",
- "ms": "2.1.3",
- "on-finished": "2.4.1",
- "range-parser": "~1.2.1",
- "statuses": "2.0.1"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/send/node_modules/ms": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
- "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
- },
- "node_modules/serve-static": {
- "version": "1.15.0",
- "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz",
- "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==",
- "dependencies": {
- "encodeurl": "~1.0.2",
- "escape-html": "~1.0.3",
- "parseurl": "~1.3.3",
- "send": "0.18.0"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/set-blocking": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
- "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw=="
- },
- "node_modules/setprototypeof": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
- "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
- },
- "node_modules/side-channel": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
- "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
- "dependencies": {
- "call-bind": "^1.0.0",
- "get-intrinsic": "^1.0.2",
- "object-inspect": "^1.9.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/sift": {
- "version": "16.0.1",
- "resolved": "https://registry.npmjs.org/sift/-/sift-16.0.1.tgz",
- "integrity": "sha512-Wv6BjQ5zbhW7VFefWusVP33T/EM0vYikCaQ2qR8yULbsilAT8/wQaXvuQ3ptGLpoKx+lihJE3y2UTgKDyyNHZQ=="
- },
- "node_modules/signal-exit": {
- "version": "3.0.7",
- "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
- "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
- },
- "node_modules/smart-buffer": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",
- "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==",
- "engines": {
- "node": ">= 6.0.0",
- "npm": ">= 3.0.0"
- }
- },
- "node_modules/socks": {
- "version": "2.7.1",
- "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz",
- "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==",
- "dependencies": {
- "ip": "^2.0.0",
- "smart-buffer": "^4.2.0"
- },
- "engines": {
- "node": ">= 10.13.0",
- "npm": ">= 3.0.0"
- }
- },
- "node_modules/sparse-bitfield": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
- "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==",
- "optional": true,
- "dependencies": {
- "memory-pager": "^1.0.2"
- }
- },
- "node_modules/statuses": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
- "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/streamsearch": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-0.1.2.tgz",
- "integrity": "sha512-jos8u++JKm0ARcSUTAZXOVC0mSox7Bhn6sBgty73P1f3JGf7yG2clTbBNHUdde/kdvP2FESam+vM6l8jBrNxHA==",
- "engines": {
- "node": ">=0.8.0"
- }
- },
- "node_modules/string_decoder": {
- "version": "0.10.31",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
- "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ=="
- },
- "node_modules/string-width": {
- "version": "4.2.3",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
- "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
- "dependencies": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/strip-ansi": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
- "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
- "dependencies": {
- "ansi-regex": "^5.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/tar": {
- "version": "6.1.15",
- "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.15.tgz",
- "integrity": "sha512-/zKt9UyngnxIT/EAGYuxaMYgOIJiP81ab9ZfkILq4oNLPFX50qyYmu7jRj9qeXoxmJHjGlbH0+cm2uy1WCs10A==",
- "dependencies": {
- "chownr": "^2.0.0",
- "fs-minipass": "^2.0.0",
- "minipass": "^5.0.0",
- "minizlib": "^2.1.1",
- "mkdirp": "^1.0.3",
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/tar/node_modules/mkdirp": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
- "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
- "bin": {
- "mkdirp": "bin/cmd.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/toidentifier": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
- "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
- "engines": {
- "node": ">=0.6"
- }
- },
- "node_modules/tr46": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz",
- "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==",
- "dependencies": {
- "punycode": "^2.1.1"
- },
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/type-is": {
- "version": "1.6.18",
- "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
- "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
- "dependencies": {
- "media-typer": "0.3.0",
- "mime-types": "~2.1.24"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/typedarray": {
- "version": "0.0.6",
- "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
- "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA=="
- },
- "node_modules/unpipe": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
- "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/util-deprecate": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
- "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
- },
- "node_modules/utils-merge": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
- "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
- "engines": {
- "node": ">= 0.4.0"
- }
- },
- "node_modules/vary": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
- "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/webidl-conversions": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
- "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/whatwg-url": {
- "version": "11.0.0",
- "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz",
- "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==",
- "dependencies": {
- "tr46": "^3.0.0",
- "webidl-conversions": "^7.0.0"
- },
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/wide-align": {
- "version": "1.1.5",
- "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz",
- "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==",
- "dependencies": {
- "string-width": "^1.0.2 || 2 || 3 || 4"
- }
- },
- "node_modules/wrappy": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
- },
- "node_modules/xtend": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
- "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
- "engines": {
- "node": ">=0.4"
- }
- },
- "node_modules/yallist": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
- }
- }
-}
diff --git a/server/node_modules/@mapbox/node-pre-gyp/.github/workflows/codeql.yml b/server/node_modules/@mapbox/node-pre-gyp/.github/workflows/codeql.yml
deleted file mode 100644
index 70eaa56..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/.github/workflows/codeql.yml
+++ /dev/null
@@ -1,74 +0,0 @@
-# For most projects, this workflow file will not need changing; you simply need
-# to commit it to your repository.
-#
-# You may wish to alter this file to override the set of languages analyzed,
-# or to provide custom queries or build logic.
-#
-# ******** NOTE ********
-# We have attempted to detect the languages in your repository. Please check
-# the `language` matrix defined below to confirm you have the correct set of
-# supported CodeQL languages.
-#
-name: "CodeQL"
-
-on:
- push:
- branches: [ "master" ]
- pull_request:
- # The branches below must be a subset of the branches above
- branches: [ "master" ]
- schedule:
- - cron: '24 5 * * 4'
-
-jobs:
- analyze:
- name: Analyze
- runs-on: ubuntu-latest
- permissions:
- actions: read
- contents: read
- security-events: write
-
- strategy:
- fail-fast: false
- matrix:
- language: [ 'javascript' ]
- # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
- # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@v3
-
- # Initializes the CodeQL tools for scanning.
- - name: Initialize CodeQL
- uses: github/codeql-action/init@v2
- with:
- languages: ${{ matrix.language }}
- # If you wish to specify custom queries, you can do so here or in a config file.
- # By default, queries listed here will override any specified in a config file.
- # Prefix the list here with "+" to use these queries and those in the config file.
-
- # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
- # queries: security-extended,security-and-quality
-
-
- # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
- # If this step fails, then you should remove it and run the build manually (see below)
- - name: Autobuild
- uses: github/codeql-action/autobuild@v2
-
- # ℹ️ Command-line programs to run using the OS shell.
- # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
-
- # If the Autobuild fails above, remove it and uncomment the following three lines.
- # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
-
- # - run: |
- # echo "Run, Build Application using script"
- # ./location_of_script_within_repo/buildscript.sh
-
- - name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v2
- with:
- category: "/language:${{matrix.language}}"
diff --git a/server/node_modules/@mapbox/node-pre-gyp/CHANGELOG.md b/server/node_modules/@mapbox/node-pre-gyp/CHANGELOG.md
deleted file mode 100644
index 990e929..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/CHANGELOG.md
+++ /dev/null
@@ -1,510 +0,0 @@
-# node-pre-gyp changelog
-
-## 1.0.11
-- Fixes dependabot alert [CVE-2021-44906](https://nvd.nist.gov/vuln/detail/CVE-2021-44906)
-
-## 1.0.10
-- Upgraded minimist to 1.2.6 to address dependabot alert [CVE-2021-44906](https://nvd.nist.gov/vuln/detail/CVE-2021-44906)
-
-## 1.0.9
-- Upgraded node-fetch to 2.6.7 to address [CVE-2022-0235](https://www.cve.org/CVERecord?id=CVE-2022-0235)
-- Upgraded detect-libc to 2.0.0 to use non-blocking NodeJS(>=12) Report API
-
-## 1.0.8
-- Downgraded npmlog to maintain node v10 and v8 support (https://github.com/mapbox/node-pre-gyp/pull/624)
-
-## 1.0.7
-- Upgraded nyc and npmlog to address https://github.com/advisories/GHSA-93q8-gq69-wqmw
-
-## 1.0.6
-- Added node v17 to the internal node releases listing
-- Upgraded various dependencies declared in package.json to latest major versions (node-fetch from 2.6.1 to 2.6.5, npmlog from 4.1.2 to 5.01, semver from 7.3.4 to 7.3.5, and tar from 6.1.0 to 6.1.11)
-- Fixed bug in `staging_host` parameter (https://github.com/mapbox/node-pre-gyp/pull/590)
-
-
-## 1.0.5
-- Fix circular reference warning with node >= v14
-
-## 1.0.4
-- Added node v16 to the internal node releases listing
-
-## 1.0.3
-- Improved support configuring s3 uploads (solves https://github.com/mapbox/node-pre-gyp/issues/571)
- - New options added in https://github.com/mapbox/node-pre-gyp/pull/576: 'bucket', 'region', and `s3ForcePathStyle`
-
-## 1.0.2
-- Fixed regression in proxy support (https://github.com/mapbox/node-pre-gyp/issues/572)
-
-## 1.0.1
-- Switched from mkdirp@1.0.4 to make-dir@3.1.0 to avoid this bug: https://github.com/isaacs/node-mkdirp/issues/31
-
-## 1.0.0
-- Module is now name-spaced at `@mapbox/node-pre-gyp` and the original `node-pre-gyp` is deprecated.
-- New: support for staging and production s3 targets (see README.md)
-- BREAKING: no longer supporting `node_pre_gyp_accessKeyId` & `node_pre_gyp_secretAccessKey`, use `AWS_ACCESS_KEY_ID` & `AWS_SECRET_ACCESS_KEY` instead to authenticate against s3 for `info`, `publish`, and `unpublish` commands.
-- Dropped node v6 support, added node v14 support
-- Switched tests to use mapbox-owned bucket for testing
-- Added coverage tracking and linting with eslint
-- Added back support for symlinks inside the tarball
-- Upgraded all test apps to N-API/node-addon-api
-- New: support for staging and production s3 targets (see README.md)
-- Added `node_pre_gyp_s3_host` env var which has priority over the `--s3_host` option or default.
-- Replaced needle with node-fetch
-- Added proxy support for node-fetch
-- Upgraded to mkdirp@1.x
-
-## 0.17.0
-- Got travis + appveyor green again
-- Added support for more node versions
-
-## 0.16.0
-
-- Added Node 15 support in the local database (https://github.com/mapbox/node-pre-gyp/pull/520)
-
-## 0.15.0
-
-- Bump dependency on `mkdirp` from `^0.5.1` to `^0.5.3` (https://github.com/mapbox/node-pre-gyp/pull/492)
-- Bump dependency on `needle` from `^2.2.1` to `^2.5.0` (https://github.com/mapbox/node-pre-gyp/pull/502)
-- Added Node 14 support in the local database (https://github.com/mapbox/node-pre-gyp/pull/501)
-
-## 0.14.0
-
-- Defer modules requires in napi.js (https://github.com/mapbox/node-pre-gyp/pull/434)
-- Bump dependency on `tar` from `^4` to `^4.4.2` (https://github.com/mapbox/node-pre-gyp/pull/454)
-- Support extracting compiled binary from local offline mirror (https://github.com/mapbox/node-pre-gyp/pull/459)
-- Added Node 13 support in the local database (https://github.com/mapbox/node-pre-gyp/pull/483)
-
-## 0.13.0
-
-- Added Node 12 support in the local database (https://github.com/mapbox/node-pre-gyp/pull/449)
-
-## 0.12.0
-
-- Fixed double-build problem with node v10 (https://github.com/mapbox/node-pre-gyp/pull/428)
-- Added node 11 support in the local database (https://github.com/mapbox/node-pre-gyp/pull/422)
-
-## 0.11.0
-
-- Fixed double-install problem with node v10
-- Significant N-API improvements (https://github.com/mapbox/node-pre-gyp/pull/405)
-
-## 0.10.3
-
-- Now will use `request` over `needle` if request is installed. By default `needle` is used for `https`. This should unbreak proxy support that regressed in v0.9.0
-
-## 0.10.2
-
-- Fixed rc/deep-extent security vulnerability
-- Fixed broken reinstall script do to incorrectly named get_best_napi_version
-
-## 0.10.1
-
-- Fix needle error event (@medns)
-
-## 0.10.0
-
-- Allow for a single-level module path when packing @allenluce (https://github.com/mapbox/node-pre-gyp/pull/371)
-- Log warnings instead of errors when falling back @xzyfer (https://github.com/mapbox/node-pre-gyp/pull/366)
-- Add Node.js v10 support to tests (https://github.com/mapbox/node-pre-gyp/pull/372)
-- Remove retire.js from CI (https://github.com/mapbox/node-pre-gyp/pull/372)
-- Remove support for Node.js v4 due to [EOL on April 30th, 2018](https://github.com/nodejs/Release/blob/7dd52354049cae99eed0e9fe01345b0722a86fde/schedule.json#L14)
-- Update appveyor tests to install default NPM version instead of NPM v2.x for all Windows builds (https://github.com/mapbox/node-pre-gyp/pull/375)
-
-## 0.9.1
-
-- Fixed regression (in v0.9.0) with support for http redirects @allenluce (https://github.com/mapbox/node-pre-gyp/pull/361)
-
-## 0.9.0
-
-- Switched from using `request` to `needle` to reduce size of module deps (https://github.com/mapbox/node-pre-gyp/pull/350)
-
-## 0.8.0
-
-- N-API support (@inspiredware)
-
-## 0.7.1
-
-- Upgraded to tar v4.x
-
-## 0.7.0
-
- - Updated request and hawk (#347)
- - Dropped node v0.10.x support
-
-## 0.6.40
-
- - Improved error reporting if an install fails
-
-## 0.6.39
-
- - Support for node v9
- - Support for versioning on `{libc}` to allow binaries to work on non-glic linux systems like alpine linux
-
-
-## 0.6.38
-
- - Maintaining compatibility (for v0.6.x series) with node v0.10.x
-
-## 0.6.37
-
- - Solved one part of #276: now now deduce the node ABI from the major version for node >= 2 even when not stored in the abi_crosswalk.json
- - Fixed docs to avoid mentioning the deprecated and dangerous `prepublish` in package.json (#291)
- - Add new node versions to crosswalk
- - Ported tests to use tape instead of mocha
- - Got appveyor tests passing by downgrading npm and node-gyp
-
-## 0.6.36
-
- - Removed the running of `testbinary` during install. Because this was regressed for so long, it is too dangerous to re-enable by default. Developers needing validation can call `node-pre-gyp testbinary` directory.
- - Fixed regression in v0.6.35 for electron installs (now skipping binary validation which is not yet supported for electron)
-
-## 0.6.35
-
- - No longer recommending `npm ls` in `prepublish` (#291)
- - Fixed testbinary command (#283) @szdavid92
-
-## 0.6.34
-
- - Added new node versions to crosswalk, including v8
- - Upgraded deps to latest versions, started using `^` instead of `~` for all deps.
-
-## 0.6.33
-
- - Improved support for yarn
-
-## 0.6.32
-
- - Honor npm configuration for CA bundles (@heikkipora)
- - Add node-pre-gyp and npm versions to user agent (@addaleax)
- - Updated various deps
- - Add known node version for v7.x
-
-## 0.6.31
-
- - Updated various deps
-
-## 0.6.30
-
- - Update to npmlog@4.x and semver@5.3.x
- - Add known node version for v6.5.0
-
-## 0.6.29
-
- - Add known node versions for v0.10.45, v0.12.14, v4.4.4, v5.11.1, and v6.1.0
-
-## 0.6.28
-
- - Now more verbose when remote binaries are not available. This is needed since npm is increasingly more quiet by default
- and users need to know why builds are falling back to source compiles that might then error out.
-
-## 0.6.27
-
- - Add known node version for node v6
- - Stopped bundling dependencies
- - Documented method for module authors to avoid bundling node-pre-gyp
- - See https://github.com/mapbox/node-pre-gyp/tree/master#configuring for details
-
-## 0.6.26
-
- - Skip validation for nw runtime (https://github.com/mapbox/node-pre-gyp/pull/181) via @fleg
-
-## 0.6.25
-
- - Improved support for auto-detection of electron runtime in `node-pre-gyp.find()`
- - Pull request from @enlight - https://github.com/mapbox/node-pre-gyp/pull/187
- - Add known node version for 4.4.1 and 5.9.1
-
-## 0.6.24
-
- - Add known node version for 5.8.0, 5.9.0, and 4.4.0.
-
-## 0.6.23
-
- - Add known node version for 0.10.43, 0.12.11, 4.3.2, and 5.7.1.
-
-## 0.6.22
-
- - Add known node version for 4.3.1, and 5.7.0.
-
-## 0.6.21
-
- - Add known node version for 0.10.42, 0.12.10, 4.3.0, and 5.6.0.
-
-## 0.6.20
-
- - Add known node version for 4.2.5, 4.2.6, 5.4.0, 5.4.1,and 5.5.0.
-
-## 0.6.19
-
- - Add known node version for 4.2.4
-
-## 0.6.18
-
- - Add new known node versions for 0.10.x, 0.12.x, 4.x, and 5.x
-
-## 0.6.17
-
- - Re-tagged to fix packaging problem of `Error: Cannot find module 'isarray'`
-
-## 0.6.16
-
- - Added known version in crosswalk for 5.1.0.
-
-## 0.6.15
-
- - Upgraded tar-pack (https://github.com/mapbox/node-pre-gyp/issues/182)
- - Support custom binary hosting mirror (https://github.com/mapbox/node-pre-gyp/pull/170)
- - Added known version in crosswalk for 4.2.2.
-
-## 0.6.14
-
- - Added node 5.x version
-
-## 0.6.13
-
- - Added more known node 4.x versions
-
-## 0.6.12
-
- - Added support for [Electron](http://electron.atom.io/). Just pass the `--runtime=electron` flag when building/installing. Thanks @zcbenz
-
-## 0.6.11
-
- - Added known node and io.js versions including more 3.x and 4.x versions
-
-## 0.6.10
-
- - Added known node and io.js versions including 3.x and 4.x versions
- - Upgraded `tar` dep
-
-## 0.6.9
-
- - Upgraded `rc` dep
- - Updated known io.js version: v2.4.0
-
-## 0.6.8
-
- - Upgraded `semver` and `rimraf` deps
- - Updated known node and io.js versions
-
-## 0.6.7
-
- - Fixed `node_abi` versions for io.js 1.1.x -> 1.8.x (should be 43, but was stored as 42) (refs https://github.com/iojs/build/issues/94)
-
-## 0.6.6
-
- - Updated with known io.js 2.0.0 version
-
-## 0.6.5
-
- - Now respecting `npm_config_node_gyp` (https://github.com/npm/npm/pull/4887)
- - Updated to semver@4.3.2
- - Updated known node v0.12.x versions and io.js 1.x versions.
-
-## 0.6.4
-
- - Improved support for `io.js` (@fengmk2)
- - Test coverage improvements (@mikemorris)
- - Fixed support for `--dist-url` that regressed in 0.6.3
-
-## 0.6.3
-
- - Added support for passing raw options to node-gyp using `--` separator. Flags passed after
- the `--` to `node-pre-gyp configure` will be passed directly to gyp while flags passed
- after the `--` will be passed directly to make/visual studio.
- - Added `node-pre-gyp configure` command to be able to call `node-gyp configure` directly
- - Fix issue with require validation not working on windows 7 (@edgarsilva)
-
-## 0.6.2
-
- - Support for io.js >= v1.0.2
- - Deferred require of `request` and `tar` to help speed up command line usage of `node-pre-gyp`.
-
-## 0.6.1
-
- - Fixed bundled `tar` version
-
-## 0.6.0
-
- - BREAKING: node odd releases like v0.11.x now use `major.minor.patch` for `{node_abi}` instead of `NODE_MODULE_VERSION` (#124)
- - Added support for `toolset` option in versioning. By default is an empty string but `--toolset` can be passed to publish or install to select alternative binaries that target a custom toolset like C++11. For example to target Visual Studio 2014 modules like node-sqlite3 use `--toolset=v140`.
- - Added support for `--no-rollback` option to request that a failed binary test does not remove the binary module leaves it in place.
- - Added support for `--update-binary` option to request an existing binary be re-installed and the check for a valid local module be skipped.
- - Added support for passing build options from `npm` through `node-pre-gyp` to `node-gyp`: `--nodedir`, `--disturl`, `--python`, and `--msvs_version`
-
-## 0.5.31
-
- - Added support for deducing node_abi for node.js runtime from previous release if the series is even
- - Added support for --target=0.10.33
-
-## 0.5.30
-
- - Repackaged with latest bundled deps
-
-## 0.5.29
-
- - Added support for semver `build`.
- - Fixed support for downloading from urls that include `+`.
-
-## 0.5.28
-
- - Now reporting unix style paths only in reveal command
-
-## 0.5.27
-
- - Fixed support for auto-detecting s3 bucket name when it contains `.` - @taavo
- - Fixed support for installing when path contains a `'` - @halfdan
- - Ported tests to mocha
-
-## 0.5.26
-
- - Fix node-webkit support when `--target` option is not provided
-
-## 0.5.25
-
- - Fix bundling of deps
-
-## 0.5.24
-
- - Updated ABI crosswalk to incldue node v0.10.30 and v0.10.31
-
-## 0.5.23
-
- - Added `reveal` command. Pass no options to get all versioning data as json. Pass a second arg to grab a single versioned property value
- - Added support for `--silent` (shortcut for `--loglevel=silent`)
-
-## 0.5.22
-
- - Fixed node-webkit versioning name (NOTE: node-webkit support still experimental)
-
-## 0.5.21
-
- - New package to fix `shasum check failed` error with v0.5.20
-
-## 0.5.20
-
- - Now versioning node-webkit binaries based on major.minor.patch - assuming no compatible ABI across versions (#90)
-
-## 0.5.19
-
- - Updated to know about more node-webkit releases
-
-## 0.5.18
-
- - Updated to know about more node-webkit releases
-
-## 0.5.17
-
- - Updated to know about node v0.10.29 release
-
-## 0.5.16
-
- - Now supporting all aws-sdk configuration parameters (http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html) (#86)
-
-## 0.5.15
-
- - Fixed installation of windows packages sub directories on unix systems (#84)
-
-## 0.5.14
-
- - Finished support for cross building using `--target_platform` option (#82)
- - Now skipping binary validation on install if target arch/platform do not match the host.
- - Removed multi-arch validing for OS X since it required a FAT node.js binary
-
-## 0.5.13
-
- - Fix problem in 0.5.12 whereby the wrong versions of mkdirp and semver where bundled.
-
-## 0.5.12
-
- - Improved support for node-webkit (@Mithgol)
-
-## 0.5.11
-
- - Updated target versions listing
-
-## 0.5.10
-
- - Fixed handling of `-debug` flag passed directory to node-pre-gyp (#72)
- - Added optional second arg to `node_pre_gyp.find` to customize the default versioning options used to locate the runtime binary
- - Failed install due to `testbinary` check failure no longer leaves behind binary (#70)
-
-## 0.5.9
-
- - Fixed regression in `testbinary` command causing installs to fail on windows with 0.5.7 (#60)
-
-## 0.5.8
-
- - Started bundling deps
-
-## 0.5.7
-
- - Fixed the `testbinary` check, which is used to determine whether to re-download or source compile, to work even in complex dependency situations (#63)
- - Exposed the internal `testbinary` command in node-pre-gyp command line tool
- - Fixed minor bug so that `fallback_to_build` option is always respected
-
-## 0.5.6
-
- - Added support for versioning on the `name` value in `package.json` (#57).
- - Moved to using streams for reading tarball when publishing (#52)
-
-## 0.5.5
-
- - Improved binary validation that also now works with node-webkit (@Mithgol)
- - Upgraded test apps to work with node v0.11.x
- - Improved test coverage
-
-## 0.5.4
-
- - No longer depends on external install of node-gyp for compiling builds.
-
-## 0.5.3
-
- - Reverted fix for debian/nodejs since it broke windows (#45)
-
-## 0.5.2
-
- - Support for debian systems where the node binary is named `nodejs` (#45)
- - Added `bin/node-pre-gyp.cmd` to be able to run command on windows locally (npm creates an .npm automatically when globally installed)
- - Updated abi-crosswalk with node v0.10.26 entry.
-
-## 0.5.1
-
- - Various minor bug fixes, several improving windows support for publishing.
-
-## 0.5.0
-
- - Changed property names in `binary` object: now required are `module_name`, `module_path`, and `host`.
- - Now `module_path` supports versioning, which allows developers to opt-in to using a versioned install path (#18).
- - Added `remote_path` which also supports versioning.
- - Changed `remote_uri` to `host`.
-
-## 0.4.2
-
- - Added support for `--target` flag to request cross-compile against a specific node/node-webkit version.
- - Added preliminary support for node-webkit
- - Fixed support for `--target_arch` option being respected in all cases.
-
-## 0.4.1
-
- - Fixed exception when only stderr is available in binary test (@bendi / #31)
-
-## 0.4.0
-
- - Enforce only `https:` based remote publishing access.
- - Added `node-pre-gyp info` command to display listing of published binaries
- - Added support for changing the directory node-pre-gyp should build in with the `-C/--directory` option.
- - Added support for S3 prefixes.
-
-## 0.3.1
-
- - Added `unpublish` command.
- - Fixed module path construction in tests.
- - Added ability to disable falling back to build behavior via `npm install --fallback-to-build=false` which overrides setting in a depedencies package.json `install` target.
-
-## 0.3.0
-
- - Support for packaging all files in `module_path` directory - see `app4` for example
- - Added `testpackage` command.
- - Changed `clean` command to only delete `.node` not entire `build` directory since node-gyp will handle that.
- - `.node` modules must be in a folder of there own since tar-pack will remove everything when it unpacks.
diff --git a/server/node_modules/@mapbox/node-pre-gyp/LICENSE b/server/node_modules/@mapbox/node-pre-gyp/LICENSE
deleted file mode 100644
index 8f5fce9..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c), Mapbox
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
- * Neither the name of node-pre-gyp nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/server/node_modules/@mapbox/node-pre-gyp/README.md b/server/node_modules/@mapbox/node-pre-gyp/README.md
deleted file mode 100644
index 203285a..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/README.md
+++ /dev/null
@@ -1,742 +0,0 @@
-# @mapbox/node-pre-gyp
-
-#### @mapbox/node-pre-gyp makes it easy to publish and install Node.js C++ addons from binaries
-
-[](https://travis-ci.com/mapbox/node-pre-gyp)
-[](https://ci.appveyor.com/project/Mapbox/node-pre-gyp)
-
-`@mapbox/node-pre-gyp` stands between [npm](https://github.com/npm/npm) and [node-gyp](https://github.com/Tootallnate/node-gyp) and offers a cross-platform method of binary deployment.
-
-### Special note on previous package
-
-On Feb 9th, 2021 `@mapbox/node-pre-gyp@1.0.0` was [released](./CHANGELOG.md). Older, unscoped versions that are not part of the `@mapbox` org are deprecated and only `@mapbox/node-pre-gyp` will see updates going forward. To upgrade to the new package do:
-
-```
-npm uninstall node-pre-gyp --save
-npm install @mapbox/node-pre-gyp --save
-```
-
-### Features
-
- - A command line tool called `node-pre-gyp` that can install your package's C++ module from a binary.
- - A variety of developer targeted commands for packaging, testing, and publishing binaries.
- - A JavaScript module that can dynamically require your installed binary: `require('@mapbox/node-pre-gyp').find`
-
-For a hello world example of a module packaged with `node-pre-gyp` see
and [the wiki ](https://github.com/mapbox/node-pre-gyp/wiki/Modules-using-node-pre-gyp) for real world examples.
-
-## Credits
-
- - The module is modeled after [node-gyp](https://github.com/Tootallnate/node-gyp) by [@Tootallnate](https://github.com/Tootallnate)
- - Motivation for initial development came from [@ErisDS](https://github.com/ErisDS) and the [Ghost Project](https://github.com/TryGhost/Ghost).
- - Development is sponsored by [Mapbox](https://www.mapbox.com/)
-
-## FAQ
-
-See the [Frequently Ask Questions](https://github.com/mapbox/node-pre-gyp/wiki/FAQ).
-
-## Depends
-
- - Node.js >= node v8.x
-
-## Install
-
-`node-pre-gyp` is designed to be installed as a local dependency of your Node.js C++ addon and accessed like:
-
- ./node_modules/.bin/node-pre-gyp --help
-
-But you can also install it globally:
-
- npm install @mapbox/node-pre-gyp -g
-
-## Usage
-
-### Commands
-
-View all possible commands:
-
- node-pre-gyp --help
-
-- clean - Remove the entire folder containing the compiled .node module
-- install - Install pre-built binary for module
-- reinstall - Run "clean" and "install" at once
-- build - Compile the module by dispatching to node-gyp or nw-gyp
-- rebuild - Run "clean" and "build" at once
-- package - Pack binary into tarball
-- testpackage - Test that the staged package is valid
-- publish - Publish pre-built binary
-- unpublish - Unpublish pre-built binary
-- info - Fetch info on published binaries
-
-You can also chain commands:
-
- node-pre-gyp clean build unpublish publish info
-
-### Options
-
-Options include:
-
- - `-C/--directory`: run the command in this directory
- - `--build-from-source`: build from source instead of using pre-built binary
- - `--update-binary`: reinstall by replacing previously installed local binary with remote binary
- - `--runtime=node-webkit`: customize the runtime: `node`, `electron` and `node-webkit` are the valid options
- - `--fallback-to-build`: fallback to building from source if pre-built binary is not available
- - `--target=0.4.0`: Pass the target node or node-webkit version to compile against
- - `--target_arch=ia32`: Pass the target arch and override the host `arch`. Any value that is [supported by Node.js](https://nodejs.org/api/os.html#osarch) is valid.
- - `--target_platform=win32`: Pass the target platform and override the host `platform`. Valid values are `linux`, `darwin`, `win32`, `sunos`, `freebsd`, `openbsd`, and `aix`.
-
-Both `--build-from-source` and `--fallback-to-build` can be passed alone or they can provide values. You can pass `--fallback-to-build=false` to override the option as declared in package.json. In addition to being able to pass `--build-from-source` you can also pass `--build-from-source=myapp` where `myapp` is the name of your module.
-
-For example: `npm install --build-from-source=myapp`. This is useful if:
-
- - `myapp` is referenced in the package.json of a larger app and therefore `myapp` is being installed as a dependency with `npm install`.
- - The larger app also depends on other modules installed with `node-pre-gyp`
- - You only want to trigger a source compile for `myapp` and the other modules.
-
-### Configuring
-
-This is a guide to configuring your module to use node-pre-gyp.
-
-#### 1) Add new entries to your `package.json`
-
- - Add `@mapbox/node-pre-gyp` to `dependencies`
- - Add `aws-sdk` as a `devDependency`
- - Add a custom `install` script
- - Declare a `binary` object
-
-This looks like:
-
-```js
- "dependencies" : {
- "@mapbox/node-pre-gyp": "1.x"
- },
- "devDependencies": {
- "aws-sdk": "2.x"
- }
- "scripts": {
- "install": "node-pre-gyp install --fallback-to-build"
- },
- "binary": {
- "module_name": "your_module",
- "module_path": "./lib/binding/",
- "host": "https://your_module.s3-us-west-1.amazonaws.com"
- }
-```
-
-For a full example see [node-addon-examples's package.json](https://github.com/springmeyer/node-addon-example/blob/master/package.json).
-
-Let's break this down:
-
- - Dependencies need to list `node-pre-gyp`
- - Your devDependencies should list `aws-sdk` so that you can run `node-pre-gyp publish` locally or a CI system. We recommend using `devDependencies` only since `aws-sdk` is large and not needed for `node-pre-gyp install` since it only uses http to fetch binaries
- - Your `scripts` section should override the `install` target with `"install": "node-pre-gyp install --fallback-to-build"`. This allows node-pre-gyp to be used instead of the default npm behavior of always source compiling with `node-gyp` directly.
- - Your package.json should contain a `binary` section describing key properties you provide to allow node-pre-gyp to package optimally. They are detailed below.
-
-Note: in the past we recommended putting `@mapbox/node-pre-gyp` in the `bundledDependencies`, but we no longer recommend this. In the past there were npm bugs (with node versions 0.10.x) that could lead to node-pre-gyp not being available at the right time during install (unless we bundled). This should no longer be the case. Also, for a time we recommended using `"preinstall": "npm install @mapbox/node-pre-gyp"` as an alternative method to avoid needing to bundle. But this did not behave predictably across all npm versions - see https://github.com/mapbox/node-pre-gyp/issues/260 for the details. So we do not recommend using `preinstall` to install `@mapbox/node-pre-gyp`. More history on this at https://github.com/strongloop/fsevents/issues/157#issuecomment-265545908.
-
-##### The `binary` object has three required properties
-
-###### module_name
-
-The name of your native node module. This value must:
-
- - Match the name passed to [the NODE_MODULE macro](http://nodejs.org/api/addons.html#addons_hello_world)
- - Must be a valid C variable name (e.g. it cannot contain `-`)
- - Should not include the `.node` extension.
-
-###### module_path
-
-The location your native module is placed after a build. This should be an empty directory without other Javascript files. This entire directory will be packaged in the binary tarball. When installing from a remote package this directory will be overwritten with the contents of the tarball.
-
-Note: This property supports variables based on [Versioning](#versioning).
-
-###### host
-
-A url to the remote location where you've published tarball binaries (must be `https` not `http`).
-
-It is highly recommended that you use Amazon S3. The reasons are:
-
- - Various node-pre-gyp commands like `publish` and `info` only work with an S3 host.
- - S3 is a very solid hosting platform for distributing large files.
- - We provide detail documentation for using [S3 hosting](#s3-hosting) with node-pre-gyp.
-
-Why then not require S3? Because while some applications using node-pre-gyp need to distribute binaries as large as 20-30 MB, others might have very small binaries and might wish to store them in a GitHub repo. This is not recommended, but if an author really wants to host in a non-S3 location then it should be possible.
-
-It should also be mentioned that there is an optional and entirely separate npm module called [node-pre-gyp-github](https://github.com/bchr02/node-pre-gyp-github) which is intended to complement node-pre-gyp and be installed along with it. It provides the ability to store and publish your binaries within your repositories GitHub Releases if you would rather not use S3 directly. Installation and usage instructions can be found [here](https://github.com/bchr02/node-pre-gyp-github), but the basic premise is that instead of using the ```node-pre-gyp publish``` command you would use ```node-pre-gyp-github publish```.
-
-##### The `binary` object other optional S3 properties
-
-If you are not using a standard s3 path like `bucket_name.s3(.-)region.amazonaws.com`, you might get an error on `publish` because node-pre-gyp extracts the region and bucket from the `host` url. For example, you may have an on-premises s3-compatible storage server, or may have configured a specific dns redirecting to an s3 endpoint. In these cases, you can explicitly set the `region` and `bucket` properties to tell node-pre-gyp to use these values instead of guessing from the `host` property. The following values can be used in the `binary` section:
-
-###### host
-
-The url to the remote server root location (must be `https` not `http`).
-
-###### bucket
-
-The bucket name where your tarball binaries should be located.
-
-###### region
-
-Your S3 server region.
-
-###### s3ForcePathStyle
-
-Set `s3ForcePathStyle` to true if the endpoint url should not be prefixed with the bucket name. If false (default), the server endpoint would be constructed as `bucket_name.your_server.com`.
-
-##### The `binary` object has optional properties
-
-###### remote_path
-
-It **is recommended** that you customize this property. This is an extra path to use for publishing and finding remote tarballs. The default value for `remote_path` is `""` meaning that if you do not provide it then all packages will be published at the base of the `host`. It is recommended to provide a value like `./{name}/v{version}` to help organize remote packages in the case that you choose to publish multiple node addons to the same `host`.
-
-Note: This property supports variables based on [Versioning](#versioning).
-
-###### package_name
-
-It is **not recommended** to override this property unless you are also overriding the `remote_path`. This is the versioned name of the remote tarball containing the binary `.node` module and any supporting files you've placed inside the `module_path` directory. Unless you specify `package_name` in your `package.json` then it defaults to `{module_name}-v{version}-{node_abi}-{platform}-{arch}.tar.gz` which allows your binary to work across node versions, platforms, and architectures. If you are using `remote_path` that is also versioned by `./{module_name}/v{version}` then you could remove these variables from the `package_name` and just use: `{node_abi}-{platform}-{arch}.tar.gz`. Then your remote tarball will be looked up at, for example, `https://example.com/your-module/v0.1.0/node-v11-linux-x64.tar.gz`.
-
-Avoiding the version of your module in the `package_name` and instead only embedding in a directory name can be useful when you want to make a quick tag of your module that does not change any C++ code. In this case you can just copy binaries to the new version behind the scenes like:
-
-```sh
-aws s3 sync --acl public-read s3://mapbox-node-binary/sqlite3/v3.0.3/ s3://mapbox-node-binary/sqlite3/v3.0.4/
-```
-
-Note: This property supports variables based on [Versioning](#versioning).
-
-#### 2) Add a new target to binding.gyp
-
-`node-pre-gyp` calls out to `node-gyp` to compile the module and passes variables along like [module_name](#module_name) and [module_path](#module_path).
-
-A new target must be added to `binding.gyp` that moves the compiled `.node` module from `./build/Release/module_name.node` into the directory specified by `module_path`.
-
-Add a target like this at the end of your `targets` list:
-
-```js
- {
- "target_name": "action_after_build",
- "type": "none",
- "dependencies": [ "<(module_name)" ],
- "copies": [
- {
- "files": [ "<(PRODUCT_DIR)/<(module_name).node" ],
- "destination": "<(module_path)"
- }
- ]
- }
-```
-
-For a full example see [node-addon-example's binding.gyp](https://github.com/springmeyer/node-addon-example/blob/2ff60a8ded7f042864ad21db00c3a5a06cf47075/binding.gyp).
-
-#### 3) Dynamically require your `.node`
-
-Inside the main js file that requires your addon module you are likely currently doing:
-
-```js
-var binding = require('../build/Release/binding.node');
-```
-
-or:
-
-```js
-var bindings = require('./bindings')
-```
-
-Change those lines to:
-
-```js
-var binary = require('@mapbox/node-pre-gyp');
-var path = require('path');
-var binding_path = binary.find(path.resolve(path.join(__dirname,'./package.json')));
-var binding = require(binding_path);
-```
-
-For a full example see [node-addon-example's index.js](https://github.com/springmeyer/node-addon-example/blob/2ff60a8ded7f042864ad21db00c3a5a06cf47075/index.js#L1-L4)
-
-#### 4) Build and package your app
-
-Now build your module from source:
-
- npm install --build-from-source
-
-The `--build-from-source` tells `node-pre-gyp` to not look for a remote package and instead dispatch to node-gyp to build.
-
-Now `node-pre-gyp` should now also be installed as a local dependency so the command line tool it offers can be found at `./node_modules/.bin/node-pre-gyp`.
-
-#### 5) Test
-
-Now `npm test` should work just as it did before.
-
-#### 6) Publish the tarball
-
-Then package your app:
-
- ./node_modules/.bin/node-pre-gyp package
-
-Once packaged, now you can publish:
-
- ./node_modules/.bin/node-pre-gyp publish
-
-Currently the `publish` command pushes your binary to S3. This requires:
-
- - You have installed `aws-sdk` with `npm install aws-sdk`
- - You have created a bucket already.
- - The `host` points to an S3 http or https endpoint.
- - You have configured node-pre-gyp to read your S3 credentials (see [S3 hosting](#s3-hosting) for details).
-
-You can also host your binaries elsewhere. To do this requires:
-
- - You manually publish the binary created by the `package` command to an `https` endpoint
- - Ensure that the `host` value points to your custom `https` endpoint.
-
-#### 7) Automate builds
-
-Now you need to publish builds for all the platforms and node versions you wish to support. This is best automated.
-
- - See [Appveyor Automation](#appveyor-automation) for how to auto-publish builds on Windows.
- - See [Travis Automation](#travis-automation) for how to auto-publish builds on OS X and Linux.
-
-#### 8) You're done!
-
-Now publish your module to the npm registry. Users will now be able to install your module from a binary.
-
-What will happen is this:
-
-1. `npm install ` will pull from the npm registry
-2. npm will run the `install` script which will call out to `node-pre-gyp`
-3. `node-pre-gyp` will fetch the binary `.node` module and unpack in the right place
-4. Assuming that all worked, you are done
-
-If a a binary was not available for a given platform and `--fallback-to-build` was used then `node-gyp rebuild` will be called to try to source compile the module.
-
-#### 9) One more option
-
-It may be that you want to work with two s3 buckets, one for staging and one for production; this
-arrangement makes it less likely to accidentally overwrite a production binary. It also allows the production
-environment to have more restrictive permissions than staging while still enabling publishing when
-developing and testing.
-
-The binary.host property can be set at execution time. In order to do so all of the following conditions
-must be true.
-
-- binary.host is falsey or not present
-- binary.staging_host is not empty
-- binary.production_host is not empty
-
-If any of these checks fail then the operation will not perform execution time determination of the s3 target.
-
-If the command being executed is either "publish" or "unpublish" then the default is set to `binary.staging_host`. In all other cases
-the default is `binary.production_host`.
-
-The command-line options `--s3_host=staging` or `--s3_host=production` override the default. If `s3_host`
-is present and not `staging` or `production` an exception is thrown.
-
-This allows installing from staging by specifying `--s3_host=staging`. And it requires specifying
-`--s3_option=production` in order to publish to, or unpublish from, production, making accidental errors less likely.
-
-## Node-API Considerations
-
-[Node-API](https://nodejs.org/api/n-api.html#n_api_node_api), which was previously known as N-API, is an ABI-stable alternative to previous technologies such as [nan](https://github.com/nodejs/nan) which are tied to a specific Node runtime engine. Node-API is Node runtime engine agnostic and guarantees modules created today will continue to run, without changes, into the future.
-
-Using `node-pre-gyp` with Node-API projects requires a handful of additional configuration values and imposes some additional requirements.
-
-The most significant difference is that an Node-API module can be coded to target multiple Node-API versions. Therefore, an Node-API module must declare in its `package.json` file which Node-API versions the module is designed to run against. In addition, since multiple builds may be required for a single module, path and file names must be specified in way that avoids naming conflicts.
-
-### The `napi_versions` array property
-
-A Node-API module must declare in its `package.json` file, the Node-API versions the module is intended to support. This is accomplished by including an `napi-versions` array property in the `binary` object. For example:
-
-```js
-"binary": {
- "module_name": "your_module",
- "module_path": "your_module_path",
- "host": "https://your_bucket.s3-us-west-1.amazonaws.com",
- "napi_versions": [1,3]
- }
-```
-
-If the `napi_versions` array property is *not* present, `node-pre-gyp` operates as it always has. Including the `napi_versions` array property instructs `node-pre-gyp` that this is a Node-API module build.
-
-When the `napi_versions` array property is present, `node-pre-gyp` fires off multiple operations, one for each of the Node-API versions in the array. In the example above, two operations are initiated, one for Node-API version 1 and second for Node-API version 3. How this version number is communicated is described next.
-
-### The `napi_build_version` value
-
-For each of the Node-API module operations `node-pre-gyp` initiates, it ensures that the `napi_build_version` is set appropriately.
-
-This value is of importance in two areas:
-
-1. The C/C++ code which needs to know against which Node-API version it should compile.
-2. `node-pre-gyp` itself which must assign appropriate path and file names to avoid collisions.
-
-### Defining `NAPI_VERSION` for the C/C++ code
-
-The `napi_build_version` value is communicated to the C/C++ code by adding this code to the `binding.gyp` file:
-
-```
-"defines": [
- "NAPI_VERSION=<(napi_build_version)",
-]
-```
-
-This ensures that `NAPI_VERSION`, an integer value, is declared appropriately to the C/C++ code for each build.
-
-> Note that earlier versions of this document recommended defining the symbol `NAPI_BUILD_VERSION`. `NAPI_VERSION` is preferred because it used by the Node-API C/C++ headers to configure the specific Node-API versions being requested.
-
-### Path and file naming requirements in `package.json`
-
-Since `node-pre-gyp` fires off multiple operations for each request, it is essential that path and file names be created in such a way as to avoid collisions. This is accomplished by imposing additional path and file naming requirements.
-
-Specifically, when performing Node-API builds, the `{napi_build_version}` text configuration value *must* be present in the `module_path` property. In addition, the `{napi_build_version}` text configuration value *must* be present in either the `remote_path` or `package_name` property. (No problem if it's in both.)
-
-Here's an example:
-
-```js
-"binary": {
- "module_name": "your_module",
- "module_path": "./lib/binding/napi-v{napi_build_version}",
- "remote_path": "./{module_name}/v{version}/{configuration}/",
- "package_name": "{platform}-{arch}-napi-v{napi_build_version}.tar.gz",
- "host": "https://your_bucket.s3-us-west-1.amazonaws.com",
- "napi_versions": [1,3]
- }
-```
-
-## Supporting both Node-API and NAN builds
-
-You may have a legacy native add-on that you wish to continue supporting for those versions of Node that do not support Node-API, as you add Node-API support for later Node versions. This can be accomplished by specifying the `node_napi_label` configuration value in the package.json `binary.package_name` property.
-
-Placing the configuration value `node_napi_label` in the package.json `binary.package_name` property instructs `node-pre-gyp` to build all viable Node-API binaries supported by the current Node instance. If the current Node instance does not support Node-API, `node-pre-gyp` will request a traditional, non-Node-API build.
-
-The configuration value `node_napi_label` is set by `node-pre-gyp` to the type of build created, `napi` or `node`, and the version number. For Node-API builds, the string contains the Node-API version nad has values like `napi-v3`. For traditional, non-Node-API builds, the string contains the ABI version with values like `node-v46`.
-
-Here's how the `binary` configuration above might be changed to support both Node-API and NAN builds:
-
-```js
-"binary": {
- "module_name": "your_module",
- "module_path": "./lib/binding/{node_napi_label}",
- "remote_path": "./{module_name}/v{version}/{configuration}/",
- "package_name": "{platform}-{arch}-{node_napi_label}.tar.gz",
- "host": "https://your_bucket.s3-us-west-1.amazonaws.com",
- "napi_versions": [1,3]
- }
-```
-
-The C/C++ symbol `NAPI_VERSION` can be used to distinguish Node-API and non-Node-API builds. The value of `NAPI_VERSION` is set to the integer Node-API version for Node-API builds and is set to `0` for non-Node-API builds.
-
-For example:
-
-```C
-#if NAPI_VERSION
-// Node-API code goes here
-#else
-// NAN code goes here
-#endif
-```
-
-### Two additional configuration values
-
-The following two configuration values, which were implemented in previous versions of `node-pre-gyp`, continue to exist, but have been replaced by the `node_napi_label` configuration value described above.
-
-1. `napi_version` If Node-API is supported by the currently executing Node instance, this value is the Node-API version number supported by Node. If Node-API is not supported, this value is an empty string.
-
-2. `node_abi_napi` If the value returned for `napi_version` is non empty, this value is `'napi'`. If the value returned for `napi_version` is empty, this value is the value returned for `node_abi`.
-
-These values are present for use in the `binding.gyp` file and may be used as `{napi_version}` and `{node_abi_napi}` for text substituion in the `binary` properties of the `package.json` file.
-
-## S3 Hosting
-
-You can host wherever you choose but S3 is cheap, `node-pre-gyp publish` expects it, and S3 can be integrated well with [Travis.ci](http://travis-ci.org) to automate builds for OS X and Ubuntu, and with [Appveyor](http://appveyor.com) to automate builds for Windows. Here is an approach to do this:
-
-First, get setup locally and test the workflow:
-
-#### 1) Create an S3 bucket
-
-And have your **key** and **secret key** ready for writing to the bucket.
-
-It is recommended to create a IAM user with a policy that only gives permissions to the specific bucket you plan to publish to. This can be done in the [IAM console](https://console.aws.amazon.com/iam/) by: 1) adding a new user, 2) choosing `Attach User Policy`, 3) Using the `Policy Generator`, 4) selecting `Amazon S3` for the service, 5) adding the actions: `DeleteObject`, `GetObject`, `GetObjectAcl`, `ListBucket`, `HeadBucket`, `PutObject`, `PutObjectAcl`, 6) adding an ARN of `arn:aws:s3:::bucket/*` (replacing `bucket` with your bucket name), and finally 7) clicking `Add Statement` and saving the policy. It should generate a policy like:
-
-```js
-{
- "Version": "2012-10-17",
- "Statement": [
- {
- "Sid": "objects",
- "Effect": "Allow",
- "Action": [
- "s3:PutObject",
- "s3:GetObjectAcl",
- "s3:GetObject",
- "s3:DeleteObject",
- "s3:PutObjectAcl"
- ],
- "Resource": "arn:aws:s3:::your-bucket-name/*"
- },
- {
- "Sid": "bucket",
- "Effect": "Allow",
- "Action": "s3:ListBucket",
- "Resource": "arn:aws:s3:::your-bucket-name"
- },
- {
- "Sid": "buckets",
- "Effect": "Allow",
- "Action": "s3:HeadBucket",
- "Resource": "*"
- }
- ]
-}
-```
-
-#### 2) Install node-pre-gyp
-
-Either install it globally:
-
- npm install node-pre-gyp -g
-
-Or put the local version on your PATH
-
- export PATH=`pwd`/node_modules/.bin/:$PATH
-
-#### 3) Configure AWS credentials
-
-It is recommended to configure the AWS JS SDK v2 used internally by `node-pre-gyp` by setting these environment variables:
-
-- AWS_ACCESS_KEY_ID
-- AWS_SECRET_ACCESS_KEY
-
-But also you can also use the `Shared Config File` mentioned [in the AWS JS SDK v2 docs](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/configuring-the-jssdk.html)
-
-#### 4) Package and publish your build
-
-Install the `aws-sdk`:
-
- npm install aws-sdk
-
-Then publish:
-
- node-pre-gyp package publish
-
-Note: if you hit an error like `Hostname/IP doesn't match certificate's altnames` it may mean that you need to provide the `region` option in your config.
-
-## Appveyor Automation
-
-[Appveyor](http://www.appveyor.com/) can build binaries and publish the results per commit and supports:
-
- - Windows Visual Studio 2013 and related compilers
- - Both 64 bit (x64) and 32 bit (x86) build configurations
- - Multiple Node.js versions
-
-For an example of doing this see [node-sqlite3's appveyor.yml](https://github.com/mapbox/node-sqlite3/blob/master/appveyor.yml).
-
-Below is a guide to getting set up:
-
-#### 1) Create a free Appveyor account
-
-Go to https://ci.appveyor.com/signup/free and sign in with your GitHub account.
-
-#### 2) Create a new project
-
-Go to https://ci.appveyor.com/projects/new and select the GitHub repo for your module
-
-#### 3) Add appveyor.yml and push it
-
-Once you have committed an `appveyor.yml` ([appveyor.yml reference](http://www.appveyor.com/docs/appveyor-yml)) to your GitHub repo and pushed it AppVeyor should automatically start building your project.
-
-#### 4) Create secure variables
-
-Encrypt your S3 AWS keys by going to and hitting the `encrypt` button.
-
-Then paste the result into your `appveyor.yml`
-
-```yml
-environment:
- AWS_ACCESS_KEY_ID:
- secure: Dn9HKdLNYvDgPdQOzRq/DqZ/MPhjknRHB1o+/lVU8MA=
- AWS_SECRET_ACCESS_KEY:
- secure: W1rwNoSnOku1r+28gnoufO8UA8iWADmL1LiiwH9IOkIVhDTNGdGPJqAlLjNqwLnL
-```
-
-NOTE: keys are per account but not per repo (this is difference than Travis where keys are per repo but not related to the account used to encrypt them).
-
-#### 5) Hook up publishing
-
-Just put `node-pre-gyp package publish` in your `appveyor.yml` after `npm install`.
-
-#### 6) Publish when you want
-
-You might wish to publish binaries only on a specific commit. To do this you could borrow from the [Travis CI idea of commit keywords](http://about.travis-ci.org/docs/user/how-to-skip-a-build/) and add special handling for commit messages with `[publish binary]`:
-
- SET CM=%APPVEYOR_REPO_COMMIT_MESSAGE%
- if not "%CM%" == "%CM:[publish binary]=%" node-pre-gyp --msvs_version=2013 publish
-
-If your commit message contains special characters (e.g. `&`) this method might fail. An alternative is to use PowerShell, which gives you additional possibilities, like ignoring case by using `ToLower()`:
-
- ps: if($env:APPVEYOR_REPO_COMMIT_MESSAGE.ToLower().Contains('[publish binary]')) { node-pre-gyp --msvs_version=2013 publish }
-
-Remember this publishing is not the same as `npm publish`. We're just talking about the binary module here and not your entire npm package.
-
-## Travis Automation
-
-[Travis](https://travis-ci.org/) can push to S3 after a successful build and supports both:
-
- - Ubuntu Precise and OS X (64 bit)
- - Multiple Node.js versions
-
-For an example of doing this see [node-add-example's .travis.yml](https://github.com/springmeyer/node-addon-example/blob/2ff60a8ded7f042864ad21db00c3a5a06cf47075/.travis.yml).
-
-Note: if you need 32 bit binaries, this can be done from a 64 bit Travis machine. See [the node-sqlite3 scripts for an example of doing this](https://github.com/mapbox/node-sqlite3/blob/bae122aa6a2b8a45f6b717fab24e207740e32b5d/scripts/build_against_node.sh#L54-L74).
-
-Below is a guide to getting set up:
-
-#### 1) Install the Travis gem
-
- gem install travis
-
-#### 2) Create secure variables
-
-Make sure you run this command from within the directory of your module.
-
-Use `travis-encrypt` like:
-
- travis encrypt AWS_ACCESS_KEY_ID=${node_pre_gyp_accessKeyId}
- travis encrypt AWS_SECRET_ACCESS_KEY=${node_pre_gyp_secretAccessKey}
-
-Then put those values in your `.travis.yml` like:
-
-```yaml
-env:
- global:
- - secure: F+sEL/v56CzHqmCSSES4pEyC9NeQlkoR0Gs/ZuZxX1ytrj8SKtp3MKqBj7zhIclSdXBz4Ev966Da5ctmcTd410p0b240MV6BVOkLUtkjZJyErMBOkeb8n8yVfSoeMx8RiIhBmIvEn+rlQq+bSFis61/JkE9rxsjkGRZi14hHr4M=
- - secure: o2nkUQIiABD139XS6L8pxq3XO5gch27hvm/gOdV+dzNKc/s2KomVPWcOyXNxtJGhtecAkABzaW8KHDDi5QL1kNEFx6BxFVMLO8rjFPsMVaBG9Ks6JiDQkkmrGNcnVdxI/6EKTLHTH5WLsz8+J7caDBzvKbEfTux5EamEhxIWgrI=
-```
-
-More details on Travis encryption at http://about.travis-ci.org/docs/user/encryption-keys/.
-
-#### 3) Hook up publishing
-
-Just put `node-pre-gyp package publish` in your `.travis.yml` after `npm install`.
-
-##### OS X publishing
-
-If you want binaries for OS X in addition to linux you can enable [multi-os for Travis](http://docs.travis-ci.com/user/multi-os/#Setting-.travis.yml)
-
-Use a configuration like:
-
-```yml
-
-language: cpp
-
-os:
-- linux
-- osx
-
-env:
- matrix:
- - NODE_VERSION="4"
- - NODE_VERSION="6"
-
-before_install:
-- rm -rf ~/.nvm/ && git clone --depth 1 https://github.com/creationix/nvm.git ~/.nvm
-- source ~/.nvm/nvm.sh
-- nvm install $NODE_VERSION
-- nvm use $NODE_VERSION
-```
-
-See [Travis OS X Gotchas](#travis-os-x-gotchas) for why we replace `language: node_js` and `node_js:` sections with `language: cpp` and a custom matrix.
-
-Also create platform specific sections for any deps that need install. For example if you need libpng:
-
-```yml
-- if [ $(uname -s) == 'Linux' ]; then apt-get install libpng-dev; fi;
-- if [ $(uname -s) == 'Darwin' ]; then brew install libpng; fi;
-```
-
-For detailed multi-OS examples see [node-mapnik](https://github.com/mapnik/node-mapnik/blob/master/.travis.yml) and [node-sqlite3](https://github.com/mapbox/node-sqlite3/blob/master/.travis.yml).
-
-##### Travis OS X Gotchas
-
-First, unlike the Travis Linux machines, the OS X machines do not put `node-pre-gyp` on PATH by default. To do so you will need to:
-
-```sh
-export PATH=$(pwd)/node_modules/.bin:${PATH}
-```
-
-Second, the OS X machines do not support using a matrix for installing different Node.js versions. So you need to bootstrap the installation of Node.js in a cross platform way.
-
-By doing:
-
-```yml
-env:
- matrix:
- - NODE_VERSION="4"
- - NODE_VERSION="6"
-
-before_install:
- - rm -rf ~/.nvm/ && git clone --depth 1 https://github.com/creationix/nvm.git ~/.nvm
- - source ~/.nvm/nvm.sh
- - nvm install $NODE_VERSION
- - nvm use $NODE_VERSION
-```
-
-You can easily recreate the previous behavior of this matrix:
-
-```yml
-node_js:
- - "4"
- - "6"
-```
-
-#### 4) Publish when you want
-
-You might wish to publish binaries only on a specific commit. To do this you could borrow from the [Travis CI idea of commit keywords](http://about.travis-ci.org/docs/user/how-to-skip-a-build/) and add special handling for commit messages with `[publish binary]`:
-
- COMMIT_MESSAGE=$(git log --format=%B --no-merges -n 1 | tr -d '\n')
- if [[ ${COMMIT_MESSAGE} =~ "[publish binary]" ]]; then node-pre-gyp publish; fi;
-
-Then you can trigger new binaries to be built like:
-
- git commit -a -m "[publish binary]"
-
-Or, if you don't have any changes to make simply run:
-
- git commit --allow-empty -m "[publish binary]"
-
-WARNING: if you are working in a pull request and publishing binaries from there then you will want to avoid double publishing when Travis CI builds both the `push` and `pr`. You only want to run the publish on the `push` commit. See https://github.com/Project-OSRM/node-osrm/blob/8eb837abe2e2e30e595093d16e5354bc5c573575/scripts/is_pr_merge.sh which is called from https://github.com/Project-OSRM/node-osrm/blob/8eb837abe2e2e30e595093d16e5354bc5c573575/scripts/publish.sh for an example of how to do this.
-
-Remember this publishing is not the same as `npm publish`. We're just talking about the binary module here and not your entire npm package. To automate the publishing of your entire package to npm on Travis see http://about.travis-ci.org/docs/user/deployment/npm/
-
-# Versioning
-
-The `binary` properties of `module_path`, `remote_path`, and `package_name` support variable substitution. The strings are evaluated by `node-pre-gyp` depending on your system and any custom build flags you passed.
-
- - `node_abi`: The node C++ `ABI` number. This value is available in Javascript as `process.versions.modules` as of [`>= v0.10.4 >= v0.11.7`](https://github.com/joyent/node/commit/ccabd4a6fa8a6eb79d29bc3bbe9fe2b6531c2d8e) and in C++ as the `NODE_MODULE_VERSION` define much earlier. For versions of Node before this was available we fallback to the V8 major and minor version.
- - `platform` matches node's `process.platform` like `linux`, `darwin`, and `win32` unless the user passed the `--target_platform` option to override.
- - `arch` matches node's `process.arch` like `x64` or `ia32` unless the user passes the `--target_arch` option to override.
- - `libc` matches `require('detect-libc').family` like `glibc` or `musl` unless the user passes the `--target_libc` option to override.
- - `configuration` - Either 'Release' or 'Debug' depending on if `--debug` is passed during the build.
- - `module_name` - the `binary.module_name` attribute from `package.json`.
- - `version` - the semver `version` value for your module from `package.json` (NOTE: ignores the `semver.build` property).
- - `major`, `minor`, `patch`, and `prelease` match the individual semver values for your module's `version`
- - `build` - the sevmer `build` value. For example it would be `this.that` if your package.json `version` was `v1.0.0+this.that`
- - `prerelease` - the semver `prerelease` value. For example it would be `alpha.beta` if your package.json `version` was `v1.0.0-alpha.beta`
-
-
-The options are visible in the code at
-
-# Download binary files from a mirror
-
-S3 is broken in China for the well known reason.
-
-Using the `npm` config argument: `--{module_name}_binary_host_mirror` can download binary files through a mirror, `-` in `module_name` will be replaced with `_`.
-
-e.g.: Install [v8-profiler](https://www.npmjs.com/package/v8-profiler) from `npm`.
-
-```bash
-$ npm install v8-profiler --profiler_binary_host_mirror=https://npm.taobao.org/mirrors/node-inspector/
-```
-
-e.g.: Install [canvas-prebuilt](https://www.npmjs.com/package/canvas-prebuilt) from `npm`.
-
-```bash
-$ npm install canvas-prebuilt --canvas_prebuilt_binary_host_mirror=https://npm.taobao.org/mirrors/canvas-prebuilt/
-```
diff --git a/server/node_modules/@mapbox/node-pre-gyp/bin/node-pre-gyp b/server/node_modules/@mapbox/node-pre-gyp/bin/node-pre-gyp
deleted file mode 100644
index c38d34d..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/bin/node-pre-gyp
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env node
-'use strict';
-
-require('../lib/main');
diff --git a/server/node_modules/@mapbox/node-pre-gyp/bin/node-pre-gyp.cmd b/server/node_modules/@mapbox/node-pre-gyp/bin/node-pre-gyp.cmd
deleted file mode 100644
index 46e14b5..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/bin/node-pre-gyp.cmd
+++ /dev/null
@@ -1,2 +0,0 @@
-@echo off
-node "%~dp0\node-pre-gyp" %*
diff --git a/server/node_modules/@mapbox/node-pre-gyp/contributing.md b/server/node_modules/@mapbox/node-pre-gyp/contributing.md
deleted file mode 100644
index 4038fa6..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/contributing.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# Contributing
-
-
-### Releasing a new version:
-
-- Ensure tests are passing on travis and appveyor
-- Run `node scripts/abi_crosswalk.js` and commit any changes
-- Update the changelog
-- Tag a new release like: `git tag -a v0.6.34 -m "tagging v0.6.34" && git push --tags`
-- Run `npm publish`
diff --git a/server/node_modules/@mapbox/node-pre-gyp/lib/build.js b/server/node_modules/@mapbox/node-pre-gyp/lib/build.js
deleted file mode 100644
index e8a1459..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/lib/build.js
+++ /dev/null
@@ -1,51 +0,0 @@
-'use strict';
-
-module.exports = exports = build;
-
-exports.usage = 'Attempts to compile the module by dispatching to node-gyp or nw-gyp';
-
-const napi = require('./util/napi.js');
-const compile = require('./util/compile.js');
-const handle_gyp_opts = require('./util/handle_gyp_opts.js');
-const configure = require('./configure.js');
-
-function do_build(gyp, argv, callback) {
- handle_gyp_opts(gyp, argv, (err, result) => {
- let final_args = ['build'].concat(result.gyp).concat(result.pre);
- if (result.unparsed.length > 0) {
- final_args = final_args.
- concat(['--']).
- concat(result.unparsed);
- }
- if (!err && result.opts.napi_build_version) {
- napi.swap_build_dir_in(result.opts.napi_build_version);
- }
- compile.run_gyp(final_args, result.opts, (err2) => {
- if (result.opts.napi_build_version) {
- napi.swap_build_dir_out(result.opts.napi_build_version);
- }
- return callback(err2);
- });
- });
-}
-
-function build(gyp, argv, callback) {
-
- // Form up commands to pass to node-gyp:
- // We map `node-pre-gyp build` to `node-gyp configure build` so that we do not
- // trigger a clean and therefore do not pay the penalty of a full recompile
- if (argv.length && (argv.indexOf('rebuild') > -1)) {
- argv.shift(); // remove `rebuild`
- // here we map `node-pre-gyp rebuild` to `node-gyp rebuild` which internally means
- // "clean + configure + build" and triggers a full recompile
- compile.run_gyp(['clean'], {}, (err3) => {
- if (err3) return callback(err3);
- configure(gyp, argv, (err4) => {
- if (err4) return callback(err4);
- return do_build(gyp, argv, callback);
- });
- });
- } else {
- return do_build(gyp, argv, callback);
- }
-}
diff --git a/server/node_modules/@mapbox/node-pre-gyp/lib/clean.js b/server/node_modules/@mapbox/node-pre-gyp/lib/clean.js
deleted file mode 100644
index e693392..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/lib/clean.js
+++ /dev/null
@@ -1,31 +0,0 @@
-'use strict';
-
-module.exports = exports = clean;
-
-exports.usage = 'Removes the entire folder containing the compiled .node module';
-
-const rm = require('rimraf');
-const exists = require('fs').exists || require('path').exists;
-const versioning = require('./util/versioning.js');
-const napi = require('./util/napi.js');
-const path = require('path');
-
-function clean(gyp, argv, callback) {
- const package_json = gyp.package_json;
- const napi_build_version = napi.get_napi_build_version_from_command_args(argv);
- const opts = versioning.evaluate(package_json, gyp.opts, napi_build_version);
- const to_delete = opts.module_path;
- if (!to_delete) {
- return callback(new Error('module_path is empty, refusing to delete'));
- } else if (path.normalize(to_delete) === path.normalize(process.cwd())) {
- return callback(new Error('module_path is not set, refusing to delete'));
- } else {
- exists(to_delete, (found) => {
- if (found) {
- if (!gyp.opts.silent_clean) console.log('[' + package_json.name + '] Removing "%s"', to_delete);
- return rm(to_delete, callback);
- }
- return callback();
- });
- }
-}
diff --git a/server/node_modules/@mapbox/node-pre-gyp/lib/configure.js b/server/node_modules/@mapbox/node-pre-gyp/lib/configure.js
deleted file mode 100644
index 1337c0c..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/lib/configure.js
+++ /dev/null
@@ -1,52 +0,0 @@
-'use strict';
-
-module.exports = exports = configure;
-
-exports.usage = 'Attempts to configure node-gyp or nw-gyp build';
-
-const napi = require('./util/napi.js');
-const compile = require('./util/compile.js');
-const handle_gyp_opts = require('./util/handle_gyp_opts.js');
-
-function configure(gyp, argv, callback) {
- handle_gyp_opts(gyp, argv, (err, result) => {
- let final_args = result.gyp.concat(result.pre);
- // pull select node-gyp configure options out of the npm environ
- const known_gyp_args = ['dist-url', 'python', 'nodedir', 'msvs_version'];
- known_gyp_args.forEach((key) => {
- const val = gyp.opts[key] || gyp.opts[key.replace('-', '_')];
- if (val) {
- final_args.push('--' + key + '=' + val);
- }
- });
- // --ensure=false tell node-gyp to re-install node development headers
- // but it is only respected by node-gyp install, so we have to call install
- // as a separate step if the user passes it
- if (gyp.opts.ensure === false) {
- const install_args = final_args.concat(['install', '--ensure=false']);
- compile.run_gyp(install_args, result.opts, (err2) => {
- if (err2) return callback(err2);
- if (result.unparsed.length > 0) {
- final_args = final_args.
- concat(['--']).
- concat(result.unparsed);
- }
- compile.run_gyp(['configure'].concat(final_args), result.opts, (err3) => {
- return callback(err3);
- });
- });
- } else {
- if (result.unparsed.length > 0) {
- final_args = final_args.
- concat(['--']).
- concat(result.unparsed);
- }
- compile.run_gyp(['configure'].concat(final_args), result.opts, (err4) => {
- if (!err4 && result.opts.napi_build_version) {
- napi.swap_build_dir_out(result.opts.napi_build_version);
- }
- return callback(err4);
- });
- }
- });
-}
diff --git a/server/node_modules/@mapbox/node-pre-gyp/lib/info.js b/server/node_modules/@mapbox/node-pre-gyp/lib/info.js
deleted file mode 100644
index ba22f32..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/lib/info.js
+++ /dev/null
@@ -1,38 +0,0 @@
-'use strict';
-
-module.exports = exports = info;
-
-exports.usage = 'Lists all published binaries (requires aws-sdk)';
-
-const log = require('npmlog');
-const versioning = require('./util/versioning.js');
-const s3_setup = require('./util/s3_setup.js');
-
-function info(gyp, argv, callback) {
- const package_json = gyp.package_json;
- const opts = versioning.evaluate(package_json, gyp.opts);
- const config = {};
- s3_setup.detect(opts, config);
- const s3 = s3_setup.get_s3(config);
- const s3_opts = {
- Bucket: config.bucket,
- Prefix: config.prefix
- };
- s3.listObjects(s3_opts, (err, meta) => {
- if (err && err.code === 'NotFound') {
- return callback(new Error('[' + package_json.name + '] Not found: https://' + s3_opts.Bucket + '.s3.amazonaws.com/' + config.prefix));
- } else if (err) {
- return callback(err);
- } else {
- log.verbose(JSON.stringify(meta, null, 1));
- if (meta && meta.Contents) {
- meta.Contents.forEach((obj) => {
- console.log(obj.Key);
- });
- } else {
- console.error('[' + package_json.name + '] No objects found at https://' + s3_opts.Bucket + '.s3.amazonaws.com/' + config.prefix);
- }
- return callback();
- }
- });
-}
diff --git a/server/node_modules/@mapbox/node-pre-gyp/lib/install.js b/server/node_modules/@mapbox/node-pre-gyp/lib/install.js
deleted file mode 100644
index 617dd86..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/lib/install.js
+++ /dev/null
@@ -1,235 +0,0 @@
-'use strict';
-
-module.exports = exports = install;
-
-exports.usage = 'Attempts to install pre-built binary for module';
-
-const fs = require('fs');
-const path = require('path');
-const log = require('npmlog');
-const existsAsync = fs.exists || path.exists;
-const versioning = require('./util/versioning.js');
-const napi = require('./util/napi.js');
-const makeDir = require('make-dir');
-// for fetching binaries
-const fetch = require('node-fetch');
-const tar = require('tar');
-
-let npgVersion = 'unknown';
-try {
- // Read own package.json to get the current node-pre-pyp version.
- const ownPackageJSON = fs.readFileSync(path.join(__dirname, '..', 'package.json'), 'utf8');
- npgVersion = JSON.parse(ownPackageJSON).version;
-} catch (e) {
- // do nothing
-}
-
-function place_binary(uri, targetDir, opts, callback) {
- log.http('GET', uri);
-
- // Try getting version info from the currently running npm.
- const envVersionInfo = process.env.npm_config_user_agent ||
- 'node ' + process.version;
-
- const sanitized = uri.replace('+', '%2B');
- const requestOpts = {
- uri: sanitized,
- headers: {
- 'User-Agent': 'node-pre-gyp (v' + npgVersion + ', ' + envVersionInfo + ')'
- },
- follow_max: 10
- };
-
- if (opts.cafile) {
- try {
- requestOpts.ca = fs.readFileSync(opts.cafile);
- } catch (e) {
- return callback(e);
- }
- } else if (opts.ca) {
- requestOpts.ca = opts.ca;
- }
-
- const proxyUrl = opts.proxy ||
- process.env.http_proxy ||
- process.env.HTTP_PROXY ||
- process.env.npm_config_proxy;
- let agent;
- if (proxyUrl) {
- const ProxyAgent = require('https-proxy-agent');
- agent = new ProxyAgent(proxyUrl);
- log.http('download', 'proxy agent configured using: "%s"', proxyUrl);
- }
-
- fetch(sanitized, { agent })
- .then((res) => {
- if (!res.ok) {
- throw new Error(`response status ${res.status} ${res.statusText} on ${sanitized}`);
- }
- const dataStream = res.body;
-
- return new Promise((resolve, reject) => {
- let extractions = 0;
- const countExtractions = (entry) => {
- extractions += 1;
- log.info('install', 'unpacking %s', entry.path);
- };
-
- dataStream.pipe(extract(targetDir, countExtractions))
- .on('error', (e) => {
- reject(e);
- });
- dataStream.on('end', () => {
- resolve(`extracted file count: ${extractions}`);
- });
- dataStream.on('error', (e) => {
- reject(e);
- });
- });
- })
- .then((text) => {
- log.info(text);
- callback();
- })
- .catch((e) => {
- log.error(`install ${e.message}`);
- callback(e);
- });
-}
-
-function extract(to, onentry) {
- return tar.extract({
- cwd: to,
- strip: 1,
- onentry
- });
-}
-
-function extract_from_local(from, targetDir, callback) {
- if (!fs.existsSync(from)) {
- return callback(new Error('Cannot find file ' + from));
- }
- log.info('Found local file to extract from ' + from);
-
- // extract helpers
- let extractCount = 0;
- function countExtractions(entry) {
- extractCount += 1;
- log.info('install', 'unpacking ' + entry.path);
- }
- function afterExtract(err) {
- if (err) return callback(err);
- if (extractCount === 0) {
- return callback(new Error('There was a fatal problem while extracting the tarball'));
- }
- log.info('tarball', 'done parsing tarball');
- callback();
- }
-
- fs.createReadStream(from).pipe(extract(targetDir, countExtractions))
- .on('close', afterExtract)
- .on('error', afterExtract);
-}
-
-function do_build(gyp, argv, callback) {
- const args = ['rebuild'].concat(argv);
- gyp.todo.push({ name: 'build', args: args });
- process.nextTick(callback);
-}
-
-function print_fallback_error(err, opts, package_json) {
- const fallback_message = ' (falling back to source compile with node-gyp)';
- let full_message = '';
- if (err.statusCode !== undefined) {
- // If we got a network response it but failed to download
- // it means remote binaries are not available, so let's try to help
- // the user/developer with the info to debug why
- full_message = 'Pre-built binaries not found for ' + package_json.name + '@' + package_json.version;
- full_message += ' and ' + opts.runtime + '@' + (opts.target || process.versions.node) + ' (' + opts.node_abi + ' ABI, ' + opts.libc + ')';
- full_message += fallback_message;
- log.warn('Tried to download(' + err.statusCode + '): ' + opts.hosted_tarball);
- log.warn(full_message);
- log.http(err.message);
- } else {
- // If we do not have a statusCode that means an unexpected error
- // happened and prevented an http response, so we output the exact error
- full_message = 'Pre-built binaries not installable for ' + package_json.name + '@' + package_json.version;
- full_message += ' and ' + opts.runtime + '@' + (opts.target || process.versions.node) + ' (' + opts.node_abi + ' ABI, ' + opts.libc + ')';
- full_message += fallback_message;
- log.warn(full_message);
- log.warn('Hit error ' + err.message);
- }
-}
-
-//
-// install
-//
-function install(gyp, argv, callback) {
- const package_json = gyp.package_json;
- const napi_build_version = napi.get_napi_build_version_from_command_args(argv);
- const source_build = gyp.opts['build-from-source'] || gyp.opts.build_from_source;
- const update_binary = gyp.opts['update-binary'] || gyp.opts.update_binary;
- const should_do_source_build = source_build === package_json.name || (source_build === true || source_build === 'true');
- if (should_do_source_build) {
- log.info('build', 'requesting source compile');
- return do_build(gyp, argv, callback);
- } else {
- const fallback_to_build = gyp.opts['fallback-to-build'] || gyp.opts.fallback_to_build;
- let should_do_fallback_build = fallback_to_build === package_json.name || (fallback_to_build === true || fallback_to_build === 'true');
- // but allow override from npm
- if (process.env.npm_config_argv) {
- const cooked = JSON.parse(process.env.npm_config_argv).cooked;
- const match = cooked.indexOf('--fallback-to-build');
- if (match > -1 && cooked.length > match && cooked[match + 1] === 'false') {
- should_do_fallback_build = false;
- log.info('install', 'Build fallback disabled via npm flag: --fallback-to-build=false');
- }
- }
- let opts;
- try {
- opts = versioning.evaluate(package_json, gyp.opts, napi_build_version);
- } catch (err) {
- return callback(err);
- }
-
- opts.ca = gyp.opts.ca;
- opts.cafile = gyp.opts.cafile;
-
- const from = opts.hosted_tarball;
- const to = opts.module_path;
- const binary_module = path.join(to, opts.module_name + '.node');
- existsAsync(binary_module, (found) => {
- if (!update_binary) {
- if (found) {
- console.log('[' + package_json.name + '] Success: "' + binary_module + '" already installed');
- console.log('Pass --update-binary to reinstall or --build-from-source to recompile');
- return callback();
- }
- log.info('check', 'checked for "' + binary_module + '" (not found)');
- }
-
- makeDir(to).then(() => {
- const fileName = from.startsWith('file://') && from.slice('file://'.length);
- if (fileName) {
- extract_from_local(fileName, to, after_place);
- } else {
- place_binary(from, to, opts, after_place);
- }
- }).catch((err) => {
- after_place(err);
- });
-
- function after_place(err) {
- if (err && should_do_fallback_build) {
- print_fallback_error(err, opts, package_json);
- return do_build(gyp, argv, callback);
- } else if (err) {
- return callback(err);
- } else {
- console.log('[' + package_json.name + '] Success: "' + binary_module + '" is installed via remote');
- return callback();
- }
- }
- });
- }
-}
diff --git a/server/node_modules/@mapbox/node-pre-gyp/lib/main.js b/server/node_modules/@mapbox/node-pre-gyp/lib/main.js
deleted file mode 100644
index bae32ac..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/lib/main.js
+++ /dev/null
@@ -1,125 +0,0 @@
-'use strict';
-
-/**
- * Set the title.
- */
-
-process.title = 'node-pre-gyp';
-
-const node_pre_gyp = require('../');
-const log = require('npmlog');
-
-/**
- * Process and execute the selected commands.
- */
-
-const prog = new node_pre_gyp.Run({ argv: process.argv });
-let completed = false;
-
-if (prog.todo.length === 0) {
- if (~process.argv.indexOf('-v') || ~process.argv.indexOf('--version')) {
- console.log('v%s', prog.version);
- process.exit(0);
- } else if (~process.argv.indexOf('-h') || ~process.argv.indexOf('--help')) {
- console.log('%s', prog.usage());
- process.exit(0);
- }
- console.log('%s', prog.usage());
- process.exit(1);
-}
-
-// if --no-color is passed
-if (prog.opts && Object.hasOwnProperty.call(prog, 'color') && !prog.opts.color) {
- log.disableColor();
-}
-
-log.info('it worked if it ends with', 'ok');
-log.verbose('cli', process.argv);
-log.info('using', process.title + '@%s', prog.version);
-log.info('using', 'node@%s | %s | %s', process.versions.node, process.platform, process.arch);
-
-
-/**
- * Change dir if -C/--directory was passed.
- */
-
-const dir = prog.opts.directory;
-if (dir) {
- const fs = require('fs');
- try {
- const stat = fs.statSync(dir);
- if (stat.isDirectory()) {
- log.info('chdir', dir);
- process.chdir(dir);
- } else {
- log.warn('chdir', dir + ' is not a directory');
- }
- } catch (e) {
- if (e.code === 'ENOENT') {
- log.warn('chdir', dir + ' is not a directory');
- } else {
- log.warn('chdir', 'error during chdir() "%s"', e.message);
- }
- }
-}
-
-function run() {
- const command = prog.todo.shift();
- if (!command) {
- // done!
- completed = true;
- log.info('ok');
- return;
- }
-
- // set binary.host when appropriate. host determines the s3 target bucket.
- const target = prog.setBinaryHostProperty(command.name);
- if (target && ['install', 'publish', 'unpublish', 'info'].indexOf(command.name) >= 0) {
- log.info('using binary.host: ' + prog.package_json.binary.host);
- }
-
- prog.commands[command.name](command.args, function(err) {
- if (err) {
- log.error(command.name + ' error');
- log.error('stack', err.stack);
- errorMessage();
- log.error('not ok');
- console.log(err.message);
- return process.exit(1);
- }
- const args_array = [].slice.call(arguments, 1);
- if (args_array.length) {
- console.log.apply(console, args_array);
- }
- // now run the next command in the queue
- process.nextTick(run);
- });
-}
-
-process.on('exit', (code) => {
- if (!completed && !code) {
- log.error('Completion callback never invoked!');
- errorMessage();
- process.exit(6);
- }
-});
-
-process.on('uncaughtException', (err) => {
- log.error('UNCAUGHT EXCEPTION');
- log.error('stack', err.stack);
- errorMessage();
- process.exit(7);
-});
-
-function errorMessage() {
- // copied from npm's lib/util/error-handler.js
- const os = require('os');
- log.error('System', os.type() + ' ' + os.release());
- log.error('command', process.argv.map(JSON.stringify).join(' '));
- log.error('cwd', process.cwd());
- log.error('node -v', process.version);
- log.error(process.title + ' -v', 'v' + prog.package.version);
-}
-
-// start running the given commands!
-run();
diff --git a/server/node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js b/server/node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js
deleted file mode 100644
index dc18e74..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js
+++ /dev/null
@@ -1,309 +0,0 @@
-'use strict';
-
-/**
- * Module exports.
- */
-
-module.exports = exports;
-
-/**
- * Module dependencies.
- */
-
-// load mocking control function for accessing s3 via https. the function is a noop always returning
-// false if not mocking.
-exports.mockS3Http = require('./util/s3_setup').get_mockS3Http();
-exports.mockS3Http('on');
-const mocking = exports.mockS3Http('get');
-
-
-const fs = require('fs');
-const path = require('path');
-const nopt = require('nopt');
-const log = require('npmlog');
-log.disableProgress();
-const napi = require('./util/napi.js');
-
-const EE = require('events').EventEmitter;
-const inherits = require('util').inherits;
-const cli_commands = [
- 'clean',
- 'install',
- 'reinstall',
- 'build',
- 'rebuild',
- 'package',
- 'testpackage',
- 'publish',
- 'unpublish',
- 'info',
- 'testbinary',
- 'reveal',
- 'configure'
-];
-const aliases = {};
-
-// differentiate node-pre-gyp's logs from npm's
-log.heading = 'node-pre-gyp';
-
-if (mocking) {
- log.warn(`mocking s3 to ${process.env.node_pre_gyp_mock_s3}`);
-}
-
-// this is a getter to avoid circular reference warnings with node v14.
-Object.defineProperty(exports, 'find', {
- get: function() {
- return require('./pre-binding').find;
- },
- enumerable: true
-});
-
-// in the following, "my_module" is using node-pre-gyp to
-// prebuild and install pre-built binaries. "main_module"
-// is using "my_module".
-//
-// "bin/node-pre-gyp" invokes Run() without a path. the
-// expectation is that the working directory is the package
-// root "my_module". this is true because in all cases npm is
-// executing a script in the context of "my_module".
-//
-// "pre-binding.find()" is executed by "my_module" but in the
-// context of "main_module". this is because "main_module" is
-// executing and requires "my_module" which is then executing
-// "pre-binding.find()" via "node-pre-gyp.find()", so the working
-// directory is that of "main_module".
-//
-// that's why "find()" must pass the path to package.json.
-//
-function Run({ package_json_path = './package.json', argv }) {
- this.package_json_path = package_json_path;
- this.commands = {};
-
- const self = this;
- cli_commands.forEach((command) => {
- self.commands[command] = function(argvx, callback) {
- log.verbose('command', command, argvx);
- return require('./' + command)(self, argvx, callback);
- };
- });
-
- this.parseArgv(argv);
-
- // this is set to true after the binary.host property was set to
- // either staging_host or production_host.
- this.binaryHostSet = false;
-}
-inherits(Run, EE);
-exports.Run = Run;
-const proto = Run.prototype;
-
-/**
- * Export the contents of the package.json.
- */
-
-proto.package = require('../package.json');
-
-/**
- * nopt configuration definitions
- */
-
-proto.configDefs = {
- help: Boolean, // everywhere
- arch: String, // 'configure'
- debug: Boolean, // 'build'
- directory: String, // bin
- proxy: String, // 'install'
- loglevel: String // everywhere
-};
-
-/**
- * nopt shorthands
- */
-
-proto.shorthands = {
- release: '--no-debug',
- C: '--directory',
- debug: '--debug',
- j: '--jobs',
- silent: '--loglevel=silent',
- silly: '--loglevel=silly',
- verbose: '--loglevel=verbose'
-};
-
-/**
- * expose the command aliases for the bin file to use.
- */
-
-proto.aliases = aliases;
-
-/**
- * Parses the given argv array and sets the 'opts', 'argv',
- * 'command', and 'package_json' properties.
- */
-
-proto.parseArgv = function parseOpts(argv) {
- this.opts = nopt(this.configDefs, this.shorthands, argv);
- this.argv = this.opts.argv.remain.slice();
- const commands = this.todo = [];
-
- // create a copy of the argv array with aliases mapped
- argv = this.argv.map((arg) => {
- // is this an alias?
- if (arg in this.aliases) {
- arg = this.aliases[arg];
- }
- return arg;
- });
-
- // process the mapped args into "command" objects ("name" and "args" props)
- argv.slice().forEach((arg) => {
- if (arg in this.commands) {
- const args = argv.splice(0, argv.indexOf(arg));
- argv.shift();
- if (commands.length > 0) {
- commands[commands.length - 1].args = args;
- }
- commands.push({ name: arg, args: [] });
- }
- });
- if (commands.length > 0) {
- commands[commands.length - 1].args = argv.splice(0);
- }
-
-
- // if a directory was specified package.json is assumed to be relative
- // to it.
- let package_json_path = this.package_json_path;
- if (this.opts.directory) {
- package_json_path = path.join(this.opts.directory, package_json_path);
- }
-
- this.package_json = JSON.parse(fs.readFileSync(package_json_path));
-
- // expand commands entries for multiple napi builds
- this.todo = napi.expand_commands(this.package_json, this.opts, commands);
-
- // support for inheriting config env variables from npm
- const npm_config_prefix = 'npm_config_';
- Object.keys(process.env).forEach((name) => {
- if (name.indexOf(npm_config_prefix) !== 0) return;
- const val = process.env[name];
- if (name === npm_config_prefix + 'loglevel') {
- log.level = val;
- } else {
- // add the user-defined options to the config
- name = name.substring(npm_config_prefix.length);
- // avoid npm argv clobber already present args
- // which avoids problem of 'npm test' calling
- // script that runs unique npm install commands
- if (name === 'argv') {
- if (this.opts.argv &&
- this.opts.argv.remain &&
- this.opts.argv.remain.length) {
- // do nothing
- } else {
- this.opts[name] = val;
- }
- } else {
- this.opts[name] = val;
- }
- }
- });
-
- if (this.opts.loglevel) {
- log.level = this.opts.loglevel;
- }
- log.resume();
-};
-
-/**
- * allow the binary.host property to be set at execution time.
- *
- * for this to take effect requires all the following to be true.
- * - binary is a property in package.json
- * - binary.host is falsey
- * - binary.staging_host is not empty
- * - binary.production_host is not empty
- *
- * if any of the previous checks fail then the function returns an empty string
- * and makes no changes to package.json's binary property.
- *
- *
- * if command is "publish" then the default is set to "binary.staging_host"
- * if command is not "publish" the the default is set to "binary.production_host"
- *
- * if the command-line option '--s3_host' is set to "staging" or "production" then
- * "binary.host" is set to the specified "staging_host" or "production_host". if
- * '--s3_host' is any other value an exception is thrown.
- *
- * if '--s3_host' is not present then "binary.host" is set to the default as above.
- *
- * this strategy was chosen so that any command other than "publish" or "unpublish" uses "production"
- * as the default without requiring any command-line options but that "publish" and "unpublish" require
- * '--s3_host production_host' to be specified in order to *really* publish (or unpublish). publishing
- * to staging can be done freely without worrying about disturbing any production releases.
- */
-proto.setBinaryHostProperty = function(command) {
- if (this.binaryHostSet) {
- return this.package_json.binary.host;
- }
- const p = this.package_json;
- // don't set anything if host is present. it must be left blank to trigger this.
- if (!p || !p.binary || p.binary.host) {
- return '';
- }
- // and both staging and production must be present. errors will be reported later.
- if (!p.binary.staging_host || !p.binary.production_host) {
- return '';
- }
- let target = 'production_host';
- if (command === 'publish' || command === 'unpublish') {
- target = 'staging_host';
- }
- // the environment variable has priority over the default or the command line. if
- // either the env var or the command line option are invalid throw an error.
- const npg_s3_host = process.env.node_pre_gyp_s3_host;
- if (npg_s3_host === 'staging' || npg_s3_host === 'production') {
- target = `${npg_s3_host}_host`;
- } else if (this.opts['s3_host'] === 'staging' || this.opts['s3_host'] === 'production') {
- target = `${this.opts['s3_host']}_host`;
- } else if (this.opts['s3_host'] || npg_s3_host) {
- throw new Error(`invalid s3_host ${this.opts['s3_host'] || npg_s3_host}`);
- }
-
- p.binary.host = p.binary[target];
- this.binaryHostSet = true;
-
- return p.binary.host;
-};
-
-/**
- * Returns the usage instructions for node-pre-gyp.
- */
-
-proto.usage = function usage() {
- const str = [
- '',
- ' Usage: node-pre-gyp [options]',
- '',
- ' where is one of:',
- cli_commands.map((c) => {
- return ' - ' + c + ' - ' + require('./' + c).usage;
- }).join('\n'),
- '',
- 'node-pre-gyp@' + this.version + ' ' + path.resolve(__dirname, '..'),
- 'node@' + process.versions.node
- ].join('\n');
- return str;
-};
-
-/**
- * Version number getter.
- */
-
-Object.defineProperty(proto, 'version', {
- get: function() {
- return this.package.version;
- },
- enumerable: true
-});
diff --git a/server/node_modules/@mapbox/node-pre-gyp/lib/package.js b/server/node_modules/@mapbox/node-pre-gyp/lib/package.js
deleted file mode 100644
index 0734984..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/lib/package.js
+++ /dev/null
@@ -1,73 +0,0 @@
-'use strict';
-
-module.exports = exports = _package;
-
-exports.usage = 'Packs binary (and enclosing directory) into locally staged tarball';
-
-const fs = require('fs');
-const path = require('path');
-const log = require('npmlog');
-const versioning = require('./util/versioning.js');
-const napi = require('./util/napi.js');
-const existsAsync = fs.exists || path.exists;
-const makeDir = require('make-dir');
-const tar = require('tar');
-
-function readdirSync(dir) {
- let list = [];
- const files = fs.readdirSync(dir);
-
- files.forEach((file) => {
- const stats = fs.lstatSync(path.join(dir, file));
- if (stats.isDirectory()) {
- list = list.concat(readdirSync(path.join(dir, file)));
- } else {
- list.push(path.join(dir, file));
- }
- });
- return list;
-}
-
-function _package(gyp, argv, callback) {
- const package_json = gyp.package_json;
- const napi_build_version = napi.get_napi_build_version_from_command_args(argv);
- const opts = versioning.evaluate(package_json, gyp.opts, napi_build_version);
- const from = opts.module_path;
- const binary_module = path.join(from, opts.module_name + '.node');
- existsAsync(binary_module, (found) => {
- if (!found) {
- return callback(new Error('Cannot package because ' + binary_module + ' missing: run `node-pre-gyp rebuild` first'));
- }
- const tarball = opts.staged_tarball;
- const filter_func = function(entry) {
- const basename = path.basename(entry);
- if (basename.length && basename[0] !== '.') {
- console.log('packing ' + entry);
- return true;
- } else {
- console.log('skipping ' + entry);
- }
- return false;
- };
- makeDir(path.dirname(tarball)).then(() => {
- let files = readdirSync(from);
- const base = path.basename(from);
- files = files.map((file) => {
- return path.join(base, path.relative(from, file));
- });
- tar.create({
- portable: false,
- gzip: true,
- filter: filter_func,
- file: tarball,
- cwd: path.dirname(from)
- }, files, (err2) => {
- if (err2) console.error('[' + package_json.name + '] ' + err2.message);
- else log.info('package', 'Binary staged at "' + tarball + '"');
- return callback(err2);
- });
- }).catch((err) => {
- return callback(err);
- });
- });
-}
diff --git a/server/node_modules/@mapbox/node-pre-gyp/lib/pre-binding.js b/server/node_modules/@mapbox/node-pre-gyp/lib/pre-binding.js
deleted file mode 100644
index e110fe3..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/lib/pre-binding.js
+++ /dev/null
@@ -1,34 +0,0 @@
-'use strict';
-
-const npg = require('..');
-const versioning = require('../lib/util/versioning.js');
-const napi = require('../lib/util/napi.js');
-const existsSync = require('fs').existsSync || require('path').existsSync;
-const path = require('path');
-
-module.exports = exports;
-
-exports.usage = 'Finds the require path for the node-pre-gyp installed module';
-
-exports.validate = function(package_json, opts) {
- versioning.validate_config(package_json, opts);
-};
-
-exports.find = function(package_json_path, opts) {
- if (!existsSync(package_json_path)) {
- throw new Error(package_json_path + 'does not exist');
- }
- const prog = new npg.Run({ package_json_path, argv: process.argv });
- prog.setBinaryHostProperty();
- const package_json = prog.package_json;
-
- versioning.validate_config(package_json, opts);
- let napi_build_version;
- if (napi.get_napi_build_versions(package_json, opts)) {
- napi_build_version = napi.get_best_napi_build_version(package_json, opts);
- }
- opts = opts || {};
- if (!opts.module_root) opts.module_root = path.dirname(package_json_path);
- const meta = versioning.evaluate(package_json, opts, napi_build_version);
- return meta.module;
-};
diff --git a/server/node_modules/@mapbox/node-pre-gyp/lib/publish.js b/server/node_modules/@mapbox/node-pre-gyp/lib/publish.js
deleted file mode 100644
index 8367b15..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/lib/publish.js
+++ /dev/null
@@ -1,81 +0,0 @@
-'use strict';
-
-module.exports = exports = publish;
-
-exports.usage = 'Publishes pre-built binary (requires aws-sdk)';
-
-const fs = require('fs');
-const path = require('path');
-const log = require('npmlog');
-const versioning = require('./util/versioning.js');
-const napi = require('./util/napi.js');
-const s3_setup = require('./util/s3_setup.js');
-const existsAsync = fs.exists || path.exists;
-const url = require('url');
-
-function publish(gyp, argv, callback) {
- const package_json = gyp.package_json;
- const napi_build_version = napi.get_napi_build_version_from_command_args(argv);
- const opts = versioning.evaluate(package_json, gyp.opts, napi_build_version);
- const tarball = opts.staged_tarball;
- existsAsync(tarball, (found) => {
- if (!found) {
- return callback(new Error('Cannot publish because ' + tarball + ' missing: run `node-pre-gyp package` first'));
- }
-
- log.info('publish', 'Detecting s3 credentials');
- const config = {};
- s3_setup.detect(opts, config);
- const s3 = s3_setup.get_s3(config);
-
- const key_name = url.resolve(config.prefix, opts.package_name);
- const s3_opts = {
- Bucket: config.bucket,
- Key: key_name
- };
- log.info('publish', 'Authenticating with s3');
- log.info('publish', config);
-
- log.info('publish', 'Checking for existing binary at ' + opts.hosted_path);
- s3.headObject(s3_opts, (err, meta) => {
- if (meta) log.info('publish', JSON.stringify(meta));
- if (err && err.code === 'NotFound') {
- // we are safe to publish because
- // the object does not already exist
- log.info('publish', 'Preparing to put object');
- const s3_put_opts = {
- ACL: 'public-read',
- Body: fs.createReadStream(tarball),
- Key: key_name,
- Bucket: config.bucket
- };
- log.info('publish', 'Putting object', s3_put_opts.ACL, s3_put_opts.Bucket, s3_put_opts.Key);
- try {
- s3.putObject(s3_put_opts, (err2, resp) => {
- log.info('publish', 'returned from putting object');
- if (err2) {
- log.info('publish', 's3 putObject error: "' + err2 + '"');
- return callback(err2);
- }
- if (resp) log.info('publish', 's3 putObject response: "' + JSON.stringify(resp) + '"');
- log.info('publish', 'successfully put object');
- console.log('[' + package_json.name + '] published to ' + opts.hosted_path);
- return callback();
- });
- } catch (err3) {
- log.info('publish', 's3 putObject error: "' + err3 + '"');
- return callback(err3);
- }
- } else if (err) {
- log.info('publish', 's3 headObject error: "' + err + '"');
- return callback(err);
- } else {
- log.error('publish', 'Cannot publish over existing version');
- log.error('publish', "Update the 'version' field in package.json and try again");
- log.error('publish', 'If the previous version was published in error see:');
- log.error('publish', '\t node-pre-gyp unpublish');
- return callback(new Error('Failed publishing to ' + opts.hosted_path));
- }
- });
- });
-}
diff --git a/server/node_modules/@mapbox/node-pre-gyp/lib/rebuild.js b/server/node_modules/@mapbox/node-pre-gyp/lib/rebuild.js
deleted file mode 100644
index 31510fb..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/lib/rebuild.js
+++ /dev/null
@@ -1,20 +0,0 @@
-'use strict';
-
-module.exports = exports = rebuild;
-
-exports.usage = 'Runs "clean" and "build" at once';
-
-const napi = require('./util/napi.js');
-
-function rebuild(gyp, argv, callback) {
- const package_json = gyp.package_json;
- let commands = [
- { name: 'clean', args: [] },
- { name: 'build', args: ['rebuild'] }
- ];
- commands = napi.expand_commands(package_json, gyp.opts, commands);
- for (let i = commands.length; i !== 0; i--) {
- gyp.todo.unshift(commands[i - 1]);
- }
- process.nextTick(callback);
-}
diff --git a/server/node_modules/@mapbox/node-pre-gyp/lib/reinstall.js b/server/node_modules/@mapbox/node-pre-gyp/lib/reinstall.js
deleted file mode 100644
index a29b5c9..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/lib/reinstall.js
+++ /dev/null
@@ -1,19 +0,0 @@
-'use strict';
-
-module.exports = exports = rebuild;
-
-exports.usage = 'Runs "clean" and "install" at once';
-
-const napi = require('./util/napi.js');
-
-function rebuild(gyp, argv, callback) {
- const package_json = gyp.package_json;
- let installArgs = [];
- const napi_build_version = napi.get_best_napi_build_version(package_json, gyp.opts);
- if (napi_build_version != null) installArgs = [napi.get_command_arg(napi_build_version)];
- gyp.todo.unshift(
- { name: 'clean', args: [] },
- { name: 'install', args: installArgs }
- );
- process.nextTick(callback);
-}
diff --git a/server/node_modules/@mapbox/node-pre-gyp/lib/reveal.js b/server/node_modules/@mapbox/node-pre-gyp/lib/reveal.js
deleted file mode 100644
index 7255e5f..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/lib/reveal.js
+++ /dev/null
@@ -1,32 +0,0 @@
-'use strict';
-
-module.exports = exports = reveal;
-
-exports.usage = 'Reveals data on the versioned binary';
-
-const versioning = require('./util/versioning.js');
-const napi = require('./util/napi.js');
-
-function unix_paths(key, val) {
- return val && val.replace ? val.replace(/\\/g, '/') : val;
-}
-
-function reveal(gyp, argv, callback) {
- const package_json = gyp.package_json;
- const napi_build_version = napi.get_napi_build_version_from_command_args(argv);
- const opts = versioning.evaluate(package_json, gyp.opts, napi_build_version);
- let hit = false;
- // if a second arg is passed look to see
- // if it is a known option
- // console.log(JSON.stringify(gyp.opts,null,1))
- const remain = gyp.opts.argv.remain[gyp.opts.argv.remain.length - 1];
- if (remain && Object.hasOwnProperty.call(opts, remain)) {
- console.log(opts[remain].replace(/\\/g, '/'));
- hit = true;
- }
- // otherwise return all options as json
- if (!hit) {
- console.log(JSON.stringify(opts, unix_paths, 2));
- }
- return callback();
-}
diff --git a/server/node_modules/@mapbox/node-pre-gyp/lib/testbinary.js b/server/node_modules/@mapbox/node-pre-gyp/lib/testbinary.js
deleted file mode 100644
index 429cb13..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/lib/testbinary.js
+++ /dev/null
@@ -1,79 +0,0 @@
-'use strict';
-
-module.exports = exports = testbinary;
-
-exports.usage = 'Tests that the binary.node can be required';
-
-const path = require('path');
-const log = require('npmlog');
-const cp = require('child_process');
-const versioning = require('./util/versioning.js');
-const napi = require('./util/napi.js');
-
-function testbinary(gyp, argv, callback) {
- const args = [];
- const options = {};
- let shell_cmd = process.execPath;
- const package_json = gyp.package_json;
- const napi_build_version = napi.get_napi_build_version_from_command_args(argv);
- const opts = versioning.evaluate(package_json, gyp.opts, napi_build_version);
- // skip validation for runtimes we don't explicitly support (like electron)
- if (opts.runtime &&
- opts.runtime !== 'node-webkit' &&
- opts.runtime !== 'node') {
- return callback();
- }
- const nw = (opts.runtime && opts.runtime === 'node-webkit');
- // ensure on windows that / are used for require path
- const binary_module = opts.module.replace(/\\/g, '/');
- if ((process.arch !== opts.target_arch) ||
- (process.platform !== opts.target_platform)) {
- let msg = 'skipping validation since host platform/arch (';
- msg += process.platform + '/' + process.arch + ')';
- msg += ' does not match target (';
- msg += opts.target_platform + '/' + opts.target_arch + ')';
- log.info('validate', msg);
- return callback();
- }
- if (nw) {
- options.timeout = 5000;
- if (process.platform === 'darwin') {
- shell_cmd = 'node-webkit';
- } else if (process.platform === 'win32') {
- shell_cmd = 'nw.exe';
- } else {
- shell_cmd = 'nw';
- }
- const modulePath = path.resolve(binary_module);
- const appDir = path.join(__dirname, 'util', 'nw-pre-gyp');
- args.push(appDir);
- args.push(modulePath);
- log.info('validate', "Running test command: '" + shell_cmd + ' ' + args.join(' ') + "'");
- cp.execFile(shell_cmd, args, options, (err, stdout, stderr) => {
- // check for normal timeout for node-webkit
- if (err) {
- if (err.killed === true && err.signal && err.signal.indexOf('SIG') > -1) {
- return callback();
- }
- const stderrLog = stderr.toString();
- log.info('stderr', stderrLog);
- if (/^\s*Xlib:\s*extension\s*"RANDR"\s*missing\s*on\s*display\s*":\d+\.\d+"\.\s*$/.test(stderrLog)) {
- log.info('RANDR', 'stderr contains only RANDR error, ignored');
- return callback();
- }
- return callback(err);
- }
- return callback();
- });
- return;
- }
- args.push('--eval');
- args.push("require('" + binary_module.replace(/'/g, '\'') + "')");
- log.info('validate', "Running test command: '" + shell_cmd + ' ' + args.join(' ') + "'");
- cp.execFile(shell_cmd, args, options, (err, stdout, stderr) => {
- if (err) {
- return callback(err, { stdout: stdout, stderr: stderr });
- }
- return callback();
- });
-}
diff --git a/server/node_modules/@mapbox/node-pre-gyp/lib/testpackage.js b/server/node_modules/@mapbox/node-pre-gyp/lib/testpackage.js
deleted file mode 100644
index fab1911..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/lib/testpackage.js
+++ /dev/null
@@ -1,53 +0,0 @@
-'use strict';
-
-module.exports = exports = testpackage;
-
-exports.usage = 'Tests that the staged package is valid';
-
-const fs = require('fs');
-const path = require('path');
-const log = require('npmlog');
-const existsAsync = fs.exists || path.exists;
-const versioning = require('./util/versioning.js');
-const napi = require('./util/napi.js');
-const testbinary = require('./testbinary.js');
-const tar = require('tar');
-const makeDir = require('make-dir');
-
-function testpackage(gyp, argv, callback) {
- const package_json = gyp.package_json;
- const napi_build_version = napi.get_napi_build_version_from_command_args(argv);
- const opts = versioning.evaluate(package_json, gyp.opts, napi_build_version);
- const tarball = opts.staged_tarball;
- existsAsync(tarball, (found) => {
- if (!found) {
- return callback(new Error('Cannot test package because ' + tarball + ' missing: run `node-pre-gyp package` first'));
- }
- const to = opts.module_path;
- function filter_func(entry) {
- log.info('install', 'unpacking [' + entry.path + ']');
- }
-
- makeDir(to).then(() => {
- tar.extract({
- file: tarball,
- cwd: to,
- strip: 1,
- onentry: filter_func
- }).then(after_extract, callback);
- }).catch((err) => {
- return callback(err);
- });
-
- function after_extract() {
- testbinary(gyp, argv, (err) => {
- if (err) {
- return callback(err);
- } else {
- console.log('[' + package_json.name + '] Package appears valid');
- return callback();
- }
- });
- }
- });
-}
diff --git a/server/node_modules/@mapbox/node-pre-gyp/lib/unpublish.js b/server/node_modules/@mapbox/node-pre-gyp/lib/unpublish.js
deleted file mode 100644
index 12c9f56..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/lib/unpublish.js
+++ /dev/null
@@ -1,41 +0,0 @@
-'use strict';
-
-module.exports = exports = unpublish;
-
-exports.usage = 'Unpublishes pre-built binary (requires aws-sdk)';
-
-const log = require('npmlog');
-const versioning = require('./util/versioning.js');
-const napi = require('./util/napi.js');
-const s3_setup = require('./util/s3_setup.js');
-const url = require('url');
-
-function unpublish(gyp, argv, callback) {
- const package_json = gyp.package_json;
- const napi_build_version = napi.get_napi_build_version_from_command_args(argv);
- const opts = versioning.evaluate(package_json, gyp.opts, napi_build_version);
- const config = {};
- s3_setup.detect(opts, config);
- const s3 = s3_setup.get_s3(config);
- const key_name = url.resolve(config.prefix, opts.package_name);
- const s3_opts = {
- Bucket: config.bucket,
- Key: key_name
- };
- s3.headObject(s3_opts, (err, meta) => {
- if (err && err.code === 'NotFound') {
- console.log('[' + package_json.name + '] Not found: https://' + s3_opts.Bucket + '.s3.amazonaws.com/' + s3_opts.Key);
- return callback();
- } else if (err) {
- return callback(err);
- } else {
- log.info('unpublish', JSON.stringify(meta));
- s3.deleteObject(s3_opts, (err2, resp) => {
- if (err2) return callback(err2);
- log.info(JSON.stringify(resp));
- console.log('[' + package_json.name + '] Success: removed https://' + s3_opts.Bucket + '.s3.amazonaws.com/' + s3_opts.Key);
- return callback();
- });
- }
- });
-}
diff --git a/server/node_modules/@mapbox/node-pre-gyp/lib/util/abi_crosswalk.json b/server/node_modules/@mapbox/node-pre-gyp/lib/util/abi_crosswalk.json
deleted file mode 100644
index 7f52972..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/lib/util/abi_crosswalk.json
+++ /dev/null
@@ -1,2602 +0,0 @@
-{
- "0.1.14": {
- "node_abi": null,
- "v8": "1.3"
- },
- "0.1.15": {
- "node_abi": null,
- "v8": "1.3"
- },
- "0.1.16": {
- "node_abi": null,
- "v8": "1.3"
- },
- "0.1.17": {
- "node_abi": null,
- "v8": "1.3"
- },
- "0.1.18": {
- "node_abi": null,
- "v8": "1.3"
- },
- "0.1.19": {
- "node_abi": null,
- "v8": "2.0"
- },
- "0.1.20": {
- "node_abi": null,
- "v8": "2.0"
- },
- "0.1.21": {
- "node_abi": null,
- "v8": "2.0"
- },
- "0.1.22": {
- "node_abi": null,
- "v8": "2.0"
- },
- "0.1.23": {
- "node_abi": null,
- "v8": "2.0"
- },
- "0.1.24": {
- "node_abi": null,
- "v8": "2.0"
- },
- "0.1.25": {
- "node_abi": null,
- "v8": "2.0"
- },
- "0.1.26": {
- "node_abi": null,
- "v8": "2.0"
- },
- "0.1.27": {
- "node_abi": null,
- "v8": "2.1"
- },
- "0.1.28": {
- "node_abi": null,
- "v8": "2.1"
- },
- "0.1.29": {
- "node_abi": null,
- "v8": "2.1"
- },
- "0.1.30": {
- "node_abi": null,
- "v8": "2.1"
- },
- "0.1.31": {
- "node_abi": null,
- "v8": "2.1"
- },
- "0.1.32": {
- "node_abi": null,
- "v8": "2.1"
- },
- "0.1.33": {
- "node_abi": null,
- "v8": "2.1"
- },
- "0.1.90": {
- "node_abi": null,
- "v8": "2.2"
- },
- "0.1.91": {
- "node_abi": null,
- "v8": "2.2"
- },
- "0.1.92": {
- "node_abi": null,
- "v8": "2.2"
- },
- "0.1.93": {
- "node_abi": null,
- "v8": "2.2"
- },
- "0.1.94": {
- "node_abi": null,
- "v8": "2.2"
- },
- "0.1.95": {
- "node_abi": null,
- "v8": "2.2"
- },
- "0.1.96": {
- "node_abi": null,
- "v8": "2.2"
- },
- "0.1.97": {
- "node_abi": null,
- "v8": "2.2"
- },
- "0.1.98": {
- "node_abi": null,
- "v8": "2.2"
- },
- "0.1.99": {
- "node_abi": null,
- "v8": "2.2"
- },
- "0.1.100": {
- "node_abi": null,
- "v8": "2.2"
- },
- "0.1.101": {
- "node_abi": null,
- "v8": "2.3"
- },
- "0.1.102": {
- "node_abi": null,
- "v8": "2.3"
- },
- "0.1.103": {
- "node_abi": null,
- "v8": "2.3"
- },
- "0.1.104": {
- "node_abi": null,
- "v8": "2.3"
- },
- "0.2.0": {
- "node_abi": 1,
- "v8": "2.3"
- },
- "0.2.1": {
- "node_abi": 1,
- "v8": "2.3"
- },
- "0.2.2": {
- "node_abi": 1,
- "v8": "2.3"
- },
- "0.2.3": {
- "node_abi": 1,
- "v8": "2.3"
- },
- "0.2.4": {
- "node_abi": 1,
- "v8": "2.3"
- },
- "0.2.5": {
- "node_abi": 1,
- "v8": "2.3"
- },
- "0.2.6": {
- "node_abi": 1,
- "v8": "2.3"
- },
- "0.3.0": {
- "node_abi": 1,
- "v8": "2.5"
- },
- "0.3.1": {
- "node_abi": 1,
- "v8": "2.5"
- },
- "0.3.2": {
- "node_abi": 1,
- "v8": "3.0"
- },
- "0.3.3": {
- "node_abi": 1,
- "v8": "3.0"
- },
- "0.3.4": {
- "node_abi": 1,
- "v8": "3.0"
- },
- "0.3.5": {
- "node_abi": 1,
- "v8": "3.0"
- },
- "0.3.6": {
- "node_abi": 1,
- "v8": "3.0"
- },
- "0.3.7": {
- "node_abi": 1,
- "v8": "3.0"
- },
- "0.3.8": {
- "node_abi": 1,
- "v8": "3.1"
- },
- "0.4.0": {
- "node_abi": 1,
- "v8": "3.1"
- },
- "0.4.1": {
- "node_abi": 1,
- "v8": "3.1"
- },
- "0.4.2": {
- "node_abi": 1,
- "v8": "3.1"
- },
- "0.4.3": {
- "node_abi": 1,
- "v8": "3.1"
- },
- "0.4.4": {
- "node_abi": 1,
- "v8": "3.1"
- },
- "0.4.5": {
- "node_abi": 1,
- "v8": "3.1"
- },
- "0.4.6": {
- "node_abi": 1,
- "v8": "3.1"
- },
- "0.4.7": {
- "node_abi": 1,
- "v8": "3.1"
- },
- "0.4.8": {
- "node_abi": 1,
- "v8": "3.1"
- },
- "0.4.9": {
- "node_abi": 1,
- "v8": "3.1"
- },
- "0.4.10": {
- "node_abi": 1,
- "v8": "3.1"
- },
- "0.4.11": {
- "node_abi": 1,
- "v8": "3.1"
- },
- "0.4.12": {
- "node_abi": 1,
- "v8": "3.1"
- },
- "0.5.0": {
- "node_abi": 1,
- "v8": "3.1"
- },
- "0.5.1": {
- "node_abi": 1,
- "v8": "3.4"
- },
- "0.5.2": {
- "node_abi": 1,
- "v8": "3.4"
- },
- "0.5.3": {
- "node_abi": 1,
- "v8": "3.4"
- },
- "0.5.4": {
- "node_abi": 1,
- "v8": "3.5"
- },
- "0.5.5": {
- "node_abi": 1,
- "v8": "3.5"
- },
- "0.5.6": {
- "node_abi": 1,
- "v8": "3.6"
- },
- "0.5.7": {
- "node_abi": 1,
- "v8": "3.6"
- },
- "0.5.8": {
- "node_abi": 1,
- "v8": "3.6"
- },
- "0.5.9": {
- "node_abi": 1,
- "v8": "3.6"
- },
- "0.5.10": {
- "node_abi": 1,
- "v8": "3.7"
- },
- "0.6.0": {
- "node_abi": 1,
- "v8": "3.6"
- },
- "0.6.1": {
- "node_abi": 1,
- "v8": "3.6"
- },
- "0.6.2": {
- "node_abi": 1,
- "v8": "3.6"
- },
- "0.6.3": {
- "node_abi": 1,
- "v8": "3.6"
- },
- "0.6.4": {
- "node_abi": 1,
- "v8": "3.6"
- },
- "0.6.5": {
- "node_abi": 1,
- "v8": "3.6"
- },
- "0.6.6": {
- "node_abi": 1,
- "v8": "3.6"
- },
- "0.6.7": {
- "node_abi": 1,
- "v8": "3.6"
- },
- "0.6.8": {
- "node_abi": 1,
- "v8": "3.6"
- },
- "0.6.9": {
- "node_abi": 1,
- "v8": "3.6"
- },
- "0.6.10": {
- "node_abi": 1,
- "v8": "3.6"
- },
- "0.6.11": {
- "node_abi": 1,
- "v8": "3.6"
- },
- "0.6.12": {
- "node_abi": 1,
- "v8": "3.6"
- },
- "0.6.13": {
- "node_abi": 1,
- "v8": "3.6"
- },
- "0.6.14": {
- "node_abi": 1,
- "v8": "3.6"
- },
- "0.6.15": {
- "node_abi": 1,
- "v8": "3.6"
- },
- "0.6.16": {
- "node_abi": 1,
- "v8": "3.6"
- },
- "0.6.17": {
- "node_abi": 1,
- "v8": "3.6"
- },
- "0.6.18": {
- "node_abi": 1,
- "v8": "3.6"
- },
- "0.6.19": {
- "node_abi": 1,
- "v8": "3.6"
- },
- "0.6.20": {
- "node_abi": 1,
- "v8": "3.6"
- },
- "0.6.21": {
- "node_abi": 1,
- "v8": "3.6"
- },
- "0.7.0": {
- "node_abi": 1,
- "v8": "3.8"
- },
- "0.7.1": {
- "node_abi": 1,
- "v8": "3.8"
- },
- "0.7.2": {
- "node_abi": 1,
- "v8": "3.8"
- },
- "0.7.3": {
- "node_abi": 1,
- "v8": "3.9"
- },
- "0.7.4": {
- "node_abi": 1,
- "v8": "3.9"
- },
- "0.7.5": {
- "node_abi": 1,
- "v8": "3.9"
- },
- "0.7.6": {
- "node_abi": 1,
- "v8": "3.9"
- },
- "0.7.7": {
- "node_abi": 1,
- "v8": "3.9"
- },
- "0.7.8": {
- "node_abi": 1,
- "v8": "3.9"
- },
- "0.7.9": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.7.10": {
- "node_abi": 1,
- "v8": "3.9"
- },
- "0.7.11": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.7.12": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.8.0": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.8.1": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.8.2": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.8.3": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.8.4": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.8.5": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.8.6": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.8.7": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.8.8": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.8.9": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.8.10": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.8.11": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.8.12": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.8.13": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.8.14": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.8.15": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.8.16": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.8.17": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.8.18": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.8.19": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.8.20": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.8.21": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.8.22": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.8.23": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.8.24": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.8.25": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.8.26": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.8.27": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.8.28": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.9.0": {
- "node_abi": 1,
- "v8": "3.11"
- },
- "0.9.1": {
- "node_abi": 10,
- "v8": "3.11"
- },
- "0.9.2": {
- "node_abi": 10,
- "v8": "3.11"
- },
- "0.9.3": {
- "node_abi": 10,
- "v8": "3.13"
- },
- "0.9.4": {
- "node_abi": 10,
- "v8": "3.13"
- },
- "0.9.5": {
- "node_abi": 10,
- "v8": "3.13"
- },
- "0.9.6": {
- "node_abi": 10,
- "v8": "3.15"
- },
- "0.9.7": {
- "node_abi": 10,
- "v8": "3.15"
- },
- "0.9.8": {
- "node_abi": 10,
- "v8": "3.15"
- },
- "0.9.9": {
- "node_abi": 11,
- "v8": "3.15"
- },
- "0.9.10": {
- "node_abi": 11,
- "v8": "3.15"
- },
- "0.9.11": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.9.12": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.0": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.1": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.2": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.3": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.4": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.5": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.6": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.7": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.8": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.9": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.10": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.11": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.12": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.13": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.14": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.15": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.16": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.17": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.18": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.19": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.20": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.21": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.22": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.23": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.24": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.25": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.26": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.27": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.28": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.29": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.30": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.31": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.32": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.33": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.34": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.35": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.36": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.37": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.38": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.39": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.40": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.41": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.42": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.43": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.44": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.45": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.46": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.47": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.10.48": {
- "node_abi": 11,
- "v8": "3.14"
- },
- "0.11.0": {
- "node_abi": 12,
- "v8": "3.17"
- },
- "0.11.1": {
- "node_abi": 12,
- "v8": "3.18"
- },
- "0.11.2": {
- "node_abi": 12,
- "v8": "3.19"
- },
- "0.11.3": {
- "node_abi": 12,
- "v8": "3.19"
- },
- "0.11.4": {
- "node_abi": 12,
- "v8": "3.20"
- },
- "0.11.5": {
- "node_abi": 12,
- "v8": "3.20"
- },
- "0.11.6": {
- "node_abi": 12,
- "v8": "3.20"
- },
- "0.11.7": {
- "node_abi": 12,
- "v8": "3.20"
- },
- "0.11.8": {
- "node_abi": 13,
- "v8": "3.21"
- },
- "0.11.9": {
- "node_abi": 13,
- "v8": "3.22"
- },
- "0.11.10": {
- "node_abi": 13,
- "v8": "3.22"
- },
- "0.11.11": {
- "node_abi": 14,
- "v8": "3.22"
- },
- "0.11.12": {
- "node_abi": 14,
- "v8": "3.22"
- },
- "0.11.13": {
- "node_abi": 14,
- "v8": "3.25"
- },
- "0.11.14": {
- "node_abi": 14,
- "v8": "3.26"
- },
- "0.11.15": {
- "node_abi": 14,
- "v8": "3.28"
- },
- "0.11.16": {
- "node_abi": 14,
- "v8": "3.28"
- },
- "0.12.0": {
- "node_abi": 14,
- "v8": "3.28"
- },
- "0.12.1": {
- "node_abi": 14,
- "v8": "3.28"
- },
- "0.12.2": {
- "node_abi": 14,
- "v8": "3.28"
- },
- "0.12.3": {
- "node_abi": 14,
- "v8": "3.28"
- },
- "0.12.4": {
- "node_abi": 14,
- "v8": "3.28"
- },
- "0.12.5": {
- "node_abi": 14,
- "v8": "3.28"
- },
- "0.12.6": {
- "node_abi": 14,
- "v8": "3.28"
- },
- "0.12.7": {
- "node_abi": 14,
- "v8": "3.28"
- },
- "0.12.8": {
- "node_abi": 14,
- "v8": "3.28"
- },
- "0.12.9": {
- "node_abi": 14,
- "v8": "3.28"
- },
- "0.12.10": {
- "node_abi": 14,
- "v8": "3.28"
- },
- "0.12.11": {
- "node_abi": 14,
- "v8": "3.28"
- },
- "0.12.12": {
- "node_abi": 14,
- "v8": "3.28"
- },
- "0.12.13": {
- "node_abi": 14,
- "v8": "3.28"
- },
- "0.12.14": {
- "node_abi": 14,
- "v8": "3.28"
- },
- "0.12.15": {
- "node_abi": 14,
- "v8": "3.28"
- },
- "0.12.16": {
- "node_abi": 14,
- "v8": "3.28"
- },
- "0.12.17": {
- "node_abi": 14,
- "v8": "3.28"
- },
- "0.12.18": {
- "node_abi": 14,
- "v8": "3.28"
- },
- "1.0.0": {
- "node_abi": 42,
- "v8": "3.31"
- },
- "1.0.1": {
- "node_abi": 42,
- "v8": "3.31"
- },
- "1.0.2": {
- "node_abi": 42,
- "v8": "3.31"
- },
- "1.0.3": {
- "node_abi": 42,
- "v8": "4.1"
- },
- "1.0.4": {
- "node_abi": 42,
- "v8": "4.1"
- },
- "1.1.0": {
- "node_abi": 43,
- "v8": "4.1"
- },
- "1.2.0": {
- "node_abi": 43,
- "v8": "4.1"
- },
- "1.3.0": {
- "node_abi": 43,
- "v8": "4.1"
- },
- "1.4.1": {
- "node_abi": 43,
- "v8": "4.1"
- },
- "1.4.2": {
- "node_abi": 43,
- "v8": "4.1"
- },
- "1.4.3": {
- "node_abi": 43,
- "v8": "4.1"
- },
- "1.5.0": {
- "node_abi": 43,
- "v8": "4.1"
- },
- "1.5.1": {
- "node_abi": 43,
- "v8": "4.1"
- },
- "1.6.0": {
- "node_abi": 43,
- "v8": "4.1"
- },
- "1.6.1": {
- "node_abi": 43,
- "v8": "4.1"
- },
- "1.6.2": {
- "node_abi": 43,
- "v8": "4.1"
- },
- "1.6.3": {
- "node_abi": 43,
- "v8": "4.1"
- },
- "1.6.4": {
- "node_abi": 43,
- "v8": "4.1"
- },
- "1.7.1": {
- "node_abi": 43,
- "v8": "4.1"
- },
- "1.8.1": {
- "node_abi": 43,
- "v8": "4.1"
- },
- "1.8.2": {
- "node_abi": 43,
- "v8": "4.1"
- },
- "1.8.3": {
- "node_abi": 43,
- "v8": "4.1"
- },
- "1.8.4": {
- "node_abi": 43,
- "v8": "4.1"
- },
- "2.0.0": {
- "node_abi": 44,
- "v8": "4.2"
- },
- "2.0.1": {
- "node_abi": 44,
- "v8": "4.2"
- },
- "2.0.2": {
- "node_abi": 44,
- "v8": "4.2"
- },
- "2.1.0": {
- "node_abi": 44,
- "v8": "4.2"
- },
- "2.2.0": {
- "node_abi": 44,
- "v8": "4.2"
- },
- "2.2.1": {
- "node_abi": 44,
- "v8": "4.2"
- },
- "2.3.0": {
- "node_abi": 44,
- "v8": "4.2"
- },
- "2.3.1": {
- "node_abi": 44,
- "v8": "4.2"
- },
- "2.3.2": {
- "node_abi": 44,
- "v8": "4.2"
- },
- "2.3.3": {
- "node_abi": 44,
- "v8": "4.2"
- },
- "2.3.4": {
- "node_abi": 44,
- "v8": "4.2"
- },
- "2.4.0": {
- "node_abi": 44,
- "v8": "4.2"
- },
- "2.5.0": {
- "node_abi": 44,
- "v8": "4.2"
- },
- "3.0.0": {
- "node_abi": 45,
- "v8": "4.4"
- },
- "3.1.0": {
- "node_abi": 45,
- "v8": "4.4"
- },
- "3.2.0": {
- "node_abi": 45,
- "v8": "4.4"
- },
- "3.3.0": {
- "node_abi": 45,
- "v8": "4.4"
- },
- "3.3.1": {
- "node_abi": 45,
- "v8": "4.4"
- },
- "4.0.0": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.1.0": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.1.1": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.1.2": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.2.0": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.2.1": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.2.2": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.2.3": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.2.4": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.2.5": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.2.6": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.3.0": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.3.1": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.3.2": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.4.0": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.4.1": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.4.2": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.4.3": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.4.4": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.4.5": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.4.6": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.4.7": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.5.0": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.6.0": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.6.1": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.6.2": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.7.0": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.7.1": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.7.2": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.7.3": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.8.0": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.8.1": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.8.2": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.8.3": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.8.4": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.8.5": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.8.6": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.8.7": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.9.0": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "4.9.1": {
- "node_abi": 46,
- "v8": "4.5"
- },
- "5.0.0": {
- "node_abi": 47,
- "v8": "4.6"
- },
- "5.1.0": {
- "node_abi": 47,
- "v8": "4.6"
- },
- "5.1.1": {
- "node_abi": 47,
- "v8": "4.6"
- },
- "5.2.0": {
- "node_abi": 47,
- "v8": "4.6"
- },
- "5.3.0": {
- "node_abi": 47,
- "v8": "4.6"
- },
- "5.4.0": {
- "node_abi": 47,
- "v8": "4.6"
- },
- "5.4.1": {
- "node_abi": 47,
- "v8": "4.6"
- },
- "5.5.0": {
- "node_abi": 47,
- "v8": "4.6"
- },
- "5.6.0": {
- "node_abi": 47,
- "v8": "4.6"
- },
- "5.7.0": {
- "node_abi": 47,
- "v8": "4.6"
- },
- "5.7.1": {
- "node_abi": 47,
- "v8": "4.6"
- },
- "5.8.0": {
- "node_abi": 47,
- "v8": "4.6"
- },
- "5.9.0": {
- "node_abi": 47,
- "v8": "4.6"
- },
- "5.9.1": {
- "node_abi": 47,
- "v8": "4.6"
- },
- "5.10.0": {
- "node_abi": 47,
- "v8": "4.6"
- },
- "5.10.1": {
- "node_abi": 47,
- "v8": "4.6"
- },
- "5.11.0": {
- "node_abi": 47,
- "v8": "4.6"
- },
- "5.11.1": {
- "node_abi": 47,
- "v8": "4.6"
- },
- "5.12.0": {
- "node_abi": 47,
- "v8": "4.6"
- },
- "6.0.0": {
- "node_abi": 48,
- "v8": "5.0"
- },
- "6.1.0": {
- "node_abi": 48,
- "v8": "5.0"
- },
- "6.2.0": {
- "node_abi": 48,
- "v8": "5.0"
- },
- "6.2.1": {
- "node_abi": 48,
- "v8": "5.0"
- },
- "6.2.2": {
- "node_abi": 48,
- "v8": "5.0"
- },
- "6.3.0": {
- "node_abi": 48,
- "v8": "5.0"
- },
- "6.3.1": {
- "node_abi": 48,
- "v8": "5.0"
- },
- "6.4.0": {
- "node_abi": 48,
- "v8": "5.0"
- },
- "6.5.0": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.6.0": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.7.0": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.8.0": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.8.1": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.9.0": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.9.1": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.9.2": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.9.3": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.9.4": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.9.5": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.10.0": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.10.1": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.10.2": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.10.3": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.11.0": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.11.1": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.11.2": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.11.3": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.11.4": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.11.5": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.12.0": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.12.1": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.12.2": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.12.3": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.13.0": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.13.1": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.14.0": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.14.1": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.14.2": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.14.3": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.14.4": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.15.0": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.15.1": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.16.0": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.17.0": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "6.17.1": {
- "node_abi": 48,
- "v8": "5.1"
- },
- "7.0.0": {
- "node_abi": 51,
- "v8": "5.4"
- },
- "7.1.0": {
- "node_abi": 51,
- "v8": "5.4"
- },
- "7.2.0": {
- "node_abi": 51,
- "v8": "5.4"
- },
- "7.2.1": {
- "node_abi": 51,
- "v8": "5.4"
- },
- "7.3.0": {
- "node_abi": 51,
- "v8": "5.4"
- },
- "7.4.0": {
- "node_abi": 51,
- "v8": "5.4"
- },
- "7.5.0": {
- "node_abi": 51,
- "v8": "5.4"
- },
- "7.6.0": {
- "node_abi": 51,
- "v8": "5.5"
- },
- "7.7.0": {
- "node_abi": 51,
- "v8": "5.5"
- },
- "7.7.1": {
- "node_abi": 51,
- "v8": "5.5"
- },
- "7.7.2": {
- "node_abi": 51,
- "v8": "5.5"
- },
- "7.7.3": {
- "node_abi": 51,
- "v8": "5.5"
- },
- "7.7.4": {
- "node_abi": 51,
- "v8": "5.5"
- },
- "7.8.0": {
- "node_abi": 51,
- "v8": "5.5"
- },
- "7.9.0": {
- "node_abi": 51,
- "v8": "5.5"
- },
- "7.10.0": {
- "node_abi": 51,
- "v8": "5.5"
- },
- "7.10.1": {
- "node_abi": 51,
- "v8": "5.5"
- },
- "8.0.0": {
- "node_abi": 57,
- "v8": "5.8"
- },
- "8.1.0": {
- "node_abi": 57,
- "v8": "5.8"
- },
- "8.1.1": {
- "node_abi": 57,
- "v8": "5.8"
- },
- "8.1.2": {
- "node_abi": 57,
- "v8": "5.8"
- },
- "8.1.3": {
- "node_abi": 57,
- "v8": "5.8"
- },
- "8.1.4": {
- "node_abi": 57,
- "v8": "5.8"
- },
- "8.2.0": {
- "node_abi": 57,
- "v8": "5.8"
- },
- "8.2.1": {
- "node_abi": 57,
- "v8": "5.8"
- },
- "8.3.0": {
- "node_abi": 57,
- "v8": "6.0"
- },
- "8.4.0": {
- "node_abi": 57,
- "v8": "6.0"
- },
- "8.5.0": {
- "node_abi": 57,
- "v8": "6.0"
- },
- "8.6.0": {
- "node_abi": 57,
- "v8": "6.0"
- },
- "8.7.0": {
- "node_abi": 57,
- "v8": "6.1"
- },
- "8.8.0": {
- "node_abi": 57,
- "v8": "6.1"
- },
- "8.8.1": {
- "node_abi": 57,
- "v8": "6.1"
- },
- "8.9.0": {
- "node_abi": 57,
- "v8": "6.1"
- },
- "8.9.1": {
- "node_abi": 57,
- "v8": "6.1"
- },
- "8.9.2": {
- "node_abi": 57,
- "v8": "6.1"
- },
- "8.9.3": {
- "node_abi": 57,
- "v8": "6.1"
- },
- "8.9.4": {
- "node_abi": 57,
- "v8": "6.1"
- },
- "8.10.0": {
- "node_abi": 57,
- "v8": "6.2"
- },
- "8.11.0": {
- "node_abi": 57,
- "v8": "6.2"
- },
- "8.11.1": {
- "node_abi": 57,
- "v8": "6.2"
- },
- "8.11.2": {
- "node_abi": 57,
- "v8": "6.2"
- },
- "8.11.3": {
- "node_abi": 57,
- "v8": "6.2"
- },
- "8.11.4": {
- "node_abi": 57,
- "v8": "6.2"
- },
- "8.12.0": {
- "node_abi": 57,
- "v8": "6.2"
- },
- "8.13.0": {
- "node_abi": 57,
- "v8": "6.2"
- },
- "8.14.0": {
- "node_abi": 57,
- "v8": "6.2"
- },
- "8.14.1": {
- "node_abi": 57,
- "v8": "6.2"
- },
- "8.15.0": {
- "node_abi": 57,
- "v8": "6.2"
- },
- "8.15.1": {
- "node_abi": 57,
- "v8": "6.2"
- },
- "8.16.0": {
- "node_abi": 57,
- "v8": "6.2"
- },
- "8.16.1": {
- "node_abi": 57,
- "v8": "6.2"
- },
- "8.16.2": {
- "node_abi": 57,
- "v8": "6.2"
- },
- "8.17.0": {
- "node_abi": 57,
- "v8": "6.2"
- },
- "9.0.0": {
- "node_abi": 59,
- "v8": "6.2"
- },
- "9.1.0": {
- "node_abi": 59,
- "v8": "6.2"
- },
- "9.2.0": {
- "node_abi": 59,
- "v8": "6.2"
- },
- "9.2.1": {
- "node_abi": 59,
- "v8": "6.2"
- },
- "9.3.0": {
- "node_abi": 59,
- "v8": "6.2"
- },
- "9.4.0": {
- "node_abi": 59,
- "v8": "6.2"
- },
- "9.5.0": {
- "node_abi": 59,
- "v8": "6.2"
- },
- "9.6.0": {
- "node_abi": 59,
- "v8": "6.2"
- },
- "9.6.1": {
- "node_abi": 59,
- "v8": "6.2"
- },
- "9.7.0": {
- "node_abi": 59,
- "v8": "6.2"
- },
- "9.7.1": {
- "node_abi": 59,
- "v8": "6.2"
- },
- "9.8.0": {
- "node_abi": 59,
- "v8": "6.2"
- },
- "9.9.0": {
- "node_abi": 59,
- "v8": "6.2"
- },
- "9.10.0": {
- "node_abi": 59,
- "v8": "6.2"
- },
- "9.10.1": {
- "node_abi": 59,
- "v8": "6.2"
- },
- "9.11.0": {
- "node_abi": 59,
- "v8": "6.2"
- },
- "9.11.1": {
- "node_abi": 59,
- "v8": "6.2"
- },
- "9.11.2": {
- "node_abi": 59,
- "v8": "6.2"
- },
- "10.0.0": {
- "node_abi": 64,
- "v8": "6.6"
- },
- "10.1.0": {
- "node_abi": 64,
- "v8": "6.6"
- },
- "10.2.0": {
- "node_abi": 64,
- "v8": "6.6"
- },
- "10.2.1": {
- "node_abi": 64,
- "v8": "6.6"
- },
- "10.3.0": {
- "node_abi": 64,
- "v8": "6.6"
- },
- "10.4.0": {
- "node_abi": 64,
- "v8": "6.7"
- },
- "10.4.1": {
- "node_abi": 64,
- "v8": "6.7"
- },
- "10.5.0": {
- "node_abi": 64,
- "v8": "6.7"
- },
- "10.6.0": {
- "node_abi": 64,
- "v8": "6.7"
- },
- "10.7.0": {
- "node_abi": 64,
- "v8": "6.7"
- },
- "10.8.0": {
- "node_abi": 64,
- "v8": "6.7"
- },
- "10.9.0": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "10.10.0": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "10.11.0": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "10.12.0": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "10.13.0": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "10.14.0": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "10.14.1": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "10.14.2": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "10.15.0": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "10.15.1": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "10.15.2": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "10.15.3": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "10.16.0": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "10.16.1": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "10.16.2": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "10.16.3": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "10.17.0": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "10.18.0": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "10.18.1": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "10.19.0": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "10.20.0": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "10.20.1": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "10.21.0": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "10.22.0": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "10.22.1": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "10.23.0": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "10.23.1": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "10.23.2": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "10.23.3": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "10.24.0": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "10.24.1": {
- "node_abi": 64,
- "v8": "6.8"
- },
- "11.0.0": {
- "node_abi": 67,
- "v8": "7.0"
- },
- "11.1.0": {
- "node_abi": 67,
- "v8": "7.0"
- },
- "11.2.0": {
- "node_abi": 67,
- "v8": "7.0"
- },
- "11.3.0": {
- "node_abi": 67,
- "v8": "7.0"
- },
- "11.4.0": {
- "node_abi": 67,
- "v8": "7.0"
- },
- "11.5.0": {
- "node_abi": 67,
- "v8": "7.0"
- },
- "11.6.0": {
- "node_abi": 67,
- "v8": "7.0"
- },
- "11.7.0": {
- "node_abi": 67,
- "v8": "7.0"
- },
- "11.8.0": {
- "node_abi": 67,
- "v8": "7.0"
- },
- "11.9.0": {
- "node_abi": 67,
- "v8": "7.0"
- },
- "11.10.0": {
- "node_abi": 67,
- "v8": "7.0"
- },
- "11.10.1": {
- "node_abi": 67,
- "v8": "7.0"
- },
- "11.11.0": {
- "node_abi": 67,
- "v8": "7.0"
- },
- "11.12.0": {
- "node_abi": 67,
- "v8": "7.0"
- },
- "11.13.0": {
- "node_abi": 67,
- "v8": "7.0"
- },
- "11.14.0": {
- "node_abi": 67,
- "v8": "7.0"
- },
- "11.15.0": {
- "node_abi": 67,
- "v8": "7.0"
- },
- "12.0.0": {
- "node_abi": 72,
- "v8": "7.4"
- },
- "12.1.0": {
- "node_abi": 72,
- "v8": "7.4"
- },
- "12.2.0": {
- "node_abi": 72,
- "v8": "7.4"
- },
- "12.3.0": {
- "node_abi": 72,
- "v8": "7.4"
- },
- "12.3.1": {
- "node_abi": 72,
- "v8": "7.4"
- },
- "12.4.0": {
- "node_abi": 72,
- "v8": "7.4"
- },
- "12.5.0": {
- "node_abi": 72,
- "v8": "7.5"
- },
- "12.6.0": {
- "node_abi": 72,
- "v8": "7.5"
- },
- "12.7.0": {
- "node_abi": 72,
- "v8": "7.5"
- },
- "12.8.0": {
- "node_abi": 72,
- "v8": "7.5"
- },
- "12.8.1": {
- "node_abi": 72,
- "v8": "7.5"
- },
- "12.9.0": {
- "node_abi": 72,
- "v8": "7.6"
- },
- "12.9.1": {
- "node_abi": 72,
- "v8": "7.6"
- },
- "12.10.0": {
- "node_abi": 72,
- "v8": "7.6"
- },
- "12.11.0": {
- "node_abi": 72,
- "v8": "7.7"
- },
- "12.11.1": {
- "node_abi": 72,
- "v8": "7.7"
- },
- "12.12.0": {
- "node_abi": 72,
- "v8": "7.7"
- },
- "12.13.0": {
- "node_abi": 72,
- "v8": "7.7"
- },
- "12.13.1": {
- "node_abi": 72,
- "v8": "7.7"
- },
- "12.14.0": {
- "node_abi": 72,
- "v8": "7.7"
- },
- "12.14.1": {
- "node_abi": 72,
- "v8": "7.7"
- },
- "12.15.0": {
- "node_abi": 72,
- "v8": "7.7"
- },
- "12.16.0": {
- "node_abi": 72,
- "v8": "7.8"
- },
- "12.16.1": {
- "node_abi": 72,
- "v8": "7.8"
- },
- "12.16.2": {
- "node_abi": 72,
- "v8": "7.8"
- },
- "12.16.3": {
- "node_abi": 72,
- "v8": "7.8"
- },
- "12.17.0": {
- "node_abi": 72,
- "v8": "7.8"
- },
- "12.18.0": {
- "node_abi": 72,
- "v8": "7.8"
- },
- "12.18.1": {
- "node_abi": 72,
- "v8": "7.8"
- },
- "12.18.2": {
- "node_abi": 72,
- "v8": "7.8"
- },
- "12.18.3": {
- "node_abi": 72,
- "v8": "7.8"
- },
- "12.18.4": {
- "node_abi": 72,
- "v8": "7.8"
- },
- "12.19.0": {
- "node_abi": 72,
- "v8": "7.8"
- },
- "12.19.1": {
- "node_abi": 72,
- "v8": "7.8"
- },
- "12.20.0": {
- "node_abi": 72,
- "v8": "7.8"
- },
- "12.20.1": {
- "node_abi": 72,
- "v8": "7.8"
- },
- "12.20.2": {
- "node_abi": 72,
- "v8": "7.8"
- },
- "12.21.0": {
- "node_abi": 72,
- "v8": "7.8"
- },
- "12.22.0": {
- "node_abi": 72,
- "v8": "7.8"
- },
- "12.22.1": {
- "node_abi": 72,
- "v8": "7.8"
- },
- "12.22.2": {
- "node_abi": 72,
- "v8": "7.8"
- },
- "12.22.3": {
- "node_abi": 72,
- "v8": "7.8"
- },
- "12.22.4": {
- "node_abi": 72,
- "v8": "7.8"
- },
- "12.22.5": {
- "node_abi": 72,
- "v8": "7.8"
- },
- "12.22.6": {
- "node_abi": 72,
- "v8": "7.8"
- },
- "12.22.7": {
- "node_abi": 72,
- "v8": "7.8"
- },
- "13.0.0": {
- "node_abi": 79,
- "v8": "7.8"
- },
- "13.0.1": {
- "node_abi": 79,
- "v8": "7.8"
- },
- "13.1.0": {
- "node_abi": 79,
- "v8": "7.8"
- },
- "13.2.0": {
- "node_abi": 79,
- "v8": "7.9"
- },
- "13.3.0": {
- "node_abi": 79,
- "v8": "7.9"
- },
- "13.4.0": {
- "node_abi": 79,
- "v8": "7.9"
- },
- "13.5.0": {
- "node_abi": 79,
- "v8": "7.9"
- },
- "13.6.0": {
- "node_abi": 79,
- "v8": "7.9"
- },
- "13.7.0": {
- "node_abi": 79,
- "v8": "7.9"
- },
- "13.8.0": {
- "node_abi": 79,
- "v8": "7.9"
- },
- "13.9.0": {
- "node_abi": 79,
- "v8": "7.9"
- },
- "13.10.0": {
- "node_abi": 79,
- "v8": "7.9"
- },
- "13.10.1": {
- "node_abi": 79,
- "v8": "7.9"
- },
- "13.11.0": {
- "node_abi": 79,
- "v8": "7.9"
- },
- "13.12.0": {
- "node_abi": 79,
- "v8": "7.9"
- },
- "13.13.0": {
- "node_abi": 79,
- "v8": "7.9"
- },
- "13.14.0": {
- "node_abi": 79,
- "v8": "7.9"
- },
- "14.0.0": {
- "node_abi": 83,
- "v8": "8.1"
- },
- "14.1.0": {
- "node_abi": 83,
- "v8": "8.1"
- },
- "14.2.0": {
- "node_abi": 83,
- "v8": "8.1"
- },
- "14.3.0": {
- "node_abi": 83,
- "v8": "8.1"
- },
- "14.4.0": {
- "node_abi": 83,
- "v8": "8.1"
- },
- "14.5.0": {
- "node_abi": 83,
- "v8": "8.3"
- },
- "14.6.0": {
- "node_abi": 83,
- "v8": "8.4"
- },
- "14.7.0": {
- "node_abi": 83,
- "v8": "8.4"
- },
- "14.8.0": {
- "node_abi": 83,
- "v8": "8.4"
- },
- "14.9.0": {
- "node_abi": 83,
- "v8": "8.4"
- },
- "14.10.0": {
- "node_abi": 83,
- "v8": "8.4"
- },
- "14.10.1": {
- "node_abi": 83,
- "v8": "8.4"
- },
- "14.11.0": {
- "node_abi": 83,
- "v8": "8.4"
- },
- "14.12.0": {
- "node_abi": 83,
- "v8": "8.4"
- },
- "14.13.0": {
- "node_abi": 83,
- "v8": "8.4"
- },
- "14.13.1": {
- "node_abi": 83,
- "v8": "8.4"
- },
- "14.14.0": {
- "node_abi": 83,
- "v8": "8.4"
- },
- "14.15.0": {
- "node_abi": 83,
- "v8": "8.4"
- },
- "14.15.1": {
- "node_abi": 83,
- "v8": "8.4"
- },
- "14.15.2": {
- "node_abi": 83,
- "v8": "8.4"
- },
- "14.15.3": {
- "node_abi": 83,
- "v8": "8.4"
- },
- "14.15.4": {
- "node_abi": 83,
- "v8": "8.4"
- },
- "14.15.5": {
- "node_abi": 83,
- "v8": "8.4"
- },
- "14.16.0": {
- "node_abi": 83,
- "v8": "8.4"
- },
- "14.16.1": {
- "node_abi": 83,
- "v8": "8.4"
- },
- "14.17.0": {
- "node_abi": 83,
- "v8": "8.4"
- },
- "14.17.1": {
- "node_abi": 83,
- "v8": "8.4"
- },
- "14.17.2": {
- "node_abi": 83,
- "v8": "8.4"
- },
- "14.17.3": {
- "node_abi": 83,
- "v8": "8.4"
- },
- "14.17.4": {
- "node_abi": 83,
- "v8": "8.4"
- },
- "14.17.5": {
- "node_abi": 83,
- "v8": "8.4"
- },
- "14.17.6": {
- "node_abi": 83,
- "v8": "8.4"
- },
- "14.18.0": {
- "node_abi": 83,
- "v8": "8.4"
- },
- "14.18.1": {
- "node_abi": 83,
- "v8": "8.4"
- },
- "15.0.0": {
- "node_abi": 88,
- "v8": "8.6"
- },
- "15.0.1": {
- "node_abi": 88,
- "v8": "8.6"
- },
- "15.1.0": {
- "node_abi": 88,
- "v8": "8.6"
- },
- "15.2.0": {
- "node_abi": 88,
- "v8": "8.6"
- },
- "15.2.1": {
- "node_abi": 88,
- "v8": "8.6"
- },
- "15.3.0": {
- "node_abi": 88,
- "v8": "8.6"
- },
- "15.4.0": {
- "node_abi": 88,
- "v8": "8.6"
- },
- "15.5.0": {
- "node_abi": 88,
- "v8": "8.6"
- },
- "15.5.1": {
- "node_abi": 88,
- "v8": "8.6"
- },
- "15.6.0": {
- "node_abi": 88,
- "v8": "8.6"
- },
- "15.7.0": {
- "node_abi": 88,
- "v8": "8.6"
- },
- "15.8.0": {
- "node_abi": 88,
- "v8": "8.6"
- },
- "15.9.0": {
- "node_abi": 88,
- "v8": "8.6"
- },
- "15.10.0": {
- "node_abi": 88,
- "v8": "8.6"
- },
- "15.11.0": {
- "node_abi": 88,
- "v8": "8.6"
- },
- "15.12.0": {
- "node_abi": 88,
- "v8": "8.6"
- },
- "15.13.0": {
- "node_abi": 88,
- "v8": "8.6"
- },
- "15.14.0": {
- "node_abi": 88,
- "v8": "8.6"
- },
- "16.0.0": {
- "node_abi": 93,
- "v8": "9.0"
- },
- "16.1.0": {
- "node_abi": 93,
- "v8": "9.0"
- },
- "16.2.0": {
- "node_abi": 93,
- "v8": "9.0"
- },
- "16.3.0": {
- "node_abi": 93,
- "v8": "9.0"
- },
- "16.4.0": {
- "node_abi": 93,
- "v8": "9.1"
- },
- "16.4.1": {
- "node_abi": 93,
- "v8": "9.1"
- },
- "16.4.2": {
- "node_abi": 93,
- "v8": "9.1"
- },
- "16.5.0": {
- "node_abi": 93,
- "v8": "9.1"
- },
- "16.6.0": {
- "node_abi": 93,
- "v8": "9.2"
- },
- "16.6.1": {
- "node_abi": 93,
- "v8": "9.2"
- },
- "16.6.2": {
- "node_abi": 93,
- "v8": "9.2"
- },
- "16.7.0": {
- "node_abi": 93,
- "v8": "9.2"
- },
- "16.8.0": {
- "node_abi": 93,
- "v8": "9.2"
- },
- "16.9.0": {
- "node_abi": 93,
- "v8": "9.3"
- },
- "16.9.1": {
- "node_abi": 93,
- "v8": "9.3"
- },
- "16.10.0": {
- "node_abi": 93,
- "v8": "9.3"
- },
- "16.11.0": {
- "node_abi": 93,
- "v8": "9.4"
- },
- "16.11.1": {
- "node_abi": 93,
- "v8": "9.4"
- },
- "16.12.0": {
- "node_abi": 93,
- "v8": "9.4"
- },
- "16.13.0": {
- "node_abi": 93,
- "v8": "9.4"
- },
- "17.0.0": {
- "node_abi": 102,
- "v8": "9.5"
- },
- "17.0.1": {
- "node_abi": 102,
- "v8": "9.5"
- },
- "17.1.0": {
- "node_abi": 102,
- "v8": "9.5"
- }
-}
\ No newline at end of file
diff --git a/server/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js b/server/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js
deleted file mode 100644
index 956e5aa..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js
+++ /dev/null
@@ -1,93 +0,0 @@
-'use strict';
-
-module.exports = exports;
-
-const fs = require('fs');
-const path = require('path');
-const win = process.platform === 'win32';
-const existsSync = fs.existsSync || path.existsSync;
-const cp = require('child_process');
-
-// try to build up the complete path to node-gyp
-/* priority:
- - node-gyp on ENV:npm_config_node_gyp (https://github.com/npm/npm/pull/4887)
- - node-gyp on NODE_PATH
- - node-gyp inside npm on NODE_PATH (ignore on iojs)
- - node-gyp inside npm beside node exe
-*/
-function which_node_gyp() {
- let node_gyp_bin;
- if (process.env.npm_config_node_gyp) {
- try {
- node_gyp_bin = process.env.npm_config_node_gyp;
- if (existsSync(node_gyp_bin)) {
- return node_gyp_bin;
- }
- } catch (err) {
- // do nothing
- }
- }
- try {
- const node_gyp_main = require.resolve('node-gyp'); // eslint-disable-line node/no-missing-require
- node_gyp_bin = path.join(path.dirname(
- path.dirname(node_gyp_main)),
- 'bin/node-gyp.js');
- if (existsSync(node_gyp_bin)) {
- return node_gyp_bin;
- }
- } catch (err) {
- // do nothing
- }
- if (process.execPath.indexOf('iojs') === -1) {
- try {
- const npm_main = require.resolve('npm'); // eslint-disable-line node/no-missing-require
- node_gyp_bin = path.join(path.dirname(
- path.dirname(npm_main)),
- 'node_modules/node-gyp/bin/node-gyp.js');
- if (existsSync(node_gyp_bin)) {
- return node_gyp_bin;
- }
- } catch (err) {
- // do nothing
- }
- }
- const npm_base = path.join(path.dirname(
- path.dirname(process.execPath)),
- 'lib/node_modules/npm/');
- node_gyp_bin = path.join(npm_base, 'node_modules/node-gyp/bin/node-gyp.js');
- if (existsSync(node_gyp_bin)) {
- return node_gyp_bin;
- }
-}
-
-module.exports.run_gyp = function(args, opts, callback) {
- let shell_cmd = '';
- const cmd_args = [];
- if (opts.runtime && opts.runtime === 'node-webkit') {
- shell_cmd = 'nw-gyp';
- if (win) shell_cmd += '.cmd';
- } else {
- const node_gyp_path = which_node_gyp();
- if (node_gyp_path) {
- shell_cmd = process.execPath;
- cmd_args.push(node_gyp_path);
- } else {
- shell_cmd = 'node-gyp';
- if (win) shell_cmd += '.cmd';
- }
- }
- const final_args = cmd_args.concat(args);
- const cmd = cp.spawn(shell_cmd, final_args, { cwd: undefined, env: process.env, stdio: [0, 1, 2] });
- cmd.on('error', (err) => {
- if (err) {
- return callback(new Error("Failed to execute '" + shell_cmd + ' ' + final_args.join(' ') + "' (" + err + ')'));
- }
- callback(null, opts);
- });
- cmd.on('close', (code) => {
- if (code && code !== 0) {
- return callback(new Error("Failed to execute '" + shell_cmd + ' ' + final_args.join(' ') + "' (" + code + ')'));
- }
- callback(null, opts);
- });
-};
diff --git a/server/node_modules/@mapbox/node-pre-gyp/lib/util/handle_gyp_opts.js b/server/node_modules/@mapbox/node-pre-gyp/lib/util/handle_gyp_opts.js
deleted file mode 100644
index d702f78..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/lib/util/handle_gyp_opts.js
+++ /dev/null
@@ -1,102 +0,0 @@
-'use strict';
-
-module.exports = exports = handle_gyp_opts;
-
-const versioning = require('./versioning.js');
-const napi = require('./napi.js');
-
-/*
-
-Here we gather node-pre-gyp generated options (from versioning) and pass them along to node-gyp.
-
-We massage the args and options slightly to account for differences in what commands mean between
-node-pre-gyp and node-gyp (e.g. see the difference between "build" and "rebuild" below)
-
-Keep in mind: the values inside `argv` and `gyp.opts` below are different depending on whether
-node-pre-gyp is called directory, or if it is called in a `run-script` phase of npm.
-
-We also try to preserve any command line options that might have been passed to npm or node-pre-gyp.
-But this is fairly difficult without passing way to much through. For example `gyp.opts` contains all
-the process.env and npm pushes a lot of variables into process.env which node-pre-gyp inherits. So we have
-to be very selective about what we pass through.
-
-For example:
-
-`npm install --build-from-source` will give:
-
-argv == [ 'rebuild' ]
-gyp.opts.argv == { remain: [ 'install' ],
- cooked: [ 'install', '--fallback-to-build' ],
- original: [ 'install', '--fallback-to-build' ] }
-
-`./bin/node-pre-gyp build` will give:
-
-argv == []
-gyp.opts.argv == { remain: [ 'build' ],
- cooked: [ 'build' ],
- original: [ '-C', 'test/app1', 'build' ] }
-
-*/
-
-// select set of node-pre-gyp versioning info
-// to share with node-gyp
-const share_with_node_gyp = [
- 'module',
- 'module_name',
- 'module_path',
- 'napi_version',
- 'node_abi_napi',
- 'napi_build_version',
- 'node_napi_label'
-];
-
-function handle_gyp_opts(gyp, argv, callback) {
-
- // Collect node-pre-gyp specific variables to pass to node-gyp
- const node_pre_gyp_options = [];
- // generate custom node-pre-gyp versioning info
- const napi_build_version = napi.get_napi_build_version_from_command_args(argv);
- const opts = versioning.evaluate(gyp.package_json, gyp.opts, napi_build_version);
- share_with_node_gyp.forEach((key) => {
- const val = opts[key];
- if (val) {
- node_pre_gyp_options.push('--' + key + '=' + val);
- } else if (key === 'napi_build_version') {
- node_pre_gyp_options.push('--' + key + '=0');
- } else {
- if (key !== 'napi_version' && key !== 'node_abi_napi')
- return callback(new Error('Option ' + key + ' required but not found by node-pre-gyp'));
- }
- });
-
- // Collect options that follow the special -- which disables nopt parsing
- const unparsed_options = [];
- let double_hyphen_found = false;
- gyp.opts.argv.original.forEach((opt) => {
- if (double_hyphen_found) {
- unparsed_options.push(opt);
- }
- if (opt === '--') {
- double_hyphen_found = true;
- }
- });
-
- // We try respect and pass through remaining command
- // line options (like --foo=bar) to node-gyp
- const cooked = gyp.opts.argv.cooked;
- const node_gyp_options = [];
- cooked.forEach((value) => {
- if (value.length > 2 && value.slice(0, 2) === '--') {
- const key = value.slice(2);
- const val = cooked[cooked.indexOf(value) + 1];
- if (val && val.indexOf('--') === -1) { // handle '--foo=bar' or ['--foo','bar']
- node_gyp_options.push('--' + key + '=' + val);
- } else { // pass through --foo
- node_gyp_options.push(value);
- }
- }
- });
-
- const result = { 'opts': opts, 'gyp': node_gyp_options, 'pre': node_pre_gyp_options, 'unparsed': unparsed_options };
- return callback(null, result);
-}
diff --git a/server/node_modules/@mapbox/node-pre-gyp/lib/util/napi.js b/server/node_modules/@mapbox/node-pre-gyp/lib/util/napi.js
deleted file mode 100644
index 5d14ad6..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/lib/util/napi.js
+++ /dev/null
@@ -1,205 +0,0 @@
-'use strict';
-
-const fs = require('fs');
-
-module.exports = exports;
-
-const versionArray = process.version
- .substr(1)
- .replace(/-.*$/, '')
- .split('.')
- .map((item) => {
- return +item;
- });
-
-const napi_multiple_commands = [
- 'build',
- 'clean',
- 'configure',
- 'package',
- 'publish',
- 'reveal',
- 'testbinary',
- 'testpackage',
- 'unpublish'
-];
-
-const napi_build_version_tag = 'napi_build_version=';
-
-module.exports.get_napi_version = function() {
- // returns the non-zero numeric napi version or undefined if napi is not supported.
- // correctly supporting target requires an updated cross-walk
- let version = process.versions.napi; // can be undefined
- if (!version) { // this code should never need to be updated
- if (versionArray[0] === 9 && versionArray[1] >= 3) version = 2; // 9.3.0+
- else if (versionArray[0] === 8) version = 1; // 8.0.0+
- }
- return version;
-};
-
-module.exports.get_napi_version_as_string = function(target) {
- // returns the napi version as a string or an empty string if napi is not supported.
- const version = module.exports.get_napi_version(target);
- return version ? '' + version : '';
-};
-
-module.exports.validate_package_json = function(package_json, opts) { // throws Error
-
- const binary = package_json.binary;
- const module_path_ok = pathOK(binary.module_path);
- const remote_path_ok = pathOK(binary.remote_path);
- const package_name_ok = pathOK(binary.package_name);
- const napi_build_versions = module.exports.get_napi_build_versions(package_json, opts, true);
- const napi_build_versions_raw = module.exports.get_napi_build_versions_raw(package_json);
-
- if (napi_build_versions) {
- napi_build_versions.forEach((napi_build_version)=> {
- if (!(parseInt(napi_build_version, 10) === napi_build_version && napi_build_version > 0)) {
- throw new Error('All values specified in napi_versions must be positive integers.');
- }
- });
- }
-
- if (napi_build_versions && (!module_path_ok || (!remote_path_ok && !package_name_ok))) {
- throw new Error('When napi_versions is specified; module_path and either remote_path or ' +
- "package_name must contain the substitution string '{napi_build_version}`.");
- }
-
- if ((module_path_ok || remote_path_ok || package_name_ok) && !napi_build_versions_raw) {
- throw new Error("When the substitution string '{napi_build_version}` is specified in " +
- 'module_path, remote_path, or package_name; napi_versions must also be specified.');
- }
-
- if (napi_build_versions && !module.exports.get_best_napi_build_version(package_json, opts) &&
- module.exports.build_napi_only(package_json)) {
- throw new Error(
- 'The Node-API version of this Node instance is ' + module.exports.get_napi_version(opts ? opts.target : undefined) + '. ' +
- 'This module supports Node-API version(s) ' + module.exports.get_napi_build_versions_raw(package_json) + '. ' +
- 'This Node instance cannot run this module.');
- }
-
- if (napi_build_versions_raw && !napi_build_versions && module.exports.build_napi_only(package_json)) {
- throw new Error(
- 'The Node-API version of this Node instance is ' + module.exports.get_napi_version(opts ? opts.target : undefined) + '. ' +
- 'This module supports Node-API version(s) ' + module.exports.get_napi_build_versions_raw(package_json) + '. ' +
- 'This Node instance cannot run this module.');
- }
-
-};
-
-function pathOK(path) {
- return path && (path.indexOf('{napi_build_version}') !== -1 || path.indexOf('{node_napi_label}') !== -1);
-}
-
-module.exports.expand_commands = function(package_json, opts, commands) {
- const expanded_commands = [];
- const napi_build_versions = module.exports.get_napi_build_versions(package_json, opts);
- commands.forEach((command)=> {
- if (napi_build_versions && command.name === 'install') {
- const napi_build_version = module.exports.get_best_napi_build_version(package_json, opts);
- const args = napi_build_version ? [napi_build_version_tag + napi_build_version] : [];
- expanded_commands.push({ name: command.name, args: args });
- } else if (napi_build_versions && napi_multiple_commands.indexOf(command.name) !== -1) {
- napi_build_versions.forEach((napi_build_version)=> {
- const args = command.args.slice();
- args.push(napi_build_version_tag + napi_build_version);
- expanded_commands.push({ name: command.name, args: args });
- });
- } else {
- expanded_commands.push(command);
- }
- });
- return expanded_commands;
-};
-
-module.exports.get_napi_build_versions = function(package_json, opts, warnings) { // opts may be undefined
- const log = require('npmlog');
- let napi_build_versions = [];
- const supported_napi_version = module.exports.get_napi_version(opts ? opts.target : undefined);
- // remove duplicates, verify each napi version can actaully be built
- if (package_json.binary && package_json.binary.napi_versions) {
- package_json.binary.napi_versions.forEach((napi_version) => {
- const duplicated = napi_build_versions.indexOf(napi_version) !== -1;
- if (!duplicated && supported_napi_version && napi_version <= supported_napi_version) {
- napi_build_versions.push(napi_version);
- } else if (warnings && !duplicated && supported_napi_version) {
- log.info('This Node instance does not support builds for Node-API version', napi_version);
- }
- });
- }
- if (opts && opts['build-latest-napi-version-only']) {
- let latest_version = 0;
- napi_build_versions.forEach((napi_version) => {
- if (napi_version > latest_version) latest_version = napi_version;
- });
- napi_build_versions = latest_version ? [latest_version] : [];
- }
- return napi_build_versions.length ? napi_build_versions : undefined;
-};
-
-module.exports.get_napi_build_versions_raw = function(package_json) {
- const napi_build_versions = [];
- // remove duplicates
- if (package_json.binary && package_json.binary.napi_versions) {
- package_json.binary.napi_versions.forEach((napi_version) => {
- if (napi_build_versions.indexOf(napi_version) === -1) {
- napi_build_versions.push(napi_version);
- }
- });
- }
- return napi_build_versions.length ? napi_build_versions : undefined;
-};
-
-module.exports.get_command_arg = function(napi_build_version) {
- return napi_build_version_tag + napi_build_version;
-};
-
-module.exports.get_napi_build_version_from_command_args = function(command_args) {
- for (let i = 0; i < command_args.length; i++) {
- const arg = command_args[i];
- if (arg.indexOf(napi_build_version_tag) === 0) {
- return parseInt(arg.substr(napi_build_version_tag.length), 10);
- }
- }
- return undefined;
-};
-
-module.exports.swap_build_dir_out = function(napi_build_version) {
- if (napi_build_version) {
- const rm = require('rimraf');
- rm.sync(module.exports.get_build_dir(napi_build_version));
- fs.renameSync('build', module.exports.get_build_dir(napi_build_version));
- }
-};
-
-module.exports.swap_build_dir_in = function(napi_build_version) {
- if (napi_build_version) {
- const rm = require('rimraf');
- rm.sync('build');
- fs.renameSync(module.exports.get_build_dir(napi_build_version), 'build');
- }
-};
-
-module.exports.get_build_dir = function(napi_build_version) {
- return 'build-tmp-napi-v' + napi_build_version;
-};
-
-module.exports.get_best_napi_build_version = function(package_json, opts) {
- let best_napi_build_version = 0;
- const napi_build_versions = module.exports.get_napi_build_versions(package_json, opts);
- if (napi_build_versions) {
- const our_napi_version = module.exports.get_napi_version(opts ? opts.target : undefined);
- napi_build_versions.forEach((napi_build_version)=> {
- if (napi_build_version > best_napi_build_version &&
- napi_build_version <= our_napi_version) {
- best_napi_build_version = napi_build_version;
- }
- });
- }
- return best_napi_build_version === 0 ? undefined : best_napi_build_version;
-};
-
-module.exports.build_napi_only = function(package_json) {
- return package_json.binary && package_json.binary.package_name &&
- package_json.binary.package_name.indexOf('{node_napi_label}') === -1;
-};
diff --git a/server/node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/index.html b/server/node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/index.html
deleted file mode 100644
index 244466c..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/index.html
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-Node-webkit-based module test
-
-
-
-Node-webkit-based module test
-
-
diff --git a/server/node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/package.json b/server/node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/package.json
deleted file mode 100644
index 71d03f8..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/package.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
-"main": "index.html",
-"name": "nw-pre-gyp-module-test",
-"description": "Node-webkit-based module test.",
-"version": "0.0.1",
-"window": {
- "show": false
-}
-}
diff --git a/server/node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js b/server/node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js
deleted file mode 100644
index 6b1b1a6..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js
+++ /dev/null
@@ -1,163 +0,0 @@
-'use strict';
-
-module.exports = exports;
-
-const url = require('url');
-const fs = require('fs');
-const path = require('path');
-
-module.exports.detect = function(opts, config) {
- const to = opts.hosted_path;
- const uri = url.parse(to);
- config.prefix = (!uri.pathname || uri.pathname === '/') ? '' : uri.pathname.replace('/', '');
- if (opts.bucket && opts.region) {
- config.bucket = opts.bucket;
- config.region = opts.region;
- config.endpoint = opts.host;
- config.s3ForcePathStyle = opts.s3ForcePathStyle;
- } else {
- const parts = uri.hostname.split('.s3');
- const bucket = parts[0];
- if (!bucket) {
- return;
- }
- if (!config.bucket) {
- config.bucket = bucket;
- }
- if (!config.region) {
- const region = parts[1].slice(1).split('.')[0];
- if (region === 'amazonaws') {
- config.region = 'us-east-1';
- } else {
- config.region = region;
- }
- }
- }
-};
-
-module.exports.get_s3 = function(config) {
-
- if (process.env.node_pre_gyp_mock_s3) {
- // here we're mocking. node_pre_gyp_mock_s3 is the scratch directory
- // for the mock code.
- const AWSMock = require('mock-aws-s3');
- const os = require('os');
-
- AWSMock.config.basePath = `${os.tmpdir()}/mock`;
-
- const s3 = AWSMock.S3();
-
- // wrapped callback maker. fs calls return code of ENOENT but AWS.S3 returns
- // NotFound.
- const wcb = (fn) => (err, ...args) => {
- if (err && err.code === 'ENOENT') {
- err.code = 'NotFound';
- }
- return fn(err, ...args);
- };
-
- return {
- listObjects(params, callback) {
- return s3.listObjects(params, wcb(callback));
- },
- headObject(params, callback) {
- return s3.headObject(params, wcb(callback));
- },
- deleteObject(params, callback) {
- return s3.deleteObject(params, wcb(callback));
- },
- putObject(params, callback) {
- return s3.putObject(params, wcb(callback));
- }
- };
- }
-
- // if not mocking then setup real s3.
- const AWS = require('aws-sdk');
-
- AWS.config.update(config);
- const s3 = new AWS.S3();
-
- // need to change if additional options need to be specified.
- return {
- listObjects(params, callback) {
- return s3.listObjects(params, callback);
- },
- headObject(params, callback) {
- return s3.headObject(params, callback);
- },
- deleteObject(params, callback) {
- return s3.deleteObject(params, callback);
- },
- putObject(params, callback) {
- return s3.putObject(params, callback);
- }
- };
-
-
-
-};
-
-//
-// function to get the mocking control function. if not mocking it returns a no-op.
-//
-// if mocking it sets up the mock http interceptors that use the mocked s3 file system
-// to fulfill reponses.
-module.exports.get_mockS3Http = function() {
- let mock_s3 = false;
- if (!process.env.node_pre_gyp_mock_s3) {
- return () => mock_s3;
- }
-
- const nock = require('nock');
- // the bucket used for testing, as addressed by https.
- const host = 'https://mapbox-node-pre-gyp-public-testing-bucket.s3.us-east-1.amazonaws.com';
- const mockDir = process.env.node_pre_gyp_mock_s3 + '/mapbox-node-pre-gyp-public-testing-bucket';
-
- // function to setup interceptors. they are "turned off" by setting mock_s3 to false.
- const mock_http = () => {
- // eslint-disable-next-line no-unused-vars
- function get(uri, requestBody) {
- const filepath = path.join(mockDir, uri.replace('%2B', '+'));
-
- try {
- fs.accessSync(filepath, fs.constants.R_OK);
- } catch (e) {
- return [404, 'not found\n'];
- }
-
- // the mock s3 functions just write to disk, so just read from it.
- return [200, fs.createReadStream(filepath)];
- }
-
- // eslint-disable-next-line no-unused-vars
- return nock(host)
- .persist()
- .get(() => mock_s3) // mock any uri for s3 when true
- .reply(get);
- };
-
- // setup interceptors. they check the mock_s3 flag to determine whether to intercept.
- mock_http(nock, host, mockDir);
- // function to turn matching all requests to s3 on/off.
- const mockS3Http = (action) => {
- const previous = mock_s3;
- if (action === 'off') {
- mock_s3 = false;
- } else if (action === 'on') {
- mock_s3 = true;
- } else if (action !== 'get') {
- throw new Error(`illegal action for setMockHttp ${action}`);
- }
- return previous;
- };
-
- // call mockS3Http with the argument
- // - 'on' - turn it on
- // - 'off' - turn it off (used by fetch.test.js so it doesn't interfere with redirects)
- // - 'get' - return true or false for 'on' or 'off'
- return mockS3Http;
-};
-
-
-
diff --git a/server/node_modules/@mapbox/node-pre-gyp/lib/util/versioning.js b/server/node_modules/@mapbox/node-pre-gyp/lib/util/versioning.js
deleted file mode 100644
index 825cfa1..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/lib/util/versioning.js
+++ /dev/null
@@ -1,335 +0,0 @@
-'use strict';
-
-module.exports = exports;
-
-const path = require('path');
-const semver = require('semver');
-const url = require('url');
-const detect_libc = require('detect-libc');
-const napi = require('./napi.js');
-
-let abi_crosswalk;
-
-// This is used for unit testing to provide a fake
-// ABI crosswalk that emulates one that is not updated
-// for the current version
-if (process.env.NODE_PRE_GYP_ABI_CROSSWALK) {
- abi_crosswalk = require(process.env.NODE_PRE_GYP_ABI_CROSSWALK);
-} else {
- abi_crosswalk = require('./abi_crosswalk.json');
-}
-
-const major_versions = {};
-Object.keys(abi_crosswalk).forEach((v) => {
- const major = v.split('.')[0];
- if (!major_versions[major]) {
- major_versions[major] = v;
- }
-});
-
-function get_electron_abi(runtime, target_version) {
- if (!runtime) {
- throw new Error('get_electron_abi requires valid runtime arg');
- }
- if (typeof target_version === 'undefined') {
- // erroneous CLI call
- throw new Error('Empty target version is not supported if electron is the target.');
- }
- // Electron guarantees that patch version update won't break native modules.
- const sem_ver = semver.parse(target_version);
- return runtime + '-v' + sem_ver.major + '.' + sem_ver.minor;
-}
-module.exports.get_electron_abi = get_electron_abi;
-
-function get_node_webkit_abi(runtime, target_version) {
- if (!runtime) {
- throw new Error('get_node_webkit_abi requires valid runtime arg');
- }
- if (typeof target_version === 'undefined') {
- // erroneous CLI call
- throw new Error('Empty target version is not supported if node-webkit is the target.');
- }
- return runtime + '-v' + target_version;
-}
-module.exports.get_node_webkit_abi = get_node_webkit_abi;
-
-function get_node_abi(runtime, versions) {
- if (!runtime) {
- throw new Error('get_node_abi requires valid runtime arg');
- }
- if (!versions) {
- throw new Error('get_node_abi requires valid process.versions object');
- }
- const sem_ver = semver.parse(versions.node);
- if (sem_ver.major === 0 && sem_ver.minor % 2) { // odd series
- // https://github.com/mapbox/node-pre-gyp/issues/124
- return runtime + '-v' + versions.node;
- } else {
- // process.versions.modules added in >= v0.10.4 and v0.11.7
- // https://github.com/joyent/node/commit/ccabd4a6fa8a6eb79d29bc3bbe9fe2b6531c2d8e
- return versions.modules ? runtime + '-v' + (+versions.modules) :
- 'v8-' + versions.v8.split('.').slice(0, 2).join('.');
- }
-}
-module.exports.get_node_abi = get_node_abi;
-
-function get_runtime_abi(runtime, target_version) {
- if (!runtime) {
- throw new Error('get_runtime_abi requires valid runtime arg');
- }
- if (runtime === 'node-webkit') {
- return get_node_webkit_abi(runtime, target_version || process.versions['node-webkit']);
- } else if (runtime === 'electron') {
- return get_electron_abi(runtime, target_version || process.versions.electron);
- } else {
- if (runtime !== 'node') {
- throw new Error("Unknown Runtime: '" + runtime + "'");
- }
- if (!target_version) {
- return get_node_abi(runtime, process.versions);
- } else {
- let cross_obj;
- // abi_crosswalk generated with ./scripts/abi_crosswalk.js
- if (abi_crosswalk[target_version]) {
- cross_obj = abi_crosswalk[target_version];
- } else {
- const target_parts = target_version.split('.').map((i) => { return +i; });
- if (target_parts.length !== 3) { // parse failed
- throw new Error('Unknown target version: ' + target_version);
- }
- /*
- The below code tries to infer the last known ABI compatible version
- that we have recorded in the abi_crosswalk.json when an exact match
- is not possible. The reasons for this to exist are complicated:
-
- - We support passing --target to be able to allow developers to package binaries for versions of node
- that are not the same one as they are running. This might also be used in combination with the
- --target_arch or --target_platform flags to also package binaries for alternative platforms
- - When --target is passed we can't therefore determine the ABI (process.versions.modules) from the node
- version that is running in memory
- - So, therefore node-pre-gyp keeps an "ABI crosswalk" (lib/util/abi_crosswalk.json) to be able to look
- this info up for all versions
- - But we cannot easily predict what the future ABI will be for released versions
- - And node-pre-gyp needs to be a `bundledDependency` in apps that depend on it in order to work correctly
- by being fully available at install time.
- - So, the speed of node releases and the bundled nature of node-pre-gyp mean that a new node-pre-gyp release
- need to happen for every node.js/io.js/node-webkit/nw.js/atom-shell/etc release that might come online if
- you want the `--target` flag to keep working for the latest version
- - Which is impractical ^^
- - Hence the below code guesses about future ABI to make the need to update node-pre-gyp less demanding.
-
- In practice then you can have a dependency of your app like `node-sqlite3` that bundles a `node-pre-gyp` that
- only knows about node v0.10.33 in the `abi_crosswalk.json` but target node v0.10.34 (which is assumed to be
- ABI compatible with v0.10.33).
-
- TODO: use semver module instead of custom version parsing
- */
- const major = target_parts[0];
- let minor = target_parts[1];
- let patch = target_parts[2];
- // io.js: yeah if node.js ever releases 1.x this will break
- // but that is unlikely to happen: https://github.com/iojs/io.js/pull/253#issuecomment-69432616
- if (major === 1) {
- // look for last release that is the same major version
- // e.g. we assume io.js 1.x is ABI compatible with >= 1.0.0
- while (true) {
- if (minor > 0) --minor;
- if (patch > 0) --patch;
- const new_iojs_target = '' + major + '.' + minor + '.' + patch;
- if (abi_crosswalk[new_iojs_target]) {
- cross_obj = abi_crosswalk[new_iojs_target];
- console.log('Warning: node-pre-gyp could not find exact match for ' + target_version);
- console.log('Warning: but node-pre-gyp successfully choose ' + new_iojs_target + ' as ABI compatible target');
- break;
- }
- if (minor === 0 && patch === 0) {
- break;
- }
- }
- } else if (major >= 2) {
- // look for last release that is the same major version
- if (major_versions[major]) {
- cross_obj = abi_crosswalk[major_versions[major]];
- console.log('Warning: node-pre-gyp could not find exact match for ' + target_version);
- console.log('Warning: but node-pre-gyp successfully choose ' + major_versions[major] + ' as ABI compatible target');
- }
- } else if (major === 0) { // node.js
- if (target_parts[1] % 2 === 0) { // for stable/even node.js series
- // look for the last release that is the same minor release
- // e.g. we assume node 0.10.x is ABI compatible with >= 0.10.0
- while (--patch > 0) {
- const new_node_target = '' + major + '.' + minor + '.' + patch;
- if (abi_crosswalk[new_node_target]) {
- cross_obj = abi_crosswalk[new_node_target];
- console.log('Warning: node-pre-gyp could not find exact match for ' + target_version);
- console.log('Warning: but node-pre-gyp successfully choose ' + new_node_target + ' as ABI compatible target');
- break;
- }
- }
- }
- }
- }
- if (!cross_obj) {
- throw new Error('Unsupported target version: ' + target_version);
- }
- // emulate process.versions
- const versions_obj = {
- node: target_version,
- v8: cross_obj.v8 + '.0',
- // abi_crosswalk uses 1 for node versions lacking process.versions.modules
- // process.versions.modules added in >= v0.10.4 and v0.11.7
- modules: cross_obj.node_abi > 1 ? cross_obj.node_abi : undefined
- };
- return get_node_abi(runtime, versions_obj);
- }
- }
-}
-module.exports.get_runtime_abi = get_runtime_abi;
-
-const required_parameters = [
- 'module_name',
- 'module_path',
- 'host'
-];
-
-function validate_config(package_json, opts) {
- const msg = package_json.name + ' package.json is not node-pre-gyp ready:\n';
- const missing = [];
- if (!package_json.main) {
- missing.push('main');
- }
- if (!package_json.version) {
- missing.push('version');
- }
- if (!package_json.name) {
- missing.push('name');
- }
- if (!package_json.binary) {
- missing.push('binary');
- }
- const o = package_json.binary;
- if (o) {
- required_parameters.forEach((p) => {
- if (!o[p] || typeof o[p] !== 'string') {
- missing.push('binary.' + p);
- }
- });
- }
-
- if (missing.length >= 1) {
- throw new Error(msg + 'package.json must declare these properties: \n' + missing.join('\n'));
- }
- if (o) {
- // enforce https over http
- const protocol = url.parse(o.host).protocol;
- if (protocol === 'http:') {
- throw new Error("'host' protocol (" + protocol + ") is invalid - only 'https:' is accepted");
- }
- }
- napi.validate_package_json(package_json, opts);
-}
-
-module.exports.validate_config = validate_config;
-
-function eval_template(template, opts) {
- Object.keys(opts).forEach((key) => {
- const pattern = '{' + key + '}';
- while (template.indexOf(pattern) > -1) {
- template = template.replace(pattern, opts[key]);
- }
- });
- return template;
-}
-
-// url.resolve needs single trailing slash
-// to behave correctly, otherwise a double slash
-// may end up in the url which breaks requests
-// and a lacking slash may not lead to proper joining
-function fix_slashes(pathname) {
- if (pathname.slice(-1) !== '/') {
- return pathname + '/';
- }
- return pathname;
-}
-
-// remove double slashes
-// note: path.normalize will not work because
-// it will convert forward to back slashes
-function drop_double_slashes(pathname) {
- return pathname.replace(/\/\//g, '/');
-}
-
-function get_process_runtime(versions) {
- let runtime = 'node';
- if (versions['node-webkit']) {
- runtime = 'node-webkit';
- } else if (versions.electron) {
- runtime = 'electron';
- }
- return runtime;
-}
-
-module.exports.get_process_runtime = get_process_runtime;
-
-const default_package_name = '{module_name}-v{version}-{node_abi}-{platform}-{arch}.tar.gz';
-const default_remote_path = '';
-
-module.exports.evaluate = function(package_json, options, napi_build_version) {
- options = options || {};
- validate_config(package_json, options); // options is a suitable substitute for opts in this case
- const v = package_json.version;
- const module_version = semver.parse(v);
- const runtime = options.runtime || get_process_runtime(process.versions);
- const opts = {
- name: package_json.name,
- configuration: options.debug ? 'Debug' : 'Release',
- debug: options.debug,
- module_name: package_json.binary.module_name,
- version: module_version.version,
- prerelease: module_version.prerelease.length ? module_version.prerelease.join('.') : '',
- build: module_version.build.length ? module_version.build.join('.') : '',
- major: module_version.major,
- minor: module_version.minor,
- patch: module_version.patch,
- runtime: runtime,
- node_abi: get_runtime_abi(runtime, options.target),
- node_abi_napi: napi.get_napi_version(options.target) ? 'napi' : get_runtime_abi(runtime, options.target),
- napi_version: napi.get_napi_version(options.target), // non-zero numeric, undefined if unsupported
- napi_build_version: napi_build_version || '',
- node_napi_label: napi_build_version ? 'napi-v' + napi_build_version : get_runtime_abi(runtime, options.target),
- target: options.target || '',
- platform: options.target_platform || process.platform,
- target_platform: options.target_platform || process.platform,
- arch: options.target_arch || process.arch,
- target_arch: options.target_arch || process.arch,
- libc: options.target_libc || detect_libc.familySync() || 'unknown',
- module_main: package_json.main,
- toolset: options.toolset || '', // address https://github.com/mapbox/node-pre-gyp/issues/119
- bucket: package_json.binary.bucket,
- region: package_json.binary.region,
- s3ForcePathStyle: package_json.binary.s3ForcePathStyle || false
- };
- // support host mirror with npm config `--{module_name}_binary_host_mirror`
- // e.g.: https://github.com/node-inspector/v8-profiler/blob/master/package.json#L25
- // > npm install v8-profiler --profiler_binary_host_mirror=https://npm.taobao.org/mirrors/node-inspector/
- const validModuleName = opts.module_name.replace('-', '_');
- const host = process.env['npm_config_' + validModuleName + '_binary_host_mirror'] || package_json.binary.host;
- opts.host = fix_slashes(eval_template(host, opts));
- opts.module_path = eval_template(package_json.binary.module_path, opts);
- // now we resolve the module_path to ensure it is absolute so that binding.gyp variables work predictably
- if (options.module_root) {
- // resolve relative to known module root: works for pre-binding require
- opts.module_path = path.join(options.module_root, opts.module_path);
- } else {
- // resolve relative to current working directory: works for node-pre-gyp commands
- opts.module_path = path.resolve(opts.module_path);
- }
- opts.module = path.join(opts.module_path, opts.module_name + '.node');
- opts.remote_path = package_json.binary.remote_path ? drop_double_slashes(fix_slashes(eval_template(package_json.binary.remote_path, opts))) : default_remote_path;
- const package_name = package_json.binary.package_name ? package_json.binary.package_name : default_package_name;
- opts.package_name = eval_template(package_name, opts);
- opts.staged_tarball = path.join('build/stage', opts.remote_path, opts.package_name);
- opts.hosted_path = url.resolve(opts.host, opts.remote_path);
- opts.hosted_tarball = url.resolve(opts.hosted_path, opts.package_name);
- return opts;
-};
diff --git a/server/node_modules/@mapbox/node-pre-gyp/package.json b/server/node_modules/@mapbox/node-pre-gyp/package.json
deleted file mode 100644
index 5e1d6fd..0000000
--- a/server/node_modules/@mapbox/node-pre-gyp/package.json
+++ /dev/null
@@ -1,62 +0,0 @@
-{
- "name": "@mapbox/node-pre-gyp",
- "description": "Node.js native addon binary install tool",
- "version": "1.0.11",
- "keywords": [
- "native",
- "addon",
- "module",
- "c",
- "c++",
- "bindings",
- "binary"
- ],
- "license": "BSD-3-Clause",
- "author": "Dane Springmeyer ",
- "repository": {
- "type": "git",
- "url": "git://github.com/mapbox/node-pre-gyp.git"
- },
- "bin": "./bin/node-pre-gyp",
- "main": "./lib/node-pre-gyp.js",
- "dependencies": {
- "detect-libc": "^2.0.0",
- "https-proxy-agent": "^5.0.0",
- "make-dir": "^3.1.0",
- "node-fetch": "^2.6.7",
- "nopt": "^5.0.0",
- "npmlog": "^5.0.1",
- "rimraf": "^3.0.2",
- "semver": "^7.3.5",
- "tar": "^6.1.11"
- },
- "devDependencies": {
- "@mapbox/cloudfriend": "^5.1.0",
- "@mapbox/eslint-config-mapbox": "^3.0.0",
- "aws-sdk": "^2.1087.0",
- "codecov": "^3.8.3",
- "eslint": "^7.32.0",
- "eslint-plugin-node": "^11.1.0",
- "mock-aws-s3": "^4.0.2",
- "nock": "^12.0.3",
- "node-addon-api": "^4.3.0",
- "nyc": "^15.1.0",
- "tape": "^5.5.2",
- "tar-fs": "^2.1.1"
- },
- "nyc": {
- "all": true,
- "skip-full": false,
- "exclude": [
- "test/**"
- ]
- },
- "scripts": {
- "coverage": "nyc --all --include index.js --include lib/ npm test",
- "upload-coverage": "nyc report --reporter json && codecov --clear --flags=unit --file=./coverage/coverage-final.json",
- "lint": "eslint bin/node-pre-gyp lib/*js lib/util/*js test/*js scripts/*js",
- "fix": "npm run lint -- --fix",
- "update-crosswalk": "node scripts/abi_crosswalk.js",
- "test": "tape test/*test.js"
- }
-}
diff --git a/server/node_modules/@types/body-parser/LICENSE b/server/node_modules/@types/body-parser/LICENSE
deleted file mode 100644
index 9e841e7..0000000
--- a/server/node_modules/@types/body-parser/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
- MIT License
-
- Copyright (c) Microsoft Corporation.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE
diff --git a/server/node_modules/@types/body-parser/README.md b/server/node_modules/@types/body-parser/README.md
deleted file mode 100644
index 3f21a9c..0000000
--- a/server/node_modules/@types/body-parser/README.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# Installation
-> `npm install --save @types/body-parser`
-
-# Summary
-This package contains type definitions for body-parser (https://github.com/expressjs/body-parser).
-
-# Details
-Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/body-parser.
-
-### Additional Details
- * Last updated: Tue, 16 Nov 2021 18:31:30 GMT
- * Dependencies: [@types/connect](https://npmjs.com/package/@types/connect), [@types/node](https://npmjs.com/package/@types/node)
- * Global values: none
-
-# Credits
-These definitions were written by [Santi Albo](https://github.com/santialbo), [Vilic Vane](https://github.com/vilic), [Jonathan Häberle](https://github.com/dreampulse), [Gevik Babakhani](https://github.com/blendsdk), [Tomasz Łaziuk](https://github.com/tlaziuk), [Jason Walton](https://github.com/jwalton), and [Piotr Błażejewicz](https://github.com/peterblazejewicz).
diff --git a/server/node_modules/@types/body-parser/index.d.ts b/server/node_modules/@types/body-parser/index.d.ts
deleted file mode 100644
index 4be0396..0000000
--- a/server/node_modules/@types/body-parser/index.d.ts
+++ /dev/null
@@ -1,107 +0,0 @@
-// Type definitions for body-parser 1.19
-// Project: https://github.com/expressjs/body-parser
-// Definitions by: Santi Albo
-// Vilic Vane
-// Jonathan Häberle
-// Gevik Babakhani
-// Tomasz Łaziuk
-// Jason Walton
-// Piotr Błażejewicz
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-///
-
-import { NextHandleFunction } from 'connect';
-import * as http from 'http';
-
-// for docs go to https://github.com/expressjs/body-parser/tree/1.19.0#body-parser
-
-declare namespace bodyParser {
- interface BodyParser {
- /**
- * @deprecated use individual json/urlencoded middlewares
- */
- (options?: OptionsJson & OptionsText & OptionsUrlencoded): NextHandleFunction;
- /**
- * Returns middleware that only parses json and only looks at requests
- * where the Content-Type header matches the type option.
- */
- json(options?: OptionsJson): NextHandleFunction;
- /**
- * Returns middleware that parses all bodies as a Buffer and only looks at requests
- * where the Content-Type header matches the type option.
- */
- raw(options?: Options): NextHandleFunction;
-
- /**
- * Returns middleware that parses all bodies as a string and only looks at requests
- * where the Content-Type header matches the type option.
- */
- text(options?: OptionsText): NextHandleFunction;
- /**
- * Returns middleware that only parses urlencoded bodies and only looks at requests
- * where the Content-Type header matches the type option
- */
- urlencoded(options?: OptionsUrlencoded): NextHandleFunction;
- }
-
- interface Options {
- /** When set to true, then deflated (compressed) bodies will be inflated; when false, deflated bodies are rejected. Defaults to true. */
- inflate?: boolean | undefined;
- /**
- * Controls the maximum request body size. If this is a number,
- * then the value specifies the number of bytes; if it is a string,
- * the value is passed to the bytes library for parsing. Defaults to '100kb'.
- */
- limit?: number | string | undefined;
- /**
- * The type option is used to determine what media type the middleware will parse
- */
- type?: string | string[] | ((req: http.IncomingMessage) => any) | undefined;
- /**
- * The verify option, if supplied, is called as verify(req, res, buf, encoding),
- * where buf is a Buffer of the raw request body and encoding is the encoding of the request.
- */
- verify?(req: http.IncomingMessage, res: http.ServerResponse, buf: Buffer, encoding: string): void;
- }
-
- interface OptionsJson extends Options {
- /**
- *
- * The reviver option is passed directly to JSON.parse as the second argument.
- */
- reviver?(key: string, value: any): any;
- /**
- * When set to `true`, will only accept arrays and objects;
- * when `false` will accept anything JSON.parse accepts. Defaults to `true`.
- */
- strict?: boolean | undefined;
- }
-
- interface OptionsText extends Options {
- /**
- * Specify the default character set for the text content if the charset
- * is not specified in the Content-Type header of the request.
- * Defaults to `utf-8`.
- */
- defaultCharset?: string | undefined;
- }
-
- interface OptionsUrlencoded extends Options {
- /**
- * The extended option allows to choose between parsing the URL-encoded data
- * with the querystring library (when `false`) or the qs library (when `true`).
- */
- extended?: boolean | undefined;
- /**
- * The parameterLimit option controls the maximum number of parameters
- * that are allowed in the URL-encoded data. If a request contains more parameters than this value,
- * a 413 will be returned to the client. Defaults to 1000.
- */
- parameterLimit?: number | undefined;
- }
-}
-
-declare const bodyParser: bodyParser.BodyParser;
-
-export = bodyParser;
diff --git a/server/node_modules/@types/body-parser/package.json b/server/node_modules/@types/body-parser/package.json
deleted file mode 100644
index 8f99f52..0000000
--- a/server/node_modules/@types/body-parser/package.json
+++ /dev/null
@@ -1,58 +0,0 @@
-{
- "name": "@types/body-parser",
- "version": "1.19.2",
- "description": "TypeScript definitions for body-parser",
- "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/body-parser",
- "license": "MIT",
- "contributors": [
- {
- "name": "Santi Albo",
- "url": "https://github.com/santialbo",
- "githubUsername": "santialbo"
- },
- {
- "name": "Vilic Vane",
- "url": "https://github.com/vilic",
- "githubUsername": "vilic"
- },
- {
- "name": "Jonathan Häberle",
- "url": "https://github.com/dreampulse",
- "githubUsername": "dreampulse"
- },
- {
- "name": "Gevik Babakhani",
- "url": "https://github.com/blendsdk",
- "githubUsername": "blendsdk"
- },
- {
- "name": "Tomasz Łaziuk",
- "url": "https://github.com/tlaziuk",
- "githubUsername": "tlaziuk"
- },
- {
- "name": "Jason Walton",
- "url": "https://github.com/jwalton",
- "githubUsername": "jwalton"
- },
- {
- "name": "Piotr Błażejewicz",
- "url": "https://github.com/peterblazejewicz",
- "githubUsername": "peterblazejewicz"
- }
- ],
- "main": "",
- "types": "index.d.ts",
- "repository": {
- "type": "git",
- "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
- "directory": "types/body-parser"
- },
- "scripts": {},
- "dependencies": {
- "@types/connect": "*",
- "@types/node": "*"
- },
- "typesPublisherContentHash": "ad069aa8b9e8a95f66df025de11975c773540e4071000abdb7db565579b013ee",
- "typeScriptVersion": "3.7"
-}
\ No newline at end of file
diff --git a/server/node_modules/@types/bson/LICENSE b/server/node_modules/@types/bson/LICENSE
deleted file mode 100644
index 9e841e7..0000000
--- a/server/node_modules/@types/bson/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
- MIT License
-
- Copyright (c) Microsoft Corporation.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE
diff --git a/server/node_modules/@types/bson/README.md b/server/node_modules/@types/bson/README.md
deleted file mode 100644
index d3982ce..0000000
--- a/server/node_modules/@types/bson/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-This is a stub types definition for @types/bson (https://github.com/mongodb/js-bson#readme).
-
-bson provides its own type definitions, so you don't need @types/bson installed!
\ No newline at end of file
diff --git a/server/node_modules/@types/bson/package.json b/server/node_modules/@types/bson/package.json
deleted file mode 100644
index 84d2a44..0000000
--- a/server/node_modules/@types/bson/package.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "name": "@types/bson",
- "version": "4.2.0",
- "typings": null,
- "description": "Stub TypeScript definitions entry for bson, which provides its own types definitions",
- "main": "",
- "scripts": {},
- "author": "",
- "license": "MIT",
- "dependencies": {
- "bson": "*"
- }
-}
\ No newline at end of file
diff --git a/server/node_modules/@types/connect/LICENSE b/server/node_modules/@types/connect/LICENSE
deleted file mode 100644
index 9e841e7..0000000
--- a/server/node_modules/@types/connect/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
- MIT License
-
- Copyright (c) Microsoft Corporation.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE
diff --git a/server/node_modules/@types/connect/README.md b/server/node_modules/@types/connect/README.md
deleted file mode 100644
index 0edaf73..0000000
--- a/server/node_modules/@types/connect/README.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# Installation
-> `npm install --save @types/connect`
-
-# Summary
-This package contains type definitions for connect (https://github.com/senchalabs/connect).
-
-# Details
-Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/connect.
-
-### Additional Details
- * Last updated: Tue, 06 Jul 2021 20:32:28 GMT
- * Dependencies: [@types/node](https://npmjs.com/package/@types/node)
- * Global values: none
-
-# Credits
-These definitions were written by [Maxime LUCE](https://github.com/SomaticIT), and [Evan Hahn](https://github.com/EvanHahn).
diff --git a/server/node_modules/@types/connect/index.d.ts b/server/node_modules/@types/connect/index.d.ts
deleted file mode 100644
index c1d5aa8..0000000
--- a/server/node_modules/@types/connect/index.d.ts
+++ /dev/null
@@ -1,93 +0,0 @@
-// Type definitions for connect v3.4.0
-// Project: https://github.com/senchalabs/connect
-// Definitions by: Maxime LUCE
-// Evan Hahn
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-///
-
-
-import * as http from "http";
-
-/**
- * Create a new connect server.
- */
-declare function createServer(): createServer.Server;
-
-declare namespace createServer {
- export type ServerHandle = HandleFunction | http.Server;
-
- export class IncomingMessage extends http.IncomingMessage {
- originalUrl?: http.IncomingMessage["url"] | undefined;
- }
-
- type NextFunction = (err?: any) => void;
-
- export type SimpleHandleFunction = (req: IncomingMessage, res: http.ServerResponse) => void;
- export type NextHandleFunction = (req: IncomingMessage, res: http.ServerResponse, next: NextFunction) => void;
- export type ErrorHandleFunction = (err: any, req: IncomingMessage, res: http.ServerResponse, next: NextFunction) => void;
- export type HandleFunction = SimpleHandleFunction | NextHandleFunction | ErrorHandleFunction;
-
- export interface ServerStackItem {
- route: string;
- handle: ServerHandle;
- }
-
- export interface Server extends NodeJS.EventEmitter {
- (req: http.IncomingMessage, res: http.ServerResponse, next?: Function): void;
-
- route: string;
- stack: ServerStackItem[];
-
- /**
- * Utilize the given middleware `handle` to the given `route`,
- * defaulting to _/_. This "route" is the mount-point for the
- * middleware, when given a value other than _/_ the middleware
- * is only effective when that segment is present in the request's
- * pathname.
- *
- * For example if we were to mount a function at _/admin_, it would
- * be invoked on _/admin_, and _/admin/settings_, however it would
- * not be invoked for _/_, or _/posts_.
- */
- use(fn: NextHandleFunction): Server;
- use(fn: HandleFunction): Server;
- use(route: string, fn: NextHandleFunction): Server;
- use(route: string, fn: HandleFunction): Server;
-
- /**
- * Handle server requests, punting them down
- * the middleware stack.
- */
- handle(req: http.IncomingMessage, res: http.ServerResponse, next: Function): void;
-
- /**
- * Listen for connections.
- *
- * This method takes the same arguments
- * as node's `http.Server#listen()`.
- *
- * HTTP and HTTPS:
- *
- * If you run your application both as HTTP
- * and HTTPS you may wrap them individually,
- * since your Connect "server" is really just
- * a JavaScript `Function`.
- *
- * var connect = require('connect')
- * , http = require('http')
- * , https = require('https');
- *
- * var app = connect();
- *
- * http.createServer(app).listen(80);
- * https.createServer(options, app).listen(443);
- */
- listen(port: number, hostname?: string, backlog?: number, callback?: Function): http.Server;
- listen(port: number, hostname?: string, callback?: Function): http.Server;
- listen(path: string, callback?: Function): http.Server;
- listen(handle: any, listeningListener?: Function): http.Server;
- }
-}
-
-export = createServer;
diff --git a/server/node_modules/@types/connect/package.json b/server/node_modules/@types/connect/package.json
deleted file mode 100644
index dff5f10..0000000
--- a/server/node_modules/@types/connect/package.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "name": "@types/connect",
- "version": "3.4.35",
- "description": "TypeScript definitions for connect",
- "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/connect",
- "license": "MIT",
- "contributors": [
- {
- "name": "Maxime LUCE",
- "url": "https://github.com/SomaticIT",
- "githubUsername": "SomaticIT"
- },
- {
- "name": "Evan Hahn",
- "url": "https://github.com/EvanHahn",
- "githubUsername": "EvanHahn"
- }
- ],
- "main": "",
- "types": "index.d.ts",
- "repository": {
- "type": "git",
- "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
- "directory": "types/connect"
- },
- "scripts": {},
- "dependencies": {
- "@types/node": "*"
- },
- "typesPublisherContentHash": "09c0dcec5f675cb2bdd7487a85447955f769ef4ab174294478c4f055b528fecc",
- "typeScriptVersion": "3.6"
-}
\ No newline at end of file
diff --git a/server/node_modules/@types/express-serve-static-core/LICENSE b/server/node_modules/@types/express-serve-static-core/LICENSE
deleted file mode 100644
index 9e841e7..0000000
--- a/server/node_modules/@types/express-serve-static-core/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
- MIT License
-
- Copyright (c) Microsoft Corporation.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE
diff --git a/server/node_modules/@types/express-serve-static-core/README.md b/server/node_modules/@types/express-serve-static-core/README.md
deleted file mode 100644
index 0f57e7e..0000000
--- a/server/node_modules/@types/express-serve-static-core/README.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# Installation
-> `npm install --save @types/express-serve-static-core`
-
-# Summary
-This package contains type definitions for Express (http://expressjs.com).
-
-# Details
-Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-serve-static-core.
-
-### Additional Details
- * Last updated: Sat, 13 May 2023 03:32:51 GMT
- * Dependencies: [@types/node](https://npmjs.com/package/@types/node), [@types/qs](https://npmjs.com/package/@types/qs), [@types/range-parser](https://npmjs.com/package/@types/range-parser), [@types/send](https://npmjs.com/package/@types/send)
- * Global values: none
-
-# Credits
-These definitions were written by [Boris Yankov](https://github.com/borisyankov), [Satana Charuwichitratana](https://github.com/micksatana), [Sami Jaber](https://github.com/samijaber), [Jose Luis Leon](https://github.com/JoseLion), [David Stephens](https://github.com/dwrss), and [Shin Ando](https://github.com/andoshin11).
diff --git a/server/node_modules/@types/express-serve-static-core/index.d.ts b/server/node_modules/@types/express-serve-static-core/index.d.ts
deleted file mode 100644
index 88820d0..0000000
--- a/server/node_modules/@types/express-serve-static-core/index.d.ts
+++ /dev/null
@@ -1,1281 +0,0 @@
-// Type definitions for Express 4.17
-// Project: http://expressjs.com
-// Definitions by: Boris Yankov
-// Satana Charuwichitratana
-// Sami Jaber
-// Jose Luis Leon
-// David Stephens
-// Shin Ando
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-// TypeScript Version: 2.3
-
-// This extracts the core definitions from express to prevent a circular dependency between express and serve-static
-///
-
-import { SendOptions } from 'send';
-
-declare global {
- namespace Express {
- // These open interfaces may be extended in an application-specific manner via declaration merging.
- // See for example method-override.d.ts (https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/method-override/index.d.ts)
- interface Request {}
- interface Response {}
- interface Locals {}
- interface Application {}
- }
-}
-
-import * as http from 'http';
-import { EventEmitter } from 'events';
-import { Options as RangeParserOptions, Result as RangeParserResult, Ranges as RangeParserRanges } from 'range-parser';
-import { ParsedQs } from 'qs';
-
-export {};
-
-export type Query = ParsedQs;
-
-export interface NextFunction {
- (err?: any): void;
- /**
- * "Break-out" of a router by calling {next('router')};
- * @see {https://expressjs.com/en/guide/using-middleware.html#middleware.router}
- */
- (deferToNext: 'router'): void;
- /**
- * "Break-out" of a route by calling {next('route')};
- * @see {https://expressjs.com/en/guide/using-middleware.html#middleware.application}
- */
- (deferToNext: 'route'): void;
-}
-
-export interface Dictionary {
- [key: string]: T;
-}
-
-export interface ParamsDictionary {
- [key: string]: string;
-}
-export type ParamsArray = string[];
-export type Params = ParamsDictionary | ParamsArray;
-
-export interface Locals extends Express.Locals {}
-
-export interface RequestHandler<
- P = ParamsDictionary,
- ResBody = any,
- ReqBody = any,
- ReqQuery = ParsedQs,
- LocalsObj extends Record = Record
-> {
- // tslint:disable-next-line callable-types (This is extended from and can't extend from a type alias in ts<2.2)
- (
- req: Request,
- res: Response,
- next: NextFunction,
- ): void;
-}
-
-export type ErrorRequestHandler<
- P = ParamsDictionary,
- ResBody = any,
- ReqBody = any,
- ReqQuery = ParsedQs,
- LocalsObj extends Record = Record
-> = (
- err: any,
- req: Request,
- res: Response,
- next: NextFunction,
-) => void;
-
-export type PathParams = string | RegExp | Array;
-
-export type RequestHandlerParams<
- P = ParamsDictionary,
- ResBody = any,
- ReqBody = any,
- ReqQuery = ParsedQs,
- LocalsObj extends Record = Record
-> =
- | RequestHandler
- | ErrorRequestHandler
- | Array | ErrorRequestHandler>;
-
-type RemoveTail = S extends `${infer P}${Tail}` ? P : S;
-type GetRouteParameter = RemoveTail<
- RemoveTail, `-${string}`>,
- `.${string}`
->;
-
-// prettier-ignore
-export type RouteParameters = string extends Route
- ? ParamsDictionary
- : Route extends `${string}(${string}`
- ? ParamsDictionary //TODO: handling for regex parameters
- : Route extends `${string}:${infer Rest}`
- ? (
- GetRouteParameter extends never
- ? ParamsDictionary
- : GetRouteParameter extends `${infer ParamName}?`
- ? { [P in ParamName]?: string }
- : { [P in GetRouteParameter]: string }
- ) &
- (Rest extends `${GetRouteParameter}${infer Next}`
- ? RouteParameters : unknown)
- : {};
-
-export interface IRouterMatcher<
- T,
- Method extends 'all' | 'get' | 'post' | 'put' | 'delete' | 'patch' | 'options' | 'head' = any
-> {
- <
- Route extends string,
- P = RouteParameters,
- ResBody = any,
- ReqBody = any,
- ReqQuery = ParsedQs,
- LocalsObj extends Record = Record
- >(
- // (it's used as the default type parameter for P)
- // eslint-disable-next-line no-unnecessary-generics
- path: Route,
- // (This generic is meant to be passed explicitly.)
- // eslint-disable-next-line no-unnecessary-generics
- ...handlers: Array>
- ): T;
- <
- Path extends string,
- P = RouteParameters,
- ResBody = any,
- ReqBody = any,
- ReqQuery = ParsedQs,
- LocalsObj extends Record = Record
- >(
- // (it's used as the default type parameter for P)
- // eslint-disable-next-line no-unnecessary-generics
- path: Path,
- // (This generic is meant to be passed explicitly.)
- // eslint-disable-next-line no-unnecessary-generics
- ...handlers: Array>
- ): T;
- <
- P = ParamsDictionary,
- ResBody = any,
- ReqBody = any,
- ReqQuery = ParsedQs,
- LocalsObj extends Record = Record
- >(
- path: PathParams,
- // (This generic is meant to be passed explicitly.)
- // eslint-disable-next-line no-unnecessary-generics
- ...handlers: Array>
- ): T;
- <
- P = ParamsDictionary,
- ResBody = any,
- ReqBody = any,
- ReqQuery = ParsedQs,
- LocalsObj extends Record = Record
- >(
- path: PathParams,
- // (This generic is meant to be passed explicitly.)
- // eslint-disable-next-line no-unnecessary-generics
- ...handlers: Array>
- ): T;
- (path: PathParams, subApplication: Application): T;
-}
-
-export interface IRouterHandler {
- (...handlers: Array>>): T;
- (...handlers: Array>>): T;
- <
- P = RouteParameters,
- ResBody = any,
- ReqBody = any,
- ReqQuery = ParsedQs,
- LocalsObj extends Record = Record
- >(
- // (This generic is meant to be passed explicitly.)
- // eslint-disable-next-line no-unnecessary-generics
- ...handlers: Array>
- ): T;
- <
- P = RouteParameters,
- ResBody = any,
- ReqBody = any,
- ReqQuery = ParsedQs,
- LocalsObj extends Record = Record
- >(
- // (This generic is meant to be passed explicitly.)
- // eslint-disable-next-line no-unnecessary-generics
- ...handlers: Array>
- ): T;
- <
- P = ParamsDictionary,
- ResBody = any,
- ReqBody = any,
- ReqQuery = ParsedQs,
- LocalsObj extends Record = Record
- >(
- // (This generic is meant to be passed explicitly.)
- // eslint-disable-next-line no-unnecessary-generics
- ...handlers: Array>
- ): T;
- <
- P = ParamsDictionary,
- ResBody = any,
- ReqBody = any,
- ReqQuery = ParsedQs,
- LocalsObj extends Record = Record
- >(
- // (This generic is meant to be passed explicitly.)
- // eslint-disable-next-line no-unnecessary-generics
- ...handlers: Array>
- ): T;
-}
-
-export interface IRouter extends RequestHandler {
- /**
- * Map the given param placeholder `name`(s) to the given callback(s).
- *
- * Parameter mapping is used to provide pre-conditions to routes
- * which use normalized placeholders. For example a _:user_id_ parameter
- * could automatically load a user's information from the database without
- * any additional code,
- *
- * The callback uses the samesignature as middleware, the only differencing
- * being that the value of the placeholder is passed, in this case the _id_
- * of the user. Once the `next()` function is invoked, just like middleware
- * it will continue on to execute the route, or subsequent parameter functions.
- *
- * app.param('user_id', function(req, res, next, id){
- * User.find(id, function(err, user){
- * if (err) {
- * next(err);
- * } else if (user) {
- * req.user = user;
- * next();
- * } else {
- * next(new Error('failed to load user'));
- * }
- * });
- * });
- */
- param(name: string, handler: RequestParamHandler): this;
-
- /**
- * Alternatively, you can pass only a callback, in which case you have the opportunity to alter the app.param()
- *
- * @deprecated since version 4.11
- */
- param(callback: (name: string, matcher: RegExp) => RequestParamHandler): this;
-
- /**
- * Special-cased "all" method, applying the given route `path`,
- * middleware, and callback to _every_ HTTP method.
- */
- all: IRouterMatcher;
- get: IRouterMatcher;
- post: IRouterMatcher;
- put: IRouterMatcher;
- delete: IRouterMatcher;
- patch: IRouterMatcher;
- options: IRouterMatcher;
- head: IRouterMatcher;
-
- checkout: IRouterMatcher;
- connect: IRouterMatcher;
- copy: IRouterMatcher;
- lock: IRouterMatcher;
- merge: IRouterMatcher;
- mkactivity: IRouterMatcher;
- mkcol: IRouterMatcher;
- move: IRouterMatcher;
- 'm-search': IRouterMatcher;
- notify: IRouterMatcher;
- propfind: IRouterMatcher;
- proppatch: IRouterMatcher;
- purge: IRouterMatcher;
- report: IRouterMatcher;
- search: IRouterMatcher;
- subscribe: IRouterMatcher;
- trace: IRouterMatcher;
- unlock: IRouterMatcher;
- unsubscribe: IRouterMatcher;
- link: IRouterMatcher;
- unlink: IRouterMatcher;
-
- use: IRouterHandler & IRouterMatcher;
-
- route(prefix: T): IRoute;
- route(prefix: PathParams): IRoute;
- /**
- * Stack of configured routes
- */
- stack: any[];
-}
-
-export interface IRoute {
- path: string;
- stack: any;
- all: IRouterHandler;
- get: IRouterHandler;
- post: IRouterHandler;
- put: IRouterHandler;
- delete: IRouterHandler;
- patch: IRouterHandler;
- options: IRouterHandler;
- head: IRouterHandler;
-
- checkout: IRouterHandler;
- copy: IRouterHandler;
- lock: IRouterHandler;
- merge: IRouterHandler;
- mkactivity: IRouterHandler;
- mkcol: IRouterHandler;
- move: IRouterHandler;
- 'm-search': IRouterHandler;
- notify: IRouterHandler;
- purge: IRouterHandler;
- report: IRouterHandler;
- search: IRouterHandler;
- subscribe: IRouterHandler;
- trace: IRouterHandler;
- unlock: IRouterHandler;
- unsubscribe: IRouterHandler;
-}
-
-export interface Router extends IRouter {}
-
-export interface CookieOptions {
- maxAge?: number | undefined;
- signed?: boolean | undefined;
- expires?: Date | undefined;
- httpOnly?: boolean | undefined;
- path?: string | undefined;
- domain?: string | undefined;
- secure?: boolean | undefined;
- encode?: ((val: string) => string) | undefined;
- sameSite?: boolean | 'lax' | 'strict' | 'none' | undefined;
-}
-
-export interface ByteRange {
- start: number;
- end: number;
-}
-
-export interface RequestRanges extends RangeParserRanges {}
-
-export type Errback = (err: Error) => void;
-
-/**
- * @param P For most requests, this should be `ParamsDictionary`, but if you're
- * using this in a route handler for a route that uses a `RegExp` or a wildcard
- * `string` path (e.g. `'/user/*'`), then `req.params` will be an array, in
- * which case you should use `ParamsArray` instead.
- *
- * @see https://expressjs.com/en/api.html#req.params
- *
- * @example
- * app.get('/user/:id', (req, res) => res.send(req.params.id)); // implicitly `ParamsDictionary`
- * app.get(/user\/(.*)/, (req, res) => res.send(req.params[0]));
- * app.get('/user/*', (req, res) => res.send(req.params[0]));
- */
-export interface Request<
- P = ParamsDictionary,
- ResBody = any,
- ReqBody = any,
- ReqQuery = ParsedQs,
- LocalsObj extends Record = Record
-> extends http.IncomingMessage,
- Express.Request {
- /**
- * Return request header.
- *
- * The `Referrer` header field is special-cased,
- * both `Referrer` and `Referer` are interchangeable.
- *
- * Examples:
- *
- * req.get('Content-Type');
- * // => "text/plain"
- *
- * req.get('content-type');
- * // => "text/plain"
- *
- * req.get('Something');
- * // => undefined
- *
- * Aliased as `req.header()`.
- */
- get(name: 'set-cookie'): string[] | undefined;
- get(name: string): string | undefined;
-
- header(name: 'set-cookie'): string[] | undefined;
- header(name: string): string | undefined;
-
- /**
- * Check if the given `type(s)` is acceptable, returning
- * the best match when true, otherwise `undefined`, in which
- * case you should respond with 406 "Not Acceptable".
- *
- * The `type` value may be a single mime type string
- * such as "application/json", the extension name
- * such as "json", a comma-delimted list such as "json, html, text/plain",
- * or an array `["json", "html", "text/plain"]`. When a list
- * or array is given the _best_ match, if any is returned.
- *
- * Examples:
- *
- * // Accept: text/html
- * req.accepts('html');
- * // => "html"
- *
- * // Accept: text/*, application/json
- * req.accepts('html');
- * // => "html"
- * req.accepts('text/html');
- * // => "text/html"
- * req.accepts('json, text');
- * // => "json"
- * req.accepts('application/json');
- * // => "application/json"
- *
- * // Accept: text/*, application/json
- * req.accepts('image/png');
- * req.accepts('png');
- * // => undefined
- *
- * // Accept: text/*;q=.5, application/json
- * req.accepts(['html', 'json']);
- * req.accepts('html, json');
- * // => "json"
- */
- accepts(): string[];
- accepts(type: string): string | false;
- accepts(type: string[]): string | false;
- accepts(...type: string[]): string | false;
-
- /**
- * Returns the first accepted charset of the specified character sets,
- * based on the request's Accept-Charset HTTP header field.
- * If none of the specified charsets is accepted, returns false.
- *
- * For more information, or if you have issues or concerns, see accepts.
- */
- acceptsCharsets(): string[];
- acceptsCharsets(charset: string): string | false;
- acceptsCharsets(charset: string[]): string | false;
- acceptsCharsets(...charset: string[]): string | false;
-
- /**
- * Returns the first accepted encoding of the specified encodings,
- * based on the request's Accept-Encoding HTTP header field.
- * If none of the specified encodings is accepted, returns false.
- *
- * For more information, or if you have issues or concerns, see accepts.
- */
- acceptsEncodings(): string[];
- acceptsEncodings(encoding: string): string | false;
- acceptsEncodings(encoding: string[]): string | false;
- acceptsEncodings(...encoding: string[]): string | false;
-
- /**
- * Returns the first accepted language of the specified languages,
- * based on the request's Accept-Language HTTP header field.
- * If none of the specified languages is accepted, returns false.
- *
- * For more information, or if you have issues or concerns, see accepts.
- */
- acceptsLanguages(): string[];
- acceptsLanguages(lang: string): string | false;
- acceptsLanguages(lang: string[]): string | false;
- acceptsLanguages(...lang: string[]): string | false;
-
- /**
- * Parse Range header field, capping to the given `size`.
- *
- * Unspecified ranges such as "0-" require knowledge of your resource length. In
- * the case of a byte range this is of course the total number of bytes.
- * If the Range header field is not given `undefined` is returned.
- * If the Range header field is given, return value is a result of range-parser.
- * See more ./types/range-parser/index.d.ts
- *
- * NOTE: remember that ranges are inclusive, so for example "Range: users=0-3"
- * should respond with 4 users when available, not 3.
- *
- */
- range(size: number, options?: RangeParserOptions): RangeParserRanges | RangeParserResult | undefined;
-
- /**
- * Return an array of Accepted media types
- * ordered from highest quality to lowest.
- */
- accepted: MediaType[];
-
- /**
- * @deprecated since 4.11 Use either req.params, req.body or req.query, as applicable.
- *
- * Return the value of param `name` when present or `defaultValue`.
- *
- * - Checks route placeholders, ex: _/user/:id_
- * - Checks body params, ex: id=12, {"id":12}
- * - Checks query string params, ex: ?id=12
- *
- * To utilize request bodies, `req.body`
- * should be an object. This can be done by using
- * the `connect.bodyParser()` middleware.
- */
- param(name: string, defaultValue?: any): string;
-
- /**
- * Check if the incoming request contains the "Content-Type"
- * header field, and it contains the give mime `type`.
- *
- * Examples:
- *
- * // With Content-Type: text/html; charset=utf-8
- * req.is('html');
- * req.is('text/html');
- * req.is('text/*');
- * // => true
- *
- * // When Content-Type is application/json
- * req.is('json');
- * req.is('application/json');
- * req.is('application/*');
- * // => true
- *
- * req.is('html');
- * // => false
- */
- is(type: string | string[]): string | false | null;
-
- /**
- * Return the protocol string "http" or "https"
- * when requested with TLS. When the "trust proxy"
- * setting is enabled the "X-Forwarded-Proto" header
- * field will be trusted. If you're running behind
- * a reverse proxy that supplies https for you this
- * may be enabled.
- */
- protocol: string;
-
- /**
- * Short-hand for:
- *
- * req.protocol == 'https'
- */
- secure: boolean;
-
- /**
- * Return the remote address, or when
- * "trust proxy" is `true` return
- * the upstream addr.
- */
- ip: string;
-
- /**
- * When "trust proxy" is `true`, parse
- * the "X-Forwarded-For" ip address list.
- *
- * For example if the value were "client, proxy1, proxy2"
- * you would receive the array `["client", "proxy1", "proxy2"]`
- * where "proxy2" is the furthest down-stream.
- */
- ips: string[];
-
- /**
- * Return subdomains as an array.
- *
- * Subdomains are the dot-separated parts of the host before the main domain of
- * the app. By default, the domain of the app is assumed to be the last two
- * parts of the host. This can be changed by setting "subdomain offset".
- *
- * For example, if the domain is "tobi.ferrets.example.com":
- * If "subdomain offset" is not set, req.subdomains is `["ferrets", "tobi"]`.
- * If "subdomain offset" is 3, req.subdomains is `["tobi"]`.
- */
- subdomains: string[];
-
- /**
- * Short-hand for `url.parse(req.url).pathname`.
- */
- path: string;
-
- /**
- * Parse the "Host" header field hostname.
- */
- hostname: string;
-
- /**
- * @deprecated Use hostname instead.
- */
- host: string;
-
- /**
- * Check if the request is fresh, aka
- * Last-Modified and/or the ETag
- * still match.
- */
- fresh: boolean;
-
- /**
- * Check if the request is stale, aka
- * "Last-Modified" and / or the "ETag" for the
- * resource has changed.
- */
- stale: boolean;
-
- /**
- * Check if the request was an _XMLHttpRequest_.
- */
- xhr: boolean;
-
- //body: { username: string; password: string; remember: boolean; title: string; };
- body: ReqBody;
-
- //cookies: { string; remember: boolean; };
- cookies: any;
-
- method: string;
-
- params: P;
-
- query: ReqQuery;
-
- route: any;
-
- signedCookies: any;
-
- originalUrl: string;
-
- url: string;
-
- baseUrl: string;
-
- app: Application;
-
- /**
- * After middleware.init executed, Request will contain res and next properties
- * See: express/lib/middleware/init.js
- */
- res?: Response | undefined;
- next?: NextFunction | undefined;
-}
-
-export interface MediaType {
- value: string;
- quality: number;
- type: string;
- subtype: string;
-}
-
-export type Send> = (body?: ResBody) => T;
-
-export interface SendFileOptions extends SendOptions {
- /** Object containing HTTP headers to serve with the file. */
- headers?: Record;
-}
-
-export interface DownloadOptions extends SendOptions {
- /** Object containing HTTP headers to serve with the file. The header `Content-Disposition` will be overridden by the filename argument. */
- headers?: Record;
-}
-
-export interface Response<
- ResBody = any,
- LocalsObj extends Record = Record,
- StatusCode extends number = number
-> extends http.ServerResponse,
- Express.Response {
- /**
- * Set status `code`.
- */
- status(code: StatusCode): this;
-
- /**
- * Set the response HTTP status code to `statusCode` and send its string representation as the response body.
- * @link http://expressjs.com/4x/api.html#res.sendStatus
- *
- * Examples:
- *
- * res.sendStatus(200); // equivalent to res.status(200).send('OK')
- * res.sendStatus(403); // equivalent to res.status(403).send('Forbidden')
- * res.sendStatus(404); // equivalent to res.status(404).send('Not Found')
- * res.sendStatus(500); // equivalent to res.status(500).send('Internal Server Error')
- */
- sendStatus(code: StatusCode): this;
-
- /**
- * Set Link header field with the given `links`.
- *
- * Examples:
- *
- * res.links({
- * next: 'http://api.example.com/users?page=2',
- * last: 'http://api.example.com/users?page=5'
- * });
- */
- links(links: any): this;
-
- /**
- * Send a response.
- *
- * Examples:
- *
- * res.send(new Buffer('wahoo'));
- * res.send({ some: 'json' });
- * res.send('some html
');
- * res.status(404).send('Sorry, cant find that');
- */
- send: Send;
-
- /**
- * Send JSON response.
- *
- * Examples:
- *
- * res.json(null);
- * res.json({ user: 'tj' });
- * res.status(500).json('oh noes!');
- * res.status(404).json('I dont have that');
- */
- json: Send;
-
- /**
- * Send JSON response with JSONP callback support.
- *
- * Examples:
- *
- * res.jsonp(null);
- * res.jsonp({ user: 'tj' });
- * res.status(500).jsonp('oh noes!');
- * res.status(404).jsonp('I dont have that');
- */
- jsonp: Send;
-
- /**
- * Transfer the file at the given `path`.
- *
- * Automatically sets the _Content-Type_ response header field.
- * The callback `fn(err)` is invoked when the transfer is complete
- * or when an error occurs. Be sure to check `res.headersSent`
- * if you wish to attempt responding, as the header and some data
- * may have already been transferred.
- *
- * Options:
- *
- * - `maxAge` defaulting to 0 (can be string converted by `ms`)
- * - `root` root directory for relative filenames
- * - `headers` object of headers to serve with file
- * - `dotfiles` serve dotfiles, defaulting to false; can be `"allow"` to send them
- *
- * Other options are passed along to `send`.
- *
- * Examples:
- *
- * The following example illustrates how `res.sendFile()` may
- * be used as an alternative for the `static()` middleware for
- * dynamic situations. The code backing `res.sendFile()` is actually
- * the same code, so HTTP cache support etc is identical.
- *
- * app.get('/user/:uid/photos/:file', function(req, res){
- * var uid = req.params.uid
- * , file = req.params.file;
- *
- * req.user.mayViewFilesFrom(uid, function(yes){
- * if (yes) {
- * res.sendFile('/uploads/' + uid + '/' + file);
- * } else {
- * res.send(403, 'Sorry! you cant see that.');
- * }
- * });
- * });
- *
- * @api public
- */
- sendFile(path: string, fn?: Errback): void;
- sendFile(path: string, options: SendFileOptions, fn?: Errback): void;
-
- /**
- * @deprecated Use sendFile instead.
- */
- sendfile(path: string): void;
- /**
- * @deprecated Use sendFile instead.
- */
- sendfile(path: string, options: SendFileOptions): void;
- /**
- * @deprecated Use sendFile instead.
- */
- sendfile(path: string, fn: Errback): void;
- /**
- * @deprecated Use sendFile instead.
- */
- sendfile(path: string, options: SendFileOptions, fn: Errback): void;
-
- /**
- * Transfer the file at the given `path` as an attachment.
- *
- * Optionally providing an alternate attachment `filename`,
- * and optional callback `fn(err)`. The callback is invoked
- * when the data transfer is complete, or when an error has
- * ocurred. Be sure to check `res.headersSent` if you plan to respond.
- *
- * The optional options argument passes through to the underlying
- * res.sendFile() call, and takes the exact same parameters.
- *
- * This method uses `res.sendfile()`.
- */
- download(path: string, fn?: Errback): void;
- download(path: string, filename: string, fn?: Errback): void;
- download(path: string, filename: string, options: DownloadOptions, fn?: Errback): void;
-
- /**
- * Set _Content-Type_ response header with `type` through `mime.lookup()`
- * when it does not contain "/", or set the Content-Type to `type` otherwise.
- *
- * Examples:
- *
- * res.type('.html');
- * res.type('html');
- * res.type('json');
- * res.type('application/json');
- * res.type('png');
- */
- contentType(type: string): this;
-
- /**
- * Set _Content-Type_ response header with `type` through `mime.lookup()`
- * when it does not contain "/", or set the Content-Type to `type` otherwise.
- *
- * Examples:
- *
- * res.type('.html');
- * res.type('html');
- * res.type('json');
- * res.type('application/json');
- * res.type('png');
- */
- type(type: string): this;
-
- /**
- * Respond to the Acceptable formats using an `obj`
- * of mime-type callbacks.
- *
- * This method uses `req.accepted`, an array of
- * acceptable types ordered by their quality values.
- * When "Accept" is not present the _first_ callback
- * is invoked, otherwise the first match is used. When
- * no match is performed the server responds with
- * 406 "Not Acceptable".
- *
- * Content-Type is set for you, however if you choose
- * you may alter this within the callback using `res.type()`
- * or `res.set('Content-Type', ...)`.
- *
- * res.format({
- * 'text/plain': function(){
- * res.send('hey');
- * },
- *
- * 'text/html': function(){
- * res.send('hey
');
- * },
- *
- * 'appliation/json': function(){
- * res.send({ message: 'hey' });
- * }
- * });
- *
- * In addition to canonicalized MIME types you may
- * also use extnames mapped to these types:
- *
- * res.format({
- * text: function(){
- * res.send('hey');
- * },
- *
- * html: function(){
- * res.send('hey
');
- * },
- *
- * json: function(){
- * res.send({ message: 'hey' });
- * }
- * });
- *
- * By default Express passes an `Error`
- * with a `.status` of 406 to `next(err)`
- * if a match is not made. If you provide
- * a `.default` callback it will be invoked
- * instead.
- */
- format(obj: any): this;
-
- /**
- * Set _Content-Disposition_ header to _attachment_ with optional `filename`.
- */
- attachment(filename?: string): this;
-
- /**
- * Set header `field` to `val`, or pass
- * an object of header fields.
- *
- * Examples:
- *
- * res.set('Foo', ['bar', 'baz']);
- * res.set('Accept', 'application/json');
- * res.set({ Accept: 'text/plain', 'X-API-Key': 'tobi' });
- *
- * Aliased as `res.header()`.
- */
- set(field: any): this;
- set(field: string, value?: string | string[]): this;
-
- header(field: any): this;
- header(field: string, value?: string | string[]): this;
-
- // Property indicating if HTTP headers has been sent for the response.
- headersSent: boolean;
-
- /** Get value for header `field`. */
- get(field: string): string|undefined;
-
- /** Clear cookie `name`. */
- clearCookie(name: string, options?: CookieOptions): this;
-
- /**
- * Set cookie `name` to `val`, with the given `options`.
- *
- * Options:
- *
- * - `maxAge` max-age in milliseconds, converted to `expires`
- * - `signed` sign the cookie
- * - `path` defaults to "/"
- *
- * Examples:
- *
- * // "Remember Me" for 15 minutes
- * res.cookie('rememberme', '1', { expires: new Date(Date.now() + 900000), httpOnly: true });
- *
- * // save as above
- * res.cookie('rememberme', '1', { maxAge: 900000, httpOnly: true })
- */
- cookie(name: string, val: string, options: CookieOptions): this;
- cookie(name: string, val: any, options: CookieOptions): this;
- cookie(name: string, val: any): this;
-
- /**
- * Set the location header to `url`.
- *
- * The given `url` can also be the name of a mapped url, for
- * example by default express supports "back" which redirects
- * to the _Referrer_ or _Referer_ headers or "/".
- *
- * Examples:
- *
- * res.location('/foo/bar').;
- * res.location('http://example.com');
- * res.location('../login'); // /blog/post/1 -> /blog/login
- *
- * Mounting:
- *
- * When an application is mounted and `res.location()`
- * is given a path that does _not_ lead with "/" it becomes
- * relative to the mount-point. For example if the application
- * is mounted at "/blog", the following would become "/blog/login".
- *
- * res.location('login');
- *
- * While the leading slash would result in a location of "/login":
- *
- * res.location('/login');
- */
- location(url: string): this;
-
- /**
- * Redirect to the given `url` with optional response `status`
- * defaulting to 302.
- *
- * The resulting `url` is determined by `res.location()`, so
- * it will play nicely with mounted apps, relative paths,
- * `"back"` etc.
- *
- * Examples:
- *
- * res.redirect('back');
- * res.redirect('/foo/bar');
- * res.redirect('http://example.com');
- * res.redirect(301, 'http://example.com');
- * res.redirect('http://example.com', 301);
- * res.redirect('../login'); // /blog/post/1 -> /blog/login
- */
- redirect(url: string): void;
- redirect(status: number, url: string): void;
- /** @deprecated use res.redirect(status, url) instead */
- redirect(url: string, status: number): void;
-
- /**
- * Render `view` with the given `options` and optional callback `fn`.
- * When a callback function is given a response will _not_ be made
- * automatically, otherwise a response of _200_ and _text/html_ is given.
- *
- * Options:
- *
- * - `cache` boolean hinting to the engine it should cache
- * - `filename` filename of the view being rendered
- */
- render(view: string, options?: object, callback?: (err: Error, html: string) => void): void;
- render(view: string, callback?: (err: Error, html: string) => void): void;
-
- locals: LocalsObj & Locals;
-
- charset: string;
-
- /**
- * Adds the field to the Vary response header, if it is not there already.
- * Examples:
- *
- * res.vary('User-Agent').render('docs');
- *
- */
- vary(field: string): this;
-
- app: Application;
-
- /**
- * Appends the specified value to the HTTP response header field.
- * If the header is not already set, it creates the header with the specified value.
- * The value parameter can be a string or an array.
- *
- * Note: calling res.set() after res.append() will reset the previously-set header value.
- *
- * @since 4.11.0
- */
- append(field: string, value?: string[] | string): this;
-
- /**
- * After middleware.init executed, Response will contain req property
- * See: express/lib/middleware/init.js
- */
- req: Request;
-}
-
-export interface Handler extends RequestHandler {}
-
-export type RequestParamHandler = (req: Request, res: Response, next: NextFunction, value: any, name: string) => any;
-
-export type ApplicationRequestHandler = IRouterHandler &
- IRouterMatcher &
- ((...handlers: RequestHandlerParams[]) => T);
-
-export interface Application<
- LocalsObj extends Record = Record
-> extends EventEmitter, IRouter, Express.Application {
- /**
- * Express instance itself is a request handler, which could be invoked without
- * third argument.
- */
- (req: Request | http.IncomingMessage, res: Response | http.ServerResponse): any;
-
- /**
- * Initialize the server.
- *
- * - setup default configuration
- * - setup default middleware
- * - setup route reflection methods
- */
- init(): void;
-
- /**
- * Initialize application configuration.
- */
- defaultConfiguration(): void;
-
- /**
- * Register the given template engine callback `fn`
- * as `ext`.
- *
- * By default will `require()` the engine based on the
- * file extension. For example if you try to render
- * a "foo.jade" file Express will invoke the following internally:
- *
- * app.engine('jade', require('jade').__express);
- *
- * For engines that do not provide `.__express` out of the box,
- * or if you wish to "map" a different extension to the template engine
- * you may use this method. For example mapping the EJS template engine to
- * ".html" files:
- *
- * app.engine('html', require('ejs').renderFile);
- *
- * In this case EJS provides a `.renderFile()` method with
- * the same signature that Express expects: `(path, options, callback)`,
- * though note that it aliases this method as `ejs.__express` internally
- * so if you're using ".ejs" extensions you dont need to do anything.
- *
- * Some template engines do not follow this convention, the
- * [Consolidate.js](https://github.com/visionmedia/consolidate.js)
- * library was created to map all of node's popular template
- * engines to follow this convention, thus allowing them to
- * work seamlessly within Express.
- */
- engine(
- ext: string,
- fn: (path: string, options: object, callback: (e: any, rendered?: string) => void) => void,
- ): this;
-
- /**
- * Assign `setting` to `val`, or return `setting`'s value.
- *
- * app.set('foo', 'bar');
- * app.get('foo');
- * // => "bar"
- * app.set('foo', ['bar', 'baz']);
- * app.get('foo');
- * // => ["bar", "baz"]
- *
- * Mounted servers inherit their parent server's settings.
- */
- set(setting: string, val: any): this;
- get: ((name: string) => any) & IRouterMatcher;
-
- param(name: string | string[], handler: RequestParamHandler): this;
-
- /**
- * Alternatively, you can pass only a callback, in which case you have the opportunity to alter the app.param()
- *
- * @deprecated since version 4.11
- */
- param(callback: (name: string, matcher: RegExp) => RequestParamHandler): this;
-
- /**
- * Return the app's absolute pathname
- * based on the parent(s) that have
- * mounted it.
- *
- * For example if the application was
- * mounted as "/admin", which itself
- * was mounted as "/blog" then the
- * return value would be "/blog/admin".
- */
- path(): string;
-
- /**
- * Check if `setting` is enabled (truthy).
- *
- * app.enabled('foo')
- * // => false
- *
- * app.enable('foo')
- * app.enabled('foo')
- * // => true
- */
- enabled(setting: string): boolean;
-
- /**
- * Check if `setting` is disabled.
- *
- * app.disabled('foo')
- * // => true
- *
- * app.enable('foo')
- * app.disabled('foo')
- * // => false
- */
- disabled(setting: string): boolean;
-
- /** Enable `setting`. */
- enable(setting: string): this;
-
- /** Disable `setting`. */
- disable(setting: string): this;
-
- /**
- * Render the given view `name` name with `options`
- * and a callback accepting an error and the
- * rendered template string.
- *
- * Example:
- *
- * app.render('email', { name: 'Tobi' }, function(err, html){
- * // ...
- * })
- */
- render(name: string, options?: object, callback?: (err: Error, html: string) => void): void;
- render(name: string, callback: (err: Error, html: string) => void): void;
-
- /**
- * Listen for connections.
- *
- * A node `http.Server` is returned, with this
- * application (which is a `Function`) as its
- * callback. If you wish to create both an HTTP
- * and HTTPS server you may do so with the "http"
- * and "https" modules as shown here:
- *
- * var http = require('http')
- * , https = require('https')
- * , express = require('express')
- * , app = express();
- *
- * http.createServer(app).listen(80);
- * https.createServer({ ... }, app).listen(443);
- */
- listen(port: number, hostname: string, backlog: number, callback?: () => void): http.Server;
- listen(port: number, hostname: string, callback?: () => void): http.Server;
- listen(port: number, callback?: () => void): http.Server;
- listen(callback?: () => void): http.Server;
- listen(path: string, callback?: () => void): http.Server;
- listen(handle: any, listeningListener?: () => void): http.Server;
-
- router: string;
-
- settings: any;
-
- resource: any;
-
- map: any;
-
- locals: LocalsObj & Locals;
-
- /**
- * The app.routes object houses all of the routes defined mapped by the
- * associated HTTP verb. This object may be used for introspection
- * capabilities, for example Express uses this internally not only for
- * routing but to provide default OPTIONS behaviour unless app.options()
- * is used. Your application or framework may also remove routes by
- * simply by removing them from this object.
- */
- routes: any;
-
- /**
- * Used to get all registered routes in Express Application
- */
- _router: any;
-
- use: ApplicationRequestHandler;
-
- /**
- * The mount event is fired on a sub-app, when it is mounted on a parent app.
- * The parent app is passed to the callback function.
- *
- * NOTE:
- * Sub-apps will:
- * - Not inherit the value of settings that have a default value. You must set the value in the sub-app.
- * - Inherit the value of settings with no default value.
- */
- on: (event: string, callback: (parent: Application) => void) => this;
-
- /**
- * The app.mountpath property contains one or more path patterns on which a sub-app was mounted.
- */
- mountpath: string | string[];
-}
-
-export interface Express extends Application {
- request: Request;
- response: Response;
-}
diff --git a/server/node_modules/@types/express-serve-static-core/package.json b/server/node_modules/@types/express-serve-static-core/package.json
deleted file mode 100644
index b75d0ff..0000000
--- a/server/node_modules/@types/express-serve-static-core/package.json
+++ /dev/null
@@ -1,55 +0,0 @@
-{
- "name": "@types/express-serve-static-core",
- "version": "4.17.35",
- "description": "TypeScript definitions for Express",
- "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-serve-static-core",
- "license": "MIT",
- "contributors": [
- {
- "name": "Boris Yankov",
- "url": "https://github.com/borisyankov",
- "githubUsername": "borisyankov"
- },
- {
- "name": "Satana Charuwichitratana",
- "url": "https://github.com/micksatana",
- "githubUsername": "micksatana"
- },
- {
- "name": "Sami Jaber",
- "url": "https://github.com/samijaber",
- "githubUsername": "samijaber"
- },
- {
- "name": "Jose Luis Leon",
- "url": "https://github.com/JoseLion",
- "githubUsername": "JoseLion"
- },
- {
- "name": "David Stephens",
- "url": "https://github.com/dwrss",
- "githubUsername": "dwrss"
- },
- {
- "name": "Shin Ando",
- "url": "https://github.com/andoshin11",
- "githubUsername": "andoshin11"
- }
- ],
- "main": "",
- "types": "index.d.ts",
- "repository": {
- "type": "git",
- "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
- "directory": "types/express-serve-static-core"
- },
- "scripts": {},
- "dependencies": {
- "@types/node": "*",
- "@types/qs": "*",
- "@types/range-parser": "*",
- "@types/send": "*"
- },
- "typesPublisherContentHash": "ff8dd9048ee34bf16a6700ed4e90e394e1b8262392fc0c2dfa2e9ea6246bde19",
- "typeScriptVersion": "4.3"
-}
\ No newline at end of file
diff --git a/server/node_modules/@types/express/LICENSE b/server/node_modules/@types/express/LICENSE
deleted file mode 100644
index 9e841e7..0000000
--- a/server/node_modules/@types/express/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
- MIT License
-
- Copyright (c) Microsoft Corporation.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE
diff --git a/server/node_modules/@types/express/README.md b/server/node_modules/@types/express/README.md
deleted file mode 100644
index 302c833..0000000
--- a/server/node_modules/@types/express/README.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# Installation
-> `npm install --save @types/express`
-
-# Summary
-This package contains type definitions for Express (http://expressjs.com).
-
-# Details
-Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express.
-
-### Additional Details
- * Last updated: Fri, 03 Feb 2023 21:32:47 GMT
- * Dependencies: [@types/body-parser](https://npmjs.com/package/@types/body-parser), [@types/express-serve-static-core](https://npmjs.com/package/@types/express-serve-static-core), [@types/qs](https://npmjs.com/package/@types/qs), [@types/serve-static](https://npmjs.com/package/@types/serve-static)
- * Global values: none
-
-# Credits
-These definitions were written by [Boris Yankov](https://github.com/borisyankov), [China Medical University Hospital](https://github.com/CMUH), [Puneet Arora](https://github.com/puneetar), and [Dylan Frankland](https://github.com/dfrankland).
diff --git a/server/node_modules/@types/express/index.d.ts b/server/node_modules/@types/express/index.d.ts
deleted file mode 100644
index 53dc74d..0000000
--- a/server/node_modules/@types/express/index.d.ts
+++ /dev/null
@@ -1,136 +0,0 @@
-// Type definitions for Express 4.17
-// Project: http://expressjs.com
-// Definitions by: Boris Yankov
-// China Medical University Hospital
-// Puneet Arora
-// Dylan Frankland
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-/* =================== USAGE ===================
-
- import express = require("express");
- var app = express();
-
- =============================================== */
-
-///
-///
-
-import * as bodyParser from 'body-parser';
-import * as serveStatic from 'serve-static';
-import * as core from 'express-serve-static-core';
-import * as qs from 'qs';
-
-/**
- * Creates an Express application. The express() function is a top-level function exported by the express module.
- */
-declare function e(): core.Express;
-
-declare namespace e {
- /**
- * This is a built-in middleware function in Express. It parses incoming requests with JSON payloads and is based on body-parser.
- * @since 4.16.0
- */
- var json: typeof bodyParser.json;
-
- /**
- * This is a built-in middleware function in Express. It parses incoming requests with Buffer payloads and is based on body-parser.
- * @since 4.17.0
- */
- var raw: typeof bodyParser.raw;
-
- /**
- * This is a built-in middleware function in Express. It parses incoming requests with text payloads and is based on body-parser.
- * @since 4.17.0
- */
- var text: typeof bodyParser.text;
-
- /**
- * These are the exposed prototypes.
- */
- var application: Application;
- var request: Request;
- var response: Response;
-
- /**
- * This is a built-in middleware function in Express. It serves static files and is based on serve-static.
- */
- var static: serveStatic.RequestHandlerConstructor;
-
- /**
- * This is a built-in middleware function in Express. It parses incoming requests with urlencoded payloads and is based on body-parser.
- * @since 4.16.0
- */
- var urlencoded: typeof bodyParser.urlencoded;
-
- /**
- * This is a built-in middleware function in Express. It parses incoming request query parameters.
- */
- export function query(options: qs.IParseOptions | typeof qs.parse): Handler;
-
- export function Router(options?: RouterOptions): core.Router;
-
- interface RouterOptions {
- /**
- * Enable case sensitivity.
- */
- caseSensitive?: boolean | undefined;
-
- /**
- * Preserve the req.params values from the parent router.
- * If the parent and the child have conflicting param names, the child’s value take precedence.
- *
- * @default false
- * @since 4.5.0
- */
- mergeParams?: boolean | undefined;
-
- /**
- * Enable strict routing.
- */
- strict?: boolean | undefined;
- }
-
- interface Application extends core.Application {}
- interface CookieOptions extends core.CookieOptions {}
- interface Errback extends core.Errback {}
- interface ErrorRequestHandler<
- P = core.ParamsDictionary,
- ResBody = any,
- ReqBody = any,
- ReqQuery = core.Query,
- Locals extends Record = Record
- > extends core.ErrorRequestHandler {}
- interface Express extends core.Express {}
- interface Handler extends core.Handler {}
- interface IRoute extends core.IRoute {}
- interface IRouter extends core.IRouter {}
- interface IRouterHandler extends core.IRouterHandler {}
- interface IRouterMatcher extends core.IRouterMatcher {}
- interface MediaType extends core.MediaType {}
- interface NextFunction extends core.NextFunction {}
- interface Locals extends core.Locals {}
- interface Request<
- P = core.ParamsDictionary,
- ResBody = any,
- ReqBody = any,
- ReqQuery = core.Query,
- Locals extends Record = Record
- > extends core.Request {}
- interface RequestHandler<
- P = core.ParamsDictionary,
- ResBody = any,
- ReqBody = any,
- ReqQuery = core.Query,
- Locals extends Record = Record
- > extends core.RequestHandler {}
- interface RequestParamHandler extends core.RequestParamHandler {}
- interface Response<
- ResBody = any,
- Locals extends Record = Record
- > extends core.Response {}
- interface Router extends core.Router {}
- interface Send extends core.Send {}
-}
-
-export = e;
diff --git a/server/node_modules/@types/express/package.json b/server/node_modules/@types/express/package.json
deleted file mode 100644
index 10071c3..0000000
--- a/server/node_modules/@types/express/package.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "name": "@types/express",
- "version": "4.17.17",
- "description": "TypeScript definitions for Express",
- "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express",
- "license": "MIT",
- "contributors": [
- {
- "name": "Boris Yankov",
- "url": "https://github.com/borisyankov",
- "githubUsername": "borisyankov"
- },
- {
- "name": "China Medical University Hospital",
- "url": "https://github.com/CMUH",
- "githubUsername": "CMUH"
- },
- {
- "name": "Puneet Arora",
- "url": "https://github.com/puneetar",
- "githubUsername": "puneetar"
- },
- {
- "name": "Dylan Frankland",
- "url": "https://github.com/dfrankland",
- "githubUsername": "dfrankland"
- }
- ],
- "main": "",
- "types": "index.d.ts",
- "repository": {
- "type": "git",
- "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
- "directory": "types/express"
- },
- "scripts": {},
- "dependencies": {
- "@types/body-parser": "*",
- "@types/express-serve-static-core": "^4.17.33",
- "@types/qs": "*",
- "@types/serve-static": "*"
- },
- "typesPublisherContentHash": "a4c3d98898199c22408b7c0662e85011cacce7899cd22a66275337ec40edac14",
- "typeScriptVersion": "4.2"
-}
\ No newline at end of file
diff --git a/server/node_modules/@types/http-errors/LICENSE b/server/node_modules/@types/http-errors/LICENSE
deleted file mode 100644
index 9e841e7..0000000
--- a/server/node_modules/@types/http-errors/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
- MIT License
-
- Copyright (c) Microsoft Corporation.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE
diff --git a/server/node_modules/@types/http-errors/README.md b/server/node_modules/@types/http-errors/README.md
deleted file mode 100644
index 6c5443f..0000000
--- a/server/node_modules/@types/http-errors/README.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# Installation
-> `npm install --save @types/http-errors`
-
-# Summary
-This package contains type definitions for http-errors (https://github.com/jshttp/http-errors).
-
-# Details
-Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/http-errors.
-
-### Additional Details
- * Last updated: Tue, 01 Nov 2022 00:02:46 GMT
- * Dependencies: none
- * Global values: none
-
-# Credits
-These definitions were written by [Tanguy Krotoff](https://github.com/tkrotoff), and [BendingBender](https://github.com/BendingBender).
diff --git a/server/node_modules/@types/http-errors/index.d.ts b/server/node_modules/@types/http-errors/index.d.ts
deleted file mode 100644
index 6b5a3d5..0000000
--- a/server/node_modules/@types/http-errors/index.d.ts
+++ /dev/null
@@ -1,83 +0,0 @@
-// Type definitions for http-errors 2.0
-// Project: https://github.com/jshttp/http-errors
-// Definitions by: Tanguy Krotoff
-// BendingBender
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-export = createHttpError;
-
-declare const createHttpError: createHttpError.CreateHttpError & createHttpError.NamedConstructors & {
- isHttpError: createHttpError.IsHttpError
-};
-
-declare namespace createHttpError {
- interface HttpError extends Error {
- status: N;
- statusCode: N;
- expose: boolean;
- headers?: {
- [key: string]: string;
- } | undefined;
- [key: string]: any;
- }
-
- type UnknownError = Error | string | { [key: string]: any };
-
- interface HttpErrorConstructor {
- (msg?: string): HttpError;
- new (msg?: string): HttpError;
- }
-
- interface CreateHttpError {
- (arg: N, ...rest: UnknownError[]): HttpError;
- (...rest: UnknownError[]): HttpError;
- }
-
- type IsHttpError = (error: unknown) => error is HttpError;
-
- type NamedConstructors = {
- HttpError: HttpErrorConstructor;
- }
- & Record<'BadRequest' | '400', HttpErrorConstructor<400>>
- & Record<'Unauthorized' | '401', HttpErrorConstructor<401>>
- & Record<'PaymentRequired' | '402', HttpErrorConstructor<402>>
- & Record<'Forbidden' | '403', HttpErrorConstructor<403>>
- & Record<'NotFound' | '404', HttpErrorConstructor<404>>
- & Record<'MethodNotAllowed' | '405', HttpErrorConstructor<405>>
- & Record<'NotAcceptable' | '406', HttpErrorConstructor<406>>
- & Record<'ProxyAuthenticationRequired' | '407', HttpErrorConstructor<407>>
- & Record<'RequestTimeout' | '408', HttpErrorConstructor<408>>
- & Record<'Conflict' | '409', HttpErrorConstructor<409>>
- & Record<'Gone' | '410', HttpErrorConstructor<410>>
- & Record<'LengthRequired' | '411', HttpErrorConstructor<411>>
- & Record<'PreconditionFailed' | '412', HttpErrorConstructor<412>>
- & Record<'PayloadTooLarge' | '413', HttpErrorConstructor<413>>
- & Record<'URITooLong' | '414', HttpErrorConstructor<414>>
- & Record<'UnsupportedMediaType' | '415', HttpErrorConstructor<415>>
- & Record<'RangeNotSatisfiable' | '416', HttpErrorConstructor<416>>
- & Record<'ExpectationFailed' | '417', HttpErrorConstructor<417>>
- & Record<'ImATeapot' | '418', HttpErrorConstructor<418>>
- & Record<'MisdirectedRequest' | '421', HttpErrorConstructor<421>>
- & Record<'UnprocessableEntity' | '422', HttpErrorConstructor<422>>
- & Record<'Locked' | '423', HttpErrorConstructor<423>>
- & Record<'FailedDependency' | '424', HttpErrorConstructor<424>>
- & Record<'TooEarly' | '425', HttpErrorConstructor<425>>
- & Record<'UpgradeRequired' | '426', HttpErrorConstructor<426>>
- & Record<'PreconditionRequired' | '428', HttpErrorConstructor<428>>
- & Record<'TooManyRequests' | '429', HttpErrorConstructor<429>>
- & Record<'RequestHeaderFieldsTooLarge' | '431', HttpErrorConstructor<431>>
- & Record<'UnavailableForLegalReasons' | '451', HttpErrorConstructor<451>>
- & Record<'InternalServerError' | '500', HttpErrorConstructor<500>>
- & Record<'NotImplemented' | '501', HttpErrorConstructor<501>>
- & Record<'BadGateway' | '502', HttpErrorConstructor<502>>
- & Record<'ServiceUnavailable' | '503', HttpErrorConstructor<503>>
- & Record<'GatewayTimeout' | '504', HttpErrorConstructor<504>>
- & Record<'HTTPVersionNotSupported' | '505', HttpErrorConstructor<505>>
- & Record<'VariantAlsoNegotiates' | '506', HttpErrorConstructor<506>>
- & Record<'InsufficientStorage' | '507', HttpErrorConstructor<507>>
- & Record<'LoopDetected' | '508', HttpErrorConstructor<508>>
- & Record<'BandwidthLimitExceeded' | '509', HttpErrorConstructor<509>>
- & Record<'NotExtended' | '510', HttpErrorConstructor<510>>
- & Record<'NetworkAuthenticationRequire' | '511', HttpErrorConstructor<511>>
- ;
-}
diff --git a/server/node_modules/@types/http-errors/package.json b/server/node_modules/@types/http-errors/package.json
deleted file mode 100644
index 6a9d486..0000000
--- a/server/node_modules/@types/http-errors/package.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "name": "@types/http-errors",
- "version": "2.0.1",
- "description": "TypeScript definitions for http-errors",
- "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/http-errors",
- "license": "MIT",
- "contributors": [
- {
- "name": "Tanguy Krotoff",
- "url": "https://github.com/tkrotoff",
- "githubUsername": "tkrotoff"
- },
- {
- "name": "BendingBender",
- "url": "https://github.com/BendingBender",
- "githubUsername": "BendingBender"
- }
- ],
- "main": "",
- "types": "index.d.ts",
- "repository": {
- "type": "git",
- "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
- "directory": "types/http-errors"
- },
- "scripts": {},
- "dependencies": {},
- "typesPublisherContentHash": "1dfc69d7710a0e2de926b0320f119575b2626e7d4b615157ad092d057e039373",
- "typeScriptVersion": "4.1"
-}
\ No newline at end of file
diff --git a/server/node_modules/@types/mime/LICENSE b/server/node_modules/@types/mime/LICENSE
deleted file mode 100644
index 9e841e7..0000000
--- a/server/node_modules/@types/mime/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
- MIT License
-
- Copyright (c) Microsoft Corporation.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE
diff --git a/server/node_modules/@types/mime/Mime.d.ts b/server/node_modules/@types/mime/Mime.d.ts
deleted file mode 100644
index a516bd4..0000000
--- a/server/node_modules/@types/mime/Mime.d.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { TypeMap } from "./index";
-
-export default class Mime {
- constructor(mimes: TypeMap);
-
- lookup(path: string, fallback?: string): string;
- extension(mime: string): string | undefined;
- load(filepath: string): void;
- define(mimes: TypeMap): void;
-}
diff --git a/server/node_modules/@types/mime/README.md b/server/node_modules/@types/mime/README.md
deleted file mode 100644
index fd615ac..0000000
--- a/server/node_modules/@types/mime/README.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# Installation
-> `npm install --save @types/mime`
-
-# Summary
-This package contains type definitions for mime (https://github.com/broofa/node-mime).
-
-# Details
-Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mime/v1.
-
-### Additional Details
- * Last updated: Mon, 18 Jan 2021 14:32:15 GMT
- * Dependencies: none
- * Global values: `mime`, `mimelite`
-
-# Credits
-These definitions were written by [Jeff Goddard](https://github.com/jedigo), and [Daniel Hritzkiv](https://github.com/dhritzkiv).
diff --git a/server/node_modules/@types/mime/index.d.ts b/server/node_modules/@types/mime/index.d.ts
deleted file mode 100644
index 3240e75..0000000
--- a/server/node_modules/@types/mime/index.d.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-// Type definitions for mime 1.3
-// Project: https://github.com/broofa/node-mime
-// Definitions by: Jeff Goddard
-// Daniel Hritzkiv
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-// Originally imported from: https://github.com/soywiz/typescript-node-definitions/mime.d.ts
-
-export as namespace mime;
-
-export interface TypeMap { [key: string]: string[]; }
-
-/**
- * Look up a mime type based on extension.
- *
- * If not found, uses the fallback argument if provided, and otherwise
- * uses `default_type`.
- */
-export function lookup(path: string, fallback?: string): string;
-/**
- * Return a file extensions associated with a mime type.
- */
-export function extension(mime: string): string | undefined;
-/**
- * Load an Apache2-style ".types" file.
- */
-export function load(filepath: string): void;
-export function define(mimes: TypeMap): void;
-
-export interface Charsets {
- lookup(mime: string, fallback: string): string;
-}
-
-export const charsets: Charsets;
-export const default_type: string;
diff --git a/server/node_modules/@types/mime/lite.d.ts b/server/node_modules/@types/mime/lite.d.ts
deleted file mode 100644
index ffebaec..0000000
--- a/server/node_modules/@types/mime/lite.d.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { default as Mime } from "./Mime";
-
-declare const mimelite: Mime;
-
-export as namespace mimelite;
-
-export = mimelite;
diff --git a/server/node_modules/@types/mime/package.json b/server/node_modules/@types/mime/package.json
deleted file mode 100644
index ad46550..0000000
--- a/server/node_modules/@types/mime/package.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "name": "@types/mime",
- "version": "1.3.2",
- "description": "TypeScript definitions for mime",
- "license": "MIT",
- "contributors": [
- {
- "name": "Jeff Goddard",
- "url": "https://github.com/jedigo",
- "githubUsername": "jedigo"
- },
- {
- "name": "Daniel Hritzkiv",
- "url": "https://github.com/dhritzkiv",
- "githubUsername": "dhritzkiv"
- }
- ],
- "main": "",
- "types": "index.d.ts",
- "repository": {
- "type": "git",
- "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
- "directory": "types/mime"
- },
- "scripts": {},
- "dependencies": {},
- "typesPublisherContentHash": "529a2ee85950b588c079bd053520c5b3c2bbff1886870bc08188284265324348",
- "typeScriptVersion": "3.4"
-}
\ No newline at end of file
diff --git a/server/node_modules/@types/mongodb/LICENSE b/server/node_modules/@types/mongodb/LICENSE
deleted file mode 100644
index 9e841e7..0000000
--- a/server/node_modules/@types/mongodb/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
- MIT License
-
- Copyright (c) Microsoft Corporation.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE
diff --git a/server/node_modules/@types/mongodb/README.md b/server/node_modules/@types/mongodb/README.md
deleted file mode 100644
index 36d79ca..0000000
--- a/server/node_modules/@types/mongodb/README.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# Installation
-> `npm install --save @types/mongodb`
-
-# Summary
-This package contains type definitions for MongoDB (https://github.com/mongodb/node-mongodb-native).
-
-# Details
-Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mongodb.
-
-### Additional Details
- * Last updated: Wed, 07 Jul 2021 00:01:43 GMT
- * Dependencies: [@types/bson](https://npmjs.com/package/@types/bson), [@types/node](https://npmjs.com/package/@types/node)
- * Global values: none
-
-# Credits
-These definitions were written by [Federico Caselli](https://github.com/CaselIT), [Alan Marcell](https://github.com/alanmarcell), [Gaurav Lahoti](https://github.com/dante-101), [Mariano Cortesi](https://github.com/mcortesi), [Enrico Picci](https://github.com/EnricoPicci), [Alexander Christie](https://github.com/AJCStriker), [Julien Chaumond](https://github.com/julien-c), [Dan Aprahamian](https://github.com/daprahamian), [Denys Bushulyak](https://github.com/denys-bushulyak), [Bastien Arata](https://github.com/b4nst), [Wan Bachtiar](https://github.com/sindbach), [Geraldine Lemeur](https://github.com/geraldinelemeur), [Dominik Heigl](https://github.com/various89), [Angela-1](https://github.com/angela-1), [Hector Ribes](https://github.com/hector7), [Florian Richter](https://github.com/floric), [Erik Christensen](https://github.com/erikc5000), [Nick Zahn](https://github.com/Manc), [Jarom Loveridge](https://github.com/jloveridge), [Luis Pais](https://github.com/ranguna), [Hossein Saniei](https://github.com/HosseinAgha), [Alberto Silva](https://github.com/albertossilva), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Linus Unnebäck](https://github.com/LinusU), [Richard Bateman](https://github.com/taxilian), [Igor Strebezhev](https://github.com/xamgore), [Valentin Agachi](https://github.com/avaly), [HitkoDev](https://github.com/HitkoDev), [TJT](https://github.com/Celend), [Julien TASSIN](https://github.com/jtassin), [Anna Henningsen](https://github.com/addaleax), [Emmanuel Gautier](https://github.com/emmanuelgautier), [Wyatt Johnson](https://github.com/wyattjoh), and [Boris Figovsky](https://github.com/borfig).
diff --git a/server/node_modules/@types/mongodb/index.d.ts b/server/node_modules/@types/mongodb/index.d.ts
deleted file mode 100644
index d37f518..0000000
--- a/server/node_modules/@types/mongodb/index.d.ts
+++ /dev/null
@@ -1,5230 +0,0 @@
-// Type definitions for MongoDB 3.6
-// Project: https://github.com/mongodb/node-mongodb-native
-// https://github.com/mongodb/node-mongodb-native/tree/3.1
-// Definitions by: Federico Caselli
-// Alan Marcell
-// Gaurav Lahoti
-// Mariano Cortesi
-// Enrico Picci
-// Alexander Christie
-// Julien Chaumond
-// Dan Aprahamian
-// Denys Bushulyak
-// Bastien Arata
-// Wan Bachtiar
-// Geraldine Lemeur
-// Dominik Heigl
-// Angela-1
-// Hector Ribes
-// Florian Richter
-// Erik Christensen
-// Nick Zahn
-// Jarom Loveridge
-// Luis Pais
-// Hossein Saniei
-// Alberto Silva
-// Piotr Błażejewicz
-// Linus Unnebäck
-// Richard Bateman
-// Igor Strebezhev
-// Valentin Agachi
-// HitkoDev
-// TJT
-// Julien TASSIN
-// Anna Henningsen
-// Emmanuel Gautier
-// Wyatt Johnson
-// Boris Figovsky
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-// Minimum TypeScript Version: 3.2
-
-// Documentation: https://mongodb.github.io/node-mongodb-native/3.6/api/
-
-///
-///
-
-import { Binary, Decimal128, Double, Int32, Long, ObjectId, Timestamp } from "bson";
-import { EventEmitter } from "events";
-import { Readable, Writable } from "stream";
-import { checkServerIdentity } from "tls";
-
-type FlattenIfArray = T extends ReadonlyArray ? R : T;
-export type WithoutProjection = T & { fields?: undefined; projection?: undefined };
-
-export function connect(uri: string, options?: MongoClientOptions): Promise;
-export function connect(uri: string, callback: MongoCallback): void;
-export function connect(uri: string, options: MongoClientOptions, callback: MongoCallback): void;
-
-export { Binary, DBRef, Decimal128, Double, Int32, Long, MaxKey, MinKey, ObjectID, ObjectId, Timestamp } from "bson";
-
-type NumericTypes = number | Decimal128 | Double | Int32 | Long;
-
-/**
- * Creates a new MongoClient instance
- *
- * @param uri The connection URI string
- * @param options Optional settings
- * @param callback The optional command result callback
- * @returns MongoClient instance
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/MongoClient.html
- */
-export class MongoClient extends EventEmitter {
- constructor(uri: string, options?: MongoClientOptions);
- /**
- * Connect to MongoDB using a url as documented at
- * https://docs.mongodb.org/manual/reference/connection-string/
- *
- * @param uri The connection URI string
- * @param options Optional settings
- * @param callback The optional command result callback
- * @returns Promise if no callback is passed
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/MongoClient.html#.connect
- */
- static connect(uri: string, callback: MongoCallback): void;
- static connect(uri: string, options?: MongoClientOptions): Promise;
- static connect(uri: string, options: MongoClientOptions, callback: MongoCallback): void;
- /**
- * Connect to MongoDB using a url as documented at
- * https://docs.mongodb.org/manual/reference/connection-string/
- *
- * @param callback The optional command result callback
- * @returns Promise if no callback is passed
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/MongoClient.html#connect
- */
- connect(): Promise;
- connect(callback: MongoCallback): void;
- /**
- * Close the db and its underlying connections
- *
- * @param force Optional force close, emitting no events
- * @param callback The optional result callback
- * @returns Promise if no callback is passed
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/MongoClient.html#close
- */
- close(callback: MongoCallback): void;
- close(force?: boolean): Promise;
- close(force: boolean, callback: MongoCallback): void;
- /**
- * Create a new Db instance sharing the current socket connections.
- * Be aware that the new db instances are related in a parent-child relationship to the original instance so that events are correctly emitted on child db instances.
- * Child db instances are cached so performing db('db1') twice will return the same instance.
- * You can control these behaviors with the options noListener and returnNonCachedInstance.
- *
- * @param dbName The name of the database we want to use. If not provided, use database name from connection string
- * @param options Optional settings
- * @returns The Db object
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/MongoClient.html#db
- */
- db(dbName?: string, options?: MongoClientCommonOption): Db;
- /**
- * Check if MongoClient is connected
- *
- * @param options Optional settings
- * @returns Whether the MongoClient is connected or not
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/MongoClient.html#isConnected
- */
- isConnected(options?: MongoClientCommonOption): boolean;
- /**
- * Starts a new session on the server
- *
- * @param options Optional settings for a driver session~
- * @returns Newly established session
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/MongoClient.html#startSession
- */
- startSession(options?: SessionOptions): ClientSession;
- /**
- * Create a new Change Stream, watching for new changes (insertions, updates, replacements, deletions, and invalidations) in this cluster.
- * Will ignore all changes to system collections, as well as the local, admin, and config databases.
- *
- * @param pipeline An array of {@link https://docs.mongodb.com/v3.6/reference/operator/aggregation-pipeline/ aggregation pipeline stages} through which to pass change stream documents.
- * This allows for filtering (using $match) and manipulating the change stream documents.
- * @param options Optional settings
- * @returns ChangeStream instance
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/MongoClient.html#watch
- */
- watch(
- pipeline?: object[],
- options?: ChangeStreamOptions & { session?: ClientSession | undefined },
- ): ChangeStream;
- /**
- * Runs a given operation with an implicitly created session. The lifetime of the session will be handled without the need for user interaction.
- * NOTE: presently the operation MUST return a Promise (either explicit or implicity as an async function)
- *
- * @param options Optional settings to be appled to implicitly created session
- * @param operation An operation to execute with an implicitly created session. The signature of this MUST be `(session) => {}`
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/MongoClient.html#withSession
- */
- withSession(operation: (session: ClientSession) => Promise): Promise;
- withSession(options: SessionOptions, operation: (session: ClientSession) => Promise): Promise;
-
- readPreference: ReadPreference;
- writeConcern: WriteConcern;
-}
-
-export type ClientSessionId = unknown;
-
-/**
- * A class representing a client session on the server
- * WARNING: not meant to be instantiated directly.
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/ClientSession.html
- */
-export interface ClientSession extends EventEmitter {
- /** The server id associated with this session */
- id: ClientSessionId;
-
- /**
- * Aborts the currently active transaction in this session.
- *
- * @param callback Optional callback for completion of this operation
- * @returns Promise if no callback is provided
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/ClientSession.html#abortTransaction
- */
- abortTransaction(): Promise;
- abortTransaction(callback?: MongoCallback): void;
-
- /**
- * Advances the operationTime for a {@link ClientSession}.
- *
- * @param operationTime The `BSON.Timestamp` of the operation type it is desired to advance to
- */
- advanceOperationTime(operationTime: Timestamp): void;
-
- /**
- * Commits the currently active transaction in this session.
- *
- * @param callback Optional callback for completion of this operation
- * @returns Promise if no callback is provided
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/ClientSession.html#commitTransaction
- */
- commitTransaction(): Promise;
- commitTransaction(callback: MongoCallback): void;
-
- /**
- * Ends this session on the server
- *
- * @param options Optional settings Currently reserved for future use
- * @param callback Optional callback for completion of this operation
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/ClientSession.html#endSession
- */
- endSession(callback?: MongoCallback): void;
- endSession(options: Object, callback: MongoCallback): void;
- endSession(options?: Object): Promise;
-
- /**
- * Used to determine if this session equals another
- *
- * @param session - a class representing a client session on the server
- * @returns `true` if the sessions are equal
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/ClientSession.html#equals
- */
- equals(session: ClientSession): boolean;
-
- /**
- * Increment the transaction number on the internal `ServerSession`
- *
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/ClientSession.html#incrementTransactionNumber
- */
- incrementTransactionNumber(): void;
-
- /**
- * @returns whether this session is currently in a transaction or not
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/ClientSession.html#inTransaction
- */
- inTransaction(): boolean;
-
- /**
- * Starts a new transaction with the given options.
- *
- * @param options Options for the transaction
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/ClientSession.html#startTransaction
- */
- startTransaction(options?: TransactionOptions): void;
-
- /**
- * Runs a provided lambda within a transaction, retrying either the commit operation
- * or entire transaction as needed (and when the error permits) to better ensure that
- * the transaction can complete successfully.
- *
- * IMPORTANT: This method requires the user to return a Promise, all lambdas that do not
- * return a Promise will result in undefined behavior.
- *
- * @param fn A user provided function to be run within a transaction
- * @param options Optional settings for the transaction
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/ClientSession.html#withTransaction
- */
- withTransaction(fn: WithTransactionCallback, options?: TransactionOptions): Promise;
-}
-
-/**
- * The MongoDB ReadConcern, which allows for control of the consistency and isolation properties
- * of the data read from replica sets and replica set shards.
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/global.html#ReadConcern
- */
-type ReadConcernLevel = "local" | "available" | "majority" | "linearizable" | "snapshot";
-
-/**
- * The MongoDB ReadConcern, which allows for control of the consistency and isolation properties
- * of the data read from replica sets and replica set shards.
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/global.html#ReadConcern
- */
-export interface ReadConcern {
- level: ReadConcernLevel;
-}
-
-/**
- * A MongoDB WriteConcern, which describes the level of acknowledgement
- * requested from MongoDB for write operations.
- *
- * @param w requests acknowledgement that the write operation has propagated to a specified number of mongod hosts
- * @param j requests acknowledgement from MongoDB that the write operation has been written to the journal
- * @param timeout a time limit, in milliseconds, for the write concern
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/global.html#WriteConcern
- */
-interface WriteConcern {
- /**
- * requests acknowledgement that the write operation has
- * propagated to a specified number of mongod hosts
- * @default 1
- */
- w?: number | "majority" | string | undefined;
- /**
- * requests acknowledgement from MongoDB that the write operation has
- * been written to the journal
- * @default false
- */
- j?: boolean | undefined;
- /**
- * a time limit, in milliseconds, for the write concern
- */
- wtimeout?: number | undefined;
-}
-
-/**
- * Options to pass when creating a Client Session
- *
- * @param causalConsistency Whether causal consistency should be enabled on this session
- * @param defaultTransactionOptions The default TransactionOptions to use for transactions started on this session.
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/global.html#SessionOptions
- */
-export interface SessionOptions {
- /**
- * Whether causal consistency should be enabled on this session
- * @default true
- */
- causalConsistency?: boolean | undefined;
- /**
- * The default TransactionOptions to use for transactions started on this session.
- */
- defaultTransactionOptions?: TransactionOptions | undefined;
-}
-
-/**
- * Configuration options for a transaction.
- *
- * @param readConcern A default read concern for commands in this transaction
- * @param writeConcern A default writeConcern for commands in this transaction
- * @param readPreference A default read preference for commands in this transaction
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/global.html#TransactionOptions
- */
-export interface TransactionOptions {
- readConcern?: ReadConcern | undefined;
- writeConcern?: WriteConcern | undefined;
- readPreference?: ReadPreferenceOrMode | undefined;
-}
-
-/**
- * @param noListener Do not make the db an event listener to the original connection.
- * @param returnNonCachedInstance Control if you want to return a cached instance or have a new one created
- */
-export interface MongoClientCommonOption {
- noListener?: boolean | undefined;
- returnNonCachedInstance?: boolean | undefined;
-}
-
-/**
- * The callback format for results
- *
- * @param error An error instance representing the error during the execution.
- * @param result The result object if the command was executed successfully.
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/Admin.html#~resultCallback
- */
-export interface MongoCallback {
- (error: MongoError, result: T): void;
-}
-
-/**
- * A user provided function to be run within a transaction
- *
- * @param session The parent session of the transaction running the operation. This should be passed into each operation within the lambda.
- * @returns Resulting Promise of operations run within this transaction
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/global.html#WithTransactionCallback
- */
-export type WithTransactionCallback = (session: ClientSession) => Promise;
-
-/**
- * Creates a new MongoError
- *
- * @param message The error message
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/MongoError.html
- */
-export class MongoError extends Error {
- constructor(message: string | Error | object);
- /**
- * Creates a new MongoError object
- *
- * @param options The options used to create the error
- * @returns A MongoError instance
- * @deprecated Use `new MongoError()` instead
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/MongoError.html#.create
- */
- static create(options: string | Error | object): MongoError;
- /**
- * Checks the error to see if it has an error label
- *
- * @param options The options used to create the error
- * @returns `true` if the error has the provided error label
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/MongoError.html#hasErrorLabel
- */
- hasErrorLabel(label: string): boolean;
- readonly errorLabels: string[];
- code?: number | string | undefined;
- /**
- * While not documented, the `errmsg` prop is AFAIK the only way to find out
- * which unique index caused a duplicate key error. When you have multiple
- * unique indexes on a collection, knowing which index caused a duplicate
- * key error enables you to send better (more precise) error messages to the
- * client/user (eg. "Email address must be unique" instead of "Both email
- * address and username must be unique") – which caters for a better (app)
- * user experience.
- *
- * Details:
- * {@link https://github.com/Automattic/mongoose/issues/2129 How to get index name on duplicate document 11000 error?}
- * (issue for mongoose, but the same applies for the native mongodb driver).
- *
- * Note that in mongoose (the link above) the prop in question is called
- * 'message' while in mongodb it is called 'errmsg'. This can be seen in
- * multiple places in the source code, for example
- * {@link https://github.com/mongodb/node-mongodb-native/blob/a12aa15ac3eaae3ad5c4166ea1423aec4560f155/test/functional/find_tests.js#L1111 here}.
- */
- errmsg?: string | undefined;
- name: string;
-}
-
-/**
- * An error indicating an issue with the network, including TCP errors and timeouts
- *
- * @param message The error message
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/MongoNetworkError.html
- */
-export class MongoNetworkError extends MongoError {}
-
-/**
- * An error used when attempting to parse a value (like a connection string)
- *
- * @param message The error message
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/MongoParseError.html
- */
-export class MongoParseError extends MongoError {}
-
-/**
- * An error signifying a client-side timeout event
- *
- * @param message The error message
- * @param reason The reason the timeout occured
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/MongoTimeoutError.html
- */
-export class MongoTimeoutError extends MongoError {
- /**
- * An optional reason context for the timeout, generally an error
- * saved during flow of monitoring and selecting servers
- */
- reason?: string | object | undefined;
-}
-
-/**
- * An error signifying a client-side server selection error
- *
- * @param message The error message
- * @param reason The reason the timeout occured
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/MongoServerSelectionError.html
- */
-export class MongoServerSelectionError extends MongoTimeoutError {}
-
-/**
- * An error thrown when the server reports a writeConcernError
- *
- * @param message The error message
- * @param reason The reason the timeout occured
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/MongoWriteConcernError.html
- */
-export class MongoWriteConcernError extends MongoError {
- /**
- * The result document (provided if ok: 1)
- */
- result?: object | undefined;
-}
-/**
- * An error indicating an unsuccessful Bulk Write
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/BulkWriteError.html
- */
-export class BulkWriteError extends MongoError {}
-export { BulkWriteError as MongoBulkWriteError };
-
-/**
- * Optional settings for MongoClient.connect()
- *
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/MongoClient.html#.connect
- */
-export interface MongoClientOptions
- extends DbCreateOptions,
- ServerOptions,
- MongosOptions,
- ReplSetOptions,
- SocketOptions,
- SSLOptions,
- TLSOptions,
- HighAvailabilityOptions,
- UnifiedTopologyOptions {
- /**
- * The logging level (error/warn/info/debug)
- */
- loggerLevel?: string | undefined;
-
- /**
- * Custom logger object
- */
- logger?: object | log | undefined;
-
- /**
- * Validate MongoClient passed in options for correctness
- * @default false
- */
- validateOptions?: object | boolean | undefined;
-
- /**
- * The name of the application that created this MongoClient instance.
- */
- appname?: string | undefined;
-
- /**
- * Authentication credentials
- */
- auth?: {
- /**
- * The username for auth
- */
- user: string;
- /**
- * The password for auth
- */
- password: string;
- } | undefined;
-
- /**
- * Determines whether or not to use the new url parser. Enables the new, spec-compliant
- * url parser shipped in the core driver. This url parser fixes a number of problems with
- * the original parser, and aims to outright replace that parser in the near future.
- * @default true
- */
- useNewUrlParser?: boolean | undefined;
-
- /**
- * Number of retries for a tailable cursor
- * @default 5
- */
- numberOfRetries?: number | undefined;
-
- /**
- * An authentication mechanism to use for connection authentication,
- * see the {@link https://docs.mongodb.com/v3.6/reference/connection-string/#urioption.authMechanism authMechanism}
- * reference for supported options.
- */
- authMechanism?:
- | "DEFAULT"
- | "GSSAPI"
- | "PLAIN"
- | "MONGODB-X509"
- | "MONGODB-CR"
- | "MONGODB-AWS"
- | "SCRAM-SHA-1"
- | "SCRAM-SHA-256"
- | string | undefined;
-
- /** Type of compression to use */
- compression?: {
- /** The selected compressors in preference order */
- compressors?: Array<"snappy" | "zlib"> | undefined;
- } | undefined;
-
- /**
- * Enable directConnection
- * @default false
- */
- directConnection?: boolean | undefined;
-
- /*
- * Optionally enable client side auto encryption.
- */
- autoEncryption?: AutoEncryptionOptions | undefined;
-}
-
-/**
- * Extra options related to the mongocryptd process.
- *
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/AutoEncrypter.html#~AutoEncryptionExtraOptions
- */
-export interface AutoEncryptionExtraOptions {
- /**
- * A local process the driver communicates with to determine how to encrypt
- * values in a command. Defaults to "mongodb:///var/mongocryptd.sock" if
- * domain sockets are available or "mongodb://localhost:27020" otherwise.
- */
- mongocryptdURI?: string | undefined;
-
- /**
- * If true, autoEncryption will not attempt to spawn a mongocryptd before
- * connecting.
- */
- mongocryptdBypassSpawn?: boolean | undefined;
-
- /**
- * The path to the mongocryptd executable on the system.
- */
- mongocryptdSpawnPath?: string | undefined;
-
- /**
- * Command line arguments to use when auto-spawning a mongocryptd.
- */
- mongocryptdSpawnArgs?: string[] | undefined;
-}
-
-/**
- * Configuration options that are used by specific KMS providers during key
- * generation, encryption, and decryption.
- *
- * @see http://mongodb.github.io/node-mongodb-native/3.6/api/global.html#KMSProviders
- */
-export interface KMSProviders {
- /**
- * Configuration options for using 'aws' as your KMS provider.
- */
- aws?: {
- /**
- * The access key used for the AWS KMS provider.
- */
- accessKeyId?: string | undefined;
-
- /**
- * The secret access key used for the AWS KMS provider.
- */
- secretAccessKey?: string | undefined;
- } | undefined;
-
- /**
- * Configuration options for using `gcp` as your KMS provider.
- */
- gcp?: {
- /**
- * The service account email to authenticate.
- */
- email?: string | undefined;
-
- /**
- * A PKCS#8 encrypted key. This can either be a base64 string or a
- * binary representation.
- */
- privateKey?: string | Buffer | undefined;
-
- /**
- * If present, a host with optional port. E.g. "example.com" or
- * "example.com:443". Defaults to "oauth2.googleapis.com".
- */
- endpoint?: string | undefined;
- } | undefined;
-
- /**
- * Configuration options for using 'local' as your KMS provider.
- */
- local?: {
- /**
- * The master key used to encrypt/decrypt data keys. A 96-byte long
- * Buffer.
- */
- key?: Buffer | undefined;
- } | undefined;
-}
-
-/**
- * Configuration options for a automatic client encryption.
- *
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/AutoEncrypter.html#~AutoEncryptionOptions
- */
-export interface AutoEncryptionOptions {
- /**
- * A MongoClient used to fetch keys from a key vault
- */
- keyVaultClient?: MongoClient | undefined;
-
- /**
- * The namespace where keys are stored in the key vault.
- */
- keyVaultNamespace?: string | undefined;
-
- /**
- * Configuration options that are used by specific KMS providers during key
- * generation, encryption, and decryption.
- */
- kmsProviders?: KMSProviders | undefined;
-
- /**
- * A map of namespaces to a local JSON schema for encryption.
- */
- schemaMap?: object | undefined;
-
- /**
- * Allows the user to bypass auto encryption, maintaining implicit
- * decryption.
- */
- bypassAutoEncryption?: boolean | undefined;
-
- /**
- * Extra options related to the mongocryptd process.
- */
- extraOptions?: AutoEncryptionExtraOptions | undefined;
-}
-
-export interface SSLOptions {
- /**
- * Passed directly through to tls.createSecureContext.
- *
- * @see https://nodejs.org/dist/latest/docs/api/tls.html#tls_tls_createsecurecontext_options
- */
- ciphers?: string | undefined;
- /**
- * Passed directly through to tls.createSecureContext.
- *
- * @see https://nodejs.org/dist/latest/docs/api/tls.html#tls_tls_createsecurecontext_options
- */
- ecdhCurve?: string | undefined;
- /**
- * Number of connections for each server instance; set to 5 as default for legacy reasons
- * @default 5
- */
- poolSize?: number | undefined;
- /**
- * If present, the connection pool will be initialized with minSize connections, and will never dip below minSize connections
- */
- minSize?: number | undefined;
- /**
- * Use ssl connection (needs to have a mongod server with ssl support)
- */
- ssl?: boolean | undefined;
- /**
- * Validate mongod server certificate against ca (mongod server >=2.4 with ssl support required)
- * @default true
- */
- sslValidate?: boolean | undefined;
- /**
- * Server identity checking during SSL
- * @default true
- */
- checkServerIdentity?: boolean | typeof checkServerIdentity | undefined;
- /**
- * Array of valid certificates either as Buffers or Strings
- */
- sslCA?: ReadonlyArray | undefined;
- /**
- * SSL Certificate revocation list binary buffer
- */
- sslCRL?: ReadonlyArray