diff --git a/app.js b/app.js index 1462bec..63eed0c 100644 --- a/app.js +++ b/app.js @@ -4,7 +4,7 @@ const cookieParser = require('cookie-parser'); const logger = require('morgan'); var debug = require('debug')('report-service:server'); -const mountRoutes = require('./routes') +const mountRoutes = require('./routes'); const app = express(); const { sequelize } = require('./models'); const { printEnvVariablesStatus } = require('./helpers/envHelpers'); @@ -17,16 +17,16 @@ app.use(express.static(path.join(__dirname, 'public'))); //connect to the database and mount routes (async () => { - try { - printEnvVariablesStatus(); - await sequelize.authenticate(); - // await sequelize.sync(); - debug('Connected to the database'); - mountRoutes(app); - } catch (error) { - debug('Unable to connect to database', error); - process.exit(1); - } -})() + try { + printEnvVariablesStatus(); + await sequelize.authenticate(); + // await sequelize.sync(); + debug('Connected to the database'); + mountRoutes(app); + } catch (error) { + debug('Unable to connect to database', error); + process.exit(1); + } +})(); module.exports = app; diff --git a/controllers/accessPaths/block.js b/controllers/accessPaths/block.js index f9ac54d..5b9832d 100644 --- a/controllers/accessPaths/block.js +++ b/controllers/accessPaths/block.js @@ -6,14 +6,14 @@ const _ = require('lodash'); */ module.exports = { - ruleName: 'block', - isMatch(user, payload) { - payload = Array.isArray(payload) ? payload : [payload]; - const userProfileLocation = _.get(user, 'profileLocation') || _.get(user, 'userLocations'); - if (!userProfileLocation) return false; - if (!Array.isArray(userProfileLocation)) return false; - const userBlock = _.find(userProfileLocation, location => _.get(location, 'type') === 'block'); - if (!(userBlock && ('id' in userBlock))) return false; - return _.some(payload, locationId => locationId === userBlock.id); - } -} \ No newline at end of file + ruleName: 'block', + isMatch(user, payload) { + payload = Array.isArray(payload) ? payload : [payload]; + const userProfileLocation = _.get(user, 'profileLocation') || _.get(user, 'userLocations'); + if (!userProfileLocation) return false; + if (!Array.isArray(userProfileLocation)) return false; + const userBlock = _.find(userProfileLocation, location => _.get(location, 'type') === 'block'); + if (!(userBlock && ('id' in userBlock))) return false; + return _.some(payload, locationId => locationId === userBlock.id); + } +}; \ No newline at end of file diff --git a/controllers/accessPaths/board.js b/controllers/accessPaths/board.js index 61d3bb9..ffd8953 100644 --- a/controllers/accessPaths/board.js +++ b/controllers/accessPaths/board.js @@ -6,19 +6,19 @@ const _ = require('lodash'); */ module.exports = { - ruleName: 'board', - isMatch(user, payload) { - payload = Array.isArray(payload) ? payload : [payload]; - const userBoards = _.get(user, 'framework.board'); - if (!userBoards) return false; - if (!Array.isArray(userBoards)) return false; - return _.some(payload, board => { - board = _.toLower(board); - if (_.find(userBoards, userBoard => _.toLower(userBoard) === board)) { - return true; - } + ruleName: 'board', + isMatch(user, payload) { + payload = Array.isArray(payload) ? payload : [payload]; + const userBoards = _.get(user, 'framework.board'); + if (!userBoards) return false; + if (!Array.isArray(userBoards)) return false; + return _.some(payload, board => { + board = _.toLower(board); + if (_.find(userBoards, userBoard => _.toLower(userBoard) === board)) { + return true; + } - return false; - }); - } -} \ No newline at end of file + return false; + }); + } +}; \ No newline at end of file diff --git a/controllers/accessPaths/channel.js b/controllers/accessPaths/channel.js index c29447c..485605c 100644 --- a/controllers/accessPaths/channel.js +++ b/controllers/accessPaths/channel.js @@ -6,11 +6,11 @@ const _ = require('lodash'); */ module.exports = { - ruleName: 'channel', - isMatch(user, payload) { - payload = Array.isArray(payload) ? payload : [payload]; - const userChannelId = _.get(user, 'rootOrg.hashTagId') || _.get(user, 'rootOrg.channel') || _.get(user, 'channel'); - if (!userChannelId) return false; - return _.some(payload, channel => channel === userChannelId); - } -} \ No newline at end of file + ruleName: 'channel', + isMatch(user, payload) { + payload = Array.isArray(payload) ? payload : [payload]; + const userChannelId = _.get(user, 'rootOrg.hashTagId') || _.get(user, 'rootOrg.channel') || _.get(user, 'channel'); + if (!userChannelId) return false; + return _.some(payload, channel => channel === userChannelId); + } +}; \ No newline at end of file diff --git a/controllers/accessPaths/district.js b/controllers/accessPaths/district.js index 804eb5b..658472c 100644 --- a/controllers/accessPaths/district.js +++ b/controllers/accessPaths/district.js @@ -6,14 +6,14 @@ const _ = require('lodash'); */ module.exports = { - ruleName: 'district', - isMatch(user, payload) { - payload = Array.isArray(payload) ? payload : [payload]; - const userProfileLocation = _.get(user, 'profileLocation') || _.get(user, 'userLocations'); - if (!userProfileLocation) return false; - if (!Array.isArray(userProfileLocation)) return false; - const userDistrict = _.find(userProfileLocation, location => _.get(location, 'type') === 'district'); - if (!(userDistrict && ('id' in userDistrict))) return false; - return _.some(payload, locationId => locationId === userDistrict.id); - } -} \ No newline at end of file + ruleName: 'district', + isMatch(user, payload) { + payload = Array.isArray(payload) ? payload : [payload]; + const userProfileLocation = _.get(user, 'profileLocation') || _.get(user, 'userLocations'); + if (!userProfileLocation) return false; + if (!Array.isArray(userProfileLocation)) return false; + const userDistrict = _.find(userProfileLocation, location => _.get(location, 'type') === 'district'); + if (!(userDistrict && ('id' in userDistrict))) return false; + return _.some(payload, locationId => locationId === userDistrict.id); + } +}; \ No newline at end of file diff --git a/controllers/accessPaths/framework.js b/controllers/accessPaths/framework.js index e886d9c..26bca12 100644 --- a/controllers/accessPaths/framework.js +++ b/controllers/accessPaths/framework.js @@ -6,20 +6,20 @@ const _ = require('lodash'); */ module.exports = { - ruleName: 'framework', - isMatch(user, payload) { - payload = Array.isArray(payload) ? payload : [payload]; + ruleName: 'framework', + isMatch(user, payload) { + payload = Array.isArray(payload) ? payload : [payload]; - const frameworkIds = _.get(user, 'framework.id'); - if (!frameworkIds) return false; - if (!Array.isArray(frameworkIds)) return false; + const frameworkIds = _.get(user, 'framework.id'); + if (!frameworkIds) return false; + if (!Array.isArray(frameworkIds)) return false; - return _.some(payload, frameworkId => { - if (_.find(frameworkIds, id => id === frameworkId)) { - return true; - } + return _.some(payload, frameworkId => { + if (_.find(frameworkIds, id => id === frameworkId)) { + return true; + } - return false; - }); - } -} \ No newline at end of file + return false; + }); + } +}; \ No newline at end of file diff --git a/controllers/accessPaths/gradeLevel.js b/controllers/accessPaths/gradeLevel.js index 782e366..4bc1ae7 100644 --- a/controllers/accessPaths/gradeLevel.js +++ b/controllers/accessPaths/gradeLevel.js @@ -6,19 +6,19 @@ const _ = require('lodash'); */ module.exports = { - ruleName: 'gradeLevel', - isMatch(user, payload) { - payload = Array.isArray(payload) ? payload : [payload]; - const userGradeLevels = _.get(user, 'framework.gradeLevel'); - if (!userGradeLevels) return false; - if (!Array.isArray(userGradeLevels)) return false; - return _.some(payload, gradeLevel => { - gradeLevel = _.toLower(gradeLevel); - if (_.find(userGradeLevels, userGradeLevel => _.toLower(userGradeLevel) === gradeLevel)) { - return true; - } + ruleName: 'gradeLevel', + isMatch(user, payload) { + payload = Array.isArray(payload) ? payload : [payload]; + const userGradeLevels = _.get(user, 'framework.gradeLevel'); + if (!userGradeLevels) return false; + if (!Array.isArray(userGradeLevels)) return false; + return _.some(payload, gradeLevel => { + gradeLevel = _.toLower(gradeLevel); + if (_.find(userGradeLevels, userGradeLevel => _.toLower(userGradeLevel) === gradeLevel)) { + return true; + } - return false; - }); - } -} \ No newline at end of file + return false; + }); + } +}; \ No newline at end of file diff --git a/controllers/accessPaths/index.js b/controllers/accessPaths/index.js index f8ddb6e..4ea6f50 100644 --- a/controllers/accessPaths/index.js +++ b/controllers/accessPaths/index.js @@ -19,12 +19,12 @@ isMatch function validates the given payload against the user context data and r const rules = new Map(); ((folderPath) => { - fs.readdirSync(folderPath) - .filter(file => file !== basename) - .forEach(file => { - const { ruleName, isMatch } = require(path.join(folderPath, file)); - rules.set(ruleName, isMatch); - }) + fs.readdirSync(folderPath) + .filter(file => file !== basename) + .forEach(file => { + const { ruleName, isMatch } = require(path.join(folderPath, file)); + rules.set(ruleName, isMatch); + }); })(__dirname); //check if the user is the creator of the report or not. @@ -35,29 +35,29 @@ const isCreatorOfReport = ({ user, report }) => _.get(report, 'createdby') === ( * @param {*} user */ const validateAccessPath = user => report => { - let { accesspath, type } = report; + let { accesspath, type } = report; - if (type === CONSTANTS.REPORT_TYPE.PUBLIC) return true; + if (type === CONSTANTS.REPORT_TYPE.PUBLIC) return true; - if (type === CONSTANTS.REPORT_TYPE.PROTECTED) { - if (!accesspath) return false; - if (typeof accesspath !== 'object') return false; - } + if (type === CONSTANTS.REPORT_TYPE.PROTECTED) { + if (!accesspath) return false; + if (typeof accesspath !== 'object') return false; + } - if (type === CONSTANTS.REPORT_TYPE.PRIVATE && !accesspath) { - // if report is private then it should be accessible only by the creator of the report. - accesspath = accessPathForPrivateReports({ user }); - } + if (type === CONSTANTS.REPORT_TYPE.PRIVATE && !accesspath) { + // if report is private then it should be accessible only by the creator of the report. + accesspath = accessPathForPrivateReports({ user }); + } - for (let [key, value] of Object.entries(accesspath)) { - if (!rules.has(key)) return false; - const validator = rules.get(key); - const success = validator(user, value); - if (!success) return false; - } + for (let [key, value] of Object.entries(accesspath)) { + if (!rules.has(key)) return false; + const validator = rules.get(key); + const success = validator(user, value); + if (!success) return false; + } - return true; -} + return true; +}; /** * @description func used when access path is sent in the filters for search query. Used to filter out the reports @@ -65,24 +65,24 @@ const validateAccessPath = user => report => { * @return {*} */ const matchAccessPath = accessPathSearchPayload => { - const accessPathSearchPayloadIterable = Object.entries(accessPathSearchPayload); + const accessPathSearchPayloadIterable = Object.entries(accessPathSearchPayload); - return report => { - const { accesspath: reportAccessPath } = report; - if (!reportAccessPath) return false; + return report => { + const { accesspath: reportAccessPath } = report; + if (!reportAccessPath) return false; - for (let [ruleName, value] of accessPathSearchPayloadIterable) { - value = Array.isArray(value) ? value : [value]; + for (let [ruleName, value] of accessPathSearchPayloadIterable) { + value = Array.isArray(value) ? value : [value]; - if (!(ruleName in reportAccessPath)) return false; + if (!(ruleName in reportAccessPath)) return false; - let ruleValue = reportAccessPath[ruleName]; - ruleValue = Array.isArray(ruleValue) ? ruleValue : [ruleValue]; - if (_.intersection(ruleValue, value).length === 0) return false; - } - return true; + let ruleValue = reportAccessPath[ruleName]; + ruleValue = Array.isArray(ruleValue) ? ruleValue : [ruleValue]; + if (_.intersection(ruleValue, value).length === 0) return false; } -} + return true; + }; +}; /** * @description private reports should should have accesspath set as userId of the creator @@ -90,10 +90,10 @@ const matchAccessPath = accessPathSearchPayload => { * @return {*} */ const accessPathForPrivateReports = ({ user }) => { - if (user) { - return { userId: _.get(user, 'identifier') || _.get(user, 'id') } - } - return null; + if (user) { + return { userId: _.get(user, 'identifier') || _.get(user, 'id') }; + } + return null; }; /** @@ -102,16 +102,16 @@ const accessPathForPrivateReports = ({ user }) => { * @return {*} */ const roleBasedAccess = ({ report, user }) => { - if (!user) return false; - const { status } = report; - if ([CONSTANTS.REPORT_STATUS.DRAFT, CONSTANTS.REPORT_STATUS.RETIRED].includes(status)) { - if (!isUserAdmin(user)) { - return false; - } + if (!user) return false; + const { status } = report; + if ([CONSTANTS.REPORT_STATUS.DRAFT, CONSTANTS.REPORT_STATUS.RETIRED].includes(status)) { + if (!isUserAdmin(user)) { + return false; } + } - return true; -} + return true; +}; -module.exports = { validateAccessPath, matchAccessPath, accessPathForPrivateReports, isCreatorOfReport, roleBasedAccess } +module.exports = { validateAccessPath, matchAccessPath, accessPathForPrivateReports, isCreatorOfReport, roleBasedAccess }; diff --git a/controllers/accessPaths/isMinor.js b/controllers/accessPaths/isMinor.js index 5943cda..9344aa0 100644 --- a/controllers/accessPaths/isMinor.js +++ b/controllers/accessPaths/isMinor.js @@ -6,10 +6,10 @@ const _ = require('lodash'); */ module.exports = { - ruleName: 'isMinor', - isMatch(user, payload) { - //payload is boolean here - const isUserMinor = _.get(user, 'isMinor') || false; - return isUserMinor === payload - } -} \ No newline at end of file + ruleName: 'isMinor', + isMatch(user, payload) { + //payload is boolean here + const isUserMinor = _.get(user, 'isMinor') || false; + return isUserMinor === payload; + } +}; \ No newline at end of file diff --git a/controllers/accessPaths/isSuperAdmin.js b/controllers/accessPaths/isSuperAdmin.js index 3b6cc1e..c6f8ce5 100644 --- a/controllers/accessPaths/isSuperAdmin.js +++ b/controllers/accessPaths/isSuperAdmin.js @@ -8,23 +8,23 @@ const { envVariables } = require('../../helpers/envHelpers'); module.exports = { - ruleName: 'isSuperAdmin', - isMatch(user, payload) { - //payload is boolean - const userRoles = _.get(user, 'roles'); - if (!userRoles) return false; - if (!Array.isArray(userRoles)) return false; - const userRolesSet = _.map(userRoles, 'role'); + ruleName: 'isSuperAdmin', + isMatch(user, payload) { + //payload is boolean + const userRoles = _.get(user, 'roles'); + if (!userRoles) return false; + if (!Array.isArray(userRoles)) return false; + const userRolesSet = _.map(userRoles, 'role'); - // check if the user is superadmin or not - let isSuperAdmin = false; - if (_.find(userRolesSet, role => _.toLower(role) === 'report_admin')) { - const userSlug = _.get(user, 'rootOrg.slug'); - if (userSlug === envVariables.SUNBIRD_SUPER_ADMIN_SLUG) { - isSuperAdmin = true - } - } - - return isSuperAdmin === payload; + // check if the user is superadmin or not + let isSuperAdmin = false; + if (_.find(userRolesSet, role => _.toLower(role) === 'report_admin')) { + const userSlug = _.get(user, 'rootOrg.slug'); + if (userSlug === envVariables.SUNBIRD_SUPER_ADMIN_SLUG) { + isSuperAdmin = true; + } } -} \ No newline at end of file + + return isSuperAdmin === payload; + } +}; \ No newline at end of file diff --git a/controllers/accessPaths/medium.js b/controllers/accessPaths/medium.js index d869bee..003ff6b 100644 --- a/controllers/accessPaths/medium.js +++ b/controllers/accessPaths/medium.js @@ -6,19 +6,19 @@ const _ = require('lodash'); */ module.exports = { - ruleName: 'medium', - isMatch(user, payload) { - payload = Array.isArray(payload) ? payload : [payload]; - const userMediums = _.get(user, 'framework.medium'); - if (!userMediums) return false; - if (!Array.isArray(userMediums)) return false; - return _.some(payload, medium => { - medium = _.toLower(medium); - if (_.find(userMediums, userMedium => _.toLower(userMedium) === medium)) { - return true; - } + ruleName: 'medium', + isMatch(user, payload) { + payload = Array.isArray(payload) ? payload : [payload]; + const userMediums = _.get(user, 'framework.medium'); + if (!userMediums) return false; + if (!Array.isArray(userMediums)) return false; + return _.some(payload, medium => { + medium = _.toLower(medium); + if (_.find(userMediums, userMedium => _.toLower(userMedium) === medium)) { + return true; + } - return false; - }); - } -} \ No newline at end of file + return false; + }); + } +}; \ No newline at end of file diff --git a/controllers/accessPaths/organisation.js b/controllers/accessPaths/organisation.js index dacc640..17df790 100644 --- a/controllers/accessPaths/organisation.js +++ b/controllers/accessPaths/organisation.js @@ -6,18 +6,18 @@ const _ = require('lodash'); */ module.exports = { - ruleName: 'organisation', - isMatch(user, payload) { - payload = Array.isArray(payload) ? payload : [payload]; - const userOrgs = _.get(user, 'organisations'); - if (!userOrgs) return false; - if (!Array.isArray(userOrgs)) return false; - return _.some(payload, orgId => { - if (_.find(userOrgs, userOrg => _.get(userOrg, 'organisationId') === orgId)) { - return true; - } + ruleName: 'organisation', + isMatch(user, payload) { + payload = Array.isArray(payload) ? payload : [payload]; + const userOrgs = _.get(user, 'organisations'); + if (!userOrgs) return false; + if (!Array.isArray(userOrgs)) return false; + return _.some(payload, orgId => { + if (_.find(userOrgs, userOrg => _.get(userOrg, 'organisationId') === orgId)) { + return true; + } - return false; - }); - } -} \ No newline at end of file + return false; + }); + } +}; \ No newline at end of file diff --git a/controllers/accessPaths/role.js b/controllers/accessPaths/role.js index 3b90ab8..46636b7 100644 --- a/controllers/accessPaths/role.js +++ b/controllers/accessPaths/role.js @@ -7,20 +7,20 @@ const _ = require('lodash'); module.exports = { - ruleName: 'role', - isMatch(user, payload) { - payload = Array.isArray(payload) ? payload : [payload]; - const userRoles = _.get(user, 'roles'); - if (!userRoles) return false; - if (!Array.isArray(userRoles)) return false; - const userRolesSet = _.map(userRoles, 'role'); - return _.some(payload, role => { - role = _.toLower(role); - if (_.find(userRolesSet, userRole => _.toLower(userRole) === role)) { - return true; - } + ruleName: 'role', + isMatch(user, payload) { + payload = Array.isArray(payload) ? payload : [payload]; + const userRoles = _.get(user, 'roles'); + if (!userRoles) return false; + if (!Array.isArray(userRoles)) return false; + const userRolesSet = _.map(userRoles, 'role'); + return _.some(payload, role => { + role = _.toLower(role); + if (_.find(userRolesSet, userRole => _.toLower(userRole) === role)) { + return true; + } - return false; - }); - } -} \ No newline at end of file + return false; + }); + } +}; \ No newline at end of file diff --git a/controllers/accessPaths/rootOrg.js b/controllers/accessPaths/rootOrg.js index 254d735..15dd9d6 100644 --- a/controllers/accessPaths/rootOrg.js +++ b/controllers/accessPaths/rootOrg.js @@ -7,11 +7,11 @@ const _ = require('lodash'); module.exports = { - ruleName: 'rootOrg', - isMatch(user, payload) { - payload = Array.isArray(payload) ? payload : [payload]; - const userRootOrg = _.get(user, 'rootOrgId'); - if (!userRootOrg) return false; - return _.some(payload, value => _.toLower(value) === _.toLower(userRootOrg)); - } -} \ No newline at end of file + ruleName: 'rootOrg', + isMatch(user, payload) { + payload = Array.isArray(payload) ? payload : [payload]; + const userRootOrg = _.get(user, 'rootOrgId'); + if (!userRootOrg) return false; + return _.some(payload, value => _.toLower(value) === _.toLower(userRootOrg)); + } +}; \ No newline at end of file diff --git a/controllers/accessPaths/slug.js b/controllers/accessPaths/slug.js index 09a48f3..78abcd9 100644 --- a/controllers/accessPaths/slug.js +++ b/controllers/accessPaths/slug.js @@ -6,11 +6,11 @@ const _ = require('lodash'); */ module.exports = { - ruleName: 'slug', - isMatch(user, payload) { - payload = Array.isArray(payload) ? payload : [payload]; - const userSlug = _.get(user, 'rootOrg.slug'); - if (!userSlug) return false; - return _.some(payload, slug => slug === userSlug); - } -} \ No newline at end of file + ruleName: 'slug', + isMatch(user, payload) { + payload = Array.isArray(payload) ? payload : [payload]; + const userSlug = _.get(user, 'rootOrg.slug'); + if (!userSlug) return false; + return _.some(payload, slug => slug === userSlug); + } +}; \ No newline at end of file diff --git a/controllers/accessPaths/state.js b/controllers/accessPaths/state.js index c0db194..dd35dac 100644 --- a/controllers/accessPaths/state.js +++ b/controllers/accessPaths/state.js @@ -6,14 +6,14 @@ const _ = require('lodash'); */ module.exports = { - ruleName: 'state', - isMatch(user, payload) { - payload = Array.isArray(payload) ? payload : [payload]; - const userProfileLocation = _.get(user, 'profileLocation') || _.get(user, 'userLocations'); - if (!userProfileLocation) return false; - if (!Array.isArray(userProfileLocation)) return false; - const userState = _.find(userProfileLocation, location => _.get(location, 'type') === 'state'); - if (!(userState && ('id' in userState))) return false; - return _.some(payload, locationId => locationId === userState.id); - } -} \ No newline at end of file + ruleName: 'state', + isMatch(user, payload) { + payload = Array.isArray(payload) ? payload : [payload]; + const userProfileLocation = _.get(user, 'profileLocation') || _.get(user, 'userLocations'); + if (!userProfileLocation) return false; + if (!Array.isArray(userProfileLocation)) return false; + const userState = _.find(userProfileLocation, location => _.get(location, 'type') === 'state'); + if (!(userState && ('id' in userState))) return false; + return _.some(payload, locationId => locationId === userState.id); + } +}; \ No newline at end of file diff --git a/controllers/accessPaths/subject.js b/controllers/accessPaths/subject.js index 2353be2..b75599f 100644 --- a/controllers/accessPaths/subject.js +++ b/controllers/accessPaths/subject.js @@ -6,19 +6,19 @@ const _ = require('lodash'); */ module.exports = { - ruleName: 'subject', - isMatch(user, payload) { - payload = Array.isArray(payload) ? payload : [payload]; - const userSubjects = _.get(user, 'framework.subject'); - if (!userSubjects) return false; - if (!Array.isArray(userSubjects)) return false; - return _.some(payload, subject => { - subject = _.toLower(subject); - if (_.find(userSubjects, userSubject => _.toLower(userSubject) === subject)) { - return true; - } + ruleName: 'subject', + isMatch(user, payload) { + payload = Array.isArray(payload) ? payload : [payload]; + const userSubjects = _.get(user, 'framework.subject'); + if (!userSubjects) return false; + if (!Array.isArray(userSubjects)) return false; + return _.some(payload, subject => { + subject = _.toLower(subject); + if (_.find(userSubjects, userSubject => _.toLower(userSubject) === subject)) { + return true; + } - return false; - }); - } -} \ No newline at end of file + return false; + }); + } +}; \ No newline at end of file diff --git a/controllers/accessPaths/userId.js b/controllers/accessPaths/userId.js index 28545f3..35e54d8 100644 --- a/controllers/accessPaths/userId.js +++ b/controllers/accessPaths/userId.js @@ -6,11 +6,11 @@ const _ = require('lodash'); */ module.exports = { - ruleName: 'userId', - isMatch(user, payload) { - payload = Array.isArray(payload) ? payload : [payload]; - const userId = _.get(user, 'identifier') || _.get(user, 'id'); - if (!userId) return false; - return _.some(payload, id => userId === id); - } -} \ No newline at end of file + ruleName: 'userId', + isMatch(user, payload) { + payload = Array.isArray(payload) ? payload : [payload]; + const userId = _.get(user, 'identifier') || _.get(user, 'id'); + if (!userId) return false; + return _.some(payload, id => userId === id); + } +}; \ No newline at end of file diff --git a/controllers/accessPaths/userSubType.js b/controllers/accessPaths/userSubType.js index f64780d..0462548 100644 --- a/controllers/accessPaths/userSubType.js +++ b/controllers/accessPaths/userSubType.js @@ -6,11 +6,11 @@ const _ = require('lodash'); */ module.exports = { - ruleName: 'userSubType', - isMatch(user, payload) { - payload = Array.isArray(payload) ? payload : [payload]; - const userSubType = _.get(user, 'profileUserType.subType'); - if (!userSubType) return false; - return _.some(payload, type => _.toLower(type) === _.toLower(userSubType)); - } -} \ No newline at end of file + ruleName: 'userSubType', + isMatch(user, payload) { + payload = Array.isArray(payload) ? payload : [payload]; + const userSubType = _.get(user, 'profileUserType.subType'); + if (!userSubType) return false; + return _.some(payload, type => _.toLower(type) === _.toLower(userSubType)); + } +}; \ No newline at end of file diff --git a/controllers/accessPaths/userType.js b/controllers/accessPaths/userType.js index dcdfe4a..ad95cb8 100644 --- a/controllers/accessPaths/userType.js +++ b/controllers/accessPaths/userType.js @@ -6,11 +6,11 @@ const _ = require('lodash'); */ module.exports = { - ruleName: 'userType', - isMatch(user, payload) { - payload = Array.isArray(payload) ? payload : [payload]; - const userType = _.get(user, 'profileUserType.type'); - if (!userType) return false; - return _.some(payload, type => _.toLower(type) === _.toLower(userType)); - } -} \ No newline at end of file + ruleName: 'userType', + isMatch(user, payload) { + payload = Array.isArray(payload) ? payload : [payload]; + const userType = _.get(user, 'profileUserType.type'); + if (!userType) return false; + return _.some(payload, type => _.toLower(type) === _.toLower(userType)); + } +}; \ No newline at end of file diff --git a/controllers/accessPaths/username.js b/controllers/accessPaths/username.js index 8fc484c..6459c5e 100644 --- a/controllers/accessPaths/username.js +++ b/controllers/accessPaths/username.js @@ -6,11 +6,11 @@ const _ = require('lodash'); */ module.exports = { - ruleName: 'username', - isMatch(user, payload) { - payload = Array.isArray(payload) ? payload : [payload]; - const userName = _.get(user, 'userName'); - if (!userName) return false; - return _.some(payload, id => userName === id); - } -} \ No newline at end of file + ruleName: 'username', + isMatch(user, payload) { + payload = Array.isArray(payload) ? payload : [payload]; + const userName = _.get(user, 'userName'); + if (!userName) return false; + return _.some(payload, id => userName === id); + } +}; \ No newline at end of file diff --git a/controllers/parameters/$board.js b/controllers/parameters/$board.js index ee73b01..c5c741f 100644 --- a/controllers/parameters/$board.js +++ b/controllers/parameters/$board.js @@ -4,23 +4,23 @@ var debug = require('debug')('parameters:$board'); const { channelRead, frameworkRead } = require('../../helpers/learnerHelper'); module.exports = { - name: '$board', - value: (user) => _.get(user, 'framework.board'), - cache: false, - async masterData({ user, req }) { - try { - const channelId = req.get('x-channel-id') || req.get('X-CHANNEL-ID') || _.get(user, 'rootOrg.hashTagId') || _.get(user, 'channel'); - const channelReadResponse = await channelRead({ channelId }); - const frameworkName = _.get(channelReadResponse, 'data.result.channel.defaultFramework'); - if (!frameworkName) throw new Error('default framework missing'); - const frameworkReadResponse = await frameworkRead({ frameworkId: frameworkName }); - const frameworkData = _.get(frameworkReadResponse, 'data.result.framework'); - const boardCategory = _.find(frameworkData.categories, ['code', 'board']); - if (!_.get(boardCategory, 'terms') && !Array.isArray(boardCategory.terms)) { return of([]); } - return _.map(boardCategory.terms, 'name'); - } catch (error) { - debug(`$board masterData fetch failed`, JSON.stringify(error)); - return []; - } + name: '$board', + value: (user) => _.get(user, 'framework.board'), + cache: false, + async masterData({ user, req }) { + try { + const channelId = req.get('x-channel-id') || req.get('X-CHANNEL-ID') || _.get(user, 'rootOrg.hashTagId') || _.get(user, 'channel'); + const channelReadResponse = await channelRead({ channelId }); + const frameworkName = _.get(channelReadResponse, 'data.result.channel.defaultFramework'); + if (!frameworkName) throw new Error('default framework missing'); + const frameworkReadResponse = await frameworkRead({ frameworkId: frameworkName }); + const frameworkData = _.get(frameworkReadResponse, 'data.result.framework'); + const boardCategory = _.find(frameworkData.categories, ['code', 'board']); + if (!_.get(boardCategory, 'terms') && !Array.isArray(boardCategory.terms)) { return of([]); } + return _.map(boardCategory.terms, 'name'); + } catch (error) { + debug('$board masterData fetch failed', JSON.stringify(error)); + return []; } -} \ No newline at end of file + } +}; \ No newline at end of file diff --git a/controllers/parameters/$channel.js b/controllers/parameters/$channel.js index 4426cad..1f8243c 100644 --- a/controllers/parameters/$channel.js +++ b/controllers/parameters/$channel.js @@ -2,29 +2,29 @@ const _ = require('lodash'); var debug = require('debug')('parameters:$channel'); -const { orgSearch } = require("../../helpers/orgHelper"); +const { orgSearch } = require('../../helpers/orgHelper'); module.exports = { - name: '$channel', - value: (user) => _.get(user, 'rootOrg.hashTagId') || _.get(user, 'rootOrg.channel') || _.get(user, 'channel'), - cache: true, - async masterData({ user, req }) { - try { - const body = { - "request": { - "filters": { - "isRootOrg": true, - "status": 1 - }, - "fields": ["id", "channel", "slug", "orgName"] - } - }; - const response = await orgSearch({ body }); - const result = response.data; - return _.map(_.get(result, 'result.response.content') || [], 'id'); - } catch (error) { - debug(`$channel masterData fetch failed`, JSON.stringify(error)); - return []; + name: '$channel', + value: (user) => _.get(user, 'rootOrg.hashTagId') || _.get(user, 'rootOrg.channel') || _.get(user, 'channel'), + cache: true, + async masterData({ user, req }) { + try { + const body = { + 'request': { + 'filters': { + 'isRootOrg': true, + 'status': 1 + }, + 'fields': ['id', 'channel', 'slug', 'orgName'] } + }; + const response = await orgSearch({ body }); + const result = response.data; + return _.map(_.get(result, 'result.response.content') || [], 'id'); + } catch (error) { + debug('$channel masterData fetch failed', JSON.stringify(error)); + return []; } -} \ No newline at end of file + } +}; \ No newline at end of file diff --git a/controllers/parameters/$slug.js b/controllers/parameters/$slug.js index aea3e2e..05743e3 100644 --- a/controllers/parameters/$slug.js +++ b/controllers/parameters/$slug.js @@ -1,29 +1,29 @@ const _ = require('lodash'); var debug = require('debug')('parameters:$slug'); -const { orgSearch } = require("../../helpers/orgHelper"); +const { orgSearch } = require('../../helpers/orgHelper'); module.exports = { - name: '$slug', - value: (user) => _.get(user, 'rootOrg.slug'), - cache: true, - async masterData({ user, req }) { - try { - const body = { - "request": { - "filters": { - "isRootOrg": true, - "status": 1 - }, - "fields": ["id", "channel", "slug", "orgName"] - } - }; - const response = await orgSearch({ body }); - const result = response.data; - return _.map(_.get(result, 'result.response.content') || [], 'slug'); - } catch (error) { - debug(`$slug masterData fetch failed`, JSON.stringify(error)); - return []; + name: '$slug', + value: (user) => _.get(user, 'rootOrg.slug'), + cache: true, + async masterData({ user, req }) { + try { + const body = { + 'request': { + 'filters': { + 'isRootOrg': true, + 'status': 1 + }, + 'fields': ['id', 'channel', 'slug', 'orgName'] } + }; + const response = await orgSearch({ body }); + const result = response.data; + return _.map(_.get(result, 'result.response.content') || [], 'slug'); + } catch (error) { + debug('$slug masterData fetch failed', JSON.stringify(error)); + return []; } -} \ No newline at end of file + } +}; \ No newline at end of file diff --git a/controllers/parameters/$state.js b/controllers/parameters/$state.js index 3e69e72..3056979 100644 --- a/controllers/parameters/$state.js +++ b/controllers/parameters/$state.js @@ -1,21 +1,21 @@ const _ = require('lodash'); var debug = require('debug')('parameters:$state'); -const { locationSearch } = require("../../helpers/learnerHelper"); +const { locationSearch } = require('../../helpers/learnerHelper'); module.exports = { - name: '$state', - value: (user) => _.get(_.find(_.get(user, 'userLocations') || _.get(user, 'profileLocation'), ['type', 'state']), 'name'), - cache: true, - async masterData({ user, req }) { - try { - const body = { "request": { 'filters': { 'type': 'state' } } }; - const response = await locationSearch({ body }); - const result = response.data; - return _.map(_.get(result, 'result.response') || [], 'name'); - } catch (error) { - debug(`$state masterData fetch failed`, JSON.stringify(error)); - return []; - } + name: '$state', + value: (user) => _.get(_.find(_.get(user, 'userLocations') || _.get(user, 'profileLocation'), ['type', 'state']), 'name'), + cache: true, + async masterData({ user, req }) { + try { + const body = { 'request': { 'filters': { 'type': 'state' } } }; + const response = await locationSearch({ body }); + const result = response.data; + return _.map(_.get(result, 'result.response') || [], 'name'); + } catch (error) { + debug('$state masterData fetch failed', JSON.stringify(error)); + return []; } -} \ No newline at end of file + } +}; \ No newline at end of file diff --git a/controllers/parameters/index.js b/controllers/parameters/index.js index b99a166..ce3a337 100644 --- a/controllers/parameters/index.js +++ b/controllers/parameters/index.js @@ -7,7 +7,7 @@ var debug = require('debug')('parameters:index'); const { getSharedAccessSignature } = require('../../helpers/azure-storage'); const { envVariables } = require('../../helpers/envHelpers'); const { isUserSuperAdmin } = require('../../helpers/userHelper'); -const CONSTANTS = require('../../resources/constants.json') +const CONSTANTS = require('../../resources/constants.json'); /* @@ -24,12 +24,12 @@ const parameters = {}; //read all the parameter files inside the folder and build the parameters object; ((folderPath) => { - fs.readdirSync(folderPath) - .filter(file => file !== basename) - .forEach(file => { - const { name, ...rest } = require(path.join(folderPath, file)); - parameters[name] = rest; - }) + fs.readdirSync(folderPath) + .filter(file => file !== basename) + .forEach(file => { + const { name, ...rest } = require(path.join(folderPath, file)); + parameters[name] = rest; + }); })(__dirname); /** @@ -40,168 +40,168 @@ const isReportParameterized = (report) => _.get(report, 'parameters.length') > 0 /** @description convert a string into base64 */ -const getHashedValue = (val) => Buffer.from(val).toString("base64"); +const getHashedValue = (val) => Buffer.from(val).toString('base64'); /** @description read the parameter value from the user context. refer to value function in params object */ const getParameterValue = (param, user) => { - if (param in parameters) { - return parameters[param].value(user) - } + if (param in parameters) { + return parameters[param].value(user); + } - return null; -} + return null; +}; /** @description generate hash from parameters value of report */ const getParametersHash = (report, user) => { - const parameters = _.get(report, 'parameters'); - const result = _.map(parameters, param => { - const userParamValue = getParameterValue(_.toLower(param), user); - if (!userParamValue) return null; - if (!_.isArray(userParamValue)) return getHashedValue(userParamValue); - return _.map(userParamValue, val => getHashedValue(val)); - }); - return _.flatMap(_.compact(result)); -} + const parameters = _.get(report, 'parameters'); + const result = _.map(parameters, param => { + const userParamValue = getParameterValue(_.toLower(param), user); + if (!userParamValue) return null; + if (!_.isArray(userParamValue)) return getHashedValue(userParamValue); + return _.map(userParamValue, val => getHashedValue(val)); + }); + return _.flatMap(_.compact(result)); +}; /** @description populate report with parameter values */ const populateReportsWithParameters = (reports, user) => { - return _.reduce(reports, (results, report) => { - const isParameterized = isReportParameterized(report); - report.isParameterized = isParameterized; - - if (isParameterized) { - if (user) { - const hash = getParametersHash(report, user); - if (isUserSuperAdmin(user)) { - results.push(report); - } else { - const childReports = _.uniqBy(_.concat(_.filter(_.get(report, 'children'), child => hash.includes(_.get(child, 'hashed_val'))), - _.map(hash, hashed_val => ({ - hashed_val, - status: CONSTANTS.REPORT_STATUS.DRAFT, - reportid: _.get(report, 'reportid'), - materialize: true - }))), 'hashed_val'); - - if (childReports.length) { - if (childReports.length === 1) { - const mergedReport = _.assign(report.dataValues, _.pick(_.get(childReports, '[0]'), ['status', 'hashed_val'])); - results.push(mergedReport); - } else { - report.children = childReports; - results.push(report); - } - } - } + return _.reduce(reports, (results, report) => { + const isParameterized = isReportParameterized(report); + report.isParameterized = isParameterized; + + if (isParameterized) { + if (user) { + const hash = getParametersHash(report, user); + if (isUserSuperAdmin(user)) { + results.push(report); + } else { + const childReports = _.uniqBy(_.concat(_.filter(_.get(report, 'children'), child => hash.includes(_.get(child, 'hashed_val'))), + _.map(hash, hashed_val => ({ + hashed_val, + status: CONSTANTS.REPORT_STATUS.DRAFT, + reportid: _.get(report, 'reportid'), + materialize: true + }))), 'hashed_val'); + + if (childReports.length) { + if (childReports.length === 1) { + const mergedReport = _.assign(report.dataValues, _.pick(_.get(childReports, '[0]'), ['status', 'hashed_val'])); + results.push(mergedReport); + } else { + report.children = childReports; + results.push(report); } + } } - else { - results.push(report); - } - return results; - }, []); -} + } + } + else { + results.push(report); + } + return results; + }, []); +}; const getParameterFromPath = path => { - const existingParameters = Object.keys(parameters); + const existingParameters = Object.keys(parameters); - for (let param of existingParameters) { - if (_.includes(path, param)) { - return param; - } + for (let param of existingParameters) { + if (_.includes(path, param)) { + return param; } + } - return null -} + return null; +}; const generateSasPredicate = ({ parameter, path, dataset }) => value => { - const resolvedPath = path.replace(parameter, value); - const promise = getSharedAccessSignature({ filePath: resolvedPath }) - .then(({ sasUrl, expiresAt }) => ({ key: value, sasUrl, expiresAt })) - .catch(_ => ({ key: value, sasUrl: null, expiresAt: null })) - .then(data => { - const { key, sasUrl, expiresAt } = data; - dataset.data.push({ - id: key, - type: parameter, - url: sasUrl, - expiresAt - }); - }); - return promise; -} + const resolvedPath = path.replace(parameter, value); + const promise = getSharedAccessSignature({ filePath: resolvedPath }) + .then(({ sasUrl, expiresAt }) => ({ key: value, sasUrl, expiresAt })) + .catch(_ => ({ key: value, sasUrl: null, expiresAt: null })) + .then(data => { + const { key, sasUrl, expiresAt } = data; + dataset.data.push({ + id: key, + type: parameter, + url: sasUrl, + expiresAt + }); + }); + return promise; +}; const getDataset = async ({ dataSource, user, req }) => { - let { id, path } = dataSource; - try { - const dataset = { dataset_id: id, isParameterized: false, parameters: null, data: [] }; - // for backward compatibility - if (typeof path === 'string' && path.startsWith('/reports/fetch/')) { - path = path.replace('/reports/fetch/', ''); - } + let { id, path } = dataSource; + try { + const dataset = { dataset_id: id, isParameterized: false, parameters: null, data: [] }; + // for backward compatibility + if (typeof path === 'string' && path.startsWith('/reports/fetch/')) { + path = path.replace('/reports/fetch/', ''); + } - const parameter = getParameterFromPath(path); - - if (parameter) { - - dataset.isParameterized = true; - dataset.parameters = [parameter]; - - const { masterData, cache = false, value } = parameters[parameter]; - const resolvedValue = value(user); - debug(parameter, 'Resolved Value', JSON.stringify(resolvedValue)); - let masterDataForParameter; - - if (isUserSuperAdmin(user)) { - //if the user is super REPORT_ADMIN then return all the masterData; - //get the master data from memory cache is available else call the master data fetch API for the parameter. - const cachedData = memoryCache.get(parameter); - debug(parameter, 'Cached Data', JSON.stringify(cachedData)); - if (false && cachedData && cache) { - masterDataForParameter = cachedData; - } else { - masterDataForParameter = await masterData({ user, req }); - debug(parameter, 'Master Data', JSON.stringify(masterDataForParameter)); - memoryCache.put(parameter, masterDataForParameter, envVariables.MEMORY_CACHE_TIMEOUT); - } - } else { - //if the user is not super REPORT_ADMIN then return only the resolved parameter data; - masterDataForParameter = resolvedValue && (Array.isArray(resolvedValue) ? resolvedValue : [resolvedValue]); - } + const parameter = getParameterFromPath(path); - if (Array.isArray(masterDataForParameter) && masterDataForParameter.length) { - await Promise.all(masterDataForParameter.map(generateSasPredicate({ parameter, path, dataset }))) - } + if (parameter) { + dataset.isParameterized = true; + dataset.parameters = [parameter]; + + const { masterData, cache = false, value } = parameters[parameter]; + const resolvedValue = value(user); + debug(parameter, 'Resolved Value', JSON.stringify(resolvedValue)); + let masterDataForParameter; + + if (isUserSuperAdmin(user)) { + //if the user is super REPORT_ADMIN then return all the masterData; + //get the master data from memory cache is available else call the master data fetch API for the parameter. + const cachedData = memoryCache.get(parameter); + debug(parameter, 'Cached Data', JSON.stringify(cachedData)); + if (false && cachedData && cache) { + masterDataForParameter = cachedData; } else { - const { sasUrl, expiresAt } = await getSharedAccessSignature({ filePath: path }).catch(error => null); - dataset.data = [{ - id: 'default', - type: null, - url: sasUrl, - expiresAt - }]; + masterDataForParameter = await masterData({ user, req }); + debug(parameter, 'Master Data', JSON.stringify(masterDataForParameter)); + memoryCache.put(parameter, masterDataForParameter, envVariables.MEMORY_CACHE_TIMEOUT); } + } else { + //if the user is not super REPORT_ADMIN then return only the resolved parameter data; + masterDataForParameter = resolvedValue && (Array.isArray(resolvedValue) ? resolvedValue : [resolvedValue]); + } + + if (Array.isArray(masterDataForParameter) && masterDataForParameter.length) { + await Promise.all(masterDataForParameter.map(generateSasPredicate({ parameter, path, dataset }))); + } + + } else { + const { sasUrl, expiresAt } = await getSharedAccessSignature({ filePath: path }).catch(error => null); + dataset.data = [{ + id: 'default', + type: null, + url: sasUrl, + expiresAt + }]; + } - return dataset; + return dataset; - } catch (error) { - return { dataset_id: id, data: [], parameters: null, isParameterized: false } - } -} + } catch (error) { + return { dataset_id: id, data: [], parameters: null, isParameterized: false }; + } +}; const getDatasets = async ({ document, user, req }) => { - let dataSources = _.get(document, 'reportconfig.dataSource'); - if (!dataSources) return []; - dataSources = Array.isArray(dataSources) ? dataSources : [dataSources]; - return Promise.all(dataSources.map(dataSource => getDataset({ dataSource, user, req }))); -} + let dataSources = _.get(document, 'reportconfig.dataSource'); + if (!dataSources) return []; + dataSources = Array.isArray(dataSources) ? dataSources : [dataSources]; + return Promise.all(dataSources.map(dataSource => getDataset({ dataSource, user, req }))); +}; -module.exports = { populateReportsWithParameters, getDatasets, reportParameters: parameters, isReportParameterized } \ No newline at end of file +module.exports = { populateReportsWithParameters, getDatasets, reportParameters: parameters, isReportParameterized }; \ No newline at end of file diff --git a/controllers/report.js b/controllers/report.js index d621919..0728af2 100644 --- a/controllers/report.js +++ b/controllers/report.js @@ -1,4 +1,4 @@ -const { Op } = require("sequelize"); +const { Op } = require('sequelize'); const createError = require('http-errors'); var debug = require('debug')('controllers:report'); const _ = require('lodash'); @@ -7,9 +7,9 @@ const axios = require('axios'); const { report, report_status, report_summary } = require('../models'); const CONSTANTS = require('../resources/constants.json'); const { formatApiResponse } = require('../helpers/responseFormatter'); -const { validateAccessPath, matchAccessPath, accessPathForPrivateReports, isCreatorOfReport, roleBasedAccess } = require("./accessPaths"); -const { getDatasets, isReportParameterized, populateReportsWithParameters } = require("./parameters"); -const { fetchAndFormatExhaustDataset } = require("../helpers/dataServiceHelper"); +const { validateAccessPath, matchAccessPath, accessPathForPrivateReports, isCreatorOfReport, roleBasedAccess } = require('./accessPaths'); +const { getDatasets, isReportParameterized, populateReportsWithParameters } = require('./parameters'); +const { fetchAndFormatExhaustDataset } = require('../helpers/dataServiceHelper'); // checks by reportid if the report exists in our database or not const reportExists = async (reportid) => report.findOne({ where: { reportid } }); @@ -22,70 +22,70 @@ const reportExists = async (reportid) => report.findOne({ where: { reportid } }) * @return {*} */ const search = async (req, res, next) => { - try { - const { filters = {}, options = {} } = req.body.request; - const { accesspath, ...otherFilters } = filters; - - let { rows } = await report.findAndCountAll({ - ...(Object.keys(otherFilters).length && { - where: { - ...otherFilters - } - }), - order: [['createdon', 'DESC']], - include: { model: report_status, required: false, as: 'children' }, - ...options - }); - - const userDetails = req.userDetails; - const documents = populateReportsWithParameters(rows, userDetails); - - //is accesspath is provided as search filter create a closure to filter reports - const accessPathMatchClosure = accesspath && matchAccessPath(accesspath); - - //check if x-authenticated-user-token is provided. If not return only public reports else validate accesspaths. - let filteredReports = []; - if (!userDetails) { - //token absent => check only public & live reports & non parameterized reports - filteredReports = _.filter(documents, row => { - if (accessPathMatchClosure) { - const isMatched = accessPathMatchClosure(row); - if (!isMatched) return false; - } - return row.type === CONSTANTS.REPORT_TYPE.PUBLIC && row.status === CONSTANTS.REPORT_STATUS.LIVE; - }); - } else { - /* + try { + const { filters = {}, options = {} } = req.body.request; + const { accesspath, ...otherFilters } = filters; + + let { rows } = await report.findAndCountAll({ + ...(Object.keys(otherFilters).length && { + where: { + ...otherFilters + } + }), + order: [['createdon', 'DESC']], + include: { model: report_status, required: false, as: 'children' }, + ...options + }); + + const userDetails = req.userDetails; + const documents = populateReportsWithParameters(rows, userDetails); + + //is accesspath is provided as search filter create a closure to filter reports + const accessPathMatchClosure = accesspath && matchAccessPath(accesspath); + + //check if x-authenticated-user-token is provided. If not return only public reports else validate accesspaths. + let filteredReports = []; + if (!userDetails) { + //token absent => check only public & live reports & non parameterized reports + filteredReports = _.filter(documents, row => { + if (accessPathMatchClosure) { + const isMatched = accessPathMatchClosure(row); + if (!isMatched) return false; + } + return row.type === CONSTANTS.REPORT_TYPE.PUBLIC && row.status === CONSTANTS.REPORT_STATUS.LIVE; + }); + } else { + /* token is present. check for 1- if user is creator of report. 2- is user report admin or not. 3 - check access path for private and protected reports. */ - filteredReports = _.filter(documents, row => { - const isCreator = isCreatorOfReport({ user: userDetails, report: row }); - if (isCreator) return true; - - if (!roleBasedAccess({ report: row, user: userDetails })) return false; - - if (accessPathMatchClosure) { - const isMatched = accessPathMatchClosure(row); - if (!isMatched) return false; - } - - const { type } = row; - if (!type) return false; - if (type === CONSTANTS.REPORT_TYPE.PUBLIC) return true; - if ((type === CONSTANTS.REPORT_TYPE.PRIVATE) || (type === CONSTANTS.REPORT_TYPE.PROTECTED)) { - return validateAccessPath(userDetails)(row); - } - }) + filteredReports = _.filter(documents, row => { + const isCreator = isCreatorOfReport({ user: userDetails, report: row }); + if (isCreator) return true; + + if (!roleBasedAccess({ report: row, user: userDetails })) return false; + + if (accessPathMatchClosure) { + const isMatched = accessPathMatchClosure(row); + if (!isMatched) return false; + } + + const { type } = row; + if (!type) return false; + if (type === CONSTANTS.REPORT_TYPE.PUBLIC) return true; + if ((type === CONSTANTS.REPORT_TYPE.PRIVATE) || (type === CONSTANTS.REPORT_TYPE.PROTECTED)) { + return validateAccessPath(userDetails)(row); } - return res.status(200).json(formatApiResponse({ id: req.id, result: { reports: filteredReports, count: filteredReports.length } })); - } catch (error) { - debug('search failed', JSON.stringify(error)); - return next(createError(500, error)); + }); } -} + return res.status(200).json(formatApiResponse({ id: req.id, result: { reports: filteredReports, count: filteredReports.length } })); + } catch (error) { + debug('search failed', JSON.stringify(error)); + return next(createError(500, error)); + } +}; /** * @description controller for the creation of report @@ -95,35 +95,35 @@ const search = async (req, res, next) => { * @return {*} */ const create = async (req, res, next) => { - try { - const { report: reportMeta } = req.body.request; - const user = req.userDetails; + try { + const { report: reportMeta } = req.body.request; + const user = req.userDetails; - const userId = _.get(user, 'identifier') || _.get(user, 'id'); - if (userId) { - reportMeta.createdby = userId; - } + const userId = _.get(user, 'identifier') || _.get(user, 'id'); + if (userId) { + reportMeta.createdby = userId; + } - // if report is private then it should be accessible only by the creator of the report. - if (user && _.get(reportMeta, 'type') === CONSTANTS.REPORT_TYPE.PRIVATE) { - reportMeta.accesspath = accessPathForPrivateReports({ user }); - } + // if report is private then it should be accessible only by the creator of the report. + if (user && _.get(reportMeta, 'type') === CONSTANTS.REPORT_TYPE.PRIVATE) { + reportMeta.accesspath = accessPathForPrivateReports({ user }); + } - const { reportid, reportaccessurl } = await report.create(reportMeta); + const { reportid, reportaccessurl } = await report.create(reportMeta); - return res.status(201).json(formatApiResponse({ - id: req.id, - result: { - reportId: reportid, - reportaccessurl - } - })); + return res.status(201).json(formatApiResponse({ + id: req.id, + result: { + reportId: reportid, + reportaccessurl + } + })); - } catch (error) { - debug('create failed', JSON.stringify(error)); - return next(createError(500, error.message)); - } -} + } catch (error) { + debug('create failed', JSON.stringify(error)); + return next(createError(500, error.message)); + } +}; /** * @description controller for the deletion of report @@ -133,57 +133,57 @@ const create = async (req, res, next) => { * @return {*} */ const remove = async (req, res, next) => { - try { - const { reportid, hash } = req.params; - let success; - - if (hash) { - success = await report_status.destroy({ - where: { - reportid, - hashed_val: hash - } - }); - } else { - //if a report is deleted, delete all associated report summaries and report status entries. - try { - - const exists = await reportExists(reportid); - if (!exists) return next(createError(404, CONSTANTS.MESSAGES.NO_REPORT)); - - await Promise.all([ - report.destroy({ - where: { - reportid - } - }), - report_summary.destroy({ - where: { - reportid - } - })], - report_summary.destroy({ - where: { - reportid - } - })); - - success = true; - } catch (error) { - success = false; - } + try { + const { reportid, hash } = req.params; + let success; + + if (hash) { + success = await report_status.destroy({ + where: { + reportid, + hashed_val: hash } + }); + } else { + //if a report is deleted, delete all associated report summaries and report status entries. + try { - if (!success) { - return next(createError(404, CONSTANTS.MESSAGES.NO_REPORT)); - } + const exists = await reportExists(reportid); + if (!exists) return next(createError(404, CONSTANTS.MESSAGES.NO_REPORT)); + + await Promise.all([ + report.destroy({ + where: { + reportid + } + }), + report_summary.destroy({ + where: { + reportid + } + })], + report_summary.destroy({ + where: { + reportid + } + })); + + success = true; + } catch (error) { + success = false; + } + } - return res.status(200).json(formatApiResponse({ id: req.id, result: { reportid, ...(hash && { hash }) } })); - } catch (error) { - debug('remove failed', JSON.stringify(error)); - return next(createError(500, error.message)); + if (!success) { + return next(createError(404, CONSTANTS.MESSAGES.NO_REPORT)); } -} + + return res.status(200).json(formatApiResponse({ id: req.id, result: { reportid, ...(hash && { hash }) } })); + } catch (error) { + debug('remove failed', JSON.stringify(error)); + return next(createError(500, error.message)); + } +}; /** * @description controller to read a report metadata with or without access path @@ -193,77 +193,77 @@ const remove = async (req, res, next) => { * @return {*} */ const read = async (req, res, next) => { - try { - const { reportid, hash } = _.get(req, "params"); - const { fields, showChildren = 'true' } = req.query; - - let rawDocument = await report.findOne({ - where: { - reportid - }, - ...((showChildren === 'true') && { - include: { - model: report_status, required: false, as: 'children', where: { - reportid, - ...(hash && { hashed_val: hash }) - } - } - }), - ...(fields && typeof fields === 'string' && { - attributes: fields.split(',') - }) - }); + try { + const { reportid, hash } = _.get(req, 'params'); + const { fields, showChildren = 'true' } = req.query; + + let rawDocument = await report.findOne({ + where: { + reportid + }, + ...((showChildren === 'true') && { + include: { + model: report_status, required: false, as: 'children', where: { + reportid, + ...(hash && { hashed_val: hash }) + } + } + }), + ...(fields && typeof fields === 'string' && { + attributes: fields.split(',') + }) + }); + + if (!rawDocument) return next(createError(404, CONSTANTS.MESSAGES.NO_REPORT)); + + if (hash) { + if (_.get(rawDocument, 'children.length')) { + const reportWithoutChildren = _.omit(rawDocument, 'children'); + rawDocument = _.assign(_.get(reportWithoutChildren, 'dataValues'), _.omit(_.get(rawDocument, 'children[0].dataValues'), ['id', 'reportid'])); + } else { + return next(createError(404, CONSTANTS.MESSAGES.NO_REPORT)); + } + } - if (!rawDocument) return next(createError(404, CONSTANTS.MESSAGES.NO_REPORT)); - if (hash) { - if (_.get(rawDocument, 'children.length')) { - const reportWithoutChildren = _.omit(rawDocument, 'children'); - rawDocument = _.assign(_.get(reportWithoutChildren, 'dataValues'), _.omit(_.get(rawDocument, 'children[0].dataValues'), ['id', 'reportid'])); - } else { - return next(createError(404, CONSTANTS.MESSAGES.NO_REPORT)); - } - } + const userDetails = req.userDetails; + let document; + if (!hash) { + [document] = populateReportsWithParameters([rawDocument], userDetails); + if (!document) return next(createError(401, CONSTANTS.MESSAGES.FORBIDDEN)); + } else { + document = rawDocument; + } + const { type, status } = document; - const userDetails = req.userDetails; - let document; - if (!hash) { - [document] = populateReportsWithParameters([rawDocument], userDetails); - if (!document) return next(createError(401, CONSTANTS.MESSAGES.FORBIDDEN)); - } else { - document = rawDocument; + if (userDetails) { + const isCreator = isCreatorOfReport({ user: userDetails, report: document }); + if (!isCreator) { + const isAllowed = roleBasedAccess({ report: document, user: userDetails }); + if (!isAllowed) { + return next(createError(401, CONSTANTS.MESSAGES.FORBIDDEN)); } - const { type, status } = document; - - if (userDetails) { - const isCreator = isCreatorOfReport({ user: userDetails, report: document }); - if (!isCreator) { - const isAllowed = roleBasedAccess({ report: document, user: userDetails }); - if (!isAllowed) { - return next(createError(401, CONSTANTS.MESSAGES.FORBIDDEN)); - } - - if ((type === CONSTANTS.REPORT_TYPE.PROTECTED) || (type === CONSTANTS.REPORT_TYPE.PRIVATE)) { - const isAuthorized = validateAccessPath(userDetails)(document); - if (!isAuthorized) { - return next(createError(401, CONSTANTS.MESSAGES.FORBIDDEN)); - } - } - } - } else { - if (type !== CONSTANTS.REPORT_TYPE.PUBLIC || status !== CONSTANTS.REPORT_STATUS.LIVE) { - return next(createError(401, CONSTANTS.MESSAGES.FORBIDDEN)); - } + if ((type === CONSTANTS.REPORT_TYPE.PROTECTED) || (type === CONSTANTS.REPORT_TYPE.PRIVATE)) { + const isAuthorized = validateAccessPath(userDetails)(document); + if (!isAuthorized) { + return next(createError(401, CONSTANTS.MESSAGES.FORBIDDEN)); + } } - - return res.json(formatApiResponse({ id: req.id, result: { reports: [document], count: 1 } })); - } catch (error) { - debug('read failed', JSON.stringify(error)); - return next(createError(500, error.message)); + } + } else { + if (type !== CONSTANTS.REPORT_TYPE.PUBLIC || status !== CONSTANTS.REPORT_STATUS.LIVE) { + return next(createError(401, CONSTANTS.MESSAGES.FORBIDDEN)); + } } -} + + return res.json(formatApiResponse({ id: req.id, result: { reports: [document], count: 1 } })); + } catch (error) { + debug('read failed', JSON.stringify(error)); + return next(createError(500, error.message)); + } +}; /** * @description controller to update a report metadata. @@ -273,35 +273,35 @@ const read = async (req, res, next) => { * @return {*} */ const update = async (req, res, next) => { - try { - const { reportid } = _.get(req, "params"); - const { report: updatePayload, options = { returning: true }, query } = _.get(req, "body.request"); - - const queryPayload = { - ...(reportid && { reportid }), - ...(query && { ...query }) - } + try { + const { reportid } = _.get(req, 'params'); + const { report: updatePayload, options = { returning: true }, query } = _.get(req, 'body.request'); - if (reportid) { - const exists = await reportExists(reportid); - if (!exists) return next(createError(404, CONSTANTS.MESSAGES.NO_REPORT)); - } + const queryPayload = { + ...(reportid && { reportid }), + ...(query && { ...query }) + }; - await report.update( - { - ...updatePayload - }, - { - where: queryPayload, - ...options - }); - - return res.status(200).json(formatApiResponse({ id: req.id, result: { reportid } })); - } catch (error) { - debug('update failed', JSON.stringify(error)); - return next(createError(500, error.message)); + if (reportid) { + const exists = await reportExists(reportid); + if (!exists) return next(createError(404, CONSTANTS.MESSAGES.NO_REPORT)); } -} + + await report.update( + { + ...updatePayload + }, + { + where: queryPayload, + ...options + }); + + return res.status(200).json(formatApiResponse({ id: req.id, result: { reportid } })); + } catch (error) { + debug('update failed', JSON.stringify(error)); + return next(createError(500, error.message)); + } +}; /** * @description controller to publish a report live. @@ -311,57 +311,57 @@ const update = async (req, res, next) => { * @return {*} */ const publish = async (req, res, next) => { - try { - const { reportid, hash } = req.params; - - const document = await reportExists(reportid); - if (!document) return next(createError(404, CONSTANTS.MESSAGES.NO_REPORT)); - - if (!hash) { - await report.update( - { - status: CONSTANTS.REPORT_STATUS.LIVE, - }, - { - where: { - reportid - } - }) - } else { - const { count } = await report_status.findAndCountAll({ - where: { - reportid, - hashed_val: hash - } - }) - - if (count > 0) { - await report_status.update( - { - status: CONSTANTS.REPORT_STATUS.LIVE - }, - { - where: { - reportid, - hashed_val: hash - } - } - ) - } else { - await report_status.create({ - reportid, - status: CONSTANTS.REPORT_STATUS.LIVE, - hashed_val: hash - }) - } + try { + const { reportid, hash } = req.params; + + const document = await reportExists(reportid); + if (!document) return next(createError(404, CONSTANTS.MESSAGES.NO_REPORT)); + + if (!hash) { + await report.update( + { + status: CONSTANTS.REPORT_STATUS.LIVE, + }, + { + where: { + reportid + } + }); + } else { + const { count } = await report_status.findAndCountAll({ + where: { + reportid, + hashed_val: hash } - - return res.status(200).json(formatApiResponse({ id: req.id, result: { reportid, ...(hash && { hash }) } })); - } catch (error) { - debug('publish failed', JSON.stringify(error)); - return next(createError(500, error.message)); + }); + + if (count > 0) { + await report_status.update( + { + status: CONSTANTS.REPORT_STATUS.LIVE + }, + { + where: { + reportid, + hashed_val: hash + } + } + ); + } else { + await report_status.create({ + reportid, + status: CONSTANTS.REPORT_STATUS.LIVE, + hashed_val: hash + }); + } } -} + + return res.status(200).json(formatApiResponse({ id: req.id, result: { reportid, ...(hash && { hash }) } })); + } catch (error) { + debug('publish failed', JSON.stringify(error)); + return next(createError(500, error.message)); + } +}; /** * @description find all jobsIds from a report @@ -369,10 +369,10 @@ const publish = async (req, res, next) => { * @returns */ const getJobIds = reportConfig => { - const dataSourcesObj = _.get(reportConfig, 'dataSource'); - const dataSources = (_.isArray(dataSourcesObj) && dataSourcesObj) || []; - return _.map(dataSources, 'id'); -} + const dataSourcesObj = _.get(reportConfig, 'dataSource'); + const dataSources = (_.isArray(dataSourcesObj) && dataSourcesObj) || []; + return _.map(dataSources, 'id'); +}; /** * @description deactivates an analytics job @@ -380,36 +380,36 @@ const getJobIds = reportConfig => { * @returns */ const deactivateJob = jobId => { - var config = { - method: 'post', - url: `${envVariables.DEACTIVATE_JOB_API.HOST}/${jobId}`, - headers: { - 'Authorization': envVariables.DEACTIVATE_JOB_API.KEY, - 'Content-Type': 'application/json' - } - }; - return axios(config) - .then(response => { - const { err, errmsg, status } = _.get(response, 'data.params'); - if (status === 'failed' || (err && errmsg)) { - throw new Error(JSON.stringify({ err, errmsg, status })); - } - }); -} + var config = { + method: 'post', + url: `${envVariables.DEACTIVATE_JOB_API.HOST}/${jobId}`, + headers: { + 'Authorization': envVariables.DEACTIVATE_JOB_API.KEY, + 'Content-Type': 'application/json' + } + }; + return axios(config) + .then(response => { + const { err, errmsg, status } = _.get(response, 'data.params'); + if (status === 'failed' || (err && errmsg)) { + throw new Error(JSON.stringify({ err, errmsg, status })); + } + }); +}; /** * @description deactivates all jobs whenever a report is retired * @param {*} report */ const deactivateAllJobsForReport = async jobIds => { - try { - await Promise.all(_.map(jobIds, id => deactivateJob(id))); - return true; - } catch (error) { - debug('deactivateAllJobsForReport failed', JSON.stringify(error)); - return false; - } -} + try { + await Promise.all(_.map(jobIds, id => deactivateJob(id))); + return true; + } catch (error) { + debug('deactivateAllJobsForReport failed', JSON.stringify(error)); + return false; + } +}; /** * @description controller to retire a report. @@ -419,71 +419,71 @@ const deactivateAllJobsForReport = async jobIds => { * @return {*} */ const retire = async (req, res, next) => { - try { - const { reportid, hash } = req.params; + try { + const { reportid, hash } = req.params; - const document = await reportExists(reportid); - if (!document) return next(createError(404, CONSTANTS.MESSAGES.NO_REPORT)); + const document = await reportExists(reportid); + if (!document) return next(createError(404, CONSTANTS.MESSAGES.NO_REPORT)); - if (!hash) { + if (!hash) { - const reportConfig = _.get(document, 'reportconfig'); + const reportConfig = _.get(document, 'reportconfig'); - if (reportConfig) { - const jobIds = getJobIds(reportConfig); - if (jobIds.length) { - const success = await deactivateAllJobsForReport(jobIds); - if (!success) { - return next(createError(500, CONSTANTS.MESSAGES.RETIRE_FAILURE)); - } - } - } + if (reportConfig) { + const jobIds = getJobIds(reportConfig); + if (jobIds.length) { + const success = await deactivateAllJobsForReport(jobIds); + if (!success) { + return next(createError(500, CONSTANTS.MESSAGES.RETIRE_FAILURE)); + } + } + } + + await report.update( + { + status: CONSTANTS.REPORT_STATUS.RETIRED, + }, + { + where: { + reportid + } + }); - await report.update( - { - status: CONSTANTS.REPORT_STATUS.RETIRED, - }, - { - where: { - reportid - } - }); - - } else { - - const { count } = await report_status.findAndCountAll({ - where: { - reportid, - hashed_val: hash - } - }) - - if (count > 0) { - await report_status.update( - { - status: CONSTANTS.REPORT_STATUS.RETIRED - }, - { - where: { - reportid, - hashed_val: hash - } - } - ) - } else { - await report_status.create({ - reportid, - status: CONSTANTS.REPORT_STATUS.RETIRED, - hashed_val: hash - }) - } + } else { + + const { count } = await report_status.findAndCountAll({ + where: { + reportid, + hashed_val: hash } - return res.status(200).json(formatApiResponse({ id: req.id, result: { reportid, ...(hash && { hash }) } })); - } catch (error) { - debug('retire failed', JSON.stringify(error)); - return next(createError(500, error.message)); + }); + + if (count > 0) { + await report_status.update( + { + status: CONSTANTS.REPORT_STATUS.RETIRED + }, + { + where: { + reportid, + hashed_val: hash + } + } + ); + } else { + await report_status.create({ + reportid, + status: CONSTANTS.REPORT_STATUS.RETIRED, + hashed_val: hash + }); + } } -} + return res.status(200).json(formatApiResponse({ id: req.id, result: { reportid, ...(hash && { hash }) } })); + } catch (error) { + debug('retire failed', JSON.stringify(error)); + return next(createError(500, error.message)); + } +}; /** * @description controller to read a report metadata along with it's datasets files @@ -493,85 +493,85 @@ const retire = async (req, res, next) => { * @return {*} */ const readWithDatasets = async (req, res, next) => { - try { - const { reportid, hash } = _.get(req, "params"); - const { fields, showChildren = 'true' } = req.query; - - let rawDocument = await report.findOne({ - where: { - reportid - }, - ...((showChildren === 'true') && { - include: { - model: report_status, required: false, as: 'children', where: { - reportid, - ...(hash && { hashed_val: hash }) - } - } - }), - ...(fields && typeof fields === 'string' && { - attributes: fields.split(',') - }) - }); - - if (!rawDocument) return next(createError(404, CONSTANTS.MESSAGES.NO_REPORT)); - - if (hash) { - if (_.get(rawDocument, 'children.length')) { - const reportWithoutChildren = _.omit(rawDocument, 'children'); - rawDocument = _.assign(_.get(reportWithoutChildren, 'dataValues'), _.omit(_.get(rawDocument, 'children[0].dataValues'), ['id', 'reportid'])); - } else { - return next(createError(404, CONSTANTS.MESSAGES.NO_REPORT)); - } + try { + const { reportid, hash } = _.get(req, 'params'); + const { fields, showChildren = 'true' } = req.query; + + let rawDocument = await report.findOne({ + where: { + reportid + }, + ...((showChildren === 'true') && { + include: { + model: report_status, required: false, as: 'children', where: { + reportid, + ...(hash && { hashed_val: hash }) + } } + }), + ...(fields && typeof fields === 'string' && { + attributes: fields.split(',') + }) + }); + + if (!rawDocument) return next(createError(404, CONSTANTS.MESSAGES.NO_REPORT)); + + if (hash) { + if (_.get(rawDocument, 'children.length')) { + const reportWithoutChildren = _.omit(rawDocument, 'children'); + rawDocument = _.assign(_.get(reportWithoutChildren, 'dataValues'), _.omit(_.get(rawDocument, 'children[0].dataValues'), ['id', 'reportid'])); + } else { + return next(createError(404, CONSTANTS.MESSAGES.NO_REPORT)); + } + } - const user = req.userDetails; - let document; - if (!hash) { - [document] = populateReportsWithParameters([rawDocument], user); - if (!document) return next(createError(401, CONSTANTS.MESSAGES.FORBIDDEN)); - } else { - document = rawDocument; - } + const user = req.userDetails; + let document; + if (!hash) { + [document] = populateReportsWithParameters([rawDocument], user); + if (!document) return next(createError(401, CONSTANTS.MESSAGES.FORBIDDEN)); + } else { + document = rawDocument; + } - const { type, status } = document; - - if (user) { - const isCreator = isCreatorOfReport({ user, report: document }); - if (!isCreator) { - const isAllowed = roleBasedAccess({ report: document, user }); - if (!isAllowed) { - return next(createError(401, CONSTANTS.MESSAGES.FORBIDDEN)); - } - - if ((document.type === CONSTANTS.REPORT_TYPE.PRIVATE) || (document.type === CONSTANTS.REPORT_TYPE.PROTECTED)) { - const isAuthorized = validateAccessPath(user)(document); - if (!isAuthorized) { - return next(createError(401, CONSTANTS.MESSAGES.FORBIDDEN)); - } - } - } - } else { - if (type !== CONSTANTS.REPORT_TYPE.PUBLIC || status !== CONSTANTS.REPORT_STATUS.LIVE) { - return next(createError(401, CONSTANTS.MESSAGES.FORBIDDEN)); - } - } + const { type, status } = document; - let datasets; - if (_.toLower(document.report_type) === 'report') { - datasets = await getDatasets({ document, user, req }); + if (user) { + const isCreator = isCreatorOfReport({ user, report: document }); + if (!isCreator) { + const isAllowed = roleBasedAccess({ report: document, user }); + if (!isAllowed) { + return next(createError(401, CONSTANTS.MESSAGES.FORBIDDEN)); } - if (_.toLower(document.report_type) === 'dataset') { - datasets = await fetchAndFormatExhaustDataset({ req, document, user }) + if ((document.type === CONSTANTS.REPORT_TYPE.PRIVATE) || (document.type === CONSTANTS.REPORT_TYPE.PROTECTED)) { + const isAuthorized = validateAccessPath(user)(document); + if (!isAuthorized) { + return next(createError(401, CONSTANTS.MESSAGES.FORBIDDEN)); + } } + } + } else { + if (type !== CONSTANTS.REPORT_TYPE.PUBLIC || status !== CONSTANTS.REPORT_STATUS.LIVE) { + return next(createError(401, CONSTANTS.MESSAGES.FORBIDDEN)); + } + } - return res.json(formatApiResponse({ id: req.id, result: { metadata: document, datasets } })); - } catch (error) { - debug('readWithDatasets failed', JSON.stringify(error)); - return next(createError(500, error.message)); + let datasets; + if (_.toLower(document.report_type) === 'report') { + datasets = await getDatasets({ document, user, req }); } -} + + if (_.toLower(document.report_type) === 'dataset') { + datasets = await fetchAndFormatExhaustDataset({ req, document, user }); + } + + return res.json(formatApiResponse({ id: req.id, result: { metadata: document, datasets } })); + } catch (error) { + debug('readWithDatasets failed', JSON.stringify(error)); + return next(createError(500, error.message)); + } +}; module.exports = { search, create, remove, read, update, publish, retire, readWithDatasets }; \ No newline at end of file diff --git a/controllers/summary.js b/controllers/summary.js index 8ef935f..80ef57e 100644 --- a/controllers/summary.js +++ b/controllers/summary.js @@ -13,35 +13,35 @@ const { formatApiResponse } = require('../helpers/responseFormatter'); * @return {*} */ const createSummary = async (req, res, next) => { - try { - const { summary } = req.body.request; - const { id } = await report_summary.create(summary); + try { + const { summary } = req.body.request; + const { id } = await report_summary.create(summary); - if ('param_hash' in summary) { - const { reportid, param_hash } = summary; + if ('param_hash' in summary) { + const { reportid, param_hash } = summary; - const document = await report_status.findOne({ - where: { - reportid: reportid, - hashed_val: param_hash - } - }) - - if (!document) { - await report_status.create({ - reportid, - status: CONSTANTS.REPORT_STATUS.DRAFT, - hashed_val: param_hash - }) - } + const document = await report_status.findOne({ + where: { + reportid: reportid, + hashed_val: param_hash } + }); - return res.status(200).json(formatApiResponse({ id: req.id, result: { summaryId: id } })); - } catch (error) { - debug('createSummary failed', JSON.stringify(error)); - return next(createError(500, error)); + if (!document) { + await report_status.create({ + reportid, + status: CONSTANTS.REPORT_STATUS.DRAFT, + hashed_val: param_hash + }); + } } -} + + return res.status(200).json(formatApiResponse({ id: req.id, result: { summaryId: id } })); + } catch (error) { + debug('createSummary failed', JSON.stringify(error)); + return next(createError(500, error)); + } +}; /** * @description controller to list all the report or chart summaries @@ -51,54 +51,54 @@ const createSummary = async (req, res, next) => { * @return {*} */ const listSummaries = async (req, res, next) => { - try { + try { - const { filters = {}, options = {} } = req.body.request; - const { count, rows } = await report_summary.findAndCountAll({ - ...(Object.keys(filters).length && { - where: { - ...filters - } - }), - order: [['createdon', 'DESC']], - ...options - }); - return res.json(formatApiResponse({ id: req.id, result: { summaries: rows, count } })); - } catch (error) { - debug('listSummaries failed', JSON.stringify(error)); - return next(createError(500, error)); - } -} + const { filters = {}, options = {} } = req.body.request; + const { count, rows } = await report_summary.findAndCountAll({ + ...(Object.keys(filters).length && { + where: { + ...filters + } + }), + order: [['createdon', 'DESC']], + ...options + }); + return res.json(formatApiResponse({ id: req.id, result: { summaries: rows, count } })); + } catch (error) { + debug('listSummaries failed', JSON.stringify(error)); + return next(createError(500, error)); + } +}; /** * @description This controller method is used to fetch the latest report/chart summary */ const getLatestSummary = async (req, res, next) => { - try { - const { hash = null } = req.query; - const { reportid, chartid = null } = req.params; - const { count, rows } = await report_summary.findAndCountAll({ - where: { - reportid, - chartid, - param_hash: hash - }, - order: [ - ['createdon', 'DESC'] - ], - limit: 1 - }); + try { + const { hash = null } = req.query; + const { reportid, chartid = null } = req.params; + const { count, rows } = await report_summary.findAndCountAll({ + where: { + reportid, + chartid, + param_hash: hash + }, + order: [ + ['createdon', 'DESC'] + ], + limit: 1 + }); - return res.json(formatApiResponse({ id: req.id, result: { summaries: rows, count } })); + return res.json(formatApiResponse({ id: req.id, result: { summaries: rows, count } })); - } catch (error) { - debug('getLatestSummary failed', JSON.stringify(error)); - return next(createError(500, error)); - } -} + } catch (error) { + debug('getLatestSummary failed', JSON.stringify(error)); + return next(createError(500, error)); + } +}; module.exports = { - getLatestSummary, - createSummary, - listSummaries -} \ No newline at end of file + getLatestSummary, + createSummary, + listSummaries +}; \ No newline at end of file diff --git a/helpers/azure-storage.js b/helpers/azure-storage.js index b91d968..d2cb218 100644 --- a/helpers/azure-storage.js +++ b/helpers/azure-storage.js @@ -7,53 +7,53 @@ const { AZURE: { account_key, account_name, container_name, sasExpiryTime } } = const blobService = azure.createBlobService(account_name, account_key); const getBlobReadStream = ({ filePath }) => { - return blobService.createReadStream(container_name, filePath); -} + return blobService.createReadStream(container_name, filePath); +}; const checkIfBlobExists = ({ container = container_name, filePath }) => { - return new Promise((resolve, reject) => { - blobService.doesBlobExist(container, filePath, (error, success) => { - if (error) { - return reject(error); - } + return new Promise((resolve, reject) => { + blobService.doesBlobExist(container, filePath, (error, success) => { + if (error) { + return reject(error); + } - if (success && !success.exists) { - return reject(false); - } + if (success && !success.exists) { + return reject(false); + } - resolve(success); - }) - }) -} + resolve(success); + }); + }); +}; const getSharedAccessSignature = ({ container = container_name, filePath, headers = {}, expiryTime = sasExpiryTime }) => { - return new Promise((resolve, reject) => { - try { - const startDate = new Date(); - const expiryDate = new Date(startDate); - expiryDate.setMinutes(startDate.getMinutes() + expiryTime); - startDate.setMinutes(startDate.getMinutes() - expiryTime); - - const sharedAccessPolicy = { - AccessPolicy: { - Permissions: azure.BlobUtilities.SharedAccessPermissions.READ, - Start: startDate, - Expiry: expiryDate - } - }; - - const azureHeaders = {}; - if (('filename' in headers) && ('content-disposition' in headers) && (headers['content-disposition'] === 'attachment')) { - azureHeaders.contentDisposition = `attachment;filename=${headers.filename}`; - } - - const token = blobService.generateSharedAccessSignature(container, filePath, sharedAccessPolicy, azureHeaders); - const sasUrl = blobService.getUrl(container, filePath, token); - resolve({ sasUrl, expiresAt: Date.parse(expiryDate), startDate }); - } catch (error) { - reject(error); + return new Promise((resolve, reject) => { + try { + const startDate = new Date(); + const expiryDate = new Date(startDate); + expiryDate.setMinutes(startDate.getMinutes() + expiryTime); + startDate.setMinutes(startDate.getMinutes() - expiryTime); + + const sharedAccessPolicy = { + AccessPolicy: { + Permissions: azure.BlobUtilities.SharedAccessPermissions.READ, + Start: startDate, + Expiry: expiryDate } - }) -} + }; + + const azureHeaders = {}; + if (('filename' in headers) && ('content-disposition' in headers) && (headers['content-disposition'] === 'attachment')) { + azureHeaders.contentDisposition = `attachment;filename=${headers.filename}`; + } + + const token = blobService.generateSharedAccessSignature(container, filePath, sharedAccessPolicy, azureHeaders); + const sasUrl = blobService.getUrl(container, filePath, token); + resolve({ sasUrl, expiresAt: Date.parse(expiryDate), startDate }); + } catch (error) { + reject(error); + } + }); +}; module.exports = { getBlobReadStream, getSharedAccessSignature }; \ No newline at end of file diff --git a/helpers/dataServiceHelper.js b/helpers/dataServiceHelper.js index 715a5b3..66e1f21 100644 --- a/helpers/dataServiceHelper.js +++ b/helpers/dataServiceHelper.js @@ -9,126 +9,126 @@ const { dataServiceProxyUpstream } = require('./upstream_axios'); const { isUserSuperAdmin } = require('./userHelper'); const fetchDataset = ({ headers = {}, datasetId, params, ...rest }) => { - const config = { - method: 'get', - url: `/data/v3/dataset/get/${datasetId}`, - headers, - ...(params && { params }), - ...rest - }; + const config = { + method: 'get', + url: `/data/v3/dataset/get/${datasetId}`, + headers, + ...(params && { params }), + ...rest + }; - return dataServiceProxyUpstream(config); -} + return dataServiceProxyUpstream(config); +}; const getPeriodicFiles = async ({ datasetId, headers, params }) => { - try { - const fetchDatasetResponse = await fetchDataset({ - headers, - datasetId, - params - }); + try { + const fetchDatasetResponse = await fetchDataset({ + headers, + datasetId, + params + }); - return _.get(fetchDatasetResponse, 'data.result') || {}; - } catch (error) { - debug('getPeriodicFiles failed', datasetId, params, headers, JSON.stringify(error)); - return { periodWiseFiles: {}, files: [], expiresAt: 0 }; - } -} + return _.get(fetchDatasetResponse, 'data.result') || {}; + } catch (error) { + debug('getPeriodicFiles failed', datasetId, params, headers, JSON.stringify(error)); + return { periodWiseFiles: {}, files: [], expiresAt: 0 }; + } +}; const fetchAndFormatExhaustDataset = async ({ req, document, user }) => { - const datasetId = _.get(document, 'reportconfig.dataset.datasetId'); - try { - const { from, to } = req.query; - const parameters = _.get(document, 'parameters') || null; - - let parameter = null, data = []; - if (parameters && Array.isArray(parameters)) { - [parameter] = parameters; - } + const datasetId = _.get(document, 'reportconfig.dataset.datasetId'); + try { + const { from, to } = req.query; + const parameters = _.get(document, 'parameters') || null; - const isParameterized = parameter && (parameter in reportParameters); - if (isParameterized) { - const { masterData, cache = false, value } = reportParameters[parameter]; - const resolvedValue = value(user); - debug(parameter, 'Resolved Value', JSON.stringify(resolvedValue)); - let masterDataForParameter; - - if (isUserSuperAdmin(user)) { - //if the user is super REPORT_ADMIN then return all the masterData; - //get the master data from memory cache is available else call the master data fetch API for the parameter. - const cachedData = memoryCache.get(parameter); - if (false && cachedData && cache) { - masterDataForParameter = cachedData; - } else { - masterDataForParameter = await masterData({ user, req }); - debug(parameter, 'Master Data', JSON.stringify(masterDataForParameter)); - memoryCache.put(parameter, masterDataForParameter, envVariables.MEMORY_CACHE_TIMEOUT); - } - } else { - //if the user is not super REPORT_ADMIN then return only the resolved parameter data; - masterDataForParameter = resolvedValue && (Array.isArray(resolvedValue) ? resolvedValue : [resolvedValue]); - } + let parameter = null, data = []; + if (parameters && Array.isArray(parameters)) { + [parameter] = parameters; + } - await Promise.all(masterDataForParameter.map(value => { - const input = { - datasetId, - headers: { - ['X-Channel-Id']: value, - }, - ...(from && to && { - params: { - from, to - } - }) - } - return getPeriodicFiles(input) - .then(response => { - data.push({ - id: value, - type: parameter, - ...response - }) - return response - }) - })); + const isParameterized = parameter && (parameter in reportParameters); + if (isParameterized) { + const { masterData, cache = false, value } = reportParameters[parameter]; + const resolvedValue = value(user); + debug(parameter, 'Resolved Value', JSON.stringify(resolvedValue)); + let masterDataForParameter; + if (isUserSuperAdmin(user)) { + //if the user is super REPORT_ADMIN then return all the masterData; + //get the master data from memory cache is available else call the master data fetch API for the parameter. + const cachedData = memoryCache.get(parameter); + if (false && cachedData && cache) { + masterDataForParameter = cachedData; } else { - const channelID = req.get('X-Channel-Id') || _.get(user, 'rootOrg.slug'); - const input = { - datasetId, - headers: { - ['X-Channel-Id']: channelID, - }, - ...(from && to && { - params: { - from, to - } - }) - }; - const response = await getPeriodicFiles(input); - data.push({ - id: 'default', - type: null, - ...response - }) + masterDataForParameter = await masterData({ user, req }); + debug(parameter, 'Master Data', JSON.stringify(masterDataForParameter)); + memoryCache.put(parameter, masterDataForParameter, envVariables.MEMORY_CACHE_TIMEOUT); } + } else { + //if the user is not super REPORT_ADMIN then return only the resolved parameter data; + masterDataForParameter = resolvedValue && (Array.isArray(resolvedValue) ? resolvedValue : [resolvedValue]); + } - return [{ - dataset_id: datasetId, - parameters, - isParameterized, - data, - ...(from && to && { - from, to - }) - }]; + await Promise.all(masterDataForParameter.map(value => { + const input = { + datasetId, + headers: { + ['X-Channel-Id']: value, + }, + ...(from && to && { + params: { + from, to + } + }) + }; + return getPeriodicFiles(input) + .then(response => { + data.push({ + id: value, + type: parameter, + ...response + }); + return response; + }); + })); - } catch (error) { - debug('fetchAndFormatExhaustDataset failed', datasetId, JSON.stringify(error)); - return [{ dataset_id: datasetId, data: [], parameters: null, isParameterized: false }] + } else { + const channelID = req.get('X-Channel-Id') || _.get(user, 'rootOrg.slug'); + const input = { + datasetId, + headers: { + ['X-Channel-Id']: channelID, + }, + ...(from && to && { + params: { + from, to + } + }) + }; + const response = await getPeriodicFiles(input); + data.push({ + id: 'default', + type: null, + ...response + }); } -} + + return [{ + dataset_id: datasetId, + parameters, + isParameterized, + data, + ...(from && to && { + from, to + }) + }]; + + } catch (error) { + debug('fetchAndFormatExhaustDataset failed', datasetId, JSON.stringify(error)); + return [{ dataset_id: datasetId, data: [], parameters: null, isParameterized: false }]; + } +}; module.exports = { - fetchAndFormatExhaustDataset -} \ No newline at end of file + fetchAndFormatExhaustDataset +}; \ No newline at end of file diff --git a/helpers/envHelpers.js b/helpers/envHelpers.js index 8c5cb11..80b00dd 100644 --- a/helpers/envHelpers.js +++ b/helpers/envHelpers.js @@ -1,4 +1,4 @@ -'use strict' +'use strict'; const { get } = require('lodash'); const env = get(process, 'env'); const fs = require('fs'); @@ -7,50 +7,50 @@ var debug = require('debug')('parameters:$board'); const packageObj = JSON.parse(fs.readFileSync('package.json', 'utf8')); const printEnvVariablesStatus = () => { - debug('Service environment variables', JSON.stringify(envVariables)); -} + debug('Service environment variables', JSON.stringify(envVariables)); +}; const envVariables = { - DB: { - HOST: env.SUNBIRD_REPORTS_DB_HOST || 'localhost', - NAME: env.SUNBIRD_REPORTS_DB_NAME || 'root', - PASSWORD: env.SUNBIRD_REPORTS_DB_PASSWORD || 'root', - PORT: env.SUNBIRD_REPORTS_DB_PORT || 5432, - USER: env.SUNBIRD_REPORTS_DB_USER || 'root' - }, - SERVER_PORT: env.SUNBIRD_SERVER_PORT || 3030, - BASE_REPORT_URL: get(env, 'SUNBIRD_BASE_REPORT_URL') || 'report', - TABLE_NAME: get(env, 'SUNBIRD_REPORTS_TABLE_NAME') || 'report', - SUMMARY_TABLE_NAME: get(env, 'SUNBIRD_REPORT_SUMMARY_TABLE_NAME') || 'report_summary', - REPORT_STATUS_TABLE_NAME: get(env, 'SUNBIRD_REPORT_STATUS_TABLE_NAME') || 'report_status', - ENV: env.SUNBIRD_ENV || 'https://dev.sunbirded.org', - DEACTIVATE_JOB_API: { - HOST: env.DEACTIVATE_JOB_API_HOST || '', - KEY: `Bearer ${env.DEACTIVATE_JOB_API_KEY}` - }, - PORTAL_API_AUTH_TOKEN: env.sunbird_api_auth_token, - MEMORY_CACHE_TIMEOUT: 3600000, // in ms - SUNBIRD_SUPER_ADMIN_SLUG: env.sunbird_super_admin_slug || 'sunbird', - AUTH: { - PORTAL_AUTH_SERVER_URL: env.sunbird_portal_auth_server_url, - KEY_CLOAK_PUBLIC: env.sunbird_keycloak_public || 'true', - KEY_CLOAK_REALM: env.sunbird_keycloak_realm || 'sunbird', - PORTAL_AUTH_SERVER_CLIENT: env.sunbird_portal_auth_server_client || 'portal', - KEY_CLOAK_PUBLIC_KEY: env.sunbird_keycloak_public_key, - CACHE_STORE: env.sunbird_cache_store || 'memory', - CACHE_TTL: env.sunbird_cache_ttl || 1800, - }, - AZURE: { - container_name: env.sunbird_azure_report_container_name, - account_name: env.sunbird_azure_account_name, - account_key: env.sunbird_azure_account_key, - sasExpiryTime: env.sunbird_report_sas_expiry_in_minutes || 60 // in minutes - }, - UPSTREAM: { - LEARNER: env.sunbird_learner_player_url, - CONTENT_PROXY: env.sunbird_content_proxy_url, - DATA_SERVICE: env.sunbird_dataservice_url - } -} + DB: { + HOST: env.SUNBIRD_REPORTS_DB_HOST || 'localhost', + NAME: env.SUNBIRD_REPORTS_DB_NAME || 'root', + PASSWORD: env.SUNBIRD_REPORTS_DB_PASSWORD || 'root', + PORT: env.SUNBIRD_REPORTS_DB_PORT || 5432, + USER: env.SUNBIRD_REPORTS_DB_USER || 'root' + }, + SERVER_PORT: env.SUNBIRD_SERVER_PORT || 3030, + BASE_REPORT_URL: get(env, 'SUNBIRD_BASE_REPORT_URL') || 'report', + TABLE_NAME: get(env, 'SUNBIRD_REPORTS_TABLE_NAME') || 'report', + SUMMARY_TABLE_NAME: get(env, 'SUNBIRD_REPORT_SUMMARY_TABLE_NAME') || 'report_summary', + REPORT_STATUS_TABLE_NAME: get(env, 'SUNBIRD_REPORT_STATUS_TABLE_NAME') || 'report_status', + ENV: env.SUNBIRD_ENV || 'https://dev.sunbirded.org', + DEACTIVATE_JOB_API: { + HOST: env.DEACTIVATE_JOB_API_HOST || '', + KEY: `Bearer ${env.DEACTIVATE_JOB_API_KEY}` + }, + PORTAL_API_AUTH_TOKEN: env.sunbird_api_auth_token, + MEMORY_CACHE_TIMEOUT: 3600000, // in ms + SUNBIRD_SUPER_ADMIN_SLUG: env.sunbird_super_admin_slug || 'sunbird', + AUTH: { + PORTAL_AUTH_SERVER_URL: env.sunbird_portal_auth_server_url, + KEY_CLOAK_PUBLIC: env.sunbird_keycloak_public || 'true', + KEY_CLOAK_REALM: env.sunbird_keycloak_realm || 'sunbird', + PORTAL_AUTH_SERVER_CLIENT: env.sunbird_portal_auth_server_client || 'portal', + KEY_CLOAK_PUBLIC_KEY: env.sunbird_keycloak_public_key, + CACHE_STORE: env.sunbird_cache_store || 'memory', + CACHE_TTL: env.sunbird_cache_ttl || 1800, + }, + AZURE: { + container_name: env.sunbird_azure_report_container_name, + account_name: env.sunbird_azure_account_name, + account_key: env.sunbird_azure_account_key, + sasExpiryTime: env.sunbird_report_sas_expiry_in_minutes || 60 // in minutes + }, + UPSTREAM: { + LEARNER: env.sunbird_learner_player_url, + CONTENT_PROXY: env.sunbird_content_proxy_url, + DATA_SERVICE: env.sunbird_dataservice_url + } +}; module.exports = { envVariables, packageObj, printEnvVariablesStatus }; \ No newline at end of file diff --git a/helpers/learnerHelper.js b/helpers/learnerHelper.js index 84733e0..4f62a17 100644 --- a/helpers/learnerHelper.js +++ b/helpers/learnerHelper.js @@ -2,37 +2,37 @@ const { learnerUpstream } = require('./upstream_axios'); const ROUTES = require('../resources/routes.json'); const locationSearch = ({ headers = {}, body = {} }) => { - const config = { - method: 'post', - url: ROUTES.LOCATION.SEARCH.URL, - headers, - data: body - }; + const config = { + method: 'post', + url: ROUTES.LOCATION.SEARCH.URL, + headers, + data: body + }; - return learnerUpstream(config); -} + return learnerUpstream(config); +}; const channelRead = ({ channelId, headers = {} }) => { - const config = { - method: 'get', - url: `${ROUTES.CHANNEL.READ.URL}/${channelId}`, - headers, - }; - return learnerUpstream(config); -} + const config = { + method: 'get', + url: `${ROUTES.CHANNEL.READ.URL}/${channelId}`, + headers, + }; + return learnerUpstream(config); +}; const frameworkRead = ({ frameworkId, headers = {} }) => { - const config = { - method: 'get', - url: `${ROUTES.FRAMEWORK.READ.URL}/${frameworkId}`, - headers, - }; - return learnerUpstream(config); -} + const config = { + method: 'get', + url: `${ROUTES.FRAMEWORK.READ.URL}/${frameworkId}`, + headers, + }; + return learnerUpstream(config); +}; module.exports = { - locationSearch, - channelRead, - frameworkRead -} \ No newline at end of file + locationSearch, + channelRead, + frameworkRead +}; \ No newline at end of file diff --git a/helpers/orgHelper.js b/helpers/orgHelper.js index e5df505..c7b230f 100644 --- a/helpers/orgHelper.js +++ b/helpers/orgHelper.js @@ -1,17 +1,17 @@ -const { contentProxyUpstream, learnerUpstream } = require('./upstream_axios') +const { contentProxyUpstream, learnerUpstream } = require('./upstream_axios'); const ROUTES = require('../resources/routes.json'); const orgSearch = ({ headers = {}, body = {} }) => { - const config = { - method: 'post', - url: ROUTES.ORG.SEARCH.URL, - headers, - data: body - }; + const config = { + method: 'post', + url: ROUTES.ORG.SEARCH.URL, + headers, + data: body + }; - return learnerUpstream(config); -} + return learnerUpstream(config); +}; module.exports = { - orgSearch -} \ No newline at end of file + orgSearch +}; \ No newline at end of file diff --git a/helpers/responseFormatter.js b/helpers/responseFormatter.js index beb20ef..bc9787a 100644 --- a/helpers/responseFormatter.js +++ b/helpers/responseFormatter.js @@ -2,20 +2,20 @@ const CONSTANTS = require('../resources/constants.json'); //Factory function to generate the params object inside the api response. const getDefaultParams = ({ err = null, errmsg = null, status = CONSTANTS.STATUS.SUCCESS }) => { - const { v4 } = require('uuid'); - const uuid = v4(); - return { - err, - errmsg, - msgid: uuid, - resmsgid: uuid, - status - } -} + const { v4 } = require('uuid'); + const uuid = v4(); + return { + err, + errmsg, + msgid: uuid, + resmsgid: uuid, + status + }; +}; // Api Response Formatter factory function. const formatApiResponse = ({ id = 'report.api', params = getDefaultParams({}), responseCode = CONSTANTS.RESPONSE_CODE.SUCCESS, result = {} }) => ({ - id, params, responseCode, result, + id, params, responseCode, result, }); module.exports = { formatApiResponse, getDefaultParams }; \ No newline at end of file diff --git a/helpers/sequalizeOperatorAliasDefinitions.js b/helpers/sequalizeOperatorAliasDefinitions.js index bf8d514..b6ce40c 100644 --- a/helpers/sequalizeOperatorAliasDefinitions.js +++ b/helpers/sequalizeOperatorAliasDefinitions.js @@ -1,36 +1,36 @@ const { Op } = require('sequelize'); const aliasDefinitions = { - $eq: Op.eq, - $ne: Op.ne, - $gte: Op.gte, - $gt: Op.gt, - $lte: Op.lte, - $lt: Op.lt, - $not: Op.not, - $in: Op.in, - $notIn: Op.notIn, - $is: Op.is, - $like: Op.like, - $notLike: Op.notLike, - $iLike: Op.iLike, - $notILike: Op.notILike, - $regexp: Op.regexp, - $notRegexp: Op.notRegexp, - $between: Op.between, - $notBetween: Op.notBetween, - $contains: Op.contains, - $and: Op.and, - $or: Op.or, - $any: Op.any, - $all: Op.all, - $values: Op.values, - $col: Op.col, - $contained: Op.contained, - $startsWith: Op.startsWith, - $endsWith: Op.endsWith, - $substring: Op.substring, - $match: Op.match -} + $eq: Op.eq, + $ne: Op.ne, + $gte: Op.gte, + $gt: Op.gt, + $lte: Op.lte, + $lt: Op.lt, + $not: Op.not, + $in: Op.in, + $notIn: Op.notIn, + $is: Op.is, + $like: Op.like, + $notLike: Op.notLike, + $iLike: Op.iLike, + $notILike: Op.notILike, + $regexp: Op.regexp, + $notRegexp: Op.notRegexp, + $between: Op.between, + $notBetween: Op.notBetween, + $contains: Op.contains, + $and: Op.and, + $or: Op.or, + $any: Op.any, + $all: Op.all, + $values: Op.values, + $col: Op.col, + $contained: Op.contained, + $startsWith: Op.startsWith, + $endsWith: Op.endsWith, + $substring: Op.substring, + $match: Op.match +}; -module.exports = { aliasDefinitions } +module.exports = { aliasDefinitions }; diff --git a/helpers/token_validation.js b/helpers/token_validation.js index 8ca743b..f35cb1c 100644 --- a/helpers/token_validation.js +++ b/helpers/token_validation.js @@ -4,46 +4,46 @@ const jwt = require('jsonwebtoken'); const { envVariables: { AUTH } } = require('./envHelpers'); const keyCloakConfig = { - 'authServerUrl': AUTH.PORTAL_AUTH_SERVER_URL, - 'realm': AUTH.KEY_CLOAK_REALM, - 'clientId': AUTH.PORTAL_AUTH_SERVER_CLIENT, - 'public': AUTH.KEY_CLOAK_PUBLIC, - 'realmPublicKey': AUTH.KEY_CLOAK_PUBLIC_KEY -} + 'authServerUrl': AUTH.PORTAL_AUTH_SERVER_URL, + 'realm': AUTH.KEY_CLOAK_REALM, + 'clientId': AUTH.PORTAL_AUTH_SERVER_CLIENT, + 'public': AUTH.KEY_CLOAK_PUBLIC, + 'realmPublicKey': AUTH.KEY_CLOAK_PUBLIC_KEY +}; const cacheConfig = { - store: AUTH.sunbird_cache_store, - ttl: AUTH.sunbird_cache_ttl -} + store: AUTH.sunbird_cache_store, + ttl: AUTH.sunbird_cache_ttl +}; const apiInterceptor = new ApiInterceptor(keyCloakConfig, cacheConfig, [`${AUTH.PORTAL_AUTH_SERVER_URL}/realms/${AUTH.KEY_CLOAK_REALM}`]); function validateToken(token) { - return new Promise((resolve, reject) => { - apiInterceptor.validateToken(token, function (error, tokenData) { - if (tokenData) { - resolve({ status: "success", result: tokenData }); - } - if (error) { - resolve({ status: "failed", error }); - } - }) - }) + return new Promise((resolve, reject) => { + apiInterceptor.validateToken(token, function (error, tokenData) { + if (tokenData) { + resolve({ status: 'success', result: tokenData }); + } + if (error) { + resolve({ status: 'failed', error }); + } + }); + }); } function validateJwtToken(token) { - return new Promise((resolve, reject) => { + return new Promise((resolve, reject) => { - const decoded = jwt.decode(token, { complete: true }); + const decoded = jwt.decode(token, { complete: true }); - if (!decoded) { - resolve({ status: "failed", error: { message: 'invalid jwt' } }); - } + if (!decoded) { + resolve({ status: 'failed', error: { message: 'invalid jwt' } }); + } - resolve({ status: "success", result: decoded }) - }).catch(error => { - return { status: 'failed', error } - }) + resolve({ status: 'success', result: decoded }); + }).catch(error => { + return { status: 'failed', error }; + }); } -module.exports = { validateToken, validateJwtToken } \ No newline at end of file +module.exports = { validateToken, validateJwtToken }; \ No newline at end of file diff --git a/helpers/upstream_axios.js b/helpers/upstream_axios.js index fd91436..00890f3 100644 --- a/helpers/upstream_axios.js +++ b/helpers/upstream_axios.js @@ -1,44 +1,44 @@ const axios = require('axios'); require('axios-debug-log/enable'); -const { envVariables: { UPSTREAM, PORTAL_API_AUTH_TOKEN } } = require('./envHelpers') +const { envVariables: { UPSTREAM, PORTAL_API_AUTH_TOKEN } } = require('./envHelpers'); const commonHeaders = { - 'Authorization': `Bearer ${PORTAL_API_AUTH_TOKEN}`, - 'Accept': 'application/json', - 'Content-Type': 'application/json' -} + 'Authorization': `Bearer ${PORTAL_API_AUTH_TOKEN}`, + 'Accept': 'application/json', + 'Content-Type': 'application/json' +}; const successCallback = function (config) { - config.headers = { ...config.headers, ...commonHeaders }; - return config; -} + config.headers = { ...config.headers, ...commonHeaders }; + return config; +}; const errorCallback = function (error) { - return Promise.reject(error); -} + return Promise.reject(error); +}; /* UPSTREAM INSTANCES */ const learnerUpstream = axios.create({ - baseURL: UPSTREAM.LEARNER + baseURL: UPSTREAM.LEARNER }); learnerUpstream.interceptors.request.use(successCallback, errorCallback); const contentProxyUpstream = axios.create({ - baseURL: UPSTREAM.CONTENT_PROXY + baseURL: UPSTREAM.CONTENT_PROXY }); contentProxyUpstream.interceptors.request.use(successCallback, errorCallback); const dataServiceProxyUpstream = axios.create({ - baseURL: UPSTREAM.DATA_SERVICE + baseURL: UPSTREAM.DATA_SERVICE }); dataServiceProxyUpstream.interceptors.request.use(successCallback, errorCallback); module.exports = { - learnerUpstream, - contentProxyUpstream, - dataServiceProxyUpstream -} \ No newline at end of file + learnerUpstream, + contentProxyUpstream, + dataServiceProxyUpstream +}; \ No newline at end of file diff --git a/helpers/userHelper.js b/helpers/userHelper.js index 824d47f..180b56d 100644 --- a/helpers/userHelper.js +++ b/helpers/userHelper.js @@ -1,7 +1,7 @@ const _ = require('lodash'); -const { learnerUpstream } = require("./upstream_axios"); -const { envVariables } = require('./envHelpers') +const { learnerUpstream } = require('./upstream_axios'); +const { envVariables } = require('./envHelpers'); /** * @description fetch user details by it's id @@ -9,14 +9,14 @@ const { envVariables } = require('./envHelpers') * @return {*} */ const userRead = ({ userId, headers = {} }) => { - const config = { - method: 'get', - url: `/user/v5/read/${userId}?withTokens=true`, - headers - }; + const config = { + method: 'get', + url: `/user/v5/read/${userId}?withTokens=true`, + headers + }; - return learnerUpstream(config); -} + return learnerUpstream(config); +}; /** * * @description checks if the user has REPORT_ADMIN role or not @@ -24,9 +24,9 @@ const userRead = ({ userId, headers = {} }) => { * @return {*} */ const isUserAdmin = (user) => { - const userRoles = _.get(user, 'roles') || []; - const userRolesSet = _.map(userRoles, 'role'); - return _.includes(userRolesSet, 'REPORT_ADMIN') + const userRoles = _.get(user, 'roles') || []; + const userRolesSet = _.map(userRoles, 'role'); + return _.includes(userRolesSet, 'REPORT_ADMIN'); }; @@ -36,9 +36,9 @@ const isUserAdmin = (user) => { * @return {*} */ const isUserSuperAdmin = (user) => { - const isAdmin = isUserAdmin(user); - if (!isAdmin) return false; - return _.get(user, 'rootOrg.slug') === envVariables.SUNBIRD_SUPER_ADMIN_SLUG; -} + const isAdmin = isUserAdmin(user); + if (!isAdmin) return false; + return _.get(user, 'rootOrg.slug') === envVariables.SUNBIRD_SUPER_ADMIN_SLUG; +}; module.exports = { userRead, isUserAdmin, isUserSuperAdmin }; \ No newline at end of file diff --git a/middleware/authentication/tokenValidator.js b/middleware/authentication/tokenValidator.js index be34ceb..aa9939e 100644 --- a/middleware/authentication/tokenValidator.js +++ b/middleware/authentication/tokenValidator.js @@ -8,46 +8,46 @@ const { validateJwtToken } = require('../../helpers/token_validation'); * @description [verifyToken - Used to validate the token and add userid into headers */ function verifyToken({ tokenRequired = true }) { - return async (req, res, next) => { - try { - var token = req.get('x-authenticated-user-token'); - delete req.headers['x-authenticated-userid']; - - if (!token) { - if (tokenRequired) { - throw new Error(); - } else { - return next(); - } - } - - - const { status, result, error } = await validateJwtToken(token); - - if (status === 'failed' && error) { - debug('Token verification failed', JSON.stringify(error)); - return next(createError(401, error.message)); - } - - if (status === 'success' && result) { - const sub = _.get(result, 'payload.sub'); - debug('Token verification success', JSON.stringify(result)); - if (sub) { - var [, , userId] = sub.split(':'); - if (userId) { - req.headers['x-authenticated-userid'] = userId; - req.tokenData = result; - } - } - } - - next(); - - } catch (error) { - debug('Token verification failed', JSON.stringify(error)); - return next(createError(401, 'unauthorized access')); + return async (req, res, next) => { + try { + var token = req.get('x-authenticated-user-token'); + delete req.headers['x-authenticated-userid']; + + if (!token) { + if (tokenRequired) { + throw new Error(); + } else { + return next(); } + } + + + const { status, result, error } = await validateJwtToken(token); + + if (status === 'failed' && error) { + debug('Token verification failed', JSON.stringify(error)); + return next(createError(401, error.message)); + } + + if (status === 'success' && result) { + const sub = _.get(result, 'payload.sub'); + debug('Token verification success', JSON.stringify(result)); + if (sub) { + var [, , userId] = sub.split(':'); + if (userId) { + req.headers['x-authenticated-userid'] = userId; + req.tokenData = result; + } + } + } + + next(); + + } catch (error) { + debug('Token verification failed', JSON.stringify(error)); + return next(createError(401, 'unauthorized access')); } + }; } -module.exports = { verifyToken } \ No newline at end of file +module.exports = { verifyToken }; \ No newline at end of file diff --git a/middleware/authentication/userDetails.js b/middleware/authentication/userDetails.js index 1cb7263..d84a9da 100644 --- a/middleware/authentication/userDetails.js +++ b/middleware/authentication/userDetails.js @@ -2,30 +2,30 @@ const _ = require('lodash'); const createErrors = require('http-errors'); var debug = require('debug')('middleware:authentication:userDetailsMiddlware'); -const { userRead } = require("../../helpers/userHelper"); +const { userRead } = require('../../helpers/userHelper'); const fetchUserDetails = () => { - return async (req, res, next) => { - var token = req.get('x-authenticated-user-token'); - var userId = req.get('x-authenticated-userid'); + return async (req, res, next) => { + var token = req.get('x-authenticated-user-token'); + var userId = req.get('x-authenticated-userid'); - if (token && userId) { - try { - const response = await userRead({ userId, headers: { 'x-authenticated-user-token': token, 'x-auth-token': token } }); - const userDetails = _.get(response, 'data.result.response'); - debug('User Read Api Success', JSON.stringify(userDetails)); - req.userDetails = userDetails; - } catch (error) { - const statusCode = _.get(error, 'response.status'); - debug('User Read Api failed', JSON.stringify(error)); - return next(createErrors(statusCode || 500, _.get(error, 'message'))); - } - } - - next(); + if (token && userId) { + try { + const response = await userRead({ userId, headers: { 'x-authenticated-user-token': token, 'x-auth-token': token } }); + const userDetails = _.get(response, 'data.result.response'); + debug('User Read Api Success', JSON.stringify(userDetails)); + req.userDetails = userDetails; + } catch (error) { + const statusCode = _.get(error, 'response.status'); + debug('User Read Api failed', JSON.stringify(error)); + return next(createErrors(statusCode || 500, _.get(error, 'message'))); + } } -} + + next(); + }; +}; module.exports = { - fetchUserDetails -} \ No newline at end of file + fetchUserDetails +}; \ No newline at end of file diff --git a/middleware/utils/errorHandler.js b/middleware/utils/errorHandler.js index 5f83037..15defeb 100644 --- a/middleware/utils/errorHandler.js +++ b/middleware/utils/errorHandler.js @@ -1,24 +1,24 @@ var debug = require('debug')('util:errorHandler'); const { formatApiResponse, getDefaultParams } = require('../../helpers/responseFormatter'); -const CONSTANTS = require('../../resources/constants.json') +const CONSTANTS = require('../../resources/constants.json'); module.exports = () => (err, req, res, next) => { - debug('Error', JSON.stringify(err)); - const statusCode = err.statusCode || 500; + debug('Error', JSON.stringify(err)); + const statusCode = err.statusCode || 500; - const paramsObject = getDefaultParams({ - err: err.errorObject || null, - errmsg: err.message || null, - status: CONSTANTS.STATUS.FAILED - }) + const paramsObject = getDefaultParams({ + err: err.errorObject || null, + errmsg: err.message || null, + status: CONSTANTS.STATUS.FAILED + }); - res.status(statusCode).json(formatApiResponse({ - id: req.id, - statusCode: CONSTANTS.RESPONSE_CODE.FAILED, - result: {}, - params: paramsObject, - responseCode: CONSTANTS.RESPONSE_CODE.FAILED - })); + res.status(statusCode).json(formatApiResponse({ + id: req.id, + statusCode: CONSTANTS.RESPONSE_CODE.FAILED, + result: {}, + params: paramsObject, + responseCode: CONSTANTS.RESPONSE_CODE.FAILED + })); -} \ No newline at end of file +}; \ No newline at end of file diff --git a/middleware/utils/setApiResponseId.js b/middleware/utils/setApiResponseId.js index 528cc5e..f58c45f 100644 --- a/middleware/utils/setApiResponseId.js +++ b/middleware/utils/setApiResponseId.js @@ -1,8 +1,8 @@ const setApiResponseId = (id) => (req, res, next) => { - req.id = id || 'api.report' - next(); -} + req.id = id || 'api.report'; + next(); +}; module.exports = { - setApiResponseId -} \ No newline at end of file + setApiResponseId +}; \ No newline at end of file diff --git a/middleware/validators/index.js b/middleware/validators/index.js index 06313d5..c2e7ff7 100644 --- a/middleware/validators/index.js +++ b/middleware/validators/index.js @@ -1,25 +1,25 @@ -const Joi = require("joi"); +const Joi = require('joi'); const { get } = require('lodash'); -const createError = require('http-errors') +const createError = require('http-errors'); var debug = require('debug')('validator'); const validationSchemaDefinitions = { - ...require('./report'), - ...require('./summary') -} + ...require('./report'), + ...require('./summary') +}; module.exports = (schemaKey, validateAgainst) => { - return (req, res, next) => { - const schema = validationSchemaDefinitions[schemaKey]; - const { error } = schema.validate(get(req, validateAgainst)); + return (req, res, next) => { + const schema = validationSchemaDefinitions[schemaKey]; + const { error } = schema.validate(get(req, validateAgainst)); - //if validation fails pass the object object to the error handler. - if (error) { - debug('Validation failed', JSON.stringify(error)); - return next(createError(400, error.message)); - } - - //else move to the next middleware - next(); + //if validation fails pass the object object to the error handler. + if (error) { + debug('Validation failed', JSON.stringify(error)); + return next(createError(400, error.message)); } -} \ No newline at end of file + + //else move to the next middleware + next(); + }; +}; \ No newline at end of file diff --git a/middleware/validators/report.js b/middleware/validators/report.js index 354a88e..5601fea 100644 --- a/middleware/validators/report.js +++ b/middleware/validators/report.js @@ -1,114 +1,114 @@ -const Joi = require("joi"); +const Joi = require('joi'); const CONSTANTS = require('../../resources/constants.json'); -const reportTypesEnum = Object.values(CONSTANTS.REPORT_TYPE) -const statusEnum = Object.values(CONSTANTS.REPORT_STATUS) +const reportTypesEnum = Object.values(CONSTANTS.REPORT_TYPE); +const statusEnum = Object.values(CONSTANTS.REPORT_STATUS); module.exports = { - "report:create": Joi.object({ - request: Joi.object({ - report: Joi.object({ - reportid: Joi.string().optional(), - description: Joi.string().required(), - title: Joi.string().required(), - authorizedroles: Joi.array().items(Joi.string()).required(), - reportaccessurl: Joi.string().optional(), - reportconfig: Joi.object().required(), - createdon: Joi.string().optional(), - updatedon: Joi.string().optional(), - createdby: Joi.string().required(), - type: Joi.string().valid(...reportTypesEnum).required(), - report_type: Joi.string().valid("report", "dataset").optional(), - status: Joi.string() - .valid(CONSTANTS.REPORT_STATUS.DRAFT) - .trim() - .optional(), - slug: Joi.string().trim().required(), - templateurl: Joi.string().optional(), - tags: Joi.array().items(Joi.string()).required(), - updatefrequency: Joi.string().required(), - reportgenerateddate: Joi.string().required(), - reportduration: Joi.object({ - startdate: Joi.string().required(), - enddate: Joi.string().required(), - }).required(), - parameters: Joi.array().items(Joi.string()).optional(), - accesspath: Joi.alternatives().conditional('type', { is: CONSTANTS.REPORT_TYPE.PROTECTED, then: Joi.object().required(), otherwise: Joi.object().optional() }), - visibilityflags: Joi.object().optional().default({}) - }).required(), + 'report:create': Joi.object({ + request: Joi.object({ + report: Joi.object({ + reportid: Joi.string().optional(), + description: Joi.string().required(), + title: Joi.string().required(), + authorizedroles: Joi.array().items(Joi.string()).required(), + reportaccessurl: Joi.string().optional(), + reportconfig: Joi.object().required(), + createdon: Joi.string().optional(), + updatedon: Joi.string().optional(), + createdby: Joi.string().required(), + type: Joi.string().valid(...reportTypesEnum).required(), + report_type: Joi.string().valid('report', 'dataset').optional(), + status: Joi.string() + .valid(CONSTANTS.REPORT_STATUS.DRAFT) + .trim() + .optional(), + slug: Joi.string().trim().required(), + templateurl: Joi.string().optional(), + tags: Joi.array().items(Joi.string()).required(), + updatefrequency: Joi.string().required(), + reportgenerateddate: Joi.string().required(), + reportduration: Joi.object({ + startdate: Joi.string().required(), + enddate: Joi.string().required(), }).required(), - }), - "report:update": Joi.object({ - request: Joi.object({ - report: Joi.object({ - description: Joi.string().optional(), - title: Joi.string().optional(), - authorizedroles: Joi.array().items(Joi.string()).optional(), - reportaccessurl: Joi.string().optional(), - reportconfig: Joi.object().optional(), - createdon: Joi.string().optional(), - updatedon: Joi.string().optional(), - createdby: Joi.string().optional(), - type: Joi.string().valid(...reportTypesEnum).optional(), - report_type: Joi.string().valid("report", "dataset").optional(), - status: Joi.string() - .valid(...statusEnum) - .trim() - .optional(), - slug: Joi.string().trim().optional(), - templateurl: Joi.string().optional(), - tags: Joi.array().items(Joi.string()).optional(), - updatefrequency: Joi.string().optional(), - reportgenerateddate: Joi.string().optional(), - reportduration: Joi.object({ - startdate: Joi.string().required(), - enddate: Joi.string().required(), - }).optional(), - parameters: Joi.array().items(Joi.string()).optional(), - accesspath: Joi.object().optional(), - visibilityflags: Joi.object().optional().default({}) - }).required(), - options: Joi.object().unknown(true).optional() - }).required(), - }), - "report:search": Joi.object({ - request: Joi.object({ - filters: Joi.object().unknown(true).optional(), - options: Joi.object().unknown(true).optional() - }).required(), - }), - "report:update:many": Joi.object({ - request: Joi.object({ - query: Joi.object().unknown().required(), - report: Joi.object({ - description: Joi.string().optional(), - title: Joi.string().optional(), - authorizedroles: Joi.array().items(Joi.string()).optional(), - reportaccessurl: Joi.string().optional(), - reportconfig: Joi.object().optional(), - createdon: Joi.string().optional(), - updatedon: Joi.string().optional(), - createdby: Joi.string().optional(), - type: Joi.string().valid(...reportTypesEnum).optional(), - report_type: Joi.string().valid("report", "dataset").optional(), - status: Joi.string() - .valid(...statusEnum) - .trim() - .optional(), - slug: Joi.string().trim().optional(), - templateurl: Joi.string().optional(), - tags: Joi.array().items(Joi.string()).optional(), - updatefrequency: Joi.string().optional(), - reportgenerateddate: Joi.string().optional(), - reportduration: Joi.object({ - startdate: Joi.string().required(), - enddate: Joi.string().required(), - }).optional(), - parameters: Joi.array().items(Joi.string()).optional(), - accesspath: Joi.object().optional(), - visibilityflags: Joi.object().optional().default({}) - }).required(), - options: Joi.object().unknown(true).optional() - }).required(), - }), -} \ No newline at end of file + parameters: Joi.array().items(Joi.string()).optional(), + accesspath: Joi.alternatives().conditional('type', { is: CONSTANTS.REPORT_TYPE.PROTECTED, then: Joi.object().required(), otherwise: Joi.object().optional() }), + visibilityflags: Joi.object().optional().default({}) + }).required(), + }).required(), + }), + 'report:update': Joi.object({ + request: Joi.object({ + report: Joi.object({ + description: Joi.string().optional(), + title: Joi.string().optional(), + authorizedroles: Joi.array().items(Joi.string()).optional(), + reportaccessurl: Joi.string().optional(), + reportconfig: Joi.object().optional(), + createdon: Joi.string().optional(), + updatedon: Joi.string().optional(), + createdby: Joi.string().optional(), + type: Joi.string().valid(...reportTypesEnum).optional(), + report_type: Joi.string().valid('report', 'dataset').optional(), + status: Joi.string() + .valid(...statusEnum) + .trim() + .optional(), + slug: Joi.string().trim().optional(), + templateurl: Joi.string().optional(), + tags: Joi.array().items(Joi.string()).optional(), + updatefrequency: Joi.string().optional(), + reportgenerateddate: Joi.string().optional(), + reportduration: Joi.object({ + startdate: Joi.string().required(), + enddate: Joi.string().required(), + }).optional(), + parameters: Joi.array().items(Joi.string()).optional(), + accesspath: Joi.object().optional(), + visibilityflags: Joi.object().optional().default({}) + }).required(), + options: Joi.object().unknown(true).optional() + }).required(), + }), + 'report:search': Joi.object({ + request: Joi.object({ + filters: Joi.object().unknown(true).optional(), + options: Joi.object().unknown(true).optional() + }).required(), + }), + 'report:update:many': Joi.object({ + request: Joi.object({ + query: Joi.object().unknown().required(), + report: Joi.object({ + description: Joi.string().optional(), + title: Joi.string().optional(), + authorizedroles: Joi.array().items(Joi.string()).optional(), + reportaccessurl: Joi.string().optional(), + reportconfig: Joi.object().optional(), + createdon: Joi.string().optional(), + updatedon: Joi.string().optional(), + createdby: Joi.string().optional(), + type: Joi.string().valid(...reportTypesEnum).optional(), + report_type: Joi.string().valid('report', 'dataset').optional(), + status: Joi.string() + .valid(...statusEnum) + .trim() + .optional(), + slug: Joi.string().trim().optional(), + templateurl: Joi.string().optional(), + tags: Joi.array().items(Joi.string()).optional(), + updatefrequency: Joi.string().optional(), + reportgenerateddate: Joi.string().optional(), + reportduration: Joi.object({ + startdate: Joi.string().required(), + enddate: Joi.string().required(), + }).optional(), + parameters: Joi.array().items(Joi.string()).optional(), + accesspath: Joi.object().optional(), + visibilityflags: Joi.object().optional().default({}) + }).required(), + options: Joi.object().unknown(true).optional() + }).required(), + }), +}; \ No newline at end of file diff --git a/middleware/validators/summary.js b/middleware/validators/summary.js index 599a878..59a4cbb 100644 --- a/middleware/validators/summary.js +++ b/middleware/validators/summary.js @@ -1,23 +1,23 @@ -const Joi = require("joi"); +const Joi = require('joi'); module.exports = { - "summary:create": Joi.object({ - request: Joi.object({ - summary: Joi.object({ - reportid: Joi.string().required(), - createdby: Joi.string().required(), - chartid: Joi.string().optional(), - summary: Joi.string().required(), - param_hash: Joi.string().optional() - }).required(), - }).required(), - }), - "summary:list": Joi.object({ - request: Joi.object({ - filters: Joi.object({ - reportid: Joi.string().required(), - chartid: Joi.string().optional(), - }).required(), - }).required(), - }) -} \ No newline at end of file + 'summary:create': Joi.object({ + request: Joi.object({ + summary: Joi.object({ + reportid: Joi.string().required(), + createdby: Joi.string().required(), + chartid: Joi.string().optional(), + summary: Joi.string().required(), + param_hash: Joi.string().optional() + }).required(), + }).required(), + }), + 'summary:list': Joi.object({ + request: Joi.object({ + filters: Joi.object({ + reportid: Joi.string().required(), + chartid: Joi.string().optional(), + }).required(), + }).required(), + }) +}; \ No newline at end of file diff --git a/models/report.js b/models/report.js index 006420f..b6cf813 100644 --- a/models/report.js +++ b/models/report.js @@ -113,19 +113,19 @@ module.exports = (sequelize, DataTypes) => { type: DataTypes.JSONB } }, - { - sequelize, - modelName: 'report', - tableName: 'report', - timestamps: false, - hooks: { - beforeValidate(report, options) { - report.reportaccessurl = `${envVariables.ENV}/dashBoard/reports/${report.reportid}`; - }, - beforeUpdate(report, options) { - report.updatedon = Date.now(); - } + { + sequelize, + modelName: 'report', + tableName: 'report', + timestamps: false, + hooks: { + beforeValidate(report, options) { + report.reportaccessurl = `${envVariables.ENV}/dashBoard/reports/${report.reportid}`; + }, + beforeUpdate(report, options) { + report.updatedon = Date.now(); } - }); + } + }); return report; }; \ No newline at end of file diff --git a/models/report_status.js b/models/report_status.js index d07665f..c8d3832 100644 --- a/models/report_status.js +++ b/models/report_status.js @@ -10,7 +10,7 @@ module.exports = (sequelize, DataTypes) => { * The `models/index` file will call this method automatically. */ static associate(models) { - this.belongsTo(models.report, { foreignKey: 'reportid', foreignKeyConstraint: true, onDelete: 'CASCADE' }) + this.belongsTo(models.report, { foreignKey: 'reportid', foreignKeyConstraint: true, onDelete: 'CASCADE' }); } } report_status.init({ diff --git a/models/report_summary.js b/models/report_summary.js index d246ab8..a884a06 100644 --- a/models/report_summary.js +++ b/models/report_summary.js @@ -10,7 +10,7 @@ module.exports = (sequelize, DataTypes) => { * The `models/index` file will call this method automatically. */ static associate(models) { - this.belongsTo(models.report, { foreignKey: 'reportid' }) + this.belongsTo(models.report, { foreignKey: 'reportid' }); } } report_summary.init({ diff --git a/package-lock.json b/package-lock.json index 50e3ac2..77ab4aa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -139,14 +139,12 @@ "node_modules/@hapi/hoek": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", - "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==", - "license": "BSD-3-Clause" + "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==" }, "node_modules/@hapi/topo": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz", "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", - "license": "BSD-3-Clause", "dependencies": { "@hapi/hoek": "^9.0.0" } @@ -214,109 +212,6 @@ "dev": true, "license": "BSD-3-Clause" }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true, - "license": "MIT" - }, - "node_modules/@isaacs/cliui/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -355,29 +250,10 @@ "node": ">= 8" } }, - "node_modules/@one-ini/wasm": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@one-ini/wasm/-/wasm-0.1.1.tgz", - "integrity": "sha512-XuySG1E38YScSJoMlqovLru4KTUNSjgVTIjyh7qMX6aNN5HY5Ct5LhRJdxO79JtTzKfzV/bnWpz+zquYrISsvw==", - "dev": true, - "license": "MIT" - }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">=14" - } - }, "node_modules/@sideway/address": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.5.tgz", - "integrity": "sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==", - "license": "BSD-3-Clause", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz", + "integrity": "sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw==", "dependencies": { "@hapi/hoek": "^9.0.0" } @@ -391,38 +267,30 @@ "node_modules/@sideway/pinpoint": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", - "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==", - "license": "BSD-3-Clause" + "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==" }, "node_modules/@types/debug": { - "version": "4.1.12", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", - "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", - "license": "MIT", + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz", + "integrity": "sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==", "dependencies": { "@types/ms": "*" } }, "node_modules/@types/ms": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz", - "integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==", - "license": "MIT" + "version": "0.7.31", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", + "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==" }, "node_modules/@types/node": { - "version": "22.15.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.3.tgz", - "integrity": "sha512-lX7HFZeHf4QG/J7tBZqrCAXwz9J5RD56Y6MpP0eJkka8p+K0RY/yBTW7CYFJ4VGCclxqOLKmiGP5juQc6MKgcw==", - "license": "MIT", - "dependencies": { - "undici-types": "~6.21.0" - } + "version": "17.0.35", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.35.tgz", + "integrity": "sha512-vu1SrqBjbbZ3J6vwY17jBs8Sr/BKA+/a/WtjRG+whKg1iuLFOosq872EXS0eXWILdO36DHQQeku/ZcL6hz2fpg==" }, "node_modules/@types/validator": { - "version": "13.15.0", - "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.15.0.tgz", - "integrity": "sha512-nh7nrWhLr6CBq9ldtw0wx+z9wKnnv/uTVLA9g/3/TcOYxbpOSZE+MhKPmWqU+K0NvThjhv12uD8MuqijB0WzEA==", - "license": "MIT" + "version": "13.7.2", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.7.2.tgz", + "integrity": "sha512-KFcchQ3h0OPQgFirBRPZr5F/sVjxZsOrQHedj3zi8AH3Zv/hOLx2OLR4hxR5HcfoU+33n69ZuOfzthKVdMoTiw==" }, "node_modules/@ungap/structured-clone": { "version": "1.3.0", @@ -432,20 +300,15 @@ "license": "ISC" }, "node_modules/abbrev": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-2.0.0.tgz", - "integrity": "sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==", - "dev": true, - "license": "ISC", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true }, "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==", - "license": "MIT", "dependencies": { "mime-types": "~2.1.34", "negotiator": "0.6.3" @@ -481,7 +344,6 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -498,7 +360,6 @@ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -508,7 +369,6 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -520,11 +380,10 @@ } }, "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "dev": true, - "license": "ISC", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -543,14 +402,12 @@ "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==", - "license": "MIT" + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, "node_modules/asn1": { "version": "0.2.6", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "license": "MIT", "dependencies": { "safer-buffer": "~2.1.0" } @@ -559,7 +416,6 @@ "version": "4.10.1", "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", - "license": "MIT", "dependencies": { "bn.js": "^4.0.0", "inherits": "^2.0.1", @@ -570,7 +426,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", - "license": "MIT", "engines": { "node": ">=0.8" } @@ -578,15 +433,13 @@ "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "license": "MIT" + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/at-least-node": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", "dev": true, - "license": "ISC", "engines": { "node": ">= 4.0.0" } @@ -595,16 +448,14 @@ "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", - "license": "Apache-2.0", "engines": { "node": "*" } }, "node_modules/aws4": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.2.tgz", - "integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==", - "license": "MIT" + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "node_modules/axios": { "version": "0.27.2", @@ -620,7 +471,6 @@ "version": "0.8.4", "resolved": "https://registry.npmjs.org/axios-debug-log/-/axios-debug-log-0.8.4.tgz", "integrity": "sha512-DvmaJiYusndhfAjQ94HqlvhaVoEjOetwo9cpb+OVtOZNZTqdz0VAVed3ZjSQKpyM1g8jDXUXFx0Pg1DhUZzAdw==", - "license": "BSD-3-Clause", "dependencies": { "@types/debug": "^4.0.0", "debug": "^4.0.0" @@ -630,12 +480,11 @@ } }, "node_modules/axios-debug-log/node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", - "license": "MIT", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dependencies": { - "ms": "^2.1.3" + "ms": "2.1.2" }, "engines": { "node": ">=6.0" @@ -647,17 +496,15 @@ } }, "node_modules/axios-debug-log/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==", - "license": "MIT" + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/azure-storage": { "version": "2.10.7", "resolved": "https://registry.npmjs.org/azure-storage/-/azure-storage-2.10.7.tgz", "integrity": "sha512-4oeFGtn3Ziw/fGs/zkoIpKKtygnCVIcZwzJ7UQzKTxhkGQqVCByOFbYqMGYR3L+wOsunX9lNfD0jc51SQuKSSA==", "deprecated": "Please note: newer packages @azure/storage-blob, @azure/storage-queue and @azure/storage-file are available as of November 2019 and @azure/data-tables is available as of June 2021. While the legacy azure-storage package will continue to receive critical bug fixes, we strongly encourage you to upgrade. Migration guide can be found: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/MigrationGuide.md", - "license": "Apache-2.0", "dependencies": { "browserify-mime": "^1.2.9", "extend": "^3.0.2", @@ -681,7 +528,6 @@ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "license": "MIT", "bin": { "uuid": "bin/uuid" } @@ -690,14 +536,12 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, - "license": "MIT" + "dev": true }, "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==", - "license": "MIT", "dependencies": { "safe-buffer": "5.1.2" }, @@ -708,43 +552,35 @@ "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==", - "license": "MIT" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "node_modules/bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", - "license": "BSD-3-Clause", "dependencies": { "tweetnacl": "^0.14.3" } }, "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/bn.js": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", - "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", - "license": "MIT" + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" }, "node_modules/body-parser": { "version": "1.20.3", @@ -770,6 +606,15 @@ "npm": "1.2.8000 || >= 1.4.16" } }, + "node_modules/body-parser/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==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/body-parser/node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", @@ -786,18 +631,53 @@ "node": ">= 0.8" } }, - "node_modules/body-parser/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/body-parser/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==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/body-parser/node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/body-parser/node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", "license": "ISC" }, + "node_modules/body-parser/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "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==", "dev": true, - "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -819,8 +699,7 @@ "node_modules/brorand": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", - "license": "MIT" + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" }, "node_modules/browserify-mime": { "version": "1.2.9", @@ -830,8 +709,15 @@ "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==", - "license": "BSD-3-Clause" + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" + }, + "node_modules/buffer-writer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/buffer-writer/-/buffer-writer-2.0.0.tgz", + "integrity": "sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw==", + "engines": { + "node": ">=4" + } }, "node_modules/bytes": { "version": "3.1.2", @@ -884,8 +770,7 @@ "node_modules/caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", - "license": "Apache-2.0" + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" }, "node_modules/chalk": { "version": "4.1.2", @@ -904,12 +789,40 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "node_modules/chalk/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -922,35 +835,18 @@ "engines": { "node": ">= 8.10.0" }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, "optionalDependencies": { "fsevents": "~2.3.2" } }, - "node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/cli-color": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.4.tgz", - "integrity": "sha512-zlnpg0jNcibNrO7GG9IeHH7maWFeCz+Ja1wx/7tZNU5ASSSSZ+/qZciM0/LHCYxSdqv5h2sdbQ/PXYdOuetXvA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.2.tgz", + "integrity": "sha512-g4JYjrTW9MGtCziFNjkqp3IMpGhnJyeB0lOtRPjQkYhXzKYr6tYnXKyEVnMzITxhpbahsEW9KsxOYIDKwcsIBw==", "dev": true, - "license": "ISC", "dependencies": { "d": "^1.0.1", - "es5-ext": "^0.10.64", + "es5-ext": "^0.10.59", "es6-iterator": "^2.0.3", "memoizee": "^0.4.15", "timers-ext": "^0.1.7" @@ -959,24 +855,11 @@ "node": ">=0.10" } }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, - "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -988,14 +871,12 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" }, @@ -1003,34 +884,28 @@ "node": ">= 0.8" } }, - "node_modules/commander": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", - "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14" - } - }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/config-chain": { "version": "1.1.13", "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", "dev": true, - "license": "MIT", "dependencies": { "ini": "^1.3.4", "proto-list": "~1.2.1" } }, + "node_modules/config-chain/node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -1077,20 +952,17 @@ "node_modules/cookie-signature": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", - "license": "MIT" + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" }, "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==", - "license": "MIT" + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" }, "node_modules/cross-env": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", - "license": "MIT", "dependencies": { "cross-spawn": "^7.0.1" }, @@ -1119,24 +991,19 @@ } }, "node_modules/d": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz", - "integrity": "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", "dev": true, - "license": "ISC", "dependencies": { - "es5-ext": "^0.10.64", - "type": "^2.7.2" - }, - "engines": { - "node": ">=0.12" + "es5-ext": "^0.10.50", + "type": "^1.0.1" } }, "node_modules/dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", - "license": "MIT", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "dependencies": { "assert-plus": "^1.0.0" }, @@ -1148,7 +1015,6 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -1163,19 +1029,17 @@ "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "license": "MIT", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "engines": { "node": ">=0.4.0" } }, "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==", - "license": "MIT", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", "engines": { - "node": ">= 0.8" + "node": ">= 0.6" } }, "node_modules/destroy": { @@ -1221,18 +1085,10 @@ "node": ">= 0.4" } }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true, - "license": "MIT" - }, "node_modules/ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", - "license": "MIT", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", "dependencies": { "jsbn": "~0.1.0", "safer-buffer": "^2.1.0" @@ -1241,75 +1097,52 @@ "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==", - "license": "Apache-2.0", - "dependencies": { - "safe-buffer": "^5.0.1" - } - }, - "node_modules/editorconfig": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-1.0.4.tgz", - "integrity": "sha512-L9Qe08KWTlqYMVvMcTIvMAdl1cDUubzRNYL+WfA4bLDMHe4nemKkpmYzkznE1FwLKu0EEmy6obgQKzMJrg4x9Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@one-ini/wasm": "0.1.1", - "commander": "^10.0.0", - "minimatch": "9.0.1", - "semver": "^7.5.3" - }, - "bin": { - "editorconfig": "bin/editorconfig" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/editorconfig/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "license": "MIT", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", "dependencies": { - "balanced-match": "^1.0.0" + "safe-buffer": "^5.0.1" } }, - "node_modules/editorconfig/node_modules/minimatch": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.1.tgz", - "integrity": "sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==", + "node_modules/editorconfig": { + "version": "0.15.3", + "resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-0.15.3.tgz", + "integrity": "sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g==", "dev": true, - "license": "ISC", "dependencies": { - "brace-expansion": "^2.0.1" + "commander": "^2.19.0", + "lru-cache": "^4.1.5", + "semver": "^5.6.0", + "sigmund": "^1.0.1" }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "bin": { + "editorconfig": "bin/editorconfig" } }, - "node_modules/editorconfig/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "node_modules/editorconfig/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "node_modules/editorconfig/node_modules/lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" + "dependencies": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" } }, + "node_modules/editorconfig/node_modules/yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, "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==", - "license": "MIT" + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "node_modules/elliptic": { "version": "6.6.1", @@ -1326,18 +1159,11 @@ "minimalistic-crypto-utils": "^1.0.1" } }, - "node_modules/elliptic/node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "license": "ISC" - }, "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==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/encodeurl": { "version": "2.0.0", @@ -1378,21 +1204,6 @@ "node": ">= 0.4" } }, - "node_modules/es-set-tostringtag": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", - "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/es5-ext": { "version": "0.10.64", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", @@ -1413,9 +1224,8 @@ "node_modules/es6-iterator": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", "dev": true, - "license": "MIT", "dependencies": { "d": "1", "es5-ext": "^0.10.35", @@ -1423,17 +1233,13 @@ } }, "node_modules/es6-symbol": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.4.tgz", - "integrity": "sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", "dev": true, - "license": "ISC", "dependencies": { - "d": "^1.0.2", - "ext": "^1.7.0" - }, - "engines": { - "node": ">=0.12" + "d": "^1.0.1", + "ext": "^1.1.2" } }, "node_modules/es6-weak-map": { @@ -1441,7 +1247,6 @@ "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", "dev": true, - "license": "ISC", "dependencies": { "d": "1", "es5-ext": "^0.10.46", @@ -1450,11 +1255,10 @@ } }, "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" } @@ -1583,6 +1387,19 @@ } } }, + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/eslint/node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -1606,6 +1423,13 @@ "node": ">=0.10" } }, + "node_modules/esniff/node_modules/type": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.3.tgz", + "integrity": "sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==", + "dev": true, + "license": "ISC" + }, "node_modules/espree": { "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", @@ -1682,9 +1506,8 @@ "node_modules/event-emitter": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", "dev": true, - "license": "MIT", "dependencies": { "d": "1", "es5-ext": "~0.10.14" @@ -1767,6 +1590,15 @@ "node": ">= 0.6" } }, + "node_modules/express/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==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/express/node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", @@ -1783,48 +1615,85 @@ "node": ">= 0.8" } }, - "node_modules/express/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/express/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==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/express/node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/express/node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", "license": "ISC" }, + "node_modules/express/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/ext": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", - "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.6.0.tgz", + "integrity": "sha512-sdBImtzkq2HpkdRLtlLWDa6w4DX22ijZLKx8BMPUuKe1c5lbN6xwQDQCxSfxBQnHZ13ls/FH0MQZx/q/gr6FQg==", "dev": true, - "license": "ISC", "dependencies": { - "type": "^2.7.2" + "type": "^2.5.0" } }, + "node_modules/ext/node_modules/type": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.6.0.tgz", + "integrity": "sha512-eiDBDOmkih5pMbo9OqsqPRGMljLodLcwd5XD5JbtNB0o89xZAwynY9EdCDsJU7LtcVCClu9DvM7/0Ep1hYX3EQ==", + "dev": true + }, "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "license": "MIT" + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, "node_modules/extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", "engines": [ "node >=0.6.0" - ], - "license": "MIT" + ] }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "license": "MIT" + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "license": "MIT" + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, "node_modules/fast-levenshtein": { "version": "2.0.6", @@ -1887,6 +1756,27 @@ "node": ">= 0.8" } }, + "node_modules/finalhandler/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==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -1946,41 +1836,21 @@ } } }, - "node_modules/foreground-child": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", - "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", - "dev": true, - "license": "ISC", - "dependencies": { - "cross-spawn": "^7.0.6", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", - "license": "Apache-2.0", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", "engines": { "node": "*" } }, "node_modules/form-data": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz", - "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", - "license": "MIT", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", - "es-set-tostringtag": "^2.1.0", "mime-types": "^2.1.12" }, "engines": { @@ -1991,7 +1861,6 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -2010,7 +1879,6 @@ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", "dev": true, - "license": "MIT", "dependencies": { "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", @@ -2024,17 +1892,15 @@ "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==", - "dev": true, - "license": "ISC" + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true }, "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "dev": true, "hasInstallScript": true, - "license": "MIT", "optional": true, "os": [ "darwin" @@ -2057,7 +1923,6 @@ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, - "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" } @@ -2102,8 +1967,7 @@ "node_modules/getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", - "license": "MIT", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", "dependencies": { "assert-plus": "^1.0.0" } @@ -2114,7 +1978,6 @@ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, - "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -2131,16 +1994,15 @@ } }, "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, - "license": "ISC", "dependencies": { - "is-glob": "^4.0.3" + "is-glob": "^4.0.1" }, "engines": { - "node": ">=10.13.0" + "node": ">= 6" } }, "node_modules/globals": { @@ -2172,11 +2034,10 @@ } }, "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true, - "license": "ISC" + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true }, "node_modules/graphemer": { "version": "1.4.0", @@ -2188,8 +2049,7 @@ "node_modules/har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", - "license": "ISC", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", "engines": { "node": ">=4" } @@ -2199,7 +2059,6 @@ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", "deprecated": "this library is no longer supported", - "license": "MIT", "dependencies": { "ajv": "^6.12.3", "har-schema": "^2.0.0" @@ -2208,14 +2067,25 @@ "node": ">=6" } }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true, - "license": "MIT", "engines": { - "node": ">=8" + "node": ">=4" } }, "node_modules/has-symbols": { @@ -2230,26 +2100,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "license": "MIT", - "dependencies": { - "has-symbols": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/hash-base": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", - "license": "MIT", "dependencies": { "inherits": "^2.0.4", "readable-stream": "^3.6.0", @@ -2259,17 +2113,10 @@ "node": ">=4" } }, - "node_modules/hash-base/node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "license": "ISC" - }, "node_modules/hash-base/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==", - "license": "MIT", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -2283,7 +2130,6 @@ "version": "1.1.7", "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "license": "MIT", "dependencies": { "inherits": "^2.0.3", "minimalistic-assert": "^1.0.1" @@ -2304,8 +2150,7 @@ "node_modules/hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", - "license": "MIT", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", "dependencies": { "hash.js": "^1.0.3", "minimalistic-assert": "^1.0.0", @@ -2315,8 +2160,7 @@ "node_modules/http-errors": { "version": "1.6.3", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", - "license": "MIT", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", "dependencies": { "depd": "~1.1.2", "inherits": "2.0.3", @@ -2327,35 +2171,15 @@ "node": ">= 0.6" } }, - "node_modules/http-errors/node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/http-errors/node_modules/setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", - "license": "ISC" - }, - "node_modules/http-errors/node_modules/statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } + "node_modules/http-errors/node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "node_modules/http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", - "license": "MIT", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", "dependencies": { "assert-plus": "^1.0.0", "jsprim": "^1.2.2", @@ -2391,9 +2215,8 @@ "node_modules/ignore-by-default": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", - "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", - "dev": true, - "license": "ISC" + "integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=", + "dev": true }, "node_modules/import-fresh": { "version": "3.3.1", @@ -2423,44 +2246,33 @@ } }, "node_modules/inflection": { - "version": "1.13.4", - "resolved": "https://registry.npmjs.org/inflection/-/inflection-1.13.4.tgz", - "integrity": "sha512-6I/HUDeYFfuNCVS3td055BaXBwKYuzw7K3ExVMStBowKo9oOAMJIXIHvdyR3iboTCp1b+1i5DSkIZTcwIktuDw==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/inflection/-/inflection-1.13.2.tgz", + "integrity": "sha512-cmZlljCRTBFouT8UzMzrGcVEvkv6D/wBdcdKG7J1QH5cXjtU75Dm+P27v9EKu/Y43UYyCJd1WC4zLebRrC8NBw==", "engines": [ "node >= 0.4.0" - ], - "license": "MIT" + ] }, "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==", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, - "license": "ISC", "dependencies": { "once": "^1.3.0", "wrappy": "1" } }, "node_modules/inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", - "license": "ISC" - }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true, - "license": "ISC" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "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==", - "license": "MIT", "engines": { "node": ">= 0.10" } @@ -2470,7 +2282,6 @@ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, - "license": "MIT", "dependencies": { "binary-extensions": "^2.0.0" }, @@ -2479,16 +2290,12 @@ } }, "node_modules/is-core-module": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", - "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", + "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", "dev": true, - "license": "MIT", "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" + "has": "^1.0.3" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2497,9 +2304,8 @@ "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -2509,7 +2315,6 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -2519,7 +2324,6 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, - "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -2550,74 +2354,50 @@ "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==", - "license": "MIT" + "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==" }, "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "license": "MIT" + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, "node_modules/isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "license": "MIT" + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "license": "ISC" + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, "node_modules/isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", - "license": "MIT" - }, - "node_modules/jackspeak": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", - "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, "node_modules/joi": { - "version": "17.13.3", - "resolved": "https://registry.npmjs.org/joi/-/joi-17.13.3.tgz", - "integrity": "sha512-otDA4ldcIx+ZXsKHWmp0YizCweVRZG96J10b0FevjfuncLO1oX59THoAmHkNubYJ+9gWsYsp5k8v4ib6oDv1fA==", - "license": "BSD-3-Clause", - "dependencies": { - "@hapi/hoek": "^9.3.0", - "@hapi/topo": "^5.1.0", - "@sideway/address": "^4.1.5", - "@sideway/formula": "^3.0.1", + "version": "17.6.0", + "resolved": "https://registry.npmjs.org/joi/-/joi-17.6.0.tgz", + "integrity": "sha512-OX5dG6DTbcr/kbMFj0KGYxuew69HPcAE3K/sZpEV2nP6e/j/C0HV+HNiBPCASxdx5T7DMoa0s8UeHWMnb6n2zw==", + "dependencies": { + "@hapi/hoek": "^9.0.0", + "@hapi/topo": "^5.0.0", + "@sideway/address": "^4.1.3", + "@sideway/formula": "^3.0.0", "@sideway/pinpoint": "^2.0.0" } }, "node_modules/js-beautify": { - "version": "1.15.4", - "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.15.4.tgz", - "integrity": "sha512-9/KXeZUKKJwqCXUdBxFJ3vPh467OCckSBmYDwSK/EtV090K+iMJ7zx2S3HLVDIWFQdqMIsZWbnaGiba18aWhaA==", + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.14.3.tgz", + "integrity": "sha512-f1ra8PHtOEu/70EBnmiUlV8nJePS58y9qKjl4JHfYWlFH6bo7ogZBz//FAZp7jDuXtYnGYKymZPlrg2I/9Zo4g==", "dev": true, - "license": "MIT", "dependencies": { "config-chain": "^1.1.13", - "editorconfig": "^1.0.4", - "glob": "^10.4.2", - "js-cookie": "^3.0.5", - "nopt": "^7.2.1" + "editorconfig": "^0.15.3", + "glob": "^7.1.3", + "nopt": "^5.0.0" }, "bin": { "css-beautify": "js/bin/css-beautify.js", @@ -2625,64 +2405,22 @@ "js-beautify": "js/bin/js-beautify.js" }, "engines": { - "node": ">=14" - } - }, - "node_modules/js-beautify/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" + "node": ">=10" } }, - "node_modules/js-beautify/node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "node_modules/js-beautify/node_modules/nopt": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", "dev": true, - "license": "ISC", "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" + "abbrev": "1" }, "bin": { - "glob": "dist/esm/bin.mjs" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/js-beautify/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" + "nopt": "bin/nopt.js" }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/js-cookie": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.5.tgz", - "integrity": "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==", - "dev": true, - "license": "MIT", "engines": { - "node": ">=14" + "node": ">=6" } }, "node_modules/js-yaml": { @@ -2701,8 +2439,7 @@ "node_modules/jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", - "license": "MIT" + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, "node_modules/json-buffer": { "version": "3.0.1", @@ -2714,8 +2451,7 @@ "node_modules/json-edm-parser": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/json-edm-parser/-/json-edm-parser-0.1.2.tgz", - "integrity": "sha512-J1U9mk6lf8dPULcaMwALXB6yel3cJyyhk9Z8FQ4sMwiazNwjaUhegIcpZyZFNMvLRtnXwh+TkCjX9uYUObBBYA==", - "license": "MIT", + "integrity": "sha1-HmCw/vG8CvZ7wNFG393lSGzWFbQ=", "dependencies": { "jsonparse": "~1.2.0" } @@ -2723,14 +2459,12 @@ "node_modules/json-schema": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "license": "(AFL-2.1 OR BSD-3-Clause)" + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "license": "MIT" + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -2742,15 +2476,13 @@ "node_modules/json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "license": "ISC" + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dev": true, - "license": "MIT", "dependencies": { "universalify": "^2.0.0" }, @@ -2761,17 +2493,15 @@ "node_modules/jsonparse": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.2.0.tgz", - "integrity": "sha512-LkDEYtKnPFI9hQ/IURETe6F1dUH80cbRkaF6RaViSwoSNPwaxQpi6TgJGvJKyLQ2/9pQW+XCxK3hBoR44RAjkg==", + "integrity": "sha1-XAxWhRBxYOcv50ib3eoLRMK8Z70=", "engines": [ "node >= 0.2.0" - ], - "license": "MIT" + ] }, "node_modules/jsonwebtoken": { "version": "8.5.1", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", - "license": "MIT", "dependencies": { "jws": "^3.2.2", "lodash.includes": "^4.3.0", @@ -2792,14 +2522,12 @@ "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==", - "license": "MIT" + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/jsprim": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", - "license": "MIT", "dependencies": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", @@ -2814,7 +2542,6 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", - "license": "MIT", "dependencies": { "buffer-equal-constant-time": "1.0.1", "ecdsa-sig-formatter": "1.0.11", @@ -2824,8 +2551,7 @@ "node_modules/jwk-to-pem": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/jwk-to-pem/-/jwk-to-pem-1.2.6.tgz", - "integrity": "sha512-Ipnj4HJk49KJ6j8u6niB37f8waRf+9uDpJlnk9QRJbH2AIII2w59VoajS5s2V0MYfIS5s+Hys9G6dspJmLn95Q==", - "license": "Apache-2.0", + "integrity": "sha1-1QfOzkAInFJI4J7GgmaiAwqcYyU=", "dependencies": { "asn1.js": "^4.5.2", "elliptic": "^6.2.3", @@ -2836,7 +2562,6 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", - "license": "MIT", "dependencies": { "jwa": "^1.4.1", "safe-buffer": "^5.0.1" @@ -2845,14 +2570,13 @@ "node_modules/jwt-decode": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-2.2.0.tgz", - "integrity": "sha512-86GgN2vzfUu7m9Wcj63iUkuDzFNYFVmjeDm2GzWpUk+opB0pEpMsw6ePCMrhYkumz2C1ihqtZzOMAg7FiXcNoQ==", - "license": "MIT" + "integrity": "sha1-fYa9VmefWM5qhHBKZX3TkruoGnk=" }, "node_modules/keycloak-auth-utils": { - "version": "3.3.0-cr.2", - "resolved": "https://registry.npmjs.org/keycloak-auth-utils/-/keycloak-auth-utils-3.3.0-cr.2.tgz", - "integrity": "sha512-ElD1WusPKMFuORdsNNlD4GnL2H6ltKpMV/qQ73mjWCnxqdCmU9TTiDNZ6Nttt6mnEfhaKebT8h/n5IytTXL0EA==", - "license": "Apache-2.0", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/keycloak-auth-utils/-/keycloak-auth-utils-3.3.0.tgz", + "integrity": "sha1-/eZsVc1RjOs0yR/huN44fqUDhtM=", + "deprecated": "Merged with keycloak-connect. For updated releases refer to https://www.npmjs.com/package/keycloak-connect", "dependencies": { "jwk-to-pem": "^1.2.6" }, @@ -2903,50 +2627,42 @@ "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "license": "MIT" + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "node_modules/lodash.flattendeep": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==", - "license": "MIT" + "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=" }, "node_modules/lodash.includes": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", - "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==", - "license": "MIT" + "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=" }, "node_modules/lodash.isboolean": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", - "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==", - "license": "MIT" + "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=" }, "node_modules/lodash.isinteger": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", - "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==", - "license": "MIT" + "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=" }, "node_modules/lodash.isnumber": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", - "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==", - "license": "MIT" + "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=" }, "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==", - "license": "MIT" + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" }, "node_modules/lodash.isstring": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==", - "license": "MIT" + "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" }, "node_modules/lodash.merge": { "version": "4.6.2", @@ -2958,22 +2674,13 @@ "node_modules/lodash.once": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", - "license": "MIT" - }, - "node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "dev": true, - "license": "ISC" + "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" }, "node_modules/lru-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", - "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==", + "integrity": "sha1-Jzi9nw089PhEkMVzbEhpmsYyzaM=", "dev": true, - "license": "MIT", "dependencies": { "es5-ext": "~0.10.2" } @@ -2991,7 +2698,6 @@ "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "license": "MIT", "dependencies": { "hash-base": "^3.0.0", "inherits": "^2.0.1", @@ -3008,37 +2714,31 @@ } }, "node_modules/memoizee": { - "version": "0.4.17", - "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.17.tgz", - "integrity": "sha512-DGqD7Hjpi/1or4F/aYAspXKNm5Yili0QDAFAY4QYvpqpgiY6+1jOfqpmByzjxbWd/T9mChbCArXAbDAsTm5oXA==", + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", + "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", "dev": true, - "license": "ISC", "dependencies": { - "d": "^1.0.2", - "es5-ext": "^0.10.64", + "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" - }, - "engines": { - "node": ">=0.12" } }, "node_modules/memoizee/node_modules/is-promise": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/memory-cache": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/memory-cache/-/memory-cache-0.2.0.tgz", - "integrity": "sha512-OcjA+jzjOYzKmKS6IQVALHLVz+rNTMPoJvCztFaZxwG14wtAW7VRZjwTQu06vKCYOxh4jVnik7ya0SXTB0W+xA==", - "license": "BSD-2-Clause" + "integrity": "sha1-eJCwHVLADI68nVM+H46xfjA0hxo=" }, "node_modules/merge-descriptors": { "version": "1.0.3", @@ -3052,8 +2752,7 @@ "node_modules/methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "license": "MIT", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", "engines": { "node": ">= 0.6" } @@ -3074,7 +2773,6 @@ "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -3083,7 +2781,6 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "license": "MIT", "dependencies": { "mime-db": "1.52.0" }, @@ -3094,21 +2791,18 @@ "node_modules/minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "license": "ISC" + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" }, "node_modules/minimalistic-crypto-utils": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", - "license": "MIT" + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -3116,16 +2810,6 @@ "node": "*" } }, - "node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, "node_modules/moment": { "version": "2.30.1", "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", @@ -3151,7 +2835,6 @@ "version": "1.9.1", "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.9.1.tgz", "integrity": "sha512-HQStPIV4y3afTiCYVxirakhlCfGkI161c76kKFca7Fk1JusM//Qeo1ej2XaMniiNeaZklMVrh3vTtIzpzwbpmA==", - "license": "MIT", "dependencies": { "basic-auth": "~2.0.0", "debug": "2.6.9", @@ -3163,32 +2846,10 @@ "node": ">= 0.8.0" } }, - "node_modules/morgan/node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "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==", - "license": "MIT", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "node_modules/natural-compare": { "version": "1.4.0", @@ -3201,7 +2862,6 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "license": "MIT", "engines": { "node": ">= 0.6" } @@ -3210,14 +2870,12 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", - "dev": true, - "license": "ISC" + "dev": true }, "node_modules/node-rsa": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/node-rsa/-/node-rsa-1.1.1.tgz", "integrity": "sha512-Jd4cvbJMryN21r5HgxQOpMEqv+ooke/korixNNK3mGqfGJmy0M77WDDzo/05969+OkMy3XW1UuZsSmW9KQm7Fw==", - "license": "MIT", "dependencies": { "asn1": "^0.2.4" } @@ -3256,55 +2914,29 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, - "license": "MIT", "dependencies": { "ms": "^2.1.1" } }, - "node_modules/nodemon/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/nodemon/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==", - "dev": true, - "license": "MIT" - }, - "node_modules/nodemon/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } + "dev": true }, "node_modules/nopt": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.1.tgz", - "integrity": "sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w==", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", "dev": true, - "license": "ISC", "dependencies": { - "abbrev": "^2.0.0" + "abbrev": "1" }, "bin": { "nopt": "bin/nopt.js" }, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "*" } }, "node_modules/normalize-path": { @@ -3312,7 +2944,6 @@ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -3321,7 +2952,6 @@ "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "license": "Apache-2.0", "engines": { "node": "*" } @@ -3339,10 +2969,9 @@ } }, "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==", - "license": "MIT", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", "dependencies": { "ee-first": "1.1.1" }, @@ -3354,7 +2983,6 @@ "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==", - "license": "MIT", "engines": { "node": ">= 0.8" } @@ -3362,9 +2990,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==", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, - "license": "ISC", "dependencies": { "wrappy": "1" } @@ -3419,12 +3046,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/package-json-from-dist": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", - "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", - "dev": true, - "license": "BlueOak-1.0.0" + "node_modules/packet-reader": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/packet-reader/-/packet-reader-1.0.0.tgz", + "integrity": "sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ==" }, "node_modules/parent-module": { "version": "1.0.1", @@ -3461,9 +3086,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==", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -3472,7 +3096,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "license": "MIT", "engines": { "node": ">=8" } @@ -3481,25 +3104,7 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true, - "license": "MIT" - }, - "node_modules/path-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } + "dev": true }, "node_modules/path-to-regexp": { "version": "0.1.12", @@ -3510,29 +3115,26 @@ "node_modules/performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", - "license": "MIT" + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, "node_modules/pg": { - "version": "8.15.6", - "resolved": "https://registry.npmjs.org/pg/-/pg-8.15.6.tgz", - "integrity": "sha512-yvao7YI3GdmmrslNVsZgx9PfntfWrnXwtR+K/DjI0I/sTKif4Z623um+sjVZ1hk5670B+ODjvHDAckKdjmPTsg==", - "license": "MIT", - "dependencies": { - "pg-connection-string": "^2.8.5", - "pg-pool": "^3.9.6", - "pg-protocol": "^1.9.5", + "version": "8.7.3", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.7.3.tgz", + "integrity": "sha512-HPmH4GH4H3AOprDJOazoIcpI49XFsHCe8xlrjHkWiapdbHK+HLtbm/GQzXYAZwmPju/kzKhjaSfMACG+8cgJcw==", + "dependencies": { + "buffer-writer": "2.0.0", + "packet-reader": "1.0.0", + "pg-connection-string": "^2.5.0", + "pg-pool": "^3.5.1", + "pg-protocol": "^1.5.0", "pg-types": "^2.1.0", "pgpass": "1.x" }, "engines": { "node": ">= 8.0.0" }, - "optionalDependencies": { - "pg-cloudflare": "^1.2.5" - }, "peerDependencies": { - "pg-native": ">=3.0.1" + "pg-native": ">=2.0.0" }, "peerDependenciesMeta": { "pg-native": { @@ -3540,24 +3142,15 @@ } } }, - "node_modules/pg-cloudflare": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.2.5.tgz", - "integrity": "sha512-OOX22Vt0vOSRrdoUPKJ8Wi2OpE/o/h9T8X1s4qSkCedbNah9ei2W2765be8iMVxQUsvgT7zIAT2eIa9fs5+vtg==", - "license": "MIT", - "optional": true - }, "node_modules/pg-connection-string": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.8.5.tgz", - "integrity": "sha512-Ni8FuZ8yAF+sWZzojvtLE2b03cqjO5jNULcHFfM9ZZ0/JXrgom5pBREbtnAw7oxsxJqHw9Nz/XWORUEL3/IFow==", - "license": "MIT" + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.5.0.tgz", + "integrity": "sha512-r5o/V/ORTA6TmUnyWZR9nCj1klXCO2CEKNRlVuJptZe85QuhFayC7WeMic7ndayT5IRIR0S0xFxFi2ousartlQ==" }, "node_modules/pg-hstore": { "version": "2.3.4", "resolved": "https://registry.npmjs.org/pg-hstore/-/pg-hstore-2.3.4.tgz", "integrity": "sha512-N3SGs/Rf+xA1M2/n0JBiXFDVMzdekwLZLAO0g7mpDY9ouX+fDI7jS6kTq3JujmYbtNSJ53TJ0q4G98KVZSM4EA==", - "license": "MIT", "dependencies": { "underscore": "^1.13.1" }, @@ -3569,31 +3162,27 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==", - "license": "ISC", "engines": { "node": ">=4.0.0" } }, "node_modules/pg-pool": { - "version": "3.9.6", - "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.9.6.tgz", - "integrity": "sha512-rFen0G7adh1YmgvrmE5IPIqbb+IgEzENUm+tzm6MLLDSlPRoZVhzU1WdML9PV2W5GOdRA9qBKURlbt1OsXOsPw==", - "license": "MIT", + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.5.1.tgz", + "integrity": "sha512-6iCR0wVrro6OOHFsyavV+i6KYL4lVNyYAB9RD18w66xSzN+d8b66HiwuP30Gp1SH5O9T82fckkzsRjlrhD0ioQ==", "peerDependencies": { "pg": ">=8.0" } }, "node_modules/pg-protocol": { - "version": "1.9.5", - "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.9.5.tgz", - "integrity": "sha512-DYTWtWpfd5FOro3UnAfwvhD8jh59r2ig8bPtc9H8Ds7MscE/9NYruUQWFAOuraRl29jwcT2kyMFQ3MxeaVjUhg==", - "license": "MIT" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.5.0.tgz", + "integrity": "sha512-muRttij7H8TqRNu/DxrAJQITO4Ac7RmX3Klyr/9mJEOBeIpgnF8f9jAfRz5d3XwQZl5qBjF9gLsUtMPJE0vezQ==" }, "node_modules/pg-types": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", - "license": "MIT", "dependencies": { "pg-int8": "1.0.1", "postgres-array": "~2.0.0", @@ -3609,7 +3198,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz", "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==", - "license": "MIT", "dependencies": { "split2": "^4.1.0" } @@ -3619,7 +3207,6 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, - "license": "MIT", "engines": { "node": ">=8.6" }, @@ -3631,7 +3218,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==", - "license": "MIT", "engines": { "node": ">=4" } @@ -3639,8 +3225,7 @@ "node_modules/postgres-bytea": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", - "integrity": "sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==", - "license": "MIT", + "integrity": "sha1-AntTPAqokOJtFy1Hz5zOzFIazTU=", "engines": { "node": ">=0.10.0" } @@ -3649,7 +3234,6 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -3658,7 +3242,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", - "license": "MIT", "dependencies": { "xtend": "^4.0.0" }, @@ -3679,21 +3262,18 @@ "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==", - "license": "MIT" + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, "node_modules/proto-list": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", - "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==", - "dev": true, - "license": "ISC" + "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", + "dev": true }, "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==", - "license": "MIT", "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" @@ -3702,47 +3282,37 @@ "node": ">= 0.10" } }, + "node_modules/pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, "node_modules/psl": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.15.0.tgz", - "integrity": "sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==", - "license": "MIT", - "dependencies": { - "punycode": "^2.3.1" - }, - "funding": { - "url": "https://github.com/sponsors/lupomontero" - } + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" }, "node_modules/pstree.remy": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "license": "MIT", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "engines": { "node": ">=6" } }, "node_modules/qs": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", - "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.6" - }, + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "engines": { "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/queue-microtask": { @@ -3790,6 +3360,15 @@ "node": ">= 0.8" } }, + "node_modules/raw-body/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==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/raw-body/node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", @@ -3806,17 +3385,25 @@ "node": ">= 0.8" } }, - "node_modules/raw-body/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/raw-body/node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", "license": "ISC" }, - "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==", + "node_modules/raw-body/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -3830,15 +3417,21 @@ "node_modules/readable-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==", - "license": "MIT" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/readable-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/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, - "license": "MIT", "dependencies": { "picomatch": "^2.2.1" }, @@ -3851,7 +3444,6 @@ "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", - "license": "Apache-2.0", "dependencies": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -3882,7 +3474,6 @@ "version": "2.3.3", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.6", @@ -3892,21 +3483,11 @@ "node": ">= 0.12" } }, - "node_modules/request/node_modules/qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.6" - } - }, "node_modules/request/node_modules/uuid": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "license": "MIT", "bin": { "uuid": "bin/uuid" } @@ -3914,30 +3495,25 @@ "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/resolve": { - "version": "1.22.10", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", - "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", + "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", "dev": true, - "license": "MIT", "dependencies": { - "is-core-module": "^2.16.0", + "is-core-module": "^2.8.1", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" }, - "engines": { - "node": ">= 0.4" - }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -4027,20 +3603,17 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "license": "MIT" + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/sax": { "version": "0.5.8", "resolved": "https://registry.npmjs.org/sax/-/sax-0.5.8.tgz", - "integrity": "sha512-c0YL9VcSfcdH3F1Qij9qpYJFpKFKMXNOkLWFssBL3RuF7ZS8oZhllR2rWlCRjDTJsfq3R6wbSsaRU6o0rkEdNw==", - "license": "BSD" + "integrity": "sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE=" }, "node_modules/sb_api_interceptor": { "resolved": "libs/sb_api_interceptor", @@ -4079,6 +3652,15 @@ "node": ">= 0.8.0" } }, + "node_modules/send/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==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/send/node_modules/encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", @@ -4104,22 +3686,43 @@ "node": ">= 0.8" } }, - "node_modules/send/node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "license": "ISC" - }, "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==", "license": "MIT" }, + "node_modules/send/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==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/send/node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, + "node_modules/send/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/sequelize": { - "version": "6.37.7", - "resolved": "https://registry.npmjs.org/sequelize/-/sequelize-6.37.7.tgz", - "integrity": "sha512-mCnh83zuz7kQxxJirtFD7q6Huy6liPanI67BSlbzSYgVNl5eXVdE2CN1FuAeZwG1SNpGsNRCV+bJAVVnykZAFA==", + "version": "6.29.0", + "resolved": "https://registry.npmjs.org/sequelize/-/sequelize-6.29.0.tgz", + "integrity": "sha512-m8Wi90rs3NZP9coXE52c7PL4Q078nwYZXqt1IxPvgki7nOFn0p/F0eKsYDBXCPw9G8/BCEa6zZNk0DQUAT4ypA==", "funding": [ { "type": "opencollective", @@ -4128,21 +3731,21 @@ ], "license": "MIT", "dependencies": { - "@types/debug": "^4.1.8", - "@types/validator": "^13.7.17", - "debug": "^4.3.4", - "dottie": "^2.0.6", - "inflection": "^1.13.4", + "@types/debug": "^4.1.7", + "@types/validator": "^13.7.1", + "debug": "^4.3.3", + "dottie": "^2.0.2", + "inflection": "^1.13.2", "lodash": "^4.17.21", - "moment": "^2.29.4", - "moment-timezone": "^0.5.43", - "pg-connection-string": "^2.6.1", - "retry-as-promised": "^7.0.4", - "semver": "^7.5.4", + "moment": "^2.29.1", + "moment-timezone": "^0.5.35", + "pg-connection-string": "^2.5.0", + "retry-as-promised": "^7.0.3", + "semver": "^7.3.5", "sequelize-pool": "^7.1.0", "toposort-class": "^1.0.1", "uuid": "^8.3.2", - "validator": "^13.9.0", + "validator": "^13.7.0", "wkx": "^0.5.0" }, "engines": { @@ -4179,17 +3782,16 @@ } }, "node_modules/sequelize-cli": { - "version": "6.6.2", - "resolved": "https://registry.npmjs.org/sequelize-cli/-/sequelize-cli-6.6.2.tgz", - "integrity": "sha512-V8Oh+XMz2+uquLZltZES6MVAD+yEnmMfwfn+gpXcDiwE3jyQygLt4xoI0zG8gKt6cRcs84hsKnXAKDQjG/JAgg==", + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/sequelize-cli/-/sequelize-cli-6.4.1.tgz", + "integrity": "sha512-gIzzFitUGUErq6DYd1JDnsmx7z7XcxzRNe4Py3AqeaxcyjpCAZU2BQnsNPGPMKAaXfMtKi/d9Tu4MtLrehVzIQ==", "dev": true, - "license": "MIT", "dependencies": { - "cli-color": "^2.0.3", + "cli-color": "^2.0.1", "fs-extra": "^9.1.0", - "js-beautify": "^1.14.5", + "js-beautify": "^1.14.0", "lodash": "^4.17.21", - "resolve": "^1.22.1", + "resolve": "^1.20.0", "umzug": "^2.3.0", "yargs": "^16.2.0" }, @@ -4201,22 +3803,49 @@ "node": ">=10.0.0" } }, + "node_modules/sequelize-cli/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/sequelize-cli/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/sequelize-pool": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/sequelize-pool/-/sequelize-pool-7.1.0.tgz", "integrity": "sha512-G9c0qlIWQSK29pR/5U2JF5dDQeqqHRragoyahj/Nx4KOOQ3CPPfzxnfqFPCSB7x5UgjOgnZ61nSxz+fjDpRlJg==", - "license": "MIT", "engines": { "node": ">= 10.0.0" } }, "node_modules/sequelize/node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", - "license": "MIT", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dependencies": { - "ms": "^2.1.3" + "ms": "2.1.2" }, "engines": { "node": ">=6.0" @@ -4228,10 +3857,9 @@ } }, "node_modules/sequelize/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==", - "license": "MIT" + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/sequelize/node_modules/semver": { "version": "7.7.1", @@ -4261,16 +3889,14 @@ } }, "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "license": "ISC" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -4282,7 +3908,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "license": "MIT", "engines": { "node": ">=8" } @@ -4359,18 +3984,11 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } + "node_modules/sigmund": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", + "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", + "dev": true }, "node_modules/simple-update-notifier": { "version": "1.1.0", @@ -4396,19 +4014,17 @@ } }, "node_modules/split2": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", - "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", - "license": "ISC", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.1.0.tgz", + "integrity": "sha512-VBiJxFkxiXRlUIeyMQi8s4hgvKCSjtknJv/LVYbrgALPwf5zSKmEwV9Lst25AkvMDnvxODugjdl6KZgwKM1WYQ==", "engines": { "node": ">= 10.x" } }, "node_modules/sshpk": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", - "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", - "license": "MIT", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", + "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", "dependencies": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -4430,51 +4046,27 @@ } }, "node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", "license": "MIT", "engines": { - "node": ">= 0.8" + "node": ">= 0.6" } }, "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==", - "license": "MIT", + "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.1.0" + "safe-buffer": "~5.2.0" } }, - "node_modules/string_decoder/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==", - "license": "MIT" - }, "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==", "dev": true, - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs": { - "name": "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==", - "dev": true, - "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -4489,21 +4081,6 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -4525,16 +4102,15 @@ } }, "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, - "license": "MIT", "dependencies": { - "has-flag": "^4.0.0" + "has-flag": "^3.0.0" }, "engines": { - "node": ">=8" + "node": ">=4" } }, "node_modules/supports-preserve-symlinks-flag": { @@ -4542,7 +4118,6 @@ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -4558,17 +4133,13 @@ "license": "MIT" }, "node_modules/timers-ext": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.8.tgz", - "integrity": "sha512-wFH7+SEAcKfJpfLPkrgMPvvwnEtj8W4IurvEyrKsDleXnKLCDw71w8jltvfLa8Rm4qQxxT4jmDBYbJG/z7qoww==", + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", + "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", "dev": true, - "license": "ISC", "dependencies": { - "es5-ext": "^0.10.64", - "next-tick": "^1.1.0" - }, - "engines": { - "node": ">=0.12" + "es5-ext": "~0.10.46", + "next-tick": "1" } }, "node_modules/to-regex-range": { @@ -4596,15 +4167,16 @@ "node_modules/toposort-class": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/toposort-class/-/toposort-class-1.0.1.tgz", - "integrity": "sha512-OsLcGGbYF3rMjPUf8oKktyvCiUxSbqMMS39m33MAjLTC1DVIH6x3WSt63/M77ihI09+Sdfk1AXvfhCEeUmC7mg==", - "license": "MIT" + "integrity": "sha1-f/0feMi+KMO6Rc1OGj9e4ZO9mYg=" }, "node_modules/touch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz", - "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", + "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", "dev": true, - "license": "ISC", + "dependencies": { + "nopt": "~1.0.10" + }, "bin": { "nodetouch": "bin/nodetouch.js" } @@ -4613,7 +4185,6 @@ "version": "2.5.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "license": "BSD-3-Clause", "dependencies": { "psl": "^1.1.28", "punycode": "^2.1.1" @@ -4625,8 +4196,7 @@ "node_modules/tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "license": "Apache-2.0", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "dependencies": { "safe-buffer": "^5.0.1" }, @@ -4637,15 +4207,13 @@ "node_modules/tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "license": "Unlicense" + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, "node_modules/type": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/type/-/type-2.7.3.tgz", - "integrity": "sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==", - "dev": true, - "license": "ISC" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "dev": true }, "node_modules/type-check": { "version": "0.4.0", @@ -4691,7 +4259,6 @@ "resolved": "https://registry.npmjs.org/umzug/-/umzug-2.3.0.tgz", "integrity": "sha512-Z274K+e8goZK8QJxmbRPhl89HPO1K+ORFtm6rySPhFKfKc5GHhqdzD0SGhSWHkzoXasqJuItdhorSvY7/Cgflw==", "dev": true, - "license": "MIT", "dependencies": { "bluebird": "^3.7.2" }, @@ -4703,27 +4270,18 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/underscore": { - "version": "1.13.7", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.7.tgz", - "integrity": "sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g==", - "license": "MIT" - }, - "node_modules/undici-types": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", - "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", - "license": "MIT" + "version": "1.13.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.3.tgz", + "integrity": "sha512-QvjkYpiD+dJJraRA8+dGAU4i7aBbb2s0S3jA45TFOvg2VgqvdCDd/3N6CqA8gluk1W91GLoXg5enMUx560QzuA==" }, "node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", "dev": true, - "license": "MIT", "engines": { "node": ">= 10.0.0" } @@ -4741,7 +4299,6 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } @@ -4749,14 +4306,12 @@ "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==", - "license": "MIT" + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "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==", - "license": "MIT", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", "engines": { "node": ">= 0.4.0" } @@ -4765,16 +4320,14 @@ "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "license": "MIT", "bin": { "uuid": "dist/bin/uuid" } }, "node_modules/validator": { - "version": "13.15.0", - "resolved": "https://registry.npmjs.org/validator/-/validator-13.15.0.tgz", - "integrity": "sha512-36B2ryl4+oL5QxZ3AzD0t5SsMNGvTtQHpjgFO5tbNxfXbMFkY822ktCDe1MnlqV3301QQI9SLHDNJokDI+Z9pA==", - "license": "MIT", + "version": "13.7.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz", + "integrity": "sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==", "engines": { "node": ">= 0.10" } @@ -4782,8 +4335,7 @@ "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==", - "license": "MIT", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", "engines": { "node": ">= 0.8" } @@ -4791,11 +4343,10 @@ "node_modules/verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", "engines": [ "node >=0.6.0" ], - "license": "MIT", "dependencies": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", @@ -4805,14 +4356,12 @@ "node_modules/verror/node_modules/core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", - "license": "MIT" + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -4827,7 +4376,6 @@ "version": "0.5.0", "resolved": "https://registry.npmjs.org/wkx/-/wkx-0.5.0.tgz", "integrity": "sha512-Xng/d4Ichh8uN4l0FToV/258EjMGU9MGcA0HV2d9B/ZpZB3lqQm7nkOdZdm5GhKtLLhAE7PiVQwN4eN+2YJJUg==", - "license": "MIT", "dependencies": { "@types/node": "*" } @@ -4847,26 +4395,6 @@ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -4882,9 +4410,8 @@ "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==", - "dev": true, - "license": "ISC" + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true }, "node_modules/xml2js": { "version": "0.2.8", @@ -4897,8 +4424,7 @@ "node_modules/xmlbuilder": { "version": "9.0.7", "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", - "integrity": "sha512-7YXTQc3P2l9+0rjaUbLwMKRhtmwg1M1eDf6nag7urC7pIPYLD9W/jmzQ4ptRSUbodw5S0jfoGTflLemQibSpeQ==", - "license": "MIT", + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=", "engines": { "node": ">=4.0" } @@ -4907,7 +4433,6 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "license": "MIT", "engines": { "node": ">=0.4" } @@ -4917,26 +4442,6 @@ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "license": "MIT", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, "engines": { "node": ">=10" } @@ -4946,7 +4451,6 @@ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true, - "license": "ISC", "engines": { "node": ">=10" } diff --git a/routes/index.js b/routes/index.js index 4330dc1..5da5dc6 100644 --- a/routes/index.js +++ b/routes/index.js @@ -4,7 +4,7 @@ const errorHandler = require('../middleware/utils/errorHandler'); module.exports = app => { - app.use(`/report`, reportRouter); + app.use('/report', reportRouter); // catch 404 and forward to error handler app.use(function (req, res, next) { @@ -13,4 +13,4 @@ module.exports = app => { //global error handler app.use(errorHandler()); -} +}; diff --git a/routes/reports.js b/routes/reports.js index 2d3c5bc..3ab9ea6 100644 --- a/routes/reports.js +++ b/routes/reports.js @@ -12,104 +12,104 @@ const router = new Router(); module.exports = router; router.post( - REPORT.LIST.URL, - setApiResponseId(REPORT.LIST.API_ID), - validate(REPORT.LIST.VALIDATE.KEY, REPORT.LIST.VALIDATE.PATH), - verifyToken({ tokenRequired: false }), - fetchUserDetails(), - search + REPORT.LIST.URL, + setApiResponseId(REPORT.LIST.API_ID), + validate(REPORT.LIST.VALIDATE.KEY, REPORT.LIST.VALIDATE.PATH), + verifyToken({ tokenRequired: false }), + fetchUserDetails(), + search ); router.post( - REPORT.CREATE.URL, - setApiResponseId(REPORT.CREATE.API_ID), - validate(REPORT.CREATE.VALIDATE.KEY, REPORT.CREATE.VALIDATE.PATH), - verifyToken({ tokenRequired: false }), - fetchUserDetails(), - create -) + REPORT.CREATE.URL, + setApiResponseId(REPORT.CREATE.API_ID), + validate(REPORT.CREATE.VALIDATE.KEY, REPORT.CREATE.VALIDATE.PATH), + verifyToken({ tokenRequired: false }), + fetchUserDetails(), + create +); router.get( - REPORT.READ.URL, - setApiResponseId(REPORT.READ.API_ID), - verifyToken({ tokenRequired: false }), - fetchUserDetails(), - read + REPORT.READ.URL, + setApiResponseId(REPORT.READ.API_ID), + verifyToken({ tokenRequired: false }), + fetchUserDetails(), + read ); router.get( - REPORT.READ_WITH_DATASETS.URL, - setApiResponseId(REPORT.READ_WITH_DATASETS.API_ID), - verifyToken({ tokenRequired: false }), - fetchUserDetails(), - readWithDatasets + REPORT.READ_WITH_DATASETS.URL, + setApiResponseId(REPORT.READ_WITH_DATASETS.API_ID), + verifyToken({ tokenRequired: false }), + fetchUserDetails(), + readWithDatasets ); router.get( - REPORT.READ_HASH_WITH_DATASETS.URL, - setApiResponseId(REPORT.READ_HASH_WITH_DATASETS.API_ID), - verifyToken({ tokenRequired: false }), - fetchUserDetails(), - readWithDatasets + REPORT.READ_HASH_WITH_DATASETS.URL, + setApiResponseId(REPORT.READ_HASH_WITH_DATASETS.API_ID), + verifyToken({ tokenRequired: false }), + fetchUserDetails(), + readWithDatasets ); router.get( - REPORT.READ_HASH.URL, - setApiResponseId(REPORT.READ_HASH.API_ID), - verifyToken({ tokenRequired: false }), - fetchUserDetails(), - read + REPORT.READ_HASH.URL, + setApiResponseId(REPORT.READ_HASH.API_ID), + verifyToken({ tokenRequired: false }), + fetchUserDetails(), + read ); router.delete( - REPORT.DELETE.URL, - setApiResponseId(REPORT.DELETE.API_ID), - remove + REPORT.DELETE.URL, + setApiResponseId(REPORT.DELETE.API_ID), + remove ); router.delete( - REPORT.DELETE_HASH.URL, - setApiResponseId(REPORT.DELETE_HASH.API_ID), - remove + REPORT.DELETE_HASH.URL, + setApiResponseId(REPORT.DELETE_HASH.API_ID), + remove ); router.patch( - REPORT.UPDATE_MANY.URL, - setApiResponseId(REPORT.UPDATE_MANY.API_ID), - validate(REPORT.UPDATE_MANY.VALIDATE.KEY, REPORT.UPDATE_MANY.VALIDATE.PATH), - update + REPORT.UPDATE_MANY.URL, + setApiResponseId(REPORT.UPDATE_MANY.API_ID), + validate(REPORT.UPDATE_MANY.VALIDATE.KEY, REPORT.UPDATE_MANY.VALIDATE.PATH), + update ); router.patch( - REPORT.UPDATE.URL, - setApiResponseId(REPORT.UPDATE.API_ID), - validate(REPORT.UPDATE.VALIDATE.KEY, REPORT.UPDATE.VALIDATE.PATH), - update + REPORT.UPDATE.URL, + setApiResponseId(REPORT.UPDATE.API_ID), + validate(REPORT.UPDATE.VALIDATE.KEY, REPORT.UPDATE.VALIDATE.PATH), + update ); router.get( - REPORT.PUBLISH.URL, - setApiResponseId(REPORT.PUBLISH.API_ID), - publish -) + REPORT.PUBLISH.URL, + setApiResponseId(REPORT.PUBLISH.API_ID), + publish +); router.get( - REPORT.PUBLISH_HASH.URL, - setApiResponseId(REPORT.PUBLISH_HASH.API_ID), - publish -) + REPORT.PUBLISH_HASH.URL, + setApiResponseId(REPORT.PUBLISH_HASH.API_ID), + publish +); router.get( - REPORT.RETIRE.URL, - setApiResponseId(REPORT.RETIRE.API_ID), - retire -) + REPORT.RETIRE.URL, + setApiResponseId(REPORT.RETIRE.API_ID), + retire +); router.get( - REPORT.RETIRE_HASH.URL, - setApiResponseId(REPORT.RETIRE_HASH.API_ID), - retire -) + REPORT.RETIRE_HASH.URL, + setApiResponseId(REPORT.RETIRE_HASH.API_ID), + retire +); router.use('/summary', summaryRoutes); diff --git a/routes/summary.js b/routes/summary.js index 6a6aea6..70cc1df 100644 --- a/routes/summary.js +++ b/routes/summary.js @@ -9,23 +9,23 @@ const router = new Router(); module.exports = router; router.post(SUMMARY.LIST.URL, - setApiResponseId(SUMMARY.LIST.API_ID), - validate(SUMMARY.LIST.VALIDATE.KEY, SUMMARY.LIST.VALIDATE.PATH), - listSummaries + setApiResponseId(SUMMARY.LIST.API_ID), + validate(SUMMARY.LIST.VALIDATE.KEY, SUMMARY.LIST.VALIDATE.PATH), + listSummaries ); router.post(SUMMARY.CREATE.URL, - setApiResponseId(SUMMARY.CREATE.API_ID), - validate(SUMMARY.CREATE.VALIDATE.KEY, SUMMARY.CREATE.VALIDATE.PATH), - createSummary + setApiResponseId(SUMMARY.CREATE.API_ID), + validate(SUMMARY.CREATE.VALIDATE.KEY, SUMMARY.CREATE.VALIDATE.PATH), + createSummary ); router.get(SUMMARY.LATEST_REPORT_SUMMARY.URL, - setApiResponseId(SUMMARY.LATEST_REPORT_SUMMARY.API_ID), - getLatestSummary -) + setApiResponseId(SUMMARY.LATEST_REPORT_SUMMARY.API_ID), + getLatestSummary +); router.get(SUMMARY.LATEST_CHART_SUMMARY.URL, - setApiResponseId(SUMMARY.LATEST_CHART_SUMMARY.API_ID), - getLatestSummary -) \ No newline at end of file + setApiResponseId(SUMMARY.LATEST_CHART_SUMMARY.API_ID), + getLatestSummary +); \ No newline at end of file