From 3f0f23002359b4061c13fe728e131836756ceb80 Mon Sep 17 00:00:00 2001 From: Simhon Chourasia Date: Sun, 16 Jul 2023 17:10:01 -0400 Subject: [PATCH] Add changes required for heroku and changed migrations to work with heroku postgres database --- backend/typescript/config/config.json | 30 ++ backend/typescript/install_nvm.sh | 425 +++++++++++++++++ ...2022.01.10T17.43.07.create-entity-table.js | 51 ++ ...2022.01.10T17.43.07.create-entity-table.ts | 46 -- ... 2023.02.18T17.43.41.create-user-table.js} | 26 +- ....05T17.43.42.ts => 2023.04.05T17.43.42.js} | 82 ++-- ...T17.43.43.create-applicationDash-table.js} | 33 +- backend/typescript/models/index.js | 45 ++ backend/typescript/models/index.ts | 4 +- backend/typescript/package.json | 3 +- backend/typescript/yarn.lock | 438 +++++++++++++++--- 11 files changed, 1009 insertions(+), 174 deletions(-) create mode 100644 backend/typescript/config/config.json create mode 100644 backend/typescript/install_nvm.sh create mode 100644 backend/typescript/migrations/2022.01.10T17.43.07.create-entity-table.js delete mode 100644 backend/typescript/migrations/2022.01.10T17.43.07.create-entity-table.ts rename backend/typescript/migrations/{2023.02.18T17.43.41.create-user-table.ts => 2023.02.18T17.43.41.create-user-table.js} (70%) rename backend/typescript/migrations/{2023.04.05T17.43.42.ts => 2023.04.05T17.43.42.js} (93%) rename backend/typescript/migrations/{2023.04.05T17.43.43.create-applicationDash-table.ts => 2023.04.05T17.43.43.create-applicationDash-table.js} (69%) create mode 100644 backend/typescript/models/index.js diff --git a/backend/typescript/config/config.json b/backend/typescript/config/config.json new file mode 100644 index 0000000..00d210a --- /dev/null +++ b/backend/typescript/config/config.json @@ -0,0 +1,30 @@ +{ + "development": { + "username": "rcdmiwfaelrydj", + "password": "619ba5c8e3e50dfc5a7bed5fbfa472045d6dc3f800e09e7a009a74e78be25d13", + "database": "dd5lsdq6q23dfh", + "host": "ec2-34-233-242-44.compute-1.amazonaws.com", + "dialect": "postgres", + "dialectOptions": { + "ssl": { + "ca": "path/to/ca.crt", + "require": true, + "rejectUnauthorized": false + } + } + }, + "test": { + "username": "root", + "password": null, + "database": "database_test", + "host": "127.0.0.1", + "dialect": "mysql" + }, + "production": { + "username": "root", + "password": null, + "database": "database_production", + "host": "127.0.0.1", + "dialect": "mysql" + } +} diff --git a/backend/typescript/install_nvm.sh b/backend/typescript/install_nvm.sh new file mode 100644 index 0000000..a6d96a6 --- /dev/null +++ b/backend/typescript/install_nvm.sh @@ -0,0 +1,425 @@ +#!/usr/bin/env bash + +{ # this ensures the entire script is downloaded # + +nvm_has() { + type "$1" > /dev/null 2>&1 +} + +nvm_default_install_dir() { + [ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm" +} + +nvm_install_dir() { + if [ -n "$NVM_DIR" ]; then + printf %s "${NVM_DIR}" + else + nvm_default_install_dir + fi +} + +nvm_latest_version() { + echo "v0.35.0" +} + +nvm_profile_is_bash_or_zsh() { + local TEST_PROFILE + TEST_PROFILE="${1-}" + case "${TEST_PROFILE-}" in + *"/.bashrc" | *"/.bash_profile" | *"/.zshrc") + return + ;; + *) + return 1 + ;; + esac +} + +# +# Outputs the location to NVM depending on: +# * The availability of $NVM_SOURCE +# * The method used ("script" or "git" in the script, defaults to "git") +# NVM_SOURCE always takes precedence unless the method is "script-nvm-exec" +# +nvm_source() { + local NVM_METHOD + NVM_METHOD="$1" + local NVM_SOURCE_URL + NVM_SOURCE_URL="$NVM_SOURCE" + if [ "_$NVM_METHOD" = "_script-nvm-exec" ]; then + NVM_SOURCE_URL="https://raw.githubusercontent.com/nvm-sh/nvm/$(nvm_latest_version)/nvm-exec" + elif [ "_$NVM_METHOD" = "_script-nvm-bash-completion" ]; then + NVM_SOURCE_URL="https://raw.githubusercontent.com/nvm-sh/nvm/$(nvm_latest_version)/bash_completion" + elif [ -z "$NVM_SOURCE_URL" ]; then + if [ "_$NVM_METHOD" = "_script" ]; then + NVM_SOURCE_URL="https://raw.githubusercontent.com/nvm-sh/nvm/$(nvm_latest_version)/nvm.sh" + elif [ "_$NVM_METHOD" = "_git" ] || [ -z "$NVM_METHOD" ]; then + NVM_SOURCE_URL="https://github.com/nvm-sh/nvm.git" + else + echo >&2 "Unexpected value \"$NVM_METHOD\" for \$NVM_METHOD" + return 1 + fi + fi + echo "$NVM_SOURCE_URL" +} + +# +# Node.js version to install +# +nvm_node_version() { + echo "$NODE_VERSION" +} + +nvm_download() { + if nvm_has "curl"; then + curl --compressed -q "$@" + elif nvm_has "wget"; then + # Emulate curl with wget + ARGS=$(echo "$*" | command sed -e 's/--progress-bar /--progress=bar /' \ + -e 's/-L //' \ + -e 's/--compressed //' \ + -e 's/-I /--server-response /' \ + -e 's/-s /-q /' \ + -e 's/-o /-O /' \ + -e 's/-C - /-c /') + # shellcheck disable=SC2086 + eval wget $ARGS + fi +} + +install_nvm_from_git() { + local INSTALL_DIR + INSTALL_DIR="$(nvm_install_dir)" + + if [ -d "$INSTALL_DIR/.git" ]; then + echo "=> nvm is already installed in $INSTALL_DIR, trying to update using git" + command printf '\r=> ' + command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" fetch origin tag "$(nvm_latest_version)" --depth=1 2> /dev/null || { + echo >&2 "Failed to update nvm, run 'git fetch' in $INSTALL_DIR yourself." + exit 1 + } + else + # Cloning to $INSTALL_DIR + echo "=> Downloading nvm from git to '$INSTALL_DIR'" + command printf '\r=> ' + mkdir -p "${INSTALL_DIR}" + if [ "$(ls -A "${INSTALL_DIR}")" ]; then + command git init "${INSTALL_DIR}" || { + echo >&2 'Failed to initialize nvm repo. Please report this!' + exit 2 + } + command git --git-dir="${INSTALL_DIR}/.git" remote add origin "$(nvm_source)" 2> /dev/null \ + || command git --git-dir="${INSTALL_DIR}/.git" remote set-url origin "$(nvm_source)" || { + echo >&2 'Failed to add remote "origin" (or set the URL). Please report this!' + exit 2 + } + command git --git-dir="${INSTALL_DIR}/.git" fetch origin tag "$(nvm_latest_version)" --depth=1 || { + echo >&2 'Failed to fetch origin with tags. Please report this!' + exit 2 + } + else + command git -c advice.detachedHead=false clone "$(nvm_source)" -b "$(nvm_latest_version)" --depth=1 "${INSTALL_DIR}" || { + echo >&2 'Failed to clone nvm repo. Please report this!' + exit 2 + } + fi + fi + command git -c advice.detachedHead=false --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" checkout -f --quiet "$(nvm_latest_version)" + if [ -n "$(command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" show-ref refs/heads/master)" ]; then + if command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" branch --quiet 2>/dev/null; then + command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" branch --quiet -D master >/dev/null 2>&1 + else + echo >&2 "Your version of git is out of date. Please update it!" + command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" branch -D master >/dev/null 2>&1 + fi + fi + + echo "=> Compressing and cleaning up git repository" + if ! command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" reflog expire --expire=now --all; then + echo >&2 "Your version of git is out of date. Please update it!" + fi + if ! command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" gc --auto --aggressive --prune=now ; then + echo >&2 "Your version of git is out of date. Please update it!" + fi + return +} + +# +# Automatically install Node.js +# +nvm_install_node() { + local NODE_VERSION_LOCAL + NODE_VERSION_LOCAL="$(nvm_node_version)" + + if [ -z "$NODE_VERSION_LOCAL" ]; then + return 0 + fi + + echo "=> Installing Node.js version $NODE_VERSION_LOCAL" + nvm install "$NODE_VERSION_LOCAL" + local CURRENT_NVM_NODE + + CURRENT_NVM_NODE="$(nvm_version current)" + if [ "$(nvm_version "$NODE_VERSION_LOCAL")" == "$CURRENT_NVM_NODE" ]; then + echo "=> Node.js version $NODE_VERSION_LOCAL has been successfully installed" + else + echo >&2 "Failed to install Node.js $NODE_VERSION_LOCAL" + fi +} + +install_nvm_as_script() { + local INSTALL_DIR + INSTALL_DIR="$(nvm_install_dir)" + local NVM_SOURCE_LOCAL + NVM_SOURCE_LOCAL="$(nvm_source script)" + local NVM_EXEC_SOURCE + NVM_EXEC_SOURCE="$(nvm_source script-nvm-exec)" + local NVM_BASH_COMPLETION_SOURCE + NVM_BASH_COMPLETION_SOURCE="$(nvm_source script-nvm-bash-completion)" + + # Downloading to $INSTALL_DIR + mkdir -p "$INSTALL_DIR" + if [ -f "$INSTALL_DIR/nvm.sh" ]; then + echo "=> nvm is already installed in $INSTALL_DIR, trying to update the script" + else + echo "=> Downloading nvm as script to '$INSTALL_DIR'" + fi + nvm_download -s "$NVM_SOURCE_LOCAL" -o "$INSTALL_DIR/nvm.sh" || { + echo >&2 "Failed to download '$NVM_SOURCE_LOCAL'" + return 1 + } & + nvm_download -s "$NVM_EXEC_SOURCE" -o "$INSTALL_DIR/nvm-exec" || { + echo >&2 "Failed to download '$NVM_EXEC_SOURCE'" + return 2 + } & + nvm_download -s "$NVM_BASH_COMPLETION_SOURCE" -o "$INSTALL_DIR/bash_completion" || { + echo >&2 "Failed to download '$NVM_BASH_COMPLETION_SOURCE'" + return 2 + } & + for job in $(jobs -p | command sort) + do + wait "$job" || return $? + done + chmod a+x "$INSTALL_DIR/nvm-exec" || { + echo >&2 "Failed to mark '$INSTALL_DIR/nvm-exec' as executable" + return 3 + } +} + +nvm_try_profile() { + if [ -z "${1-}" ] || [ ! -f "${1}" ]; then + return 1 + fi + echo "${1}" +} + +# +# Detect profile file if not specified as environment variable +# (eg: PROFILE=~/.myprofile) +# The echo'ed path is guaranteed to be an existing file +# Otherwise, an empty string is returned +# +nvm_detect_profile() { + if [ "${PROFILE-}" = '/dev/null' ]; then + # the user has specifically requested NOT to have nvm touch their profile + return + fi + + if [ -n "${PROFILE}" ] && [ -f "${PROFILE}" ]; then + echo "${PROFILE}" + return + fi + + local DETECTED_PROFILE + DETECTED_PROFILE='' + + if [ -n "${BASH_VERSION-}" ]; then + if [ -f "$HOME/.bashrc" ]; then + DETECTED_PROFILE="$HOME/.bashrc" + elif [ -f "$HOME/.bash_profile" ]; then + DETECTED_PROFILE="$HOME/.bash_profile" + fi + elif [ -n "${ZSH_VERSION-}" ]; then + DETECTED_PROFILE="$HOME/.zshrc" + fi + + if [ -z "$DETECTED_PROFILE" ]; then + for EACH_PROFILE in ".profile" ".bashrc" ".bash_profile" ".zshrc" + do + if DETECTED_PROFILE="$(nvm_try_profile "${HOME}/${EACH_PROFILE}")"; then + break + fi + done + fi + + if [ -n "$DETECTED_PROFILE" ]; then + echo "$DETECTED_PROFILE" + fi +} + +# +# Check whether the user has any globally-installed npm modules in their system +# Node, and warn them if so. +# +nvm_check_global_modules() { + command -v npm >/dev/null 2>&1 || return 0 + + local NPM_VERSION + NPM_VERSION="$(npm --version)" + NPM_VERSION="${NPM_VERSION:--1}" + [ "${NPM_VERSION%%[!-0-9]*}" -gt 0 ] || return 0 + + local NPM_GLOBAL_MODULES + NPM_GLOBAL_MODULES="$( + npm list -g --depth=0 | + command sed -e '/ npm@/d' -e '/ (empty)$/d' + )" + + local MODULE_COUNT + MODULE_COUNT="$( + command printf %s\\n "$NPM_GLOBAL_MODULES" | + command sed -ne '1!p' | # Remove the first line + wc -l | command tr -d ' ' # Count entries + )" + + if [ "${MODULE_COUNT}" != '0' ]; then + # shellcheck disable=SC2016 + echo '=> You currently have modules installed globally with `npm`. These will no' + # shellcheck disable=SC2016 + echo '=> longer be linked to the active version of Node when you install a new node' + # shellcheck disable=SC2016 + echo '=> with `nvm`; and they may (depending on how you construct your `$PATH`)' + # shellcheck disable=SC2016 + echo '=> override the binaries of modules installed with `nvm`:' + echo + + command printf %s\\n "$NPM_GLOBAL_MODULES" + echo '=> If you wish to uninstall them at a later point (or re-install them under your' + # shellcheck disable=SC2016 + echo '=> `nvm` Nodes), you can remove them from the system Node as follows:' + echo + echo ' $ nvm use system' + echo ' $ npm uninstall -g a_module' + echo + fi +} + +nvm_do_install() { + if [ -n "${NVM_DIR-}" ] && ! [ -d "${NVM_DIR}" ]; then + if [ -e "${NVM_DIR}" ]; then + echo >&2 "File \"${NVM_DIR}\" has the same name as installation directory." + exit 1 + fi + + if [ "${NVM_DIR}" = "$(nvm_default_install_dir)" ]; then + mkdir "${NVM_DIR}" + else + echo >&2 "You have \$NVM_DIR set to \"${NVM_DIR}\", but that directory does not exist. Check your profile files and environment." + exit 1 + fi + fi + if [ -z "${METHOD}" ]; then + # Autodetect install method + if nvm_has git; then + install_nvm_from_git + elif nvm_has nvm_download; then + install_nvm_as_script + else + echo >&2 'You need git, curl, or wget to install nvm' + exit 1 + fi + elif [ "${METHOD}" = 'git' ]; then + if ! nvm_has git; then + echo >&2 "You need git to install nvm" + exit 1 + fi + install_nvm_from_git + elif [ "${METHOD}" = 'script' ]; then + if ! nvm_has nvm_download; then + echo >&2 "You need curl or wget to install nvm" + exit 1 + fi + install_nvm_as_script + else + echo >&2 "The environment variable \$METHOD is set to \"${METHOD}\", which is not recognized as a valid installation method." + exit 1 + fi + + echo + + local NVM_PROFILE + NVM_PROFILE="$(nvm_detect_profile)" + local PROFILE_INSTALL_DIR + PROFILE_INSTALL_DIR="$(nvm_install_dir | command sed "s:^$HOME:\$HOME:")" + + SOURCE_STR="\\nexport NVM_DIR=\"${PROFILE_INSTALL_DIR}\"\\n[ -s \"\$NVM_DIR/nvm.sh\" ] && \\. \"\$NVM_DIR/nvm.sh\" # This loads nvm\\n" + + # shellcheck disable=SC2016 + COMPLETION_STR='[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion\n' + BASH_OR_ZSH=false + + if [ -z "${NVM_PROFILE-}" ] ; then + local TRIED_PROFILE + if [ -n "${PROFILE}" ]; then + TRIED_PROFILE="${NVM_PROFILE} (as defined in \$PROFILE), " + fi + echo "=> Profile not found. Tried ${TRIED_PROFILE-}~/.bashrc, ~/.bash_profile, ~/.zshrc, and ~/.profile." + echo "=> Create one of them and run this script again" + echo " OR" + echo "=> Append the following lines to the correct file yourself:" + command printf "${SOURCE_STR}" + echo + else + if nvm_profile_is_bash_or_zsh "${NVM_PROFILE-}"; then + BASH_OR_ZSH=true + fi + if ! command grep -qc '/nvm.sh' "$NVM_PROFILE"; then + echo "=> Appending nvm source string to $NVM_PROFILE" + command printf "${SOURCE_STR}" >> "$NVM_PROFILE" + else + echo "=> nvm source string already in ${NVM_PROFILE}" + fi + # shellcheck disable=SC2016 + if ${BASH_OR_ZSH} && ! command grep -qc '$NVM_DIR/bash_completion' "$NVM_PROFILE"; then + echo "=> Appending bash_completion source string to $NVM_PROFILE" + command printf "$COMPLETION_STR" >> "$NVM_PROFILE" + else + echo "=> bash_completion source string already in ${NVM_PROFILE}" + fi + fi + if ${BASH_OR_ZSH} && [ -z "${NVM_PROFILE-}" ] ; then + echo "=> Please also append the following lines to the if you are using bash/zsh shell:" + command printf "${COMPLETION_STR}" + fi + + # Source nvm + # shellcheck source=/dev/null + \. "$(nvm_install_dir)/nvm.sh" + + nvm_check_global_modules + + nvm_install_node + + nvm_reset + + echo "=> Close and reopen your terminal to start using nvm or run the following to use it now:" + command printf "${SOURCE_STR}" + if ${BASH_OR_ZSH} ; then + command printf "${COMPLETION_STR}" + fi +} + +# +# Unsets the various functions defined +# during the execution of the install script +# +nvm_reset() { + unset -f nvm_has nvm_install_dir nvm_latest_version nvm_profile_is_bash_or_zsh \ + nvm_source nvm_node_version nvm_download install_nvm_from_git nvm_install_node \ + install_nvm_as_script nvm_try_profile nvm_detect_profile nvm_check_global_modules \ + nvm_do_install nvm_reset nvm_default_install_dir +} + +[ "_$NVM_ENV" = "_testing" ] || nvm_do_install + +} # this ensures the entire script is downloaded # diff --git a/backend/typescript/migrations/2022.01.10T17.43.07.create-entity-table.js b/backend/typescript/migrations/2022.01.10T17.43.07.create-entity-table.js new file mode 100644 index 0000000..be5bba6 --- /dev/null +++ b/backend/typescript/migrations/2022.01.10T17.43.07.create-entity-table.js @@ -0,0 +1,51 @@ +const DataType = require("sequelize-typescript"); +const { Sequelize, sequelize, db } = require("../models/index.js"); + +// const Migration = require("../umzug"); + +const TABLE_NAME = "entities"; + +const up = async ({ context: s }) => { + // console.log("sequelize: "); + // console.log(sequelize); + await sequelize.getQueryInterface().createTable(TABLE_NAME, { + id: { + type: Sequelize.INTEGER, + allowNull: false, + primaryKey: true, + autoIncrement: true, + }, + string_field: { + type: Sequelize.STRING, + allowNull: false, + }, + int_field: { + type: Sequelize.INTEGER, + allowNull: false, + }, + enum_field: { + type: Sequelize.ENUM("A", "B", "C", "D"), + allowNull: false, + }, + string_array_field: { + type: Sequelize.ARRAY(Sequelize.STRING), + allowNull: false, + }, + bool_field: { + type: Sequelize.BOOLEAN, + allowNull: false, + }, + file_name: { + type: Sequelize.STRING, + allowNull: false, + }, + createdAt: Sequelize.DATE, + updatedAt: Sequelize.DATE, + }); +}; + +const down = async ({ context: s }) => { + await sequelize.getQueryInterface().dropTable(TABLE_NAME); +}; + +module.exports = { up, down }; diff --git a/backend/typescript/migrations/2022.01.10T17.43.07.create-entity-table.ts b/backend/typescript/migrations/2022.01.10T17.43.07.create-entity-table.ts deleted file mode 100644 index 7f4d37f..0000000 --- a/backend/typescript/migrations/2022.01.10T17.43.07.create-entity-table.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { DataType } from "sequelize-typescript"; - -import { Migration } from "../umzug"; - -const TABLE_NAME = "entities"; - -export const up: Migration = async ({ context: sequelize }) => { - await sequelize.getQueryInterface().createTable(TABLE_NAME, { - id: { - type: DataType.INTEGER, - allowNull: false, - primaryKey: true, - autoIncrement: true, - }, - string_field: { - type: DataType.STRING, - allowNull: false, - }, - int_field: { - type: DataType.INTEGER, - allowNull: false, - }, - enum_field: { - type: DataType.ENUM("A", "B", "C", "D"), - allowNull: false, - }, - string_array_field: { - type: DataType.ARRAY(DataType.STRING), - allowNull: false, - }, - bool_field: { - type: DataType.BOOLEAN, - allowNull: false, - }, - file_name: { - type: DataType.STRING, - allowNull: false, - }, - createdAt: DataType.DATE, - updatedAt: DataType.DATE, - }); -}; - -export const down: Migration = async ({ context: sequelize }) => { - await sequelize.getQueryInterface().dropTable(TABLE_NAME); -}; diff --git a/backend/typescript/migrations/2023.02.18T17.43.41.create-user-table.ts b/backend/typescript/migrations/2023.02.18T17.43.41.create-user-table.js similarity index 70% rename from backend/typescript/migrations/2023.02.18T17.43.41.create-user-table.ts rename to backend/typescript/migrations/2023.02.18T17.43.41.create-user-table.js index ad1b971..27979c1 100644 --- a/backend/typescript/migrations/2023.02.18T17.43.41.create-user-table.ts +++ b/backend/typescript/migrations/2023.02.18T17.43.41.create-user-table.js @@ -1,6 +1,4 @@ -import { DataType } from "sequelize-typescript"; - -import { Migration } from "../umzug"; +const { Sequelize, sequelize, db } = require("../models/index.js"); const TABLE_NAME = "users"; @@ -32,43 +30,45 @@ const SEEDED_DATA = [ ]; // recruitmenttools@uwblueprint.org // myblueprint! -export const up: Migration = async ({ context: sequelize }) => { +const up = async ({ context: s }) => { await sequelize.getQueryInterface().createTable(TABLE_NAME, { id: { - type: DataType.INTEGER, + type: Sequelize.INTEGER, allowNull: false, primaryKey: true, autoIncrement: true, unique: true, }, first_name: { - type: DataType.STRING, + type: Sequelize.STRING, allowNull: false, }, last_name: { - type: DataType.STRING, + type: Sequelize.STRING, allowNull: false, }, auth_id: { - type: DataType.STRING, + type: Sequelize.STRING, allowNull: true, }, email: { - type: DataType.STRING, + type: Sequelize.STRING, primaryKey: true, allowNull: false, }, role: { - type: DataType.ENUM("User", "Admin"), + type: Sequelize.ENUM("User", "Admin"), allowNull: false, }, - createdAt: DataType.DATE, - updatedAt: DataType.DATE, + createdAt: Sequelize.DATE, + updatedAt: Sequelize.DATE, }); await sequelize.getQueryInterface().bulkInsert(TABLE_NAME, SEEDED_DATA); }; -export const down: Migration = async ({ context: sequelize }) => { +const down = async ({ context: s }) => { await sequelize.getQueryInterface().dropTable(TABLE_NAME); }; + +module.exports = { up, down }; diff --git a/backend/typescript/migrations/2023.04.05T17.43.42.ts b/backend/typescript/migrations/2023.04.05T17.43.42.js similarity index 93% rename from backend/typescript/migrations/2023.04.05T17.43.42.ts rename to backend/typescript/migrations/2023.04.05T17.43.42.js index c500200..458dbad 100644 --- a/backend/typescript/migrations/2023.04.05T17.43.42.ts +++ b/backend/typescript/migrations/2023.04.05T17.43.42.js @@ -1,8 +1,8 @@ -import { DataType } from "sequelize-typescript"; +const { Sequelize, sequelize, db } = require("../models/index.js"); // import ApplicationDashboardTable from "../models/applicationDashboard.model"; // import User from "../models/user.model"; -import { Migration } from "../umzug"; +// import { Migration } from "../umzug"; const TABLE_NAME = "applicantresponse"; @@ -248,155 +248,157 @@ const SEEDED_DATA = [ }, ]; -export const up: Migration = async ({ context: sequelize }) => { +const up = async ({ context: s }) => { const binaryQuestions = sequelize.define( "binaryQuestion", - { question: DataType.STRING(4000), selected: DataType.STRING(4000) }, + { question: Sequelize.STRING(4000), selected: Sequelize.STRING(4000) }, {}, ); await sequelize.getQueryInterface().createTable(TABLE_NAME, { id: { - type: DataType.INTEGER, + type: Sequelize.INTEGER, allowNull: false, primaryKey: true, autoIncrement: true, unique: true, }, academicYear: { - type: DataType.STRING(4000), + type: Sequelize.STRING(4000), allowNull: true, }, binaryQuestion1: { - type: DataType.STRING(4000), + type: Sequelize.STRING(4000), allowNull: true, }, binaryQuestion2: { - type: DataType.STRING(4000), + type: Sequelize.STRING(4000), allowNull: true, }, binaryQuestions: { - type: DataType.ARRAY(DataType.STRING(4000)), + type: Sequelize.ARRAY(Sequelize.STRING(4000)), allowNull: true, }, dropdownQuestion1: { - type: DataType.STRING(4000), + type: Sequelize.STRING(4000), allowNull: true, }, dropdownQuestions: { - type: DataType.ARRAY(DataType.STRING(4000)), + type: Sequelize.ARRAY(Sequelize.STRING(4000)), allowNull: true, }, email: { - type: DataType.STRING(4000), + type: Sequelize.STRING(4000), allowNull: true, }, firstName: { - type: DataType.STRING(4000), + type: Sequelize.STRING(4000), allowNull: true, }, lastName: { - type: DataType.STRING(4000), + type: Sequelize.STRING(4000), allowNull: true, }, positions: { - type: DataType.ARRAY(DataType.STRING(4000)), + type: Sequelize.ARRAY(Sequelize.STRING(4000)), allowNull: true, }, program: { - type: DataType.STRING(4000), + type: Sequelize.STRING(4000), allowNull: true, }, question1: { - type: DataType.STRING(4000), + type: Sequelize.STRING(4000), allowNull: true, }, question2: { - type: DataType.STRING(4000), + type: Sequelize.STRING(4000), allowNull: true, }, question3: { - type: DataType.STRING(4000), + type: Sequelize.STRING(4000), allowNull: true, }, question4: { - type: DataType.STRING(4000), + type: Sequelize.STRING(4000), allowNull: true, }, question5: { - type: DataType.STRING(4000), + type: Sequelize.STRING(4000), allowNull: true, }, questions: { - type: DataType.ARRAY(DataType.STRING(4000)), + type: Sequelize.ARRAY(Sequelize.STRING(4000)), allowNull: true, }, resume: { - type: DataType.STRING(4000), + type: Sequelize.STRING(4000), allowNull: true, }, resumeInput: { - type: DataType.STRING(4000), + type: Sequelize.STRING(4000), allowNull: true, }, resumeUrl: { - type: DataType.STRING(4000), + type: Sequelize.STRING(4000), allowNull: true, }, roleQuestion1: { - type: DataType.STRING(4000), + type: Sequelize.STRING(4000), allowNull: true, }, roleQuestion2: { - type: DataType.STRING(4000), + type: Sequelize.STRING(4000), allowNull: true, }, roleQuestion3: { - type: DataType.STRING(4000), + type: Sequelize.STRING(4000), allowNull: true, }, roleQuestion4: { - type: DataType.STRING(4000), + type: Sequelize.STRING(4000), allowNull: true, }, roleQuestion5: { - type: DataType.STRING(4000), + type: Sequelize.STRING(4000), allowNull: true, }, roleQuestion6: { - type: DataType.STRING(4000), + type: Sequelize.STRING(4000), allowNull: true, }, roleQuestion7: { - type: DataType.STRING(4000), + type: Sequelize.STRING(4000), allowNull: true, }, roleQuestion8: { - type: DataType.STRING(4000), + type: Sequelize.STRING(4000), allowNull: true, }, roleQuestion9: { - type: DataType.STRING(4000), + type: Sequelize.STRING(4000), allowNull: true, }, roleSpecificQuestions: { - type: DataType.ARRAY(DataType.STRING(4000)), + type: Sequelize.ARRAY(Sequelize.STRING(4000)), allowNull: true, }, status: { - type: DataType.ENUM("pending", "accepted", "rejected"), + type: Sequelize.ENUM("pending", "accepted", "rejected"), allowNull: true, }, timestamp: { - type: DataType.BIGINT, + type: Sequelize.BIGINT, allowNull: true, }, - createdAt: DataType.DATE, - updatedAt: DataType.DATE, + createdAt: Sequelize.DATE, + updatedAt: Sequelize.DATE, }); await sequelize.getQueryInterface().bulkInsert(TABLE_NAME, SEEDED_DATA); }; -export const down: Migration = async ({ context: sequelize }) => { +const down = async ({ context: s }) => { await sequelize.getQueryInterface().dropTable(TABLE_NAME); }; + +module.exports = { up, down }; diff --git a/backend/typescript/migrations/2023.04.05T17.43.43.create-applicationDash-table.ts b/backend/typescript/migrations/2023.04.05T17.43.43.create-applicationDash-table.js similarity index 69% rename from backend/typescript/migrations/2023.04.05T17.43.43.create-applicationDash-table.ts rename to backend/typescript/migrations/2023.04.05T17.43.43.create-applicationDash-table.js index 343b063..6b5a462 100644 --- a/backend/typescript/migrations/2023.04.05T17.43.43.create-applicationDash-table.ts +++ b/backend/typescript/migrations/2023.04.05T17.43.43.create-applicationDash-table.js @@ -1,6 +1,7 @@ -import { DataType } from "sequelize-typescript"; +const { Sequelize, sequelize, db } = require("../models/index.js"); +// import { DataType } from "sequelize-typescript"; -import { Migration } from "../umzug"; +// import { Migration } from "../umzug"; const TABLE_NAME = "applicationdashboardtable"; @@ -31,16 +32,16 @@ const SEEDED_DATA = [ }, ]; -export const up: Migration = async ({ context: sequelize }) => { +const up = async ({ context: s }) => { await sequelize.getQueryInterface().createTable(TABLE_NAME, { id: { - type: DataType.INTEGER, + type: Sequelize.INTEGER, allowNull: false, primaryKey: true, unique: true, }, applicationId: { - type: DataType.INTEGER, + type: Sequelize.INTEGER, allowNull: false, references: { model: "applicantresponse", @@ -48,7 +49,7 @@ export const up: Migration = async ({ context: sequelize }) => { }, }, reviewerId: { - type: DataType.INTEGER, + type: Sequelize.INTEGER, allowNull: false, references: { model: "users", @@ -56,37 +57,39 @@ export const up: Migration = async ({ context: sequelize }) => { }, }, reviewerEmail: { - type: DataType.STRING, + type: Sequelize.STRING, allowNull: false, }, passionFSG: { - type: DataType.INTEGER, + type: Sequelize.INTEGER, allowNull: false, }, teamPlayer: { - type: DataType.INTEGER, + type: Sequelize.INTEGER, allowNull: false, }, desireToLearn: { - type: DataType.INTEGER, + type: Sequelize.INTEGER, allowNull: false, }, skill: { - type: DataType.INTEGER, + type: Sequelize.INTEGER, allowNull: false, }, skillCategory: { - type: DataType.ENUM("junior", "intermediate", "senior"), + type: Sequelize.ENUM("junior", "intermediate", "senior"), allowNull: false, }, - createdAt: DataType.DATE, - updatedAt: DataType.DATE, + createdAt: Sequelize.DATE, + updatedAt: Sequelize.DATE, }); // Creating ForeignKey for User and Application table await sequelize.getQueryInterface().bulkInsert(TABLE_NAME, SEEDED_DATA); // Inserting users to User table }; -export const down: Migration = async ({ context: sequelize }) => { +const down = async ({ context: s }) => { await sequelize.getQueryInterface().dropTable(TABLE_NAME); }; + +module.exports = { up, down }; diff --git a/backend/typescript/models/index.js b/backend/typescript/models/index.js new file mode 100644 index 0000000..0c745e1 --- /dev/null +++ b/backend/typescript/models/index.js @@ -0,0 +1,45 @@ +'use strict'; + +const fs = require('fs'); +const path = require('path'); +const Sequelize = require('sequelize'); +const process = require('process'); +const basename = path.basename(__filename); +const env = process.env.NODE_ENV || 'development'; +const config = require(__dirname + '/../config/config.json')[env]; +const db = {}; + +console.log("hello"); + +let sequelize; +if (config.use_env_variable) { + sequelize = new Sequelize(process.env[config.use_env_variable], config); +} else { + sequelize = new Sequelize(config.database, config.username, config.password, config); +} + +fs + .readdirSync(__dirname) + .filter(file => { + return ( + file.indexOf('.') !== 0 && + file !== basename && + file.slice(-3) === '.js' && + file.indexOf('.test.js') === -1 + ); + }) + .forEach(file => { + const model = require(path.join(__dirname, file))(sequelize, Sequelize.DataTypes); + db[model.name] = model; + }); + +Object.keys(db).forEach(modelName => { + if (db[modelName].associate) { + db[modelName].associate(db); + } +}); + +db.sequelize = sequelize; +db.Sequelize = Sequelize; + +module.exports = {db, sequelize, Sequelize}; diff --git a/backend/typescript/models/index.ts b/backend/typescript/models/index.ts index 38af6e2..d060fec 100644 --- a/backend/typescript/models/index.ts +++ b/backend/typescript/models/index.ts @@ -10,11 +10,11 @@ const DATABASE_URL = /* eslint-disable-next-line import/prefer-default-export */ export const sequelize = new Sequelize(DATABASE_URL, { models: [path.join(__dirname, "/*.model.ts")], - // ssl: true, + ssl: true, dialectOptions: { ssl: { require: true, rejectUnauthorized: false, - } + }, }, }); diff --git a/backend/typescript/package.json b/backend/typescript/package.json index c4453f5..3ab2af4 100644 --- a/backend/typescript/package.json +++ b/backend/typescript/package.json @@ -38,7 +38,8 @@ "nodemailer": "^6.5.0", "pg": "^8.5.1", "reflect-metadata": "^0.1.13", - "sequelize": "^6.5.0", + "sequelize": "^6.32.1", + "sequelize-cli": "^6.6.1", "sequelize-typescript": "^2.1.0", "swagger-ui-express": "^4.1.6", "ts-node": "^10.0.0", diff --git a/backend/typescript/yarn.lock b/backend/typescript/yarn.lock index 1cc35dc..e9da720 100644 --- a/backend/typescript/yarn.lock +++ b/backend/typescript/yarn.lock @@ -1027,6 +1027,13 @@ resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.10.tgz#61cc8469849e5bcdd0c7044122265c39cec10cf4" integrity sha512-C7srjHiVG3Ey1nR6d511dtDkCEjxuN9W1HWAEjGq8kpcwmNM6JJkpC0xvabM7BXTG2wDq8Eu33iH9aQKa7IvLQ== +"@types/debug@^4.1.8": + version "4.1.8" + resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.8.tgz#cef723a5d0a90990313faec2d1e22aee5eecb317" + integrity sha512-/vPO1EPOs306Cvhwv7KfVfYvOJqA/S/AXjaHQiJboCZzcNDb+TIJFN9/2C9DZ//ijSKWioNyUxD792QmDJ+HKQ== + dependencies: + "@types/ms" "*" + "@types/dotenv@^8.2.0": version "8.2.0" resolved "https://registry.yarnpkg.com/@types/dotenv/-/dotenv-8.2.0.tgz#5cd64710c3c98e82d9d15844375a33bf1b45d053" @@ -1202,6 +1209,11 @@ "@types/mongodb" "*" "@types/node" "*" +"@types/ms@*": + version "0.7.31" + resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197" + integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA== + "@types/multer@^1.4.6": version "1.4.6" resolved "https://registry.yarnpkg.com/@types/multer/-/multer-1.4.6.tgz#411950b7a99ba0de6ee8f6e3713f4628980cdc73" @@ -1335,6 +1347,11 @@ resolved "https://registry.yarnpkg.com/@types/validator/-/validator-13.1.3.tgz#366b394aa3fbeed2392bf0a20ded606fa4a3d35e" integrity sha512-DaOWN1zf7j+8nHhqXhIgNmS+ltAC53NXqGxYuBhWqWgqolRhddKzfZU814lkHQSTG0IUfQxU7Cg0gb8fFWo2mA== +"@types/validator@^13.7.17": + version "13.7.17" + resolved "https://registry.yarnpkg.com/@types/validator/-/validator-13.7.17.tgz#0a6d1510395065171e3378a4afc587a3aefa7cc1" + integrity sha512-aqayTNmeWrZcvnG2MG9eGYI6b7S5fl+yKgPs6bAjOTwPS316R5SxBGKvtSExfyoJU7pIeHJfsHI0Ji41RVMkvQ== + "@types/verror@^1.10.4": version "1.10.4" resolved "https://registry.yarnpkg.com/@types/verror/-/verror-1.10.4.tgz#805c0612b3a0c124cf99f517364142946b74ba3b" @@ -1453,7 +1470,7 @@ abab@^2.0.3, abab@^2.0.5: resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a" integrity sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q== -abbrev@1: +abbrev@1, abbrev@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== @@ -1576,11 +1593,6 @@ ansi-styles@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== -any-promise@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" - integrity sha1-q8av7tzqUugJzcA3au0845Y10X8= - anymatch@^3.0.3: version "3.1.2" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" @@ -1860,6 +1872,11 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= +at-least-node@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" + integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== + babel-jest@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.0.6.tgz#e99c6e0577da2655118e3608b68761a5a69bd0d8" @@ -1968,6 +1985,11 @@ bluebird@3.5.1: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" integrity sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA== +bluebird@^3.7.2: + version "3.7.2" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" + integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== + body-parser@1.19.0, body-parser@^1.18.3: version "1.19.0" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" @@ -2006,6 +2028,13 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + braces@^3.0.1, braces@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" @@ -2210,6 +2239,17 @@ cli-boxes@^2.2.0: resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.1.tgz#ddd5035d25094fce220e9cab40a45840a440318f" integrity sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw== +cli-color@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/cli-color/-/cli-color-2.0.3.tgz#73769ba969080629670f3f2ef69a4bf4e7cc1879" + integrity sha512-OkoZnxyC4ERN3zLzZaY9Emb7f/MhBOIpePv0Ycok0fJYT+Ouo00UBEIwsVsr0yoow++n5YWlSUgST9GKhNHiRQ== + dependencies: + d "^1.0.1" + es5-ext "^0.10.61" + es6-iterator "^2.0.3" + memoizee "^0.4.15" + timers-ext "^0.1.7" + cliui@^7.0.2: version "7.0.4" resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" @@ -2306,7 +2346,7 @@ combined-stream@^1.0.8: dependencies: delayed-stream "~1.0.0" -commander@^2.20.3: +commander@^2.19.0, commander@^2.20.3: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -2343,6 +2383,14 @@ concat-stream@^1.5.2: readable-stream "^2.2.2" typedarray "^0.0.6" +config-chain@^1.1.13: + version "1.1.13" + resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4" + integrity sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ== + dependencies: + ini "^1.3.4" + proto-list "~1.2.1" + configstore@^5.0.0, configstore@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/configstore/-/configstore-5.0.1.tgz#d365021b5df4b98cdd187d6a3b0e3f6a7cc5ed96" @@ -2461,6 +2509,14 @@ cssstyle@^2.3.0: dependencies: cssom "~0.3.6" +d@1, d@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" + integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== + dependencies: + es5-ext "^0.10.50" + type "^1.0.1" + data-urls@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" @@ -2515,6 +2571,13 @@ debug@^4.1.0, debug@^4.2.0: dependencies: ms "2.1.2" +debug@^4.3.4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + decimal.js@^10.2.1: version "10.3.1" resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.3.1.tgz#d8c3a444a9c6774ba60ca6ad7261c3a94fd5e783" @@ -2660,10 +2723,10 @@ dotenv@*, dotenv@^8.2.0: resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== -dottie@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/dottie/-/dottie-2.0.2.tgz#cc91c0726ce3a054ebf11c55fbc92a7f266dd154" - integrity sha512-fmrwR04lsniq/uSr8yikThDTrM7epXHBAAjH9TbeH3rEA8tdCO7mRzB9hdmdGyJCxF8KERo9CITcm3kGuoyMhg== +dottie@^2.0.4: + version "2.0.6" + resolved "https://registry.yarnpkg.com/dottie/-/dottie-2.0.6.tgz#34564ebfc6ec5e5772272d466424ad5b696484d4" + integrity sha512-iGCHkfUc5kFekGiqhe8B/mdaurD+lakO9txNnTvKtA6PISrw86LgqHvRzWYPyoE2Ph5aMIrCw9/uko6XHTKCwA== duplexer3@^0.1.4: version "0.1.4" @@ -2687,6 +2750,16 @@ ecdsa-sig-formatter@1.0.11, ecdsa-sig-formatter@^1.0.11: dependencies: safe-buffer "^5.0.1" +editorconfig@^0.15.3: + version "0.15.3" + resolved "https://registry.yarnpkg.com/editorconfig/-/editorconfig-0.15.3.tgz#bef84c4e75fb8dcb0ce5cee8efd51c15999befc5" + integrity sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g== + dependencies: + commander "^2.19.0" + lru-cache "^4.1.5" + semver "^5.6.0" + sigmund "^1.0.1" + ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" @@ -2777,6 +2850,42 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.53, es5-ext@^0.10.61, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46: + version "0.10.62" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5" + integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA== + dependencies: + es6-iterator "^2.0.3" + es6-symbol "^3.1.3" + next-tick "^1.1.0" + +es6-iterator@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + integrity sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g== + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + +es6-symbol@^3.1.1, es6-symbol@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" + integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== + dependencies: + d "^1.0.1" + ext "^1.1.2" + +es6-weak-map@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.3.tgz#b6da1f16cc2cc0d9be43e6bdbfc5e7dfcdf31d53" + integrity sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA== + dependencies: + d "1" + es5-ext "^0.10.46" + es6-iterator "^2.0.3" + es6-symbol "^3.1.1" + escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -3004,6 +3113,14 @@ etag@~1.8.1: resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= +event-emitter@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + integrity sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA== + dependencies: + d "1" + es5-ext "~0.10.14" + event-target-shim@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" @@ -3082,6 +3199,13 @@ express@^4.0.0, express@^4.17.1: utils-merge "1.0.1" vary "~1.1.2" +ext@^1.1.2: + version "1.7.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f" + integrity sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw== + dependencies: + type "^2.7.2" + extend@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" @@ -3292,6 +3416,16 @@ fs-constants@^1.0.0: resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== +fs-extra@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" + integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== + dependencies: + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-jetpack@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/fs-jetpack/-/fs-jetpack-4.1.0.tgz#d693fcffd3cedbd8829226967866b9e89f290f0f" @@ -3431,6 +3565,17 @@ glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.4, glob@^7.1.6: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" + integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^5.0.1" + once "^1.3.0" + global-dirs@^2.0.1: version "2.1.0" resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-2.1.0.tgz#e9046a49c806ff04d6c1825e196c8f0091e8df4d" @@ -3538,6 +3683,11 @@ graceful-fs@^4.1.2: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ== +graceful-fs@^4.1.6, graceful-fs@^4.2.0: + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + graceful-fs@^4.2.4: version "4.2.8" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a" @@ -3791,10 +3941,10 @@ imurmurhash@^0.1.4: resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= -inflection@1.12.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/inflection/-/inflection-1.12.0.tgz#a200935656d6f5f6bc4dc7502e1aecb703228416" - integrity sha1-ogCTVlbW9fa8TcdQLhrstwMihBY= +inflection@^1.13.4: + version "1.13.4" + resolved "https://registry.yarnpkg.com/inflection/-/inflection-1.13.4.tgz#65aa696c4e2da6225b148d7a154c449366633a32" + integrity sha512-6I/HUDeYFfuNCVS3td055BaXBwKYuzw7K3ExVMStBowKo9oOAMJIXIHvdyR3iboTCp1b+1i5DSkIZTcwIktuDw== inflight@^1.0.4: version "1.0.6" @@ -3819,7 +3969,7 @@ ini@1.3.7: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.7.tgz#a09363e1911972ea16d7a8851005d84cf09a9a84" integrity sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ== -ini@~1.3.0: +ini@^1.3.4, ini@~1.3.0: version "1.3.8" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== @@ -3865,6 +4015,13 @@ is-ci@^3.0.0: dependencies: ci-info "^3.1.1" +is-core-module@^2.11.0: + version "2.12.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.12.1.tgz#0c0b6885b6f80011c71541ce15c8d66cf5a4f9fd" + integrity sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg== + dependencies: + has "^1.0.3" + is-core-module@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" @@ -3947,6 +4104,11 @@ is-promise@4.0.0: resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-4.0.0.tgz#42ff9f84206c1991d26debf520dd5c01042dd2f3" integrity sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ== +is-promise@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.2.2.tgz#39ab959ccbf9a774cf079f7b40c7a26f763135f1" + integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ== + is-regex@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.2.tgz#81c8ebde4db142f2cf1c53fc86d6a45788266251" @@ -4477,6 +4639,16 @@ jest@^27.0.4: import-local "^3.0.2" jest-cli "^27.0.6" +js-beautify@^1.14.5: + version "1.14.8" + resolved "https://registry.yarnpkg.com/js-beautify/-/js-beautify-1.14.8.tgz#e0c570c15b5445b006de6d9a3e70fb62f9e408e9" + integrity sha512-4S7HFeI9YfRvRgKnEweohs0tgJj28InHVIj4Nl8Htf96Y6pHg3+tJrmo4ucAM9f7l4SHbFI3IvFAZ2a1eQPbyg== + dependencies: + config-chain "^1.1.13" + editorconfig "^0.15.3" + glob "^8.1.0" + nopt "^6.0.0" + js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -4578,6 +4750,15 @@ json5@^1.0.1: dependencies: minimist "^1.2.0" +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + jsonparse@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" @@ -4801,6 +4982,14 @@ lowercase-keys@^2.0.0: resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== +lru-cache@^4.1.5: + version "4.1.5" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" + integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + lru-cache@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" @@ -4808,6 +4997,13 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" +lru-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/lru-queue/-/lru-queue-0.1.0.tgz#2738bd9f0d3cf4f84490c5736c48699ac632cda3" + integrity sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ== + dependencies: + es5-ext "~0.10.2" + make-dir@^3.0.0, make-dir@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" @@ -4837,6 +5033,20 @@ media-typer@0.3.0: resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= +memoizee@^0.4.15: + version "0.4.15" + resolved "https://registry.yarnpkg.com/memoizee/-/memoizee-0.4.15.tgz#e6f3d2da863f318d02225391829a6c5956555b72" + integrity sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ== + dependencies: + d "^1.0.1" + es5-ext "^0.10.53" + es6-weak-map "^2.0.3" + event-emitter "^0.3.5" + is-promise "^2.2.2" + lru-queue "^0.1.0" + next-tick "^1.1.0" + timers-ext "^0.1.7" + memory-pager@^1.0.2: version "1.5.0" resolved "https://registry.yarnpkg.com/memory-pager/-/memory-pager-1.5.0.tgz#d8751655d22d384682741c972f2c3d6dfa3e66b5" @@ -4917,6 +5127,13 @@ minimatch@^3.0.2, minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" +minimatch@^5.0.1: + version "5.1.6" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== + dependencies: + brace-expansion "^2.0.1" + minimist@^1.2.0, minimist@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" @@ -4934,17 +5151,17 @@ mkdirp@^1.0.4: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== -moment-timezone@^0.5.31: - version "0.5.33" - resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.33.tgz#b252fd6bb57f341c9b59a5ab61a8e51a73bbd22c" - integrity sha512-PTc2vcT8K9J5/9rDEPe5czSIKgLoGsH8UNpA4qZTVw0Vd/Uz19geE9abbIOQKaAQFcnQ3v5YEXrbSc5BpshH+w== +moment-timezone@^0.5.43: + version "0.5.43" + resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.43.tgz#3dd7f3d0c67f78c23cd1906b9b2137a09b3c4790" + integrity sha512-72j3aNyuIsDxdF1i7CEgV2FfxM1r6aaqJyLB2vwb33mXYyoyLly+F1zbWqhA3/bVIoJ4szlUoMbUnVdid32NUQ== dependencies: - moment ">= 2.9.0" + moment "^2.29.4" -"moment@>= 2.9.0", moment@^2.26.0: - version "2.29.1" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3" - integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ== +moment@^2.29.4: + version "2.29.4" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" + integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w== mongodb-memory-server-core@6.10.0: version "6.10.0" @@ -5086,6 +5303,11 @@ negotiator@0.6.2: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== +next-tick@1, next-tick@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" + integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== + no-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" @@ -5140,6 +5362,13 @@ nodemon@^2.0.7: undefsafe "^2.0.3" update-notifier "^4.1.0" +nopt@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-6.0.0.tgz#245801d8ebf409c6df22ab9d95b65e1309cdb16d" + integrity sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g== + dependencies: + abbrev "^1.0.0" + nopt@~1.0.10: version "1.0.10" resolved "https://registry.yarnpkg.com/nopt/-/nopt-1.0.10.tgz#6ddd21bd2a31417b92727dd585f8a6f37608ebee" @@ -5422,6 +5651,11 @@ path-parse@^1.0.6: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" @@ -5449,6 +5683,11 @@ pg-connection-string@^2.4.0: resolved "https://registry.yarnpkg.com/pg-connection-string/-/pg-connection-string-2.4.0.tgz#c979922eb47832999a204da5dbe1ebf2341b6a10" integrity sha512-3iBXuv7XKvxeMrIgym7njT+HlZkwZqqGX4Bu9cci8xHZNT+Um1gWKqCsAzcC0d95rcKMU5WBg6YRUcHyV0HZKQ== +pg-connection-string@^2.6.0: + version "2.6.1" + resolved "https://registry.yarnpkg.com/pg-connection-string/-/pg-connection-string-2.6.1.tgz#78c23c21a35dd116f48e12e23c0965e8d9e2cbfb" + integrity sha512-w6ZzNu6oMmIzEAYVw+RLK0+nqHPt8K3ZnknKi+g48Ak2pr3dtljJW3o+D/n2zzCG07Zoe9VOX3aiKpj+BN0pjg== + pg-int8@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/pg-int8/-/pg-int8-1.0.1.tgz#943bd463bf5b71b4170115f80f8efc9a0c0eb78c" @@ -5618,6 +5857,11 @@ prompts@^2.0.1: kleur "^3.0.3" sisteransi "^1.0.5" +proto-list@~1.2.1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" + integrity sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA== + protobufjs@^6.10.2, protobufjs@^6.8.6: version "6.10.2" resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.10.2.tgz#b9cb6bd8ec8f87514592ba3fdfd28e93f33a469b" @@ -5645,6 +5889,11 @@ proxy-addr@~2.0.5: forwarded "~0.1.2" ipaddr.js "1.9.1" +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + integrity sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ== + psl@^1.1.33: version "1.8.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" @@ -5844,6 +6093,15 @@ resolve@^1.10.0, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.20.0: is-core-module "^2.2.0" path-parse "^1.0.6" +resolve@^1.22.1: + version "1.22.2" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f" + integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g== + dependencies: + is-core-module "^2.11.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + responselike@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" @@ -5851,12 +6109,10 @@ responselike@^1.0.2: dependencies: lowercase-keys "^1.0.0" -retry-as-promised@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/retry-as-promised/-/retry-as-promised-3.2.0.tgz#769f63d536bec4783549db0777cb56dadd9d8543" - integrity sha512-CybGs60B7oYU/qSQ6kuaFmRd9sTZ6oXSc0toqePvV74Ac6/IFZSI1ReFQmtCN+uvW1Mtqdwpvt/LGOiCBAY2Mg== - dependencies: - any-promise "^1.3.0" +retry-as-promised@^7.0.4: + version "7.0.4" + resolved "https://registry.yarnpkg.com/retry-as-promised/-/retry-as-promised-7.0.4.tgz#9df73adaeea08cb2948b9d34990549dc13d800a2" + integrity sha512-XgmCoxKWkDofwH8WddD0w85ZfqYz+ZHlr5yo+3YUCfycWawU56T5ckWXsScsj5B8tqUcIG67DxXByo3VUgiAdA== retry-request@^4.0.0, retry-request@^4.1.1: version "4.1.3" @@ -5956,6 +6212,13 @@ semver@^7.2.1, semver@^7.3.2: dependencies: lru-cache "^6.0.0" +semver@^7.5.1: + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== + dependencies: + lru-cache "^6.0.0" + send@0.17.1: version "0.17.1" resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" @@ -5975,10 +6238,23 @@ send@0.17.1: range-parser "~1.2.1" statuses "~1.5.0" -sequelize-pool@^6.0.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/sequelize-pool/-/sequelize-pool-6.1.0.tgz#caaa0c1e324d3c2c3a399fed2c7998970925d668" - integrity sha512-4YwEw3ZgK/tY/so+GfnSgXkdwIJJ1I32uZJztIEgZeAO6HMgj64OzySbWLgxj+tXhZCJnzRfkY9gINw8Ft8ZMg== +sequelize-cli@^6.6.1: + version "6.6.1" + resolved "https://registry.yarnpkg.com/sequelize-cli/-/sequelize-cli-6.6.1.tgz#ab86fc8de79f56bf1d1c4e3bbb1104aee4a5eaf4" + integrity sha512-C3qRpy1twBsFa855qOQFSYWer8ngiaZP05/OAsT1QCUwtc6UxVNNiQ0CGUt98T9T1gi5D3TGWL6le8HWUKELyw== + dependencies: + cli-color "^2.0.3" + fs-extra "^9.1.0" + js-beautify "^1.14.5" + lodash "^4.17.21" + resolve "^1.22.1" + umzug "^2.3.0" + yargs "^16.2.0" + +sequelize-pool@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/sequelize-pool/-/sequelize-pool-7.1.0.tgz#210b391af4002762f823188fd6ecfc7413020768" + integrity sha512-G9c0qlIWQSK29pR/5U2JF5dDQeqqHRragoyahj/Nx4KOOQ3CPPfzxnfqFPCSB7x5UgjOgnZ61nSxz+fjDpRlJg== sequelize-typescript@^2.1.0: version "2.1.0" @@ -5987,23 +6263,26 @@ sequelize-typescript@^2.1.0: dependencies: glob "7.1.6" -sequelize@^6.5.0: - version "6.5.0" - resolved "https://registry.yarnpkg.com/sequelize/-/sequelize-6.5.0.tgz#c968a03f6fbbcda40717f73edb39fadf27b85e96" - integrity sha512-owBt8fnzVy8E1OvyCyfCdVk7OOLyPVrBCMEf+CvRReC5oCyo+UqeXCtwaex9L6LM9ifZ1i3TG3sFeM5MgLK0CQ== - dependencies: - debug "^4.1.1" - dottie "^2.0.0" - inflection "1.12.0" - lodash "^4.17.20" - moment "^2.26.0" - moment-timezone "^0.5.31" - retry-as-promised "^3.2.0" - semver "^7.3.2" - sequelize-pool "^6.0.0" +sequelize@^6.32.1: + version "6.32.1" + resolved "https://registry.yarnpkg.com/sequelize/-/sequelize-6.32.1.tgz#8e8669a8d6cf711d2d94b33cc721928fad7487f6" + integrity sha512-3Iv0jruv57Y0YvcxQW7BE56O7DC1BojcfIrqh6my+IQwde+9u/YnuYHzK+8kmZLhLvaziRT1eWu38nh9yVwn/g== + dependencies: + "@types/debug" "^4.1.8" + "@types/validator" "^13.7.17" + debug "^4.3.4" + dottie "^2.0.4" + inflection "^1.13.4" + lodash "^4.17.21" + moment "^2.29.4" + moment-timezone "^0.5.43" + pg-connection-string "^2.6.0" + retry-as-promised "^7.0.4" + semver "^7.5.1" + sequelize-pool "^7.1.0" toposort-class "^1.0.1" - uuid "^8.1.0" - validator "^10.11.0" + uuid "^8.3.2" + validator "^13.9.0" wkx "^0.5.0" serve-static@1.14.1: @@ -6051,6 +6330,11 @@ sift@13.5.2: resolved "https://registry.yarnpkg.com/sift/-/sift-13.5.2.tgz#24a715e13c617b086166cd04917d204a591c9da6" integrity sha512-+gxdEOMA2J+AI+fVsCqeNn7Tgx3M9ZN9jdi95939l1IJ8cZsqS8sqpJyOkic2SJk+1+98Uwryt/gL6XDaV+UZA== +sigmund@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" + integrity sha512-fCvEXfh6NWpm+YSuY2bpXb/VIihqWA6hLsgboC+0nl71Q7N7o2eaCW8mJa/NLvQhs6jpd3VZV4UiUQlV6+lc8g== + signal-exit@^3.0.2, signal-exit@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" @@ -6349,6 +6633,11 @@ supports-hyperlinks@^2.0.0: has-flag "^4.0.0" supports-color "^7.0.0" +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + swagger-ui-dist@^3.18.1: version "3.49.0" resolved "https://registry.yarnpkg.com/swagger-ui-dist/-/swagger-ui-dist-3.49.0.tgz#8915df662b74a4dbc9583cd6d3d726c3910e3b33" @@ -6440,6 +6729,14 @@ throat@^6.0.1: resolved "https://registry.yarnpkg.com/throat/-/throat-6.0.1.tgz#d514fedad95740c12c2d7fc70ea863eb51ade375" integrity sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w== +timers-ext@^0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/timers-ext/-/timers-ext-0.1.7.tgz#6f57ad8578e07a3fb9f91d9387d65647555e25c6" + integrity sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ== + dependencies: + es5-ext "~0.10.46" + next-tick "1" + tmp@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14" @@ -6628,6 +6925,16 @@ type-is@^1.6.16, type-is@^1.6.4, type-is@~1.6.17, type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" +type@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" + integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== + +type@^2.7.2: + version "2.7.2" + resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" + integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== + typedarray-to-buffer@^3.1.5: version "3.1.5" resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" @@ -6645,6 +6952,13 @@ typescript@4.1.6: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.6.tgz#1becd85d77567c3c741172339e93ce2e69932138" integrity sha512-pxnwLxeb/Z5SP80JDRzVjh58KsM6jZHRAOtTpS7sXLS4ogXNKC9ANxHHZqLLeVHZN35jCtI4JdmLLbLiC1kBow== +umzug@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/umzug/-/umzug-2.3.0.tgz#0ef42b62df54e216b05dcaf627830a6a8b84a184" + integrity sha512-Z274K+e8goZK8QJxmbRPhl89HPO1K+ORFtm6rySPhFKfKc5GHhqdzD0SGhSWHkzoXasqJuItdhorSvY7/Cgflw== + dependencies: + bluebird "^3.7.2" + umzug@^3.0.0-beta.16: version "3.0.0-beta.16" resolved "https://registry.yarnpkg.com/umzug/-/umzug-3.0.0-beta.16.tgz#fd64f99e080f3c05faa9adae2f0e3320fc66416d" @@ -6677,6 +6991,11 @@ universalify@^0.1.2: resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" @@ -6741,7 +7060,7 @@ uuid@^3.1.0: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== -uuid@^8.0.0, uuid@^8.1.0, uuid@^8.3.1, uuid@^8.3.2: +uuid@^8.0.0, uuid@^8.3.1, uuid@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== @@ -6768,10 +7087,10 @@ validate-npm-package-license@^3.0.1: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" -validator@^10.11.0: - version "10.11.0" - resolved "https://registry.yarnpkg.com/validator/-/validator-10.11.0.tgz#003108ea6e9a9874d31ccc9e5006856ccd76b228" - integrity sha512-X/p3UZerAIsbBfN/IwahhYaBbY68EN/UQBWHtsbXGT5bfrH/p4NQzUCG1kF/rtKaNpnJ7jAu6NGTdSNtyNIXMw== +validator@^13.9.0: + version "13.9.0" + resolved "https://registry.yarnpkg.com/validator/-/validator-13.9.0.tgz#33e7b85b604f3bbce9bb1a05d5c3e22e1c2ff855" + integrity sha512-B+dGG8U3fdtM0/aNK4/X8CXq/EcxU2WPrPEkJGslb47qyHsxmbggTWK0yEA4qnYVNF+nxNlN88o14hIcPmSIEA== vary@^1, vary@~1.1.2: version "1.1.2" @@ -6978,6 +7297,11 @@ y18n@^5.0.5: resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + integrity sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A== + yallist@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" @@ -6996,7 +7320,7 @@ yargs-parser@20.x, yargs-parser@^20.2.2: resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== -yargs@^16.0.3: +yargs@^16.0.3, yargs@^16.2.0: version "16.2.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==