diff --git a/backend/.dockerignore b/backend/.dockerignore new file mode 100644 index 000000000..dea911818 --- /dev/null +++ b/backend/.dockerignore @@ -0,0 +1,3 @@ +# Exclusion from docker image + +dataloader \ No newline at end of file diff --git a/backend/dataloader/bulk-data-loader.js b/backend/dataloader/bulk-data-loader.js new file mode 100644 index 000000000..ccad9bfd5 --- /dev/null +++ b/backend/dataloader/bulk-data-loader.js @@ -0,0 +1,263 @@ +// Instruction for running: from backend directory: node dataloader/bulk-data-loader.js +// Ensure parameters at the bottom of this file are updated as required +require('dotenv').config(); +const faker = require('faker'); +const db = require('pg-promise')(); +const regions = require('./location-enum'); + +// Database connection setup +const connection = { + host: process.env.POSTGRESQL_HOST, + port: 5432, + database: process.env.POSTGRESQL_DATABASE, + user: process.env.POSTGRESQL_USER, + password: process.env.POSTGRESQL_PASSWORD, +}; + +const pg = db(connection); + +// Function to generate a random latitude within the specified range +// Params: +// min: the minimum latitude +// max: the maximum latitude +const generateLatitude = (min, max) => { + return faker.datatype.number({ min: min * 10000, max: max * 10000 }) / 10000; +}; + +// Function to generate a random longitude within the specified range +// Params: +// min: the minimum longitude +// max: the maximum longitude +const generateLongitude = (min, max) => { + return faker.datatype.number({ min: min * 10000, max: max * 10000 }) / 10000; +}; + +// Randomly selects a region, a zone within that region, a district within that zone and a community. +// Driven from location-enum.js that is a subset of the location view +// this could be updated to pull from the database in the future +const getRandomLocation = () => { + // Randomly select a region + const regionKeys = Object.keys(regions); + const region = faker.random.arrayElement(regionKeys); + + // Randomly select a zone within that region + const zoneKeys = Object.keys(regions[region].zones); + const zone = faker.random.arrayElement(zoneKeys); + + // Randomly select a district within that zone + const districtKeys = Object.keys(regions[region].zones[zone].districts); + const district = faker.random.arrayElement(districtKeys); + + // Randomly select a community within that district + const communities = regions[region].zones[zone].districts[district]; + const community = faker.random.arrayElement(communities); + + return { region, zone, district, community }; +}; + +// Helper for generating random location (region, zone, district, community) +const generateLocation = () => { + const { region, zone, district, community } = getRandomLocation(); // Reuse the earlier location function + return { region, zone, district, community }; +}; + +// Helper for generating common fields +// Params: +// complaint_identifier = the identifer to use for the complaint +const generateCommonFields = (complaint_identifier) => { + const { region, zone, district, community } = generateLocation(); // Get location from helper + + return { + tablename: 'Conservation Officer Service Table', + dataid: faker.datatype.number(), + username: faker.internet.userName(), + positionname: 'ECC COS_test', + entrydate: faker.date.recent().toISOString(), + prevdataid: '0', + created_by_datetime: faker.date.recent().toISOString(), + incident_number: complaint_identifier, + incident_datetime: faker.date.recent().toISOString(), + cos_area_community: community, + cos_district: district, + cos_zone: zone, + cos_region: region, + status: faker.random.arrayElement(['Open', 'Closed', 'Closed', 'Closed', 'Closed', 'Closed', 'Closed', 'Closed', 'Closed', 'Closed' ]), //Close 90% of complaints + address: faker.address.streetAddress(), + address_coordinates_lat: generateLatitude(48.2513, 60.0).toString(), + address_coordinates_long: generateLongitude(-139.0596, -114.0337).toString(), + cos_location_description: faker.lorem.sentence(), + cos_caller_name: faker.name.findName(), + cos_caller_email: faker.internet.email(), + caller_address: faker.address.streetAddress(), + cos_call_details: faker.lorem.paragraph(), + created_by_position: 'ECC COS_test', + created_by_username: faker.internet.userName(), + back_number_of_days: faker.datatype.number({ min: 0, max: 365 }).toString(), + back_number_of_hours: faker.datatype.number({ min: 0, max: 24 }).toString(), + back_number_of_minutes: faker.datatype.number({ min: 0, max: 60 }).toString(), + flag_COS: faker.random.arrayElement(['Yes', 'No']), + flag_AT: faker.random.arrayElement(['Yes', 'No']), + flag_UAT: faker.random.arrayElement(['Yes', 'No']), + }; +}; + +// Function to generate a single Complaint record - Note optional fields are not included in order to keep payload size down +// Params: +// complaint_identifier = the identifer to use for the complaint +const generateHWCRData = (complaint_identifier) => { + + const commonFields = generateCommonFields(complaint_identifier); // Get common fields + + return { + ...commonFields, + report_type: 'HWCR', + nature_of_complaint: faker.random.arrayElement(['Sightings', 'Food Conditioned', 'Confined', 'Human injury/death', 'Wildlife in trap']), + species: faker.random.arrayElement(['Black bear', 'Deer', 'Wolf', 'Moose', 'Cougar', 'Wolverine', 'Elk', 'Rattlesnake']), + attractants_list: faker.random.arrayElement(['BBQ', 'Crops', 'Pet Food', 'Beehive', 'Freezer', 'Pets', 'Garbage', 'Industrial Camp']), + }; +}; + +// Function to generate a single Complaint record - Note optional fields are not included in order to keep payload size down +// Params: +// complaint_identifier = the identifer to use for the complaint +const generateERSData = (complaint_identifier, owner) => { + + const commonFields = generateCommonFields(complaint_identifier); // Get common fields + let violationType = faker.random.arrayElement(['Boating', 'Dumping', 'Fisheries ', 'Open Burning', 'Off-road vehicles (ORV)', 'Aquatic: Invasive Species']) + + if(owner === 'CEEB') { + violationType = faker.random.arrayElement(['Waste', 'Pesticide']) + } + + return { + ...commonFields, + report_type: 'ERS', + violation_type: violationType, + suspect_details: faker.lorem.paragraph(), + observe_violation: faker.random.arrayElement(['Yes', 'No']), + violation_in_progress: faker.random.arrayElement(['Yes', 'No']), + }; +}; + +// Function to generate a single Complaint record - Note optional fields are not included in order to keep payload size down +// Params: +// complaint_identifier = the identifer to use for the complaint +const generateGIRData = (complaint_identifier) => { + + const commonFields = generateCommonFields(complaint_identifier); // Get common fields + +return { + ...commonFields, + report_type: 'GIR', + call_type_gir: faker.random.arrayElement(['CO Contact', 'CO Disposition', 'General Advice', 'Media', 'Query']), +}; +}; + +// Function to generate bulk data. Sequentially inserts complaints starting at a given number: HWCRs first, then ERS, the CEEB ERS, finally GIRs +// Params: +// year = the year prefix for the complaint +// num = the number of complaints to generate +// startingRecord = the sequence number to start at +const generateBulkData = (year, num, startingRecord) => { + let bulkData = []; + + //Distrubte the counts according to a realistic business breakdown + const HWCRcount = num*0.7; + const ERScountCOS = num*0.15; + const ERScountCEEB = num*0.10; + const GIRcount = num*0.05; + + for (let i = 0; i < HWCRcount; i++) { + let identifer = i + startingRecord; + let complaint_identifier = `${year}-${identifer.toString().padStart(6, '0')}`; + if(i === 0) { + console.log (`HWCR Complaint Series starts at: ${complaint_identifier}`) + } + bulkData.push(generateHWCRData(complaint_identifier)); + } + for (let i = 0; i < ERScountCOS; i++) { + let identifer = i + startingRecord + HWCRcount; // Add Starting Record and HWCRcount to i + let complaint_identifier = `${year}-${identifer.toString().padStart(6, '0')}`; + if(i === 0) { + console.log (`COS ERS Complaint Series starts at: ${complaint_identifier}`) + } + bulkData.push(generateERSData(complaint_identifier, 'COS')); + } + for (let i = 0; i < ERScountCEEB; i++) { + let identifer = i + startingRecord+ HWCRcount + ERScountCOS; // Add Starting Record, HWCRcount and ERScountCOS to i + let complaint_identifier = `${year}-${identifer.toString().padStart(6, '0')}`; + if(i === 0) { + console.log (`CEEB ERS Complaint Series starts at: ${complaint_identifier}`) + } + bulkData.push(generateERSData(complaint_identifier, 'CEEB')); + } + for (let i = 0; i < GIRcount; i++) { + let identifer = i + startingRecord + HWCRcount + ERScountCOS + ERScountCEEB; // Add Starting Record, HWCRcount and both ERScounts to i + let complaint_identifier = `${year}-${identifer.toString().padStart(6, '0')}`; + if(i === 0) { + console.log (`GIR Complaint Series starts at: ${complaint_identifier}`) + } + bulkData.push(generateGIRData(complaint_identifier)); + } + return bulkData; +}; + +// Uses bulk insert statements to put all the data into a single statement. Limit of 10K records +// Params: +// data = all the data to insert +const insertData = async (data) => { + // Create an insert query with placeholders for each value + const insertQuery = ` + INSERT INTO staging_complaint ( + staging_complaint_guid, + staging_status_code, + staging_activity_code, + complaint_identifier, + complaint_jsonb, + create_user_id, + create_utc_timestamp, + update_user_id, + update_utc_timestamp + ) + VALUES + ${data.map((_, i) => `($${i * 9 + 1}, $${i * 9 + 2}, $${i * 9 + 3}, $${i * 9 + 4}, $${i * 9 + 5}, $${i * 9 + 6}, $${i * 9 + 7}, $${i * 9 + 8}, $${i * 9 + 9})`).join(',')} + `; + + const queryValues = data.flatMap((item) => { + const currentTimestamp = new Date().toISOString(); // Get the current timestamp + + return [ + faker.datatype.uuid(), // Unique ID for the complaint (staging_complaint_guid) + 'PENDING', // Placeholder for status (staging_status_code) + 'INSERT', // Placeholder for activity (staging_activity_code) + item.incident_number, // Complaint identifier + item, // Complaint JSON data + 'Bulk Data Load', // Created by user ID + currentTimestamp, // Created timestamp + 'Bulk Data Load', // Updated by user ID + currentTimestamp // Updated timestamp + ]; + }); + + try { + // Perform the bulk insert + await pg.none(insertQuery, queryValues); + console.log('Data insertion complete.'); + } catch (error) { + console.error('Error inserting data:', error); + } +}; + +// Adjust these as required. +// No more than 10k at a time or the insert will blow up. +const yearPrefix = 25; +const numRecords = 10000; +const startingRecord = 100000; + +// Validate parameters +if (numRecords > 10000) { + console.log ("Please adjust the numRecords parameter to be less than 10000"); + return; +} +const records = generateBulkData(yearPrefix, numRecords, startingRecord); +insertData(records); diff --git a/backend/dataloader/location-enum.js b/backend/dataloader/location-enum.js new file mode 100644 index 000000000..88b963224 --- /dev/null +++ b/backend/dataloader/location-enum.js @@ -0,0 +1,159 @@ +const regions = { + "Skeena": { + "zones": { + "Bulkley-Cassiar": { + "districts": { + "Atlin": ["Atlin"], + "Dease Lake": ["Bell II North"], + "Smithers": ["Bell II South"] + } + }, + "North Coast": { + "districts": { + "Terrace": ["Terrace", "Klemtu", "Usk"] + } + + } + } + }, + "West Coast": { + "zones": { + "Central Island": { + "districts": { + "Port Alberni": ["Ahousat", "Bamfield", "Beaver Creek"] + } + }, + "North Island": { + "districts": { + "Port McNeill": ["Alert Bay", "Beaver Cove", "Bella Bella"] + } + }, + "South Island": { + "districts": { + "Duncan": ["Caycuse", "Chemainus"], + "Victoria": ["Central Saanich"] + } + } + } + }, + "Okanagan": { + "zones": { + "Central Okanagan": { + "districts": { + "Kelowna": ["Beaverdell", "Big White", "Black Mountain"] + } + }, + "North Okanagan": { + "districts": { + "Salmon Arm": ["Albert Canyon", "Arrowhead"], + "Vernon": ["Armstrong"] + } + }, + "South Okanagan": { + "districts": { + "Penticton": ["Bridesville", "Cawston"], + "Grand Forks": ["Christian Valley"] + } + } + } + }, + "Kootenay": { + "zones": { + "Columbia/Kootenay": { + "districts": { + "Invermere": ["Athalmer"], + "Golden": ["Blaeberry", "Brisco"] + } + }, + "East Kootenay": { + "districts": { + "Fernie": ["Baynes Lake"], + "Cranbrook": ["Bull River", "Coyote Creek"] + } + }, + "West Kootenay": { + "districts": { + "Nelson": ["Ainsworth"], + "Castlegar": ["Appledale", "Applegrove"] + } + } + } + }, + "South Coast": { + "zones": { + "Fraser North": { + "districts": { + "Mission/Maple Ridge": ["Albion", "Alvin", "Anmore"] + } + }, + "Fraser South": { + "districts": { + "Mission/Chilliwack": ["Abbotsford", "Agassiz"], + "Mission/Surrey": ["Aldergrove"] + } + }, + "Sea to Sky": { + "districts": { + "Squamish/Whistler": ["Birken", "Birkenhead Estates", "Devine"] + } + }, + "Sunshine Coast": { + "districts": { + "Powell River": ["Black Point", "Bliss Landing", "Blubber Bay"] + } + } + } + }, + "Omineca": { + "zones": { + "Nechako-Lakes": { + "districts": { + "Burns Lake": ["Burns Lake", "Clemretta"], + "Vanderhoof": ["Clucluz Lake - Brookside Resort West"] + } + }, + "Omineca": { + "districts": { + "Prince George": ["Aleza Lake", "Bear Lake", "Beaverly"] + } + } + } + }, + "Peace Liard": { + "zones": { + "North Peace": { + "districts": { + "Fort St. John": ["Altona", "Attachie", "Baldonell"] + } + }, + "South Peace": { + "districts": { + "Dawson Creek": ["Arras", "Bear Mountain"], + "Chetwynd": ["Beryl Prairie"] + } + } + } + }, + "Thompson Cariboo": { + "zones": { + "Thompson Nicola": { + "districts": { + "Kamloops": ["Adams Lake", "Anglemont"], + "Merritt": ["Ashcroft"] + } + }, + "Cariboo Chilcotin": { + "districts": { + "Williams Lake": ["140 Mile House", "Horsefly", "Likely"] + } + }, + "Cariboo Thompson": { + "districts": { + "Lillooet": ["Big Bar", "Pavillion", "Clinton"] + } + } + } + }, +}; + +module.exports = regions; \ No newline at end of file diff --git a/backend/package-lock.json b/backend/package-lock.json index bfa695027..d86579e13 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -75,12 +75,14 @@ "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-promise": "^6.1.1", + "faker": "^5.5.3", "istanbul-badges-readme": "^1.8.4", "jest": "^29.7.0", "jest-badges": "^0.1.3", "jest-fetch-mock": "^3.0.3", "jest-sonar-reporter": "^2.0.0", "lint-staged": "^13.1.0", + "pg-promise": "^11.10.2", "prettier": "^2.8.3", "source-map-support": "^0.5.20", "supertest": "^6.3.3", @@ -1786,15 +1788,15 @@ } }, "node_modules/@nestjs/platform-express": { - "version": "10.4.4", - "resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-10.4.4.tgz", - "integrity": "sha512-y52q1MxhbHaT3vAgWd08RgiYon0lJgtTa8U6g6gV0KI0IygwZhDQFJVxnrRDUdxQGIP5CKHmfQu3sk9gTNFoEA==", + "version": "10.4.15", + "resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-10.4.15.tgz", + "integrity": "sha512-63ZZPkXHjoDyO7ahGOVcybZCRa7/Scp6mObQKjcX/fTEq1YJeU75ELvMsuQgc8U2opMGOBD7GVuc4DV0oeDHoA==", "dependencies": { "body-parser": "1.20.3", "cors": "2.8.5", - "express": "4.21.0", + "express": "4.21.2", "multer": "1.4.4-lts.1", - "tslib": "2.7.0" + "tslib": "2.8.1" }, "funding": { "type": "opencollective", @@ -1805,6 +1807,11 @@ "@nestjs/core": "^10.0.0" } }, + "node_modules/@nestjs/platform-express/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + }, "node_modules/@nestjs/schedule": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/@nestjs/schedule/-/schedule-4.1.1.tgz", @@ -2932,6 +2939,15 @@ "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", "dev": true }, + "node_modules/assert-options": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/assert-options/-/assert-options-0.8.2.tgz", + "integrity": "sha512-XaXoMxY0zuwAb0YuZjxIm8FeWvNq0aWNIbrzHhFjme8Smxw4JlPoyrAKQ6808k5UvQdhvnWqHZCphq5mXd4TDA==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/astral-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", @@ -3268,14 +3284,6 @@ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" }, - "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/builtins": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", @@ -3815,9 +3823,9 @@ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==" }, "node_modules/cookie": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", - "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", "engines": { "node": ">= 0.6" } @@ -3926,9 +3934,9 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -5066,16 +5074,16 @@ } }, "node_modules/express": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.0.tgz", - "integrity": "sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.6.0", + "cookie": "0.7.1", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", @@ -5089,7 +5097,7 @@ "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.10", + "path-to-regexp": "0.1.12", "proxy-addr": "~2.0.7", "qs": "6.13.0", "range-parser": "~1.2.1", @@ -5104,6 +5112,10 @@ }, "engines": { "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/express/node_modules/debug": { @@ -5120,9 +5132,9 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/express/node_modules/path-to-regexp": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", - "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==" + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==" }, "node_modules/external-editor": { "version": "3.1.0", @@ -5137,6 +5149,12 @@ "node": ">=4" } }, + "node_modules/faker": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/faker/-/faker-5.5.3.tgz", + "integrity": "sha512-wLTv2a28wjUyWkbnX7u/ABZBkUkIF2fCd73V6P2oFqEGEktDfzWx4UxrSqtPRw0xPRAcjeAOIiJWqZm3pP4u3g==", + "dev": true + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -7843,12 +7861,12 @@ } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -8312,11 +8330,6 @@ "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==" }, - "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", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -8490,21 +8503,22 @@ "integrity": "sha512-KG8UEiEVkR3wGEb4m5yZkVCzigAD+cVEJck2CzYZO37ZGJfctvVptVO192MwrtPhzONn6go8ylnOdMhKqi4nfg==" }, "node_modules/pg": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/pg/-/pg-8.10.0.tgz", - "integrity": "sha512-ke7o7qSTMb47iwzOSaZMfeR7xToFdkE71ifIipOAAaLIM0DYzfOAXlgFFmYUIE2BcJtvnVlGCID84ZzCegE8CQ==", - "dependencies": { - "buffer-writer": "2.0.0", - "packet-reader": "1.0.0", - "pg-connection-string": "^2.5.0", - "pg-pool": "^3.6.0", - "pg-protocol": "^1.6.0", + "version": "8.13.1", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.13.1.tgz", + "integrity": "sha512-OUir1A0rPNZlX//c7ksiu7crsGZTKSOXJPgtNiHGIlC9H0lO+NC6ZDYksSgBYY/thSWhnSRBv8w1lieNNGATNQ==", + "dependencies": { + "pg-connection-string": "^2.7.0", + "pg-pool": "^3.7.0", + "pg-protocol": "^1.7.0", "pg-types": "^2.1.0", "pgpass": "1.x" }, "engines": { "node": ">= 8.0.0" }, + "optionalDependencies": { + "pg-cloudflare": "^1.1.1" + }, "peerDependencies": { "pg-native": ">=3.0.1" }, @@ -8514,16 +8528,22 @@ } } }, + "node_modules/pg-cloudflare": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.1.1.tgz", + "integrity": "sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q==", + "optional": true + }, "node_modules/pg-connection-string": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.5.0.tgz", - "integrity": "sha512-r5o/V/ORTA6TmUnyWZR9nCj1klXCO2CEKNRlVuJptZe85QuhFayC7WeMic7ndayT5IRIR0S0xFxFi2ousartlQ==" + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.7.0.tgz", + "integrity": "sha512-PI2W9mv53rXJQEOb8xNR8lH7Hr+EKa6oJa38zsK0S/ky2er16ios1wLKhZyxzD7jUReiWokc9WK5nxSnC7W1TA==" }, "node_modules/pg-cursor": { - "version": "2.10.3", - "resolved": "https://registry.npmjs.org/pg-cursor/-/pg-cursor-2.10.3.tgz", - "integrity": "sha512-rDyBVoqPVnx/PTmnwQAYgusSeAKlTL++gmpf5klVK+mYMFEqsOc6VHHZnPKc/4lOvr4r6fiMuoxSFuBF1dx4FQ==", - "optional": true, + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/pg-cursor/-/pg-cursor-2.12.1.tgz", + "integrity": "sha512-V13tEaA9Oq1w+V6Q3UBIB/blxJrwbbr35/dY54r/86soBJ7xkP236bXaORUTVXUPt9B6Ql2BQu+uwQiuMfRVgg==", + "devOptional": true, "peer": true, "peerDependencies": { "pg": "^8" @@ -8537,27 +8557,54 @@ "node": ">=4.0.0" } }, + "node_modules/pg-minify": { + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/pg-minify/-/pg-minify-1.6.5.tgz", + "integrity": "sha512-u0UE8veaCnMfJmoklqneeBBopOAPG3/6DHqGVHYAhz8DkJXh9dnjPlz25fRxn4e+6XVzdOp7kau63Rp52fZ3WQ==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/pg-pool": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.6.0.tgz", - "integrity": "sha512-clFRf2ksqd+F497kWFyM21tMjeikn60oGDmqMT8UBrynEwVEX/5R5xd2sdvdo1cZCFlguORNpVuqxIj+aK4cfQ==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.7.0.tgz", + "integrity": "sha512-ZOBQForurqh4zZWjrgSwwAtzJ7QiRX0ovFkZr2klsen3Nm0aoh33Ls0fzfv3imeH/nw/O27cjdz5kzYJfeGp/g==", "peerDependencies": { "pg": ">=8.0" } }, + "node_modules/pg-promise": { + "version": "11.10.2", + "resolved": "https://registry.npmjs.org/pg-promise/-/pg-promise-11.10.2.tgz", + "integrity": "sha512-wK4yjxZdfxBmAMcs40q6IsC1SOzdLilc1yNvJqlbOjtm2syayqLDCt1JQ9lhS6yNSgVlGOQZT88yb/SADJmEBw==", + "dev": true, + "dependencies": { + "assert-options": "0.8.2", + "pg": "8.13.1", + "pg-minify": "1.6.5", + "spex": "3.4.0" + }, + "engines": { + "node": ">=14.0" + }, + "peerDependencies": { + "pg-query-stream": "4.7.1" + } + }, "node_modules/pg-protocol": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.6.0.tgz", - "integrity": "sha512-M+PDm637OY5WM307051+bsDia5Xej6d9IR4GwJse1qA1DIhiKlksvrneZOYQq42OM+spubpcNYEo2FcKQrDk+Q==" + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.7.0.tgz", + "integrity": "sha512-hTK/mE36i8fDDhgDFjy6xNOG+LCorxLG3WO17tku+ij6sVHXh1jQUJ8hYAnRhNla4QVD2H8er/FOjc/+EgC6yQ==" }, "node_modules/pg-query-stream": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/pg-query-stream/-/pg-query-stream-4.5.3.tgz", - "integrity": "sha512-ufa94r/lHJdjAm3+zPZEO0gXAmCb4tZPaOt7O76mjcxdL/HxwTuryy76km+u0odBBgtfdKFYq/9XGfiYeQF0yA==", - "optional": true, + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/pg-query-stream/-/pg-query-stream-4.7.1.tgz", + "integrity": "sha512-UMgsgn/pOIYsIifRySp59vwlpTpLADMK9HWJtq5ff0Z3MxBnPMGnCQeaQl5VuL+7ov4F96mSzIRIcz+Duo6OiQ==", + "devOptional": true, "peer": true, "dependencies": { - "pg-cursor": "^2.10.3" + "pg-cursor": "^2.12.1" }, "peerDependencies": { "pg": "^8" @@ -9610,6 +9657,15 @@ "node": ">=0.10.0" } }, + "node_modules/spex": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/spex/-/spex-3.4.0.tgz", + "integrity": "sha512-8JeZJ7QlEBnSj1W1fKXgbB2KUPA8k4BxFMf6lZX/c1ZagU/1b9uZWZK0yD6yjfzqAIuTNG4YlRmtMpQiXuohsg==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/split2": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", @@ -12266,15 +12322,22 @@ "requires": {} }, "@nestjs/platform-express": { - "version": "10.4.4", - "resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-10.4.4.tgz", - "integrity": "sha512-y52q1MxhbHaT3vAgWd08RgiYon0lJgtTa8U6g6gV0KI0IygwZhDQFJVxnrRDUdxQGIP5CKHmfQu3sk9gTNFoEA==", + "version": "10.4.15", + "resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-10.4.15.tgz", + "integrity": "sha512-63ZZPkXHjoDyO7ahGOVcybZCRa7/Scp6mObQKjcX/fTEq1YJeU75ELvMsuQgc8U2opMGOBD7GVuc4DV0oeDHoA==", "requires": { "body-parser": "1.20.3", "cors": "2.8.5", - "express": "4.21.0", + "express": "4.21.2", "multer": "1.4.4-lts.1", - "tslib": "2.7.0" + "tslib": "2.8.1" + }, + "dependencies": { + "tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + } } }, "@nestjs/schedule": { @@ -13161,6 +13224,12 @@ "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", "dev": true }, + "assert-options": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/assert-options/-/assert-options-0.8.2.tgz", + "integrity": "sha512-XaXoMxY0zuwAb0YuZjxIm8FeWvNq0aWNIbrzHhFjme8Smxw4JlPoyrAKQ6808k5UvQdhvnWqHZCphq5mXd4TDA==", + "dev": true + }, "astral-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", @@ -13404,11 +13473,6 @@ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" }, - "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==" - }, "builtins": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", @@ -13802,9 +13866,9 @@ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==" }, "cookie": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", - "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==" + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==" }, "cookie-signature": { "version": "1.0.6", @@ -13887,9 +13951,9 @@ } }, "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "requires": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -14706,16 +14770,16 @@ } }, "express": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.0.tgz", - "integrity": "sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng==", + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", "requires": { "accepts": "~1.3.8", "array-flatten": "1.1.1", "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.6.0", + "cookie": "0.7.1", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", @@ -14729,7 +14793,7 @@ "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.10", + "path-to-regexp": "0.1.12", "proxy-addr": "~2.0.7", "qs": "6.13.0", "range-parser": "~1.2.1", @@ -14757,9 +14821,9 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "path-to-regexp": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", - "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==" + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==" } } }, @@ -14773,6 +14837,12 @@ "tmp": "^0.0.33" } }, + "faker": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/faker/-/faker-5.5.3.tgz", + "integrity": "sha512-wLTv2a28wjUyWkbnX7u/ABZBkUkIF2fCd73V6P2oFqEGEktDfzWx4UxrSqtPRw0xPRAcjeAOIiJWqZm3pP4u3g==", + "dev": true + }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -16761,12 +16831,12 @@ "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==" }, "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "requires": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" } }, @@ -17095,11 +17165,6 @@ "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==" }, - "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==" - }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -17228,29 +17293,34 @@ "integrity": "sha512-KG8UEiEVkR3wGEb4m5yZkVCzigAD+cVEJck2CzYZO37ZGJfctvVptVO192MwrtPhzONn6go8ylnOdMhKqi4nfg==" }, "pg": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/pg/-/pg-8.10.0.tgz", - "integrity": "sha512-ke7o7qSTMb47iwzOSaZMfeR7xToFdkE71ifIipOAAaLIM0DYzfOAXlgFFmYUIE2BcJtvnVlGCID84ZzCegE8CQ==", - "requires": { - "buffer-writer": "2.0.0", - "packet-reader": "1.0.0", - "pg-connection-string": "^2.5.0", - "pg-pool": "^3.6.0", - "pg-protocol": "^1.6.0", + "version": "8.13.1", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.13.1.tgz", + "integrity": "sha512-OUir1A0rPNZlX//c7ksiu7crsGZTKSOXJPgtNiHGIlC9H0lO+NC6ZDYksSgBYY/thSWhnSRBv8w1lieNNGATNQ==", + "requires": { + "pg-cloudflare": "^1.1.1", + "pg-connection-string": "^2.7.0", + "pg-pool": "^3.7.0", + "pg-protocol": "^1.7.0", "pg-types": "^2.1.0", "pgpass": "1.x" } }, + "pg-cloudflare": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.1.1.tgz", + "integrity": "sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q==", + "optional": true + }, "pg-connection-string": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.5.0.tgz", - "integrity": "sha512-r5o/V/ORTA6TmUnyWZR9nCj1klXCO2CEKNRlVuJptZe85QuhFayC7WeMic7ndayT5IRIR0S0xFxFi2ousartlQ==" + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.7.0.tgz", + "integrity": "sha512-PI2W9mv53rXJQEOb8xNR8lH7Hr+EKa6oJa38zsK0S/ky2er16ios1wLKhZyxzD7jUReiWokc9WK5nxSnC7W1TA==" }, "pg-cursor": { - "version": "2.10.3", - "resolved": "https://registry.npmjs.org/pg-cursor/-/pg-cursor-2.10.3.tgz", - "integrity": "sha512-rDyBVoqPVnx/PTmnwQAYgusSeAKlTL++gmpf5klVK+mYMFEqsOc6VHHZnPKc/4lOvr4r6fiMuoxSFuBF1dx4FQ==", - "optional": true, + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/pg-cursor/-/pg-cursor-2.12.1.tgz", + "integrity": "sha512-V13tEaA9Oq1w+V6Q3UBIB/blxJrwbbr35/dY54r/86soBJ7xkP236bXaORUTVXUPt9B6Ql2BQu+uwQiuMfRVgg==", + "devOptional": true, "peer": true, "requires": {} }, @@ -17259,25 +17329,43 @@ "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==" }, + "pg-minify": { + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/pg-minify/-/pg-minify-1.6.5.tgz", + "integrity": "sha512-u0UE8veaCnMfJmoklqneeBBopOAPG3/6DHqGVHYAhz8DkJXh9dnjPlz25fRxn4e+6XVzdOp7kau63Rp52fZ3WQ==", + "dev": true + }, "pg-pool": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.6.0.tgz", - "integrity": "sha512-clFRf2ksqd+F497kWFyM21tMjeikn60oGDmqMT8UBrynEwVEX/5R5xd2sdvdo1cZCFlguORNpVuqxIj+aK4cfQ==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.7.0.tgz", + "integrity": "sha512-ZOBQForurqh4zZWjrgSwwAtzJ7QiRX0ovFkZr2klsen3Nm0aoh33Ls0fzfv3imeH/nw/O27cjdz5kzYJfeGp/g==", "requires": {} }, + "pg-promise": { + "version": "11.10.2", + "resolved": "https://registry.npmjs.org/pg-promise/-/pg-promise-11.10.2.tgz", + "integrity": "sha512-wK4yjxZdfxBmAMcs40q6IsC1SOzdLilc1yNvJqlbOjtm2syayqLDCt1JQ9lhS6yNSgVlGOQZT88yb/SADJmEBw==", + "dev": true, + "requires": { + "assert-options": "0.8.2", + "pg": "8.13.1", + "pg-minify": "1.6.5", + "spex": "3.4.0" + } + }, "pg-protocol": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.6.0.tgz", - "integrity": "sha512-M+PDm637OY5WM307051+bsDia5Xej6d9IR4GwJse1qA1DIhiKlksvrneZOYQq42OM+spubpcNYEo2FcKQrDk+Q==" + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.7.0.tgz", + "integrity": "sha512-hTK/mE36i8fDDhgDFjy6xNOG+LCorxLG3WO17tku+ij6sVHXh1jQUJ8hYAnRhNla4QVD2H8er/FOjc/+EgC6yQ==" }, "pg-query-stream": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/pg-query-stream/-/pg-query-stream-4.5.3.tgz", - "integrity": "sha512-ufa94r/lHJdjAm3+zPZEO0gXAmCb4tZPaOt7O76mjcxdL/HxwTuryy76km+u0odBBgtfdKFYq/9XGfiYeQF0yA==", - "optional": true, + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/pg-query-stream/-/pg-query-stream-4.7.1.tgz", + "integrity": "sha512-UMgsgn/pOIYsIifRySp59vwlpTpLADMK9HWJtq5ff0Z3MxBnPMGnCQeaQl5VuL+7ov4F96mSzIRIcz+Duo6OiQ==", + "devOptional": true, "peer": true, "requires": { - "pg-cursor": "^2.10.3" + "pg-cursor": "^2.12.1" } }, "pg-types": { @@ -18046,6 +18134,12 @@ } } }, + "spex": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/spex/-/spex-3.4.0.tgz", + "integrity": "sha512-8JeZJ7QlEBnSj1W1fKXgbB2KUPA8k4BxFMf6lZX/c1ZagU/1b9uZWZK0yD6yjfzqAIuTNG4YlRmtMpQiXuohsg==", + "dev": true + }, "split2": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", diff --git a/backend/package.json b/backend/package.json index 10260c0ce..2ccc84dda 100644 --- a/backend/package.json +++ b/backend/package.json @@ -106,12 +106,14 @@ "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-promise": "^6.1.1", + "faker": "^5.5.3", "istanbul-badges-readme": "^1.8.4", "jest": "^29.7.0", "jest-badges": "^0.1.3", "jest-fetch-mock": "^3.0.3", "jest-sonar-reporter": "^2.0.0", "lint-staged": "^13.1.0", + "pg-promise": "^11.10.2", "prettier": "^2.8.3", "source-map-support": "^0.5.20", "supertest": "^6.3.3",