diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index f9aecef9..00000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,239 +0,0 @@ -docker-latest-build: - image: docker:latest - stage: build - variables: - EXCLUDE_DB: "false" - BASE_IMAGE: "node:18-buster-slim" - services: - - docker:dind - before_script: - - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - script: - - | - BRANCH_PREFIX="$(if [ $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH ]; then echo ${CI_COMMIT_REF_SLUG} ; else echo 'latest'; fi)" - NO_DB_SUFIX="$(${EXCLUDE_DB} && echo '-no-db' || echo '')" - BASE_IMAGE_ARCH="$(echo ${BASE_IMAGE} | cut -d'/' -f1)" - BASE_IMAGE_TYPE="$(echo ${BASE_IMAGE} | cut -d'/' -f2)" - ARCH_TYPE="$(if [ $BASE_IMAGE_ARCH != $BASE_IMAGE_TYPE ]; then echo '-'${BASE_IMAGE_ARCH}; else echo ''; fi )" - - export IMAGE_NAME="$CI_REGISTRY_IMAGE:${BRANCH_PREFIX}${ARCH_TYPE}${NO_DB_SUFIX}" - echo "Running on branch '${CI_COMMIT_BRANCH}', Image: ${IMAGE_NAME}" ; - - - docker build --pull --build-arg EXCLUDE_DB="${EXCLUDE_DB}" --build-arg BASE_IMAGE="${BASE_IMAGE}" -t "${IMAGE_NAME}" . -f "Dockerfile" - - docker push "${IMAGE_NAME}" - rules: - - if: $CI_COMMIT_BRANCH != "master" && $CI_COMMIT_BRANCH != "main" && $CI_COMMIT_BRANCH != "dev" - when: never - - if: $CI_COMMIT_BRANCH - exists: - - Dockerfile - -docker-latest-no-db-build: - image: docker:latest - stage: build - variables: - EXCLUDE_DB: "true" - BASE_IMAGE: "node:18-buster-slim" - services: - - docker:dind - before_script: - - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - script: - - | - BRANCH_PREFIX="$(if [ $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH ]; then echo ${CI_COMMIT_REF_SLUG} ; else echo 'latest'; fi)" - NO_DB_SUFIX="$(${EXCLUDE_DB} && echo '-no-db' || echo '')" - BASE_IMAGE_ARCH="$(echo ${BASE_IMAGE} | cut -d'/' -f1)" - BASE_IMAGE_TYPE="$(echo ${BASE_IMAGE} | cut -d'/' -f2)" - ARCH_TYPE="$(if [ $BASE_IMAGE_ARCH != $BASE_IMAGE_TYPE ]; then echo '-'${BASE_IMAGE_ARCH}; else echo ''; fi )" - - export IMAGE_NAME="$CI_REGISTRY_IMAGE:${BRANCH_PREFIX}${ARCH_TYPE}${NO_DB_SUFIX}" - echo "Running on branch '${CI_COMMIT_BRANCH}', Image: ${IMAGE_NAME}" ; - - - docker build --pull --build-arg EXCLUDE_DB="${EXCLUDE_DB}" --build-arg BASE_IMAGE="${BASE_IMAGE}" -t "${IMAGE_NAME}" . -f "Dockerfile" - - docker push "${IMAGE_NAME}" - rules: - - if: $CI_COMMIT_BRANCH != "master" && $CI_COMMIT_BRANCH != "main" && $CI_COMMIT_BRANCH != "dev" - when: never - - if: $CI_COMMIT_BRANCH - exists: - - Dockerfile - -docker-arm32v7-build: - image: docker:latest - stage: build - variables: - EXCLUDE_DB: "false" - BASE_IMAGE: "arm32v7/node:18-buster-slim" - services: - - docker:dind - before_script: - - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - script: - - | - BRANCH_PREFIX="$(if [ $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH ]; then echo ${CI_COMMIT_REF_SLUG} ; else echo 'latest'; fi)" - NO_DB_SUFIX="$(${EXCLUDE_DB} && echo '-no-db' || echo '')" - BASE_IMAGE_ARCH="$(echo ${BASE_IMAGE} | cut -d'/' -f1)" - BASE_IMAGE_TYPE="$(echo ${BASE_IMAGE} | cut -d'/' -f2)" - ARCH_TYPE="$(if [ $BASE_IMAGE_ARCH != $BASE_IMAGE_TYPE ]; then echo '-'${BASE_IMAGE_ARCH}; else echo ''; fi )" - - export IMAGE_NAME="$CI_REGISTRY_IMAGE:${BRANCH_PREFIX}${ARCH_TYPE}${NO_DB_SUFIX}" - echo "Running on branch '${CI_COMMIT_BRANCH}', Image: ${IMAGE_NAME}" ; - - - docker build --pull --build-arg EXCLUDE_DB="${EXCLUDE_DB}" --build-arg BASE_IMAGE="${BASE_IMAGE}" -t "${IMAGE_NAME}" . -f "Dockerfile" - - docker push "${IMAGE_NAME}" - rules: - - if: $CI_COMMIT_BRANCH != "master" && $CI_COMMIT_BRANCH != "main" && $CI_COMMIT_BRANCH != "dev" - when: never - - if: $CI_COMMIT_BRANCH - exists: - - Dockerfile - -docker-arm32v7-no-db-build: - image: docker:latest - stage: build - variables: - EXCLUDE_DB: "true" - BASE_IMAGE: "arm32v7/node:18-buster-slim" - services: - - docker:dind - before_script: - - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - script: - - | - BRANCH_PREFIX="$(if [ $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH ]; then echo ${CI_COMMIT_REF_SLUG} ; else echo 'latest'; fi)" - NO_DB_SUFIX="$(${EXCLUDE_DB} && echo '-no-db' || echo '')" - BASE_IMAGE_ARCH="$(echo ${BASE_IMAGE} | cut -d'/' -f1)" - BASE_IMAGE_TYPE="$(echo ${BASE_IMAGE} | cut -d'/' -f2)" - ARCH_TYPE="$(if [ $BASE_IMAGE_ARCH != $BASE_IMAGE_TYPE ]; then echo '-'${BASE_IMAGE_ARCH}; else echo ''; fi )" - - export IMAGE_NAME="$CI_REGISTRY_IMAGE:${BRANCH_PREFIX}${ARCH_TYPE}${NO_DB_SUFIX}" - echo "Running on branch '${CI_COMMIT_BRANCH}', Image: ${IMAGE_NAME}" ; - - - docker build --pull --build-arg EXCLUDE_DB="${EXCLUDE_DB}" --build-arg BASE_IMAGE="${BASE_IMAGE}" -t "${IMAGE_NAME}" . -f "Dockerfile" - - docker push "${IMAGE_NAME}" - rules: - - if: $CI_COMMIT_BRANCH != "master" && $CI_COMMIT_BRANCH != "main" && $CI_COMMIT_BRANCH != "dev" - when: never - - if: $CI_COMMIT_BRANCH - exists: - - Dockerfile - -docker-arm64v8-build: - image: docker:latest - stage: build - variables: - EXCLUDE_DB: "false" - BASE_IMAGE: "arm64v8/node:18-buster-slim" - services: - - docker:dind - before_script: - - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - script: - - | - BRANCH_PREFIX="$(if [ $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH ]; then echo ${CI_COMMIT_REF_SLUG} ; else echo 'latest'; fi)" - NO_DB_SUFIX="$(${EXCLUDE_DB} && echo '-no-db' || echo '')" - BASE_IMAGE_ARCH="$(echo ${BASE_IMAGE} | cut -d'/' -f1)" - BASE_IMAGE_TYPE="$(echo ${BASE_IMAGE} | cut -d'/' -f2)" - ARCH_TYPE="$(if [ $BASE_IMAGE_ARCH != $BASE_IMAGE_TYPE ]; then echo '-'${BASE_IMAGE_ARCH}; else echo ''; fi )" - - export IMAGE_NAME="$CI_REGISTRY_IMAGE:${BRANCH_PREFIX}${ARCH_TYPE}${NO_DB_SUFIX}" - echo "Running on branch '${CI_COMMIT_BRANCH}', Image: ${IMAGE_NAME}" ; - - - docker build --pull --build-arg EXCLUDE_DB="${EXCLUDE_DB}" --build-arg BASE_IMAGE="${BASE_IMAGE}" -t "${IMAGE_NAME}" . -f "Dockerfile" - - docker push "${IMAGE_NAME}" - rules: - - if: $CI_COMMIT_BRANCH != "master" && $CI_COMMIT_BRANCH != "main" && $CI_COMMIT_BRANCH != "dev" - when: never - - if: $CI_COMMIT_BRANCH - exists: - - Dockerfile - -docker-arm64v8-no-db-build: - image: docker:latest - stage: build - variables: - EXCLUDE_DB: "true" - BASE_IMAGE: "arm64v8/node:18-buster-slim" - services: - - docker:dind - before_script: - - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - script: - - | - BRANCH_PREFIX="$(if [ $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH ]; then echo ${CI_COMMIT_REF_SLUG} ; else echo 'latest'; fi)" - NO_DB_SUFIX="$(${EXCLUDE_DB} && echo '-no-db' || echo '')" - BASE_IMAGE_ARCH="$(echo ${BASE_IMAGE} | cut -d'/' -f1)" - BASE_IMAGE_TYPE="$(echo ${BASE_IMAGE} | cut -d'/' -f2)" - ARCH_TYPE="$(if [ $BASE_IMAGE_ARCH != $BASE_IMAGE_TYPE ]; then echo '-'${BASE_IMAGE_ARCH}; else echo ''; fi )" - - export IMAGE_NAME="$CI_REGISTRY_IMAGE:${BRANCH_PREFIX}${ARCH_TYPE}${NO_DB_SUFIX}" - echo "Running on branch '${CI_COMMIT_BRANCH}', Image: ${IMAGE_NAME}" ; - - - docker build --pull --build-arg EXCLUDE_DB="${EXCLUDE_DB}" --build-arg BASE_IMAGE="${BASE_IMAGE}" -t "${IMAGE_NAME}" . -f "Dockerfile" - - docker push "${IMAGE_NAME}" - rules: - - if: $CI_COMMIT_BRANCH != "master" && $CI_COMMIT_BRANCH != "main" && $CI_COMMIT_BRANCH != "dev" - when: never - - if: $CI_COMMIT_BRANCH - exists: - - Dockerfile - -docker-nvidia-build: - image: docker:latest - stage: build - variables: - EXCLUDE_DB: "false" - BASE_IMAGE: "nvidia/cuda:11.7.1-cudnn8-runtime-ubuntu22.04" - services: - - docker:dind - before_script: - - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - script: - - | - BRANCH_PREFIX="$(if [ $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH ]; then echo ${CI_COMMIT_REF_SLUG} ; else echo 'latest'; fi)" - NO_DB_SUFIX="$(${EXCLUDE_DB} && echo '-no-db' || echo '')" - BASE_IMAGE_ARCH="$(echo ${BASE_IMAGE} | cut -d'/' -f1)" - BASE_IMAGE_TYPE="$(echo ${BASE_IMAGE} | cut -d'/' -f2)" - ARCH_TYPE="$(if [ $BASE_IMAGE_ARCH != $BASE_IMAGE_TYPE ]; then echo '-'${BASE_IMAGE_ARCH}; else echo ''; fi )" - - export IMAGE_NAME="$CI_REGISTRY_IMAGE:${BRANCH_PREFIX}${ARCH_TYPE}${NO_DB_SUFIX}" - echo "Running on branch '${CI_COMMIT_BRANCH}', Image: ${IMAGE_NAME}" ; - - - docker build --pull --build-arg EXCLUDE_DB="${EXCLUDE_DB}" --build-arg BASE_IMAGE="${BASE_IMAGE}" -t "${IMAGE_NAME}" . -f "Dockerfile" - - docker push "${IMAGE_NAME}" - rules: - - if: $CI_COMMIT_BRANCH != "master" && $CI_COMMIT_BRANCH != "main" && $CI_COMMIT_BRANCH != "dev" - when: never - - if: $CI_COMMIT_BRANCH - exists: - - Dockerfile - -docker-nvidia-no-db-build: - image: docker:latest - stage: build - variables: - EXCLUDE_DB: "true" - BASE_IMAGE: "nvidia/cuda:11.7.1-cudnn8-runtime-ubuntu22.04" - services: - - docker:dind - before_script: - - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - script: - - | - BRANCH_PREFIX="$(if [ $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH ]; then echo ${CI_COMMIT_REF_SLUG} ; else echo 'latest'; fi)" - NO_DB_SUFIX="$(${EXCLUDE_DB} && echo '-no-db' || echo '')" - BASE_IMAGE_ARCH="$(echo ${BASE_IMAGE} | cut -d'/' -f1)" - BASE_IMAGE_TYPE="$(echo ${BASE_IMAGE} | cut -d'/' -f2)" - ARCH_TYPE="$(if [ $BASE_IMAGE_ARCH != $BASE_IMAGE_TYPE ]; then echo '-'${BASE_IMAGE_ARCH}; else echo ''; fi )" - - export IMAGE_NAME="$CI_REGISTRY_IMAGE:${BRANCH_PREFIX}${ARCH_TYPE}${NO_DB_SUFIX}" - echo "Running on branch '${CI_COMMIT_BRANCH}', Image: ${IMAGE_NAME}" ; - - - docker build --pull --build-arg EXCLUDE_DB="${EXCLUDE_DB}" --build-arg BASE_IMAGE="${BASE_IMAGE}" -t "${IMAGE_NAME}" . -f "Dockerfile" - - docker push "${IMAGE_NAME}" - rules: - - if: $CI_COMMIT_BRANCH != "master" && $CI_COMMIT_BRANCH != "main" && $CI_COMMIT_BRANCH != "dev" - when: never - - if: $CI_COMMIT_BRANCH - exists: - - Dockerfile diff --git a/Docker/README.md b/Docker/README.md index 815ebd8f..a8d5eae5 100644 --- a/Docker/README.md +++ b/Docker/README.md @@ -1,3 +1,9 @@ +⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐ +# OUTDATED, Newest Docker method here : +https://gitlab.com/Shinobi-Systems/ShinobiDocker +⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐ + + # Install Shinobi with Docker **Warning :** It is recommended that you have a dedicated machine for Shinobi even if you intend to use Docker. If you are willing to install directly on the operating system please consider installing Ubuntu 22.04 and using the Ninja Way. diff --git a/definitions/base.js b/definitions/base.js index 94ff4532..ee77123f 100644 --- a/definitions/base.js +++ b/definitions/base.js @@ -5750,6 +5750,10 @@ module.exports = function(s,config,lang){ name: lang['Can Get Monitors'], value: 'get_monitors', }, + { + name: lang['Can Edit Monitors'], + value: 'edit_monitors', + }, { name: lang['Can Control Monitors'], value: 'control_monitors', @@ -6606,7 +6610,7 @@ module.exports = function(s,config,lang){ { "name": "ip", "field": lang['IP Address'], - "description": lang[lang["fieldTextIp"]], + "description": lang.fieldTextIp, "example": "10.1.100.1-10.1.100.254", }, { @@ -6618,11 +6622,13 @@ module.exports = function(s,config,lang){ { "name": "user", "field": lang['Camera Username'], + "description": lang.fieldTextOnvifScanCameraUsername, "placeholder": "Can be left blank.", }, { "name": "pass", "field": lang['Camera Password'], + "description": lang.fieldTextOnvifScanCameraPassword, "fieldType": "password", }, { @@ -6631,8 +6637,13 @@ module.exports = function(s,config,lang){ { "fieldType": "btn", "forForm": true, - "class": `btn-block btn-success`, - "btnContent": `${lang['Search']}`, + "class": `btn-success start-scan`, + "btnContent": `${lang['Search']}`, + }, + { + "fieldType": "btn", + "class": `btn-danger stop-scan d-none`, + "btnContent": `${lang['Stop']}`, }, { "fieldType": "btn", @@ -6653,18 +6664,7 @@ module.exports = function(s,config,lang){ "class": "onvif_result row", } ] - }, - "Other Devices": { - "name": lang['Other Devices'], - "color": "danger", - "section-pre-class": "col-md-12", - "info": [ - { - "fieldType": "div", - "class": "onvif_result_error row", - } - ] - }, + } } }, "Camera Probe": { @@ -7696,6 +7696,11 @@ module.exports = function(s,config,lang){ pageOpen: 'liveGrid', addUl: true, ulItems: [ + { + label: lang['Open Wall Display'], + class: 'open-wallview cursor-pointer', + color: 'blue', + }, { label: lang['Open All Monitors'], class: 'open-all-monitors cursor-pointer', @@ -9191,6 +9196,12 @@ module.exports = function(s,config,lang){
+
+ + +
`, }, diff --git a/languages/en_CA.json b/languages/en_CA.json index 82388252..418c67fa 100644 --- a/languages/en_CA.json +++ b/languages/en_CA.json @@ -20,6 +20,8 @@ "Geolocation": "Geolocation", "fieldTextGeolocation": "The map coordinates of this camera in the real world. This will plot a point for your camera on the Monitor Map.", "playUntilVideoEnd": "Play until video end", + "Monitor Saved": "Monitor Saved", + "Auto Placement": "Auto Placement", "Unmute": "Unmute", "byUser": "by user", "accountDeleted": "Account Deleted", @@ -135,7 +137,12 @@ "Viewing Server Stats": "Viewing Server Stats", "Connected Users": "Connected Users", "Registered Servers": "Registered Servers", + "Open All": "Open All", + "Close All": "Close All", "Open All Monitors": "Open All Monitors", + "Open Wall Display": "Open Wall Display", + "New Wall Display": "New Wall Display", + "openWallViewInfo": "Open Monitors in the top right of this window.", "Accounts": "Accounts", "Settings": "Settings", "Count Objects only inside Regions": "Count Objects only inside Regions", @@ -298,6 +305,7 @@ "Can Get Logs": "Can Get Logs", "Can Authenticate Websocket": "Can Authenticate Websocket", "Can Control Monitors": "Can Control Monitors", + "Can Edit Monitors": "Can Edit Monitors", "Can View Snapshots": "Can View Snapshots", "Can View Streams": "Can View Streams", "Can View Videos": "Can View Videos", @@ -417,6 +425,8 @@ "Audio streams only": "Audio streams only", "Audio stream only from first feed": "Audio stream only from first feed", "sorryNothingWasFound": "Sorry, nothing was found.", + "fieldTextOnvifScanCameraUsername": "Commas are used to separate potential usernames to attempt while scanning. If you have multiple usernames and passwords then all variations will be attempted.", + "fieldTextOnvifScanCameraPassword": "Commas and @ are not allowed in passwords. Commas are used to separate potential passwords to attempt while scanning. Double click this field to reveal the currently set value.", "Event Occurred": "Event Occurred", "ONVIF Port": "ONVIF Port", "ONVIF Scanner": "ONVIF Scanner", @@ -424,9 +434,10 @@ "ONVIFEventsNotAvailable": "ONVIF Events not Available", "ONVIFEventsNotAvailableText1": "This service may not be available for this camera or ONVIF has not initialized yet.", "ONVIFnotCompliantProfileT": "Camera is not ONVIF Profile T Compliant", - "ONVIFErr400": "Found ONVIF port but authorization failed when retrieving the Stream URL. Check username and password used for scan. Make sure your camera time and server time are synced.", + "ONVIFErr400": "Bad Request. Found ONVIF port but failed when retrieving the Stream URL. Check username and password used for scan. Make sure your camera time and server time are synced.", "ONVIFErr405": "Method Not Allowed. Check username and password used for scan.", "ONVIFErr404": "Not Found. This may just be the web panel for a network device.", + "ONVIFErr401": "Not Authorized. Found ONVIF port but authorization failed when retrieving the Stream URL. Check username and password used for scan. Make sure your camera time and server time are synced.", "Scan Settings": "Scan Settings", "ONVIFnote": "Discover ONVIF devices on networks outside your own or leave it blank to scan your current network.
Username and Password can be left blank.", "Range or Single": "Range or Single", @@ -1426,6 +1437,7 @@ "Select atleast one monitor to delete": "Select atleast one monitor to delete.", "Use Built-In": "Use Built-In", "Add Cameras": "Add Cameras", + "addAllCamerasText": "You are about to add 9001 cameras to your system.", "Add Camera": "Add Camera", "Delete Camera": "Delete Camera", "Event Rules": "Event Rules", @@ -1448,7 +1460,7 @@ "Original Choice": "Original Choice", "Legacy Webhook": "Legacy Webhook", "eventFilterActionText": "These are the actions that occur from the filter conditions that have succeeded. \"Original Choice\" refers to the option you had chosen in your Monitor's Settings.", - "eventFilterEnableNoticeText": "This is an advnaced feature. Ensure you have enabled \"Event Filters\" in your Detector Settings section. If you cannot see this option toggle Simple to Advanced in the bottom right corner of the Monitor Settings.", + "eventFilterEnableNoticeText": "This is an advanced feature. Ensure you have enabled \"Event Filters\" in your Detector Settings section. If you cannot see this option toggle Simple to Advanced in the bottom right corner of the Monitor Settings.", "Telegram": "Telegram", "Before": "Before", "After": "After", diff --git a/libs/auth.js b/libs/auth.js index 9372f0f5..43a4b88f 100644 --- a/libs/auth.js +++ b/libs/auth.js @@ -106,6 +106,8 @@ module.exports = function(s,config,lang){ permissions: {} }) callback(err,user,true) + }else{ + callback(lang['Not Authorized'],null,false) } }) } diff --git a/libs/auth/ldap.js b/libs/auth/ldap.js index 784d500b..bca774fd 100644 --- a/libs/auth/ldap.js +++ b/libs/auth/ldap.js @@ -150,8 +150,8 @@ module.exports = (s,config,lang,app) => { alternateLoginsFieldList[alternateLoginsFieldList.length - 1].btns.push({ "class": `btn-info ldap-sign-in`, "btnContent": `   ${lang['Link LDAP Account']}`, - }) - s.customAutoLoadTree['LibsJs'].push(`dash2.ldapSignIn.js`) + }); + s.customAutoLoadTree['AssetsJs'].push(`bs5.ldapSignIn.js`) }) /** * API : Add Token Window (Sign-In to LDAP) (GET) diff --git a/libs/childNode/utils.js b/libs/childNode/utils.js index cc51aef6..14c85044 100644 --- a/libs/childNode/utils.js +++ b/libs/childNode/utils.js @@ -179,7 +179,7 @@ module.exports = function(s,config,lang,app,io){ } s.insertDatabaseRow(monitorConfig,insert) s.insertCompletedVideoExtensions.forEach(function(extender){ - extender(monitorConfig,insert) + extender(activeMonitor, monitorConfig, insert) }) //purge over max s.purgeDiskForGroup(data.ke) diff --git a/libs/commander/workerv2.js b/libs/commander/workerv2.js index c0e49207..1c4bfa0b 100644 --- a/libs/commander/workerv2.js +++ b/libs/commander/workerv2.js @@ -8,6 +8,9 @@ let config = workerData.config let lang = workerData.lang let sslInfo = config.ssl || {} let remoteConnectionPort = config.easyRemotePort || (sslInfo && sslInfo.port && (sslInfo.enabled !== false) ? sslInfo.port : config.port || 8080) +const multipleSelected = config.p2pHostMultiSelected instanceof Array && config.p2pHostMultiSelected.length > 0; +const p2pApiKey = config.p2pApiKey; +const p2pServerList = config.p2pServerList; const net = require("net") const bson = require('bson') const WebSocket = require('cws') @@ -28,7 +31,16 @@ const s = { parentPort.on('message',(data) => { switch(data.f){ case'init': - initialize() + if(multipleSelected){ + for(aSelection of config.p2pHostMultiSelected){ + clearAllTimeouts(aSelection) + initialize(aSelection) + } + }else{ + const singleSelection = config.p2pHostSelected; + clearAllTimeouts(singleSelection) + initialize(singleSelection) + } break; case'exit': s.debugLog('Closing P2P Connection...') @@ -36,11 +48,11 @@ parentPort.on('message',(data) => { break; } }) -var socketCheckTimer = null -var heartbeatTimer = null -var heartBeatCheckTimout = null -var onClosedTimeout = null -let stayDisconnected = false +var socketCheckTimer = {} +var heartbeatTimer = {} +var heartBeatCheckTimout = {} +var onClosedTimeout = {} +let stayDisconnected = {} const requestConnections = {} const requestConnectionsData = {} function getRequestConnection(requestId){ @@ -48,29 +60,28 @@ function getRequestConnection(requestId){ write: () => {} } } -function clearAllTimeouts(){ - clearInterval(heartbeatTimer) - clearTimeout(heartBeatCheckTimout) - clearTimeout(onClosedTimeout) +function clearAllTimeouts(p2pServerAddress){ + clearInterval(heartbeatTimer[p2pServerAddress]) + clearTimeout(heartBeatCheckTimout[p2pServerAddress]) + clearTimeout(onClosedTimeout[p2pServerAddress]) } function startConnection(p2pServerAddress,subscriptionId){ let tunnelToP2P - stayDisconnected = false + stayDisconnected[p2pServerAddress] = false const allMessageHandlers = [] async function startWebsocketConnection(key,callback){ s.debugLog(`startWebsocketConnection EXECUTE`,new Error()) - console.log('P2P : Connecting to Konekta P2P Server...') function createWebsocketConnection(){ - clearAllTimeouts() return new Promise((resolve,reject) => { try{ - stayDisconnected = true + stayDisconnected[p2pServerAddress] = true if(tunnelToP2P)tunnelToP2P.close() }catch(err){ console.log(err) } tunnelToP2P = new WebSocket(p2pServerAddress); - stayDisconnected = false; + console.log('P2P : Connecting to Konekta P2P Server :', p2pServerAddress) + stayDisconnected[p2pServerAddress] = false; tunnelToP2P.on('open', function(){ resolve(tunnelToP2P) }) @@ -81,7 +92,7 @@ function startConnection(p2pServerAddress,subscriptionId){ }) tunnelToP2P.on('close', () => { console.log(`P2P Connection Closed!`) - clearAllTimeouts() + clearAllTimeouts(p2pServerAddress) // onClosedTimeout = setTimeout(() => { // disconnectedConnection(); // },5000) @@ -95,8 +106,8 @@ function startConnection(p2pServerAddress,subscriptionId){ }) } - clearInterval(socketCheckTimer) - socketCheckTimer = setInterval(() => { + clearInterval(socketCheckTimer[p2pServerAddress]) + socketCheckTimer[p2pServerAddress] = setInterval(() => { // s.debugLog('Tunnel Ready State :',tunnelToP2P.readyState) if(tunnelToP2P.readyState !== 1){ s.debugLog('Tunnel NOT Ready! Reconnecting...') @@ -106,10 +117,10 @@ function startConnection(p2pServerAddress,subscriptionId){ }) } function disconnectedConnection(code,reason){ - s.debugLog('stayDisconnected',stayDisconnected) + s.debugLog('stayDisconnected',stayDisconnected[p2pServerAddress]) clearAllTimeouts() s.debugLog('DISCONNECTED!') - if(stayDisconnected)return; + if(stayDisconnected[p2pServerAddress])return; s.debugLog('RESTARTING!') setTimeout(() => { if(tunnelToP2P && tunnelToP2P.readyState !== 1)startWebsocketConnection() @@ -122,8 +133,8 @@ function startConnection(p2pServerAddress,subscriptionId){ subscriptionId: subscriptionId, restrictedTo: config.p2pRestrictedTo || [], }) - clearInterval(heartbeatTimer) - heartbeatTimer = setInterval(() => { + clearInterval(heartbeatTimer[p2pServerAddress]) + heartbeatTimer[p2pServerAddress] = setInterval(() => { sendDataToTunnel({ f: 'ping', }) @@ -158,7 +169,7 @@ function startConnection(p2pServerAddress,subscriptionId){ // remotesocket.off('close') // requestConnections[requestId].end() // } - const responseTunnel = await getResponseTunnel(requestId) + const responseTunnel = await getResponseTunnel(requestId, p2pServerAddress) let remotesocket = new net.Socket(); remotesocket.on('ready',() => { remotesocket.write(initData.buffer) @@ -196,8 +207,8 @@ function startConnection(p2pServerAddress,subscriptionId){ } } function refreshHeartBeatCheck(){ - clearTimeout(heartBeatCheckTimout) - heartBeatCheckTimout = setTimeout(() => { + clearTimeout(heartBeatCheckTimout[p2pServerAddress]) + heartBeatCheckTimout[p2pServerAddress] = setTimeout(() => { startWebsocketConnection() },1000 * 10 * 1.5) } @@ -304,15 +315,16 @@ function startConnection(p2pServerAddress,subscriptionId){ onIncomingMessage('disconnect',function(data,requestId){ console.log(`FAILED LICENSE CHECK ON P2P`) const retryLater = data && data.retryLater; - stayDisconnected = !retryLater + stayDisconnected[p2pServerAddress] = !retryLater if(retryLater)console.log(`Retrying P2P Later...`) }) + return tunnelToP2P; } const responseTunnels = {} -async function getResponseTunnel(originalRequestId){ - return responseTunnels[originalRequestId] || await createResponseTunnel(originalRequestId) +async function getResponseTunnel(originalRequestId, p2pServerAddress){ + return responseTunnels[originalRequestId] || await createResponseTunnel(originalRequestId, p2pServerAddress) } -function createResponseTunnel(originalRequestId){ +function createResponseTunnel(originalRequestId, p2pServerAddress){ const responseTunnelMessageHandlers = [] function onMessage(key,callback){ responseTunnelMessageHandlers.push({ @@ -321,7 +333,7 @@ function createResponseTunnel(originalRequestId){ }) } return new Promise((resolve,reject) => { - const responseTunnel = new WebSocket(config.selectedHost); + const responseTunnel = new WebSocket(p2pServerAddress); function sendToResponseTunnel(data){ responseTunnel.send( bson.serialize(data) @@ -374,10 +386,9 @@ function closeResponseTunnel(originalRequestId){ s.debugLog('closeResponseTunnel',err) } } -function initialize(){ - const selectedP2PServerId = config.p2pServerList[config.p2pHostSelected] ? config.p2pHostSelected : Object.keys(config.p2pServerList)[0] - const p2pServerDetails = config.p2pServerList[selectedP2PServerId] +function initialize(p2pHostSelected){ + const selectedP2PServerId = p2pServerList[p2pHostSelected] ? p2pHostSelected : Object.keys(p2pServerList)[0] + const p2pServerDetails = p2pServerList[selectedP2PServerId] const selectedHost = `${p2pServerDetails.secure ? `wss` : 'ws'}://` + p2pServerDetails.host + ':' + p2pServerDetails.p2pPort - config.selectedHost = selectedHost - startConnection(selectedHost,config.p2pApiKey) + startConnection(selectedHost,p2pApiKey) } diff --git a/libs/control/ptz.js b/libs/control/ptz.js index 8c2508d0..6c14b27f 100644 --- a/libs/control/ptz.js +++ b/libs/control/ptz.js @@ -389,12 +389,14 @@ module.exports = function(s,config,lang){ },callback) } const moveToHomePosition = (options,callback) => { - const nonStandardOnvif = s.group[options.ke].rawMonitorConfigurations[options.id].details.onvif_non_standard === '1' + const groupKey = options.ke + const monitorId = options.mid || options.id + const nonStandardOnvif = s.group[groupKey].rawMonitorConfigurations[monitorId].details.onvif_non_standard === '1' const profileToken = options.ProfileToken || "__CURRENT_TOKEN" return s.runOnvifMethod({ auth: { - ke: options.ke, - id: options.id, + ke: groupKey, + id: monitorId, service: 'ptz', action: 'gotoHomePosition', }, @@ -537,5 +539,6 @@ module.exports = function(s,config,lang){ moveToPresetPosition, moveCameraPtzToMatrix, setHomePositionPreset, + moveToHomePosition, } } diff --git a/libs/cron.js b/libs/cron.js index 55e9065c..f728c93e 100644 --- a/libs/cron.js +++ b/libs/cron.js @@ -50,7 +50,7 @@ module.exports = (s,config,lang) => { } break; default: - s.systemLog('CRON.js MESSAGE : ',data) + s.debugLog('CRON.js MESSAGE : ',data) break; } }) diff --git a/libs/events/onvif.js b/libs/events/onvif.js index 90d524e6..f06527b2 100644 --- a/libs/events/onvif.js +++ b/libs/events/onvif.js @@ -1,116 +1,106 @@ -module.exports = function(s,config,lang){ +function hasOnvifEventsEnabled(monitorConfig) { + return monitorConfig.details.is_onvif === '1' && monitorConfig.details.onvif_events === '1'; +} + +module.exports = function (s, config, lang) { + const {Cam} = require("onvif"); const { triggerEvent, - } = require('./utils.js')(s,config,lang) - const onvifEvents = require("node-onvif-events"); - const onvifEventIds = [] - const onvifEventControllers = {} - const startMotion = async (onvifId,monitorConfig) => { - const groupKey = monitorConfig.ke - const monitorId = monitorConfig.mid - const onvifIdKey = `${monitorConfig.mid}${monitorConfig.ke}` - const controlBaseUrl = monitorConfig.details.control_base_url || s.buildMonitorUrl(monitorConfig, true) - const controlURLOptions = s.cameraControlOptionsFromUrl(controlBaseUrl,monitorConfig) - const onvifPort = parseInt(monitorConfig.details.onvif_port) || 8000 - let options = { - id: onvifId, - hostname: controlURLOptions.host, - username: controlURLOptions.username, - password: controlURLOptions.password, - port: onvifPort, - }; - const detector = onvifEventControllers[onvifIdKey] || await onvifEvents.MotionDetector.create(options.id, options); - function onvifEventLog(type,data){ - s.userLog({ - ke: groupKey, - mid: monitorId - },{ - type: type, - msg: data - }) - } - onvifEventLog(`ONVIF Event Detection Listening!`) - try { - detector.listen((motion) => { - if (motion) { - onvifEventLog(`ONVIF Event Detected!`) - triggerEvent({ - f: 'trigger', - id: monitorId, - ke: groupKey, - details:{ - plug: 'onvifEvent', - name: 'onvifEvent', - reason: 'motion', - confidence: 100, - // reason: 'object', - // matrices: [matrix], - // imgHeight: img.height, - // imgWidth: img.width, - } - }) - } else { - onvifEventLog(`ONVIF Event Stopped`) - } - }); - } catch(e) { - console.error(e) - onvifEventLog(`ONVIF Event Error`,e) - } - return detector - } - async function initializeOnvifEvents(monitorConfig){ - const monitorMode = monitorConfig.mode - const groupKey = monitorConfig.ke - const monitorId = monitorConfig.mid - const hasOnvifEventsEnabled = monitorConfig.details.is_onvif === '1' && monitorConfig.details.onvif_events === '1'; - if(hasOnvifEventsEnabled){ - const onvifIdKey = `${monitorConfig.mid}${monitorConfig.ke}` - let onvifId = onvifEventIds.indexOf(onvifIdKey) - if(onvifEventIds.indexOf(onvifIdKey) === -1){ - onvifId = onvifEventIds.length; - onvifEventIds.push(onvifIdKey); - } - try{ - onvifEventControllers[onvifIdKey].close() - s.debugLog('ONVIF Event Module Warning : This could cause a memory leak?') - }catch(err){ - s.debugLog('ONVIF Event Module Error', err.stack); - } - try{ - delete(onvifEventControllers[onvifIdKey]) - s.debugLog('Can ',monitorConfig.name, 'read ONVIF Events?',monitorMode !== 'stop') - if(monitorMode !== 'stop'){ - s.debugLog('Starting ONVIF Event Reader on ',monitorConfig.name) - const detector = await startMotion(onvifId,monitorConfig) - onvifEventControllers[onvifIdKey] = detector; - } - }catch(err){ - console.error(err) - s.debugLog('ONVIF Event Module Start Error', err.stack); - } + } = require('./utils.js')(s, config, lang) + + function handleEvent(event, monitorConfig, onvifEventLog) { + const eventValue = event.message?.message?.data?.simpleItem?.$?.Value; + if (eventValue === false) { + onvifEventLog(`ONVIF Event Stopped`, `topic ${event.topic?._}`) + return } + onvifEventLog(`ONVIF Event Detected!`, `topic ${event.topic?._}`) + triggerEvent({ + f: 'trigger', + id: monitorConfig.mid, + ke: monitorConfig.ke, + details: { + plug: 'onvifEvent', + name: 'onvifEvent', + reason: event.topic?._, + confidence: 100, + [event.message?.message?.data?.simpleItem?.$?.Name]: eventValue + } + }) } + + function configureOnvif(monitorConfig, onvifEventLog) { + const controlBaseUrl = monitorConfig.details.control_base_url || s.buildMonitorUrl(monitorConfig, true) + const controlURLOptions = s.cameraControlOptionsFromUrl(controlBaseUrl, monitorConfig) + const onvifPort = parseInt(monitorConfig.details.onvif_port) || 8000 + + const options = { + hostname: controlURLOptions.host, + username: controlURLOptions.username, + password: controlURLOptions.password, + port: onvifPort, + }; + + return new Cam(options, function (error) { + if (error) { + onvifEventLog(`ONVIF Event Error`,e) + return + } + this.on('event', function (event) { + handleEvent(event, monitorConfig, onvifEventLog); + }) + + }) + } + + const cams = {}; + + function initializeOnvifEvents(monitorConfig) { + monitorConfig.key = `${monitorConfig.mid}${monitorConfig.ke}` + + const onvifEventLog = function onvifEventLog(type, data) { + s.userLog({ + ke: monitorConfig.key, + mid: monitorConfig.mid + }, { + type: type, + msg: data + }) + } + + if (!hasOnvifEventsEnabled(monitorConfig)) { + cams[monitorConfig.key]?.removeAllListeners('event') + return + } + if (cams[monitorConfig.key]) { + onvifEventLog("ONVIF already listening to events") + return; + } + + cams[monitorConfig.key] = configureOnvif(monitorConfig,onvifEventLog); + } + s.onMonitorStart((monitorConfig) => { initializeOnvifEvents(monitorConfig) }) + const connectionInfoArray = s.definitions["Monitor Settings"].blocks["Detector"].info connectionInfoArray.splice(2, 0, { - "name": "detail=onvif_events", - "field": lang['ONVIF Events'], - "default": "0", - "form-group-class": "h_onvif_input h_onvif_1", - "form-group-class-pre-layer": "h_det_input h_det_1", - "fieldType": "select", - "possible": [ - { - "name": lang.No, - "value": "0" - }, - { - "name": lang.Yes, - "value": "1" - } - ] + "name": "detail=onvif_events", + "field": lang['ONVIF Events'], + "default": "0", + "form-group-class": "h_onvif_input h_onvif_1", + "form-group-class-pre-layer": "h_det_input h_det_1", + "fieldType": "select", + "possible": [ + { + "name": lang.No, + "value": "0" + }, + { + "name": lang.Yes, + "value": "1" + } + ] }); } diff --git a/libs/events/utils.js b/libs/events/utils.js index a4d5cfad..429b5f84 100644 --- a/libs/events/utils.js +++ b/libs/events/utils.js @@ -83,6 +83,7 @@ module.exports = (s,config,lang) => { && detailString.matrices[0] && detailString.matrices[0].tag; newString = newString + .replace(/{{CONFIDENCE}}/g,d.details.confidence) .replace(/{{TIME}}/g,d.currentTimestamp) .replace(/{{REGION_NAME}}/g,d.details.name) .replace(/{{SNAP_PATH}}/g,s.dir.streams+d.ke+'/'+d.id+'/s.jpg') diff --git a/libs/ffmpeg/builders.js b/libs/ffmpeg/builders.js index eca1fe1c..905b11b9 100644 --- a/libs/ffmpeg/builders.js +++ b/libs/ffmpeg/builders.js @@ -428,7 +428,7 @@ module.exports = (s,config,lang) => { } if(!videoCodecisCopy || outputRequiresEncoding){ if(videoWidth && videoHeight)streamFlags.push(`-s ${videoWidth}x${videoHeight}`) - if(videoFps && streamType === 'mjpeg' || streamType === 'b64'){ + if(videoFps && streamType === 'mjpeg' || streamType === 'b64' || videoFps && !videoCodecisCopy){ streamFilters.push(`fps=${videoFps}`) } } @@ -495,7 +495,7 @@ module.exports = (s,config,lang) => { const isCudaEnabled = hasCudaEnabled(e) const videoFlags = [] const videoFilters = [] - const inputMap = buildInputMap(e,e.details.input_map_choices.stream) + const inputMap = buildInputMap(e,e.details.input_map_choices.snap) const { videoWidth, videoHeight } = validateDimensions(e.details.snap_scale_x,e.details.snap_scale_y) if(inputMap)videoFlags.push(inputMap) if(e.details.snap_vf)videoFilters.push(e.details.snap_vf) diff --git a/libs/monitor.js b/libs/monitor.js index 33b456f6..233b10ae 100644 --- a/libs/monitor.js +++ b/libs/monitor.js @@ -196,7 +196,7 @@ module.exports = function(s,config,lang){ var iconImageFile = streamDir + 'icon.jpg' const snapRawFilters = monitor.details.cust_snap_raw if(snapRawFilters)outputOptions.push(snapRawFilters); - var ffmpegCmd = splitForFFMPEG(`-y -loglevel warning ${isDetectorStream ? '-live_start_index 2' : ''} -re ${inputOptions.join(' ')} -stimeout 4000000 -i "${url}" ${outputOptions.join(' ')} -f image2 -an -frames:v 1 "${temporaryImageFile}"`) + var ffmpegCmd = splitForFFMPEG(`-y -loglevel warning ${isDetectorStream ? '-live_start_index 2' : ''} -re ${inputOptions.join(' ')} -timeout 4000000 -i "${url}" ${outputOptions.join(' ')} -f image2 -an -frames:v 1 "${temporaryImageFile}"`) try{ await fs.promises.mkdir(streamDir, {recursive: true}, (err) => {s.debugLog(err)}) }catch(err){ @@ -796,6 +796,7 @@ module.exports = function(s,config,lang){ [ 'auth_socket', 'get_monitors', + 'edit_monitors', 'control_monitors', 'get_logs', 'watch_stream', diff --git a/libs/monitor/utils.js b/libs/monitor/utils.js index 6fe21d25..c45a5630 100644 --- a/libs/monitor/utils.js +++ b/libs/monitor/utils.js @@ -1,15 +1,15 @@ -const fs = require('fs'); -const URL = require('url'); -const events = require('events'); -const Mp4Frag = require('mp4frag'); -const treekill = require('tree-kill'); -const exec = require('child_process').exec; -const spawn = require('child_process').spawn; -const connectionTester = require('connection-tester') -const SoundDetection = require('shinobi-sound-detection') -const streamViewerCountTimeouts = {} -const { createQueueAwaited } = require('../common.js') module.exports = (s,config,lang) => { + const fs = require('fs'); + const URL = require('url'); + const events = require('events'); + const Mp4Frag = require('mp4frag'); + const treekill = require('tree-kill'); + const exec = require('child_process').exec; + const spawn = require('child_process').spawn; + const connectionTester = require('connection-tester') + const SoundDetection = require('shinobi-sound-detection') + const streamViewerCountTimeouts = {} + const { createQueueAwaited } = require('../common.js') const { applyPartialToConfiguration, getWarningChangesForMonitor, @@ -29,6 +29,7 @@ module.exports = (s,config,lang) => { } = require('../events/utils.js')(s,config,lang) const { setHomePositionPreset, + moveToHomePosition, } = require('../control/ptz.js')(s,config,lang) const { scanForOrphanedVideos, @@ -498,7 +499,20 @@ module.exports = (s,config,lang) => { const groupKey = e.ke const monitorId = e.mid || e.id const activeMonitor = getActiveMonitor(groupKey,monitorId); + const monitorConfig = copyMonitorConfiguration(groupKey,monitorId); + const streamType = monitorConfig.details.stream_type; + const analyzeDuration = (parseInt(monitorConfig.details.aduration) / 1000) || 10000; + let initialHeartBeat = null + if(streamType !== 'useSubstream'){ + initialHeartBeat = setTimeout(() => { + resetStreamCheck({ + ke: groupKey, + mid: monitorId, + }) + }, analyzeDuration); + } activeMonitor.spawn_exit = async function(){ + clearTimeout(initialHeartBeat) if(activeMonitor.isStarted === true){ if(e.details.loglevel !== 'quiet'){ s.userLog(e,{type:lang['Process Unexpected Exit'],msg:{msg:lang.unexpectedExitText,cmd:activeMonitor.ffmpeg}}); @@ -508,7 +522,6 @@ module.exports = (s,config,lang) => { forceCheck: true, checkMax: 2 }) - const monitorConfig = copyMonitorConfiguration(groupKey,monitorId); s.onMonitorUnexpectedExitExtensions.forEach(function(extender){ extender(monitorConfig,e) }) @@ -1707,7 +1720,8 @@ module.exports = (s,config,lang) => { activeMonitor.errorFatalCount = 0; delete(activeMonitor.childNode) if(e.details.detector_ptz_follow === '1'){ - setHomePositionPreset(e) + // setHomePositionPreset(e) + moveToHomePosition(e) } try{ await launchMonitorProcesses(e) @@ -1778,6 +1792,36 @@ module.exports = (s,config,lang) => { const streamDir = s.dir.streams + options.ke + '/' + options.mid + '/' return streamDir } + function removeSenstiveInfoFromMonitorConfig(monitorConfig){ + monitorConfig.protocol = '' + monitorConfig.host = '' + monitorConfig.path = '' + monitorConfig.port = '' + monitorConfig.details.muser = '' + monitorConfig.details.mpass = '' + monitorConfig.details.auto_host = '' + monitorConfig.details.rtmp_key = '' + monitorConfig.details.notes = '' + monitorConfig.details.tv_channel_id = '' + monitorConfig.details.tv_channel_group_title = '' + monitorConfig.details.control_base_url = '' + monitorConfig.details.cust_input = '' + monitorConfig.details.cust_stream = '' + monitorConfig.details.cust_snap = '' + monitorConfig.details.cust_snap_raw = '' + monitorConfig.details.cust_record = '' + monitorConfig.details.cust_record = '' + monitorConfig.details.cust_detect = '' + monitorConfig.details.cust_detect_object = '' + monitorConfig.details.cust_sip_record = '' + monitorConfig.details.custom_output = '' + monitorConfig.details.detector_cascades = '' + monitorConfig.details.stream_channels = '' + monitorConfig.details.input_maps = '' + delete(monitorConfig.details.input_map_choices) + delete(monitorConfig.details.substream) + return monitorConfig + } return { monitorStop, monitorIdle, @@ -1809,5 +1853,6 @@ module.exports = (s,config,lang) => { getActiveViewerCount: getActiveViewerCount, setTimedActiveViewerForHttp: setTimedActiveViewerForHttp, attachMainProcessHandlers: attachMainProcessHandlers, + removeSenstiveInfoFromMonitorConfig, } } diff --git a/libs/notification.js b/libs/notification.js index a8ad9c48..9b76cdb5 100644 --- a/libs/notification.js +++ b/libs/notification.js @@ -18,11 +18,11 @@ module.exports = function(s,config,lang){ ){ require('./notifications/email.js')(s,config,lang,getSnapshot) } + require('./notifications/webhook.js')(s,config,lang,getSnapshot) require('./notifications/emailByUser.js')(s,config,lang,getSnapshot) require('./notifications/discordBot.js')(s,config,lang,getSnapshot) require('./notifications/telegram.js')(s,config,lang,getSnapshot) require('./notifications/pushover.js')(s,config,lang,getSnapshot) - require('./notifications/webhook.js')(s,config,lang,getSnapshot) require('./notifications/mqtt.js')(s,config,lang,getSnapshot) require('./notifications/matrix.js')(s,config,lang,getSnapshot) } diff --git a/libs/notifications/webhook.js b/libs/notifications/webhook.js index b133deef..9d618e52 100644 --- a/libs/notifications/webhook.js +++ b/libs/notifications/webhook.js @@ -25,41 +25,33 @@ module.exports = function(s,config,lang,getSnapshot){ }) }) } - const doPostMethod = s.group[groupKey].init.global_webhook_method === 'post'; + const doPostMethod = s.group[groupKey].init.global_webhook_method === 'POST'; // const includeSnapshot = s.group[groupKey].init.global_webhook_include_image === '1'; const webhookInfoData = { info: sendBody, files: [], } - if(files){ - const formData = new FormData(); + const formData = new FormData(); + if(files && doPostMethod){ files.forEach(async (file,n) => { + const fileName = file.name switch(file.type){ case'video': // video cannot be sent this way unless POST - if(doPostMethod){ - const fileName = file.name - formData.append(`file${n + 1}`, file.attachment, { - contentType: 'video/mp4', - name: fileName, - filename: fileName, - }); - webhookInfoData.files.push(fileName) - } + formData.append(`file${n + 1}`, file.attachment, { + contentType: 'video/mp4', + name: fileName, + filename: fileName, + }); + webhookInfoData.files.push(fileName) break; case'photo': - if(doPostMethod){ - const fileName = file.name - formData.append(`file${n + 1}`, file.attachment, { - contentType: 'image/jpeg', - name: fileName, - filename: fileName, - }); - webhookInfoData.files.push(fileName) - }else{ - const base64StringofImage = file.attachment.toString('base64') - webhookInfoData.files.push(base64StringofImage) - } + formData.append(`file${n + 1}`, file.attachment, { + contentType: 'image/jpeg', + name: fileName, + filename: fileName, + }); + webhookInfoData.files.push(fileName) break; } }) diff --git a/libs/scanners.js b/libs/scanners.js index af570cdf..e78197b8 100644 --- a/libs/scanners.js +++ b/libs/scanners.js @@ -1,16 +1,34 @@ module.exports = function(s,config,lang,app,io){ + const { + scanStatus, + runOnvifScanner, + stopOnvifScanner, + } = require('./scanners/utils.js')(s,config,lang) const { ffprobe, } = require('./ffmpeg/utils.js')(s,config,lang) - const { - runOnvifScanner, - } = require('./scanners/utils.js')(s,config,lang) const onWebSocketConnection = async (cn) => { const tx = function(z){if(!z.ke){z.ke=cn.ke;};cn.emit('f',z);} cn.on('f',(d) => { switch(d.f){ + case'onvif_scan_reconnect': + tx({f: 'onvif_scan_current', devices: Object.values(scanStatus.allSuccessful), isScanning: scanStatus.isActive}) + break; + case'onvif_stop': + stopOnvifScanner() + tx({f: 'onvif_scan_stopped'}) + break; case'onvif': - runOnvifScanner(d,tx) + const groupKey = `${cn.ke}` + runOnvifScanner(d, (data) => { + const response = { f: 'onvif', ...data } + s.tx(response, 'GRP_' + cn.ke) + }, (data) => { + const response = { f: 'onvif', ff: 'failed_capture', ...data } + s.tx(response, 'GRP_' + cn.ke) + }).then((responseList) => { + s.tx({ f: 'onvif_scan_complete' }, 'GRP_' + cn.ke) + }) break; } }) @@ -40,4 +58,60 @@ module.exports = function(s,config,lang,app,io){ }) },res,req); }) + /** + * API : ONVIF Scanner RUN + */ + app.get(config.webPaths.apiPrefix+':auth/onvifScanner/:ke/scan',function (req,res){ + s.auth(req.params,function(user){ + const { + isRestricted, + isRestrictedApiKey, + apiKeyPermissions, + } = s.checkPermission(user); + if( + isRestrictedApiKey && apiKeyPermissions.control_monitors_disallowed + ){ + s.closeJsonResponse(res,{ + ok: false, + msg: lang['Not Authorized'] + }); + return + } + const groupKey = req.params.ke; + stopOnvifScanner() + s.closeJsonResponse(res, { ok: true }); + },res,req); + }) + /** + * API : ONVIF Scanner STOP + */ + app.get(config.webPaths.apiPrefix+':auth/onvifScanner/:ke/scan/stop',function (req,res){ + s.auth(req.params,function(user){ + const { + isRestricted, + isRestrictedApiKey, + apiKeyPermissions, + } = s.checkPermission(user); + if( + isRestrictedApiKey && apiKeyPermissions.control_monitors_disallowed + ){ + s.closeJsonResponse(res,{ + ok: false, + msg: lang['Not Authorized'] + }); + return + } + const groupKey = req.params.ke; + runOnvifScanner(d, (data) => { + const response = { f: 'onvif', ...data } + s.tx(response, 'GRP_' + groupKey) + }, (data) => { + const response = { f: 'onvif', ff: 'failed_capture', ...data } + s.tx(response, 'GRP_' + groupKey) + }).then((responseList) => { + s.tx({ f: 'onvif_scan_complete' }, 'GRP_' + groupKey) + s.closeJsonResponse(res, responseList) + }) + },res,req); + }) } diff --git a/libs/scanners/utils.js b/libs/scanners/utils.js index 7169911b..c6e4a7ef 100644 --- a/libs/scanners/utils.js +++ b/libs/scanners/utils.js @@ -1,202 +1,377 @@ var os = require('os'); +const async = require('async'); const onvif = require("shinobi-onvif"); const { addCredentialsToUrl, stringContains, getBuffer, } = require('../common.js') +const scanStatus = { + current: [], + allSuccessful: {}, + cancelPromises: null, + abortController: null +}; + module.exports = (s,config,lang) => { const ipRange = (start_ip, end_ip) => { - var startLong = toLong(start_ip); - var endLong = toLong(end_ip); - if (startLong > endLong) { - var tmp = startLong; - startLong = endLong - endLong = tmp; - } - var rangeArray = []; - var i; - for (i = startLong; i <= endLong; i++) { - rangeArray.push(fromLong(i)); - } - return rangeArray; - } - const portRange = (lowEnd,highEnd) => { - var list = []; - for (var i = lowEnd; i <= highEnd; i++) { + const startLong = toLong(start_ip); + const endLong = toLong(end_ip); + if (startLong > endLong) { + const tmp = startLong; + startLong = endLong; + endLong = tmp; + } + const rangeArray = []; + for (let i = startLong; i <= endLong; i++) { + rangeArray.push(fromLong(i)); + } + return rangeArray; + }; + + const portRange = (lowEnd, highEnd) => { + const list = []; + for (let i = lowEnd; i <= highEnd; i++) { list.push(i); } return list; - } - //toLong taken from NPM package 'ip' - const toLong = (ip) => { - var ipl = 0; - ip.split('.').forEach(function(octet) { - ipl <<= 8; - ipl += parseInt(octet); - }); - return(ipl >>> 0); - } - //fromLong taken from NPM package 'ip' - const fromLong = (ipl) => { - return ((ipl >>> 24) + '.' + - (ipl >> 16 & 255) + '.' + - (ipl >> 8 & 255) + '.' + - (ipl & 255) ); - } - const runOnvifScanner = (options,foundCameraCallback) => { - var ip = options.ip.replace(/ /g,'') - var ports = options.port.replace(/ /g,'') - if(options.ip === ''){ - var interfaces = os.networkInterfaces() - var addresses = [] - for (var k in interfaces) { - for (var k2 in interfaces[k]) { - var address = interfaces[k][k2] - if (address.family === 'IPv4' && !address.internal) { - addresses.push(address.address) - } - } - } - const addressRange = [] - addresses.forEach(function(address){ - if(address.indexOf('0.0.0')>-1){return false} - var addressPrefix = address.split('.') - delete(addressPrefix[3]); - addressPrefix = addressPrefix.join('.') - addressRange.push(`${addressPrefix}1-${addressPrefix}254`) - }) - ip = addressRange.join(',') - } - if(ports === ''){ - ports = '80,8080,8000,7575,8081,9080,8090,8999,8899' - } - if(ports.indexOf('-') > -1){ - ports = ports.split('-') - var portRangeStart = ports[0] - var portRangeEnd = ports[1] - ports = portRange(portRangeStart,portRangeEnd); - }else{ - ports = ports.split(',') - } - var ipList = options.ipList - var onvifUsername = options.user || '' - var onvifPassword = options.pass || '' - ip.split(',').forEach(function(addressRange){ - var ipRangeStart = addressRange[0] - var ipRangeEnd = addressRange[1] - if(addressRange.indexOf('-')>-1){ - addressRange = addressRange.split('-'); - ipRangeStart = addressRange[0] - ipRangeEnd = addressRange[1] - }else{ - ipRangeStart = addressRange - ipRangeEnd = addressRange - } - if(!ipList){ - ipList = ipRange(ipRangeStart,ipRangeEnd); - }else{ - ipList = ipList.concat(ipRange(ipRangeStart,ipRangeEnd)) - } - }) - var hitList = [] - ipList.forEach((ipEntry,n) => { - ports.forEach((portEntry,nn) => { - hitList.push({ - xaddr : 'http://' + ipEntry + ':' + portEntry + '/onvif/device_service', - user : onvifUsername, - pass : onvifPassword, - ip: ipEntry, - port: portEntry, - }) - }) - }) - var responseList = [] - hitList.forEach(async (camera) => { - try{ - var device = new onvif.OnvifDevice(camera) - var info = await device.init() - var date = await device.services.device.getSystemDateAndTime() - var stream = await device.services.media.getStreamUri({ - ProfileToken : device.current_profile.token, - Protocol : 'RTSP' - }) + }; - var cameraResponse = { - ip: camera.ip, - port: camera.port, - info: info, - date: date, - uri: stream.data.GetStreamUriResponse.MediaUri.Uri + const toLong = (ip) => { + let ipl = 0; + ip.split('.').forEach(function(octet) { + ipl <<= 8; + ipl += parseInt(octet); + }); + return (ipl >>> 0); + }; + + const fromLong = (ipl) => { + return ((ipl >>> 24) + '.' + + (ipl >> 16 & 255) + '.' + + (ipl >> 8 & 255) + '.' + + (ipl & 255)); + }; + + const getNetworkAddresses = () => { + const interfaces = os.networkInterfaces(); + const addresses = []; + for (const k in interfaces) { + for (const k2 in interfaces[k]) { + const address = interfaces[k][k2]; + if (address.family === 'IPv4' && !address.internal) { + addresses.push(address.address); } - try{ - const camPtzConfigs = (await device.services.ptz.getConfigurations()).data.GetConfigurationsResponse - if( - camPtzConfigs.PTZConfiguration && - ( - camPtzConfigs.PTZConfiguration.PanTiltLimits || - camPtzConfigs.PTZConfiguration.ZoomLimits - ) - ){ - cameraResponse.isPTZ = true - } - }catch(err){ - s.debugLog(err) - } - responseList.push(cameraResponse) - var imageSnap - try{ - const snapUri = addCredentialsToUrl({ - username: onvifUsername, - password: onvifPassword, - url: (await device.services.media.getSnapshotUri({ - ProfileToken : device.current_profile.token, - })).data.GetSnapshotUriResponse.MediaUri.Uri, - }); - imageSnap = (await getBuffer(snapUri)).toString('base64'); - }catch(err){ - s.debugLog(err) - } - if(foundCameraCallback)foundCameraCallback(Object.assign(cameraResponse,{f: 'onvif', snapShot: imageSnap})) - }catch(err){ - const searchError = (find) => { - return stringContains(find,err.message,true) - } - var foundDevice = false - var errorMessage = '' - switch(true){ - //ONVIF camera found but denied access - case searchError('400'): //Bad Request - Sender not Authorized - foundDevice = true - errorMessage = lang.ONVIFErr400 - break; - case searchError('405'): //Method Not Allowed - foundDevice = true - errorMessage = lang.ONVIFErr405 - break; - //Webserver exists but undetermined if IP Camera - case searchError('404'): //Not Found - foundDevice = true - errorMessage = lang.ONVIFErr404 - break; - } - if(foundDevice && foundCameraCallback){ - foundCameraCallback({ - f: 'onvif', - ff: 'failed_capture', - ip: camera.ip, - port: camera.port, - error: errorMessage - }) - } - if(config.debugLogVerbose)s.debugLog(err); } - }) - return responseList + } + return addresses; + }; + + const getAddressRange = (addresses) => { + const addressRange = []; + addresses.forEach((address) => { + if (address.indexOf('0.0.0') > -1) return; + const addressPrefix = address.split('.').slice(0, 3).join('.'); + addressRange.push(`${addressPrefix}.1-${addressPrefix}.254`); + }); + return addressRange.join(','); + }; + + const getPorts = (ports) => { + if (ports === '') { + return '80,8080,8000,7575,8081,9080,8090,8999,8899'.split(','); + } + if (ports.indexOf('-') > -1) { + const [start, end] = ports.split('-'); + return portRange(start, end); + } + return ports.split(','); + }; + + const getIpList = (ip) => { + const ipList = []; + ip.split(',').forEach((range) => { + const [start, end] = range.indexOf('-') > -1 ? range.split('-') : [range, range]; + ipList.push(...ipRange(start, end)); + }); + return ipList; + }; + + const createHitList = (ipList, ports, onvifUsername = '', onvifPassword = '') => { + const hitList = []; + const usernameVariants = onvifUsername.split(','); + const passwordVariants = onvifPassword.split(','); + for (const username of usernameVariants) { + for (const password of passwordVariants) { + hitList.push(...ipList.flatMap((ipEntry) => + ports.map((portEntry) => ({ + xaddr: `http://${ipEntry}:${portEntry}/onvif/device_service`, + user: username, + pass: password, + ip: ipEntry, + port: portEntry, + })) + )); + } + } + return hitList; + }; + + const takeSnapshot = async (cameraResponse, device) => { + try { + const snapUri = addCredentialsToUrl({ + username: cameraResponse.user, + password: cameraResponse.pass, + url: (await device.services.media.getSnapshotUri({ ProfileToken: device.current_profile.token })).data.GetSnapshotUriResponse.MediaUri.Uri, + }); + const imgBuffer = await getBuffer(snapUri); + cameraResponse.snapShot = imgBuffer.toString('base64'); + } catch (err) { + console.error('Failed to get snapshot via ONVIF:', err); + } + return cameraResponse; } + + const fetchCameraDetails = async (camera, onvifUsername, onvifPassword, foundCameraCallback, failedCameraCallback) => { + const previousSuccess = scanStatus.allSuccessful[camera.ip]; + if (previousSuccess) { + // console.log('FOUND PREVIOUS', camera.ip); + foundCameraCallback(previousSuccess); + return; + } + try { + const device = new onvif.OnvifDevice(camera); + const info = await device.init(); + const stream = await device.services.media.getStreamUri({ + ProfileToken: device.current_profile.token, + Protocol: 'RTSP' + }); + + const cameraResponse = { + ip: camera.ip, + port: camera.port, + user: camera.user, + pass: camera.pass, + info: info, + uri: stream.data.GetStreamUriResponse.MediaUri.Uri + }; + + try { + const camPtzConfigs = (await device.services.ptz.getConfigurations()).data.GetConfigurationsResponse; + if (camPtzConfigs.PTZConfiguration && (camPtzConfigs.PTZConfiguration.PanTiltLimits || camPtzConfigs.PTZConfiguration.ZoomLimits)) { + cameraResponse.isPTZ = true; + } + } catch (err) { + console.error(er) + // s.debugLog(err); + } + await takeSnapshot(cameraResponse, device) + scanStatus.allSuccessful[camera.ip] = cameraResponse; + foundCameraCallback(cameraResponse); + + return cameraResponse; + } catch (err) { + return handleCameraError(camera, err, failedCameraCallback); + } + }; + + const handleCameraError = (camera, err, failedCameraCallback) => { + const previousSuccess = scanStatus.allSuccessful[camera.ip]; + if (previousSuccess) { + // console.log('FOUND PREVIOUS AFTER ERROR', camera.ip); + return previousSuccess; + } + const searchError = (find) => stringContains(find, err.message, true); + const commonIgnoredErrors = ['ECONNREFUSED', 'socket hang up']; + let foundDevice = false; + let errorMessage = ''; + + switch (true) { + case searchError('ECONNREFUSED'): + errorMessage = `ECONNREFUSED`; + return {refused: true} + break; + case searchError('TIMEDOUT'): + foundDevice = true; + errorMessage = lang.ONVIFErr401; + break; + case searchError('401'): + foundDevice = true; + errorMessage = lang.ONVIFErr401; + break; + case searchError('400'): + foundDevice = true; + errorMessage = lang.ONVIFErr400; + break; + case searchError('405'): + foundDevice = true; + errorMessage = lang.ONVIFErr405; + break; + case searchError('404'): + foundDevice = true; + errorMessage = lang.ONVIFErr404; + break; + default: + break; + } + + if (foundDevice) { + const cameraResponse = { + ip: camera.ip, + port: camera.port, + error: errorMessage, + failedConnection: true, + }; + failedCameraCallback(cameraResponse); + return cameraResponse; + } + + return null; + }; + + function isValidOnvifResult(result) { + return result.info || result.uri; + } + + function detectAndReplaceReolinkRTSP(camera, url){ + const possibilities = [`/h264Preview_01_main`, `/h265Preview_01_main`] + for(possible of possibilities){ + // console.log(url, possible, url.indexOf(possible) > -1) + if(url.indexOf(possible) > -1){ + return `rtmp://${camera.user}:${camera.pass}@${camera.ip}:1935/bcs/channel0_main.bcs?token=sdasdasd&channel=0&stream=0&user=${camera.user}&password=${camera.pass}` + } + } + return url + } + + const runOnvifScanner = async (options, foundCameraCallback, failedCameraCallback) => { + if (scanStatus.isActive) return scanStatus.current; + + scanStatus.isActive = true; + scanStatus.abortController = new AbortController(); + const { signal } = scanStatus.abortController; + const cancelPromises = []; + scanStatus.cancelPromises = cancelPromises; + let ip = options.ip.replace(/ /g, ''); + let ports = options.port.replace(/ /g, ''); + const onvifUsername = options.user || 'admin'; + const onvifPassword = options.pass || ''; + + if (ip === '') { + const addresses = getNetworkAddresses(); + ip = getAddressRange(addresses); + } + + ports = getPorts(ports); + + const ipList = getIpList(ip); + const hitList = createHitList(ipList, ports, onvifUsername, onvifPassword); + + const ipQueues = {}; + const responseList = []; + const allPingSuccess = {}; + + const fetchWithTimeout = async (camera, onvifUsername, onvifPassword, foundCameraCallback, failedCameraCallback, signal) => { + return new Promise((resolve, reject) => { + const timeout = setTimeout(() => reject(new Error('Timeout')), 2500); // Adjust the timeout as needed + fetchCameraDetails(camera, onvifUsername, onvifPassword, foundCameraCallback, failedCameraCallback, signal) + .then(result => { + clearTimeout(timeout); + resolve(result); + }) + .catch(error => { + clearTimeout(timeout); + reject(error); + }); + }); + }; + + try { + for (const camera of hitList) { + if (!ipQueues[camera.ip]) { + ipQueues[camera.ip] = async.queue(async (task) => { + if (signal.aborted) { + throw new Error('Aborted'); + } + if(!scanStatus.allSuccessful[camera.ip]){ + const cameraIp = task.camera.ip; + const hasPingSuccess = allPingSuccess[cameraIp]; + if (hasPingSuccess !== false) { + const fetchPromise = fetchWithTimeout(task.camera, task.onvifUsername, task.onvifPassword, task.foundCameraCallback, task.failedCameraCallback, signal); + cancelPromises.push(fetchPromise); + const result = await fetchPromise; + if (result.refused) allPingSuccess[cameraIp] = !result.refused; + if (result.uri){ + result.uri = detectAndReplaceReolinkRTSP(task.camera, addCredentialsToUrl({ url: result.uri, username: task.camera.user, password: task.camera.pass })); + } + responseList.push({...result}); + } + } + }, 1); + } + ipQueues[camera.ip].push({ + camera, + onvifUsername: camera.user, + onvifPassword: camera.pass, + foundCameraCallback, + failedCameraCallback + }); + } + await Promise.all(Object.values(ipQueues).map(queue => new Promise((resolve) => queue.drain(resolve)))); + } catch (err) { + if (err.message === 'Aborted') { + console.log('Scan aborted'); + } else { + console.error('big error', err); + } + } + + scanStatus.isActive = false; + scanStatus.abortController = null; + scanStatus.cancelPromises = null; + s.debugLog('Done Scan'); + return responseList; + }; + + const stopOnvifScanner = () => { + if (scanStatus.isActive && scanStatus.abortController) { + scanStatus.abortController.abort(); + scanStatus.cancelPromises.forEach(promise => promise.catch(() => {})); + scanStatus.isActive = false; + s.debugLog('Scan stopped'); + } + }; + + function expandIPRange(rangeStr) { + const ipRangeToArray = (start, end) => { + const startParts = start.split('.').map(Number); + const endParts = end.split('.').map(Number); + const ips = []; + for (let a = startParts[0]; a <= endParts[0]; a++) { + for (let b = startParts[1]; b <= endParts[1]; b++) { + for (let c = startParts[2]; c <= endParts[2]; c++) { + for (let d = startParts[3]; d <= endParts[3]; d++) { + ips.push([a, b, c, d].join('.')); + } + } + } + } + return ips; + }; + + return rangeStr.split(',') + .flatMap(range => { + const [start, end] = range.split('-'); + return ipRangeToArray(start.trim(), end.trim()); + }); + } + return { - ipRange: ipRange, - portRange: portRange, - runOnvifScanner: runOnvifScanner, - } + expandIPRange, + ipRange, + portRange, + scanStatus, + runOnvifScanner, + stopOnvifScanner, + }; } diff --git a/libs/system/utils.js b/libs/system/utils.js index 17a24962..8a77df4e 100644 --- a/libs/system/utils.js +++ b/libs/system/utils.js @@ -25,7 +25,7 @@ module.exports = (config) => { getConfiguration: () => { return new Promise((resolve,reject) => { const configPath = config.thisIsDocker ? "/config/conf.json" : s.location.config; - + fs.readFile(configPath, 'utf8', (err, data) => { resolve(JSON.parse(data)) }); @@ -33,11 +33,11 @@ module.exports = (config) => { }, modifyConfiguration: (postBody) => { return new Promise((resolve, reject) => { - console.log(s.location.config) - + console.log(config) + const configPath = config.thisIsDocker ? "/config/conf.json" : s.location.config; const configData = JSON.stringify(postBody,null,3); - + fs.writeFile(configPath, configData, resolve); }); }, diff --git a/libs/video/utils.js b/libs/video/utils.js index 8512e660..65b33202 100644 --- a/libs/video/utils.js +++ b/libs/video/utils.js @@ -66,10 +66,17 @@ module.exports = (s,config,lang) => { const videosDirectory = s.getVideoDirectory(monitor) const tempDirectory = s.getStreamsDirectory(monitor) // const findCmd = [videosDirectory].concat(options.flags || ['-maxdepth','1']) - fs.writeFileSync( - tempDirectory + 'orphanCheck.sh', - `find "${s.checkCorrectPathEnding(videosDirectory,true)}" -maxdepth 1 -type f -exec stat -c "%n" {} + | sort -r | head -n ${options.checkMax}` - ); + try{ + fs.writeFileSync( + tempDirectory + 'orphanCheck.sh', + `find "${s.checkCorrectPathEnding(videosDirectory,true)}" -maxdepth 1 -type f -exec stat -c "%n" {} + | sort -r | head -n ${options.checkMax}` + ); + }catch(err){ + console.log('Failed scanForOrphanedVideos', monitor.ke, monitor.mid) + response.err = err.toString() + resolve(response) + return + } let listing = spawn('sh',[tempDirectory + 'orphanCheck.sh']) // const onData = options.onData ? options.onData : () => {} const onError = options.onError ? options.onError : s.systemLog diff --git a/libs/webServer.js b/libs/webServer.js index 32dd7fe3..1f87b416 100644 --- a/libs/webServer.js +++ b/libs/webServer.js @@ -54,6 +54,10 @@ module.exports = function(s,config,lang,io){ if(config.renderPaths.grid === undefined){config.renderPaths.grid='pages/grid'} //slick.js (cycle) page if(config.renderPaths.cycle === undefined){config.renderPaths.cycle='pages/cycle'} + //WallView page + if(config.renderPaths.wallview === undefined){config.renderPaths.wallview='pages/wallview'} + //WallVideoView page + if(config.renderPaths.wallvideoview === undefined){config.renderPaths.wallvideoview='pages/wallvideoview'} // Use uws/cws if(config.useUWebsocketJs === undefined){config.useUWebsocketJs=true} if(config.webBlocksPreloaded === undefined){ diff --git a/libs/webServerAdminPaths.js b/libs/webServerAdminPaths.js index 56158ab8..64384542 100644 --- a/libs/webServerAdminPaths.js +++ b/libs/webServerAdminPaths.js @@ -311,7 +311,7 @@ module.exports = function(s,config,lang,app){ } = s.checkPermission(user) if( userPermissions.monitor_create_disallowed || - isRestrictedApiKey && apiKeyPermissions.control_monitors_disallowed || + isRestrictedApiKey && apiKeyPermissions.edit_monitors_disallowed || isRestricted && !monitorPermissions[`${monitorId}_monitor_edit`] ){ s.closeJsonResponse(res,{ok: false, msg: lang['Not Authorized']}); diff --git a/libs/webServerPaths.js b/libs/webServerPaths.js index 27d5e0f0..a0d9186a 100644 --- a/libs/webServerPaths.js +++ b/libs/webServerPaths.js @@ -31,6 +31,7 @@ module.exports = function(s,config,lang,app,io){ const { spawnSubstreamProcess, destroySubstreamProcess, + removeSenstiveInfoFromMonitorConfig, } = require('./monitor/utils.js')(s,config,lang) const { sliceVideo, @@ -771,6 +772,7 @@ module.exports = function(s,config,lang,app,io){ } = s.getMonitorsPermitted(user.details,monitorId) const { isRestricted, + userPermissions, isRestrictedApiKey, apiKeyPermissions, } = s.checkPermission(user) @@ -784,6 +786,7 @@ module.exports = function(s,config,lang,app,io){ s.closeJsonResponse(res,[]); return } + const cannotSeeImportantSettings = (isRestrictedApiKey && apiKeyPermissions.edit_monitors_disallowed) || userPermissions.monitor_create_disallowed; s.knexQuery({ action: "select", columns: "*", @@ -794,6 +797,12 @@ module.exports = function(s,config,lang,app,io){ ] },(err,r) => { r.forEach(function(v,n){ + const monitorId = v.mid; + v.details = JSON.parse(v.details) + var details = v.details; + if(isRestricted && !monitorPermissions[`${monitorId}_monitor_edit`] || cannotSeeImportantSettings){ + r[n] = removeSenstiveInfoFromMonitorConfig(v); + } if(s.group[v.ke] && s.group[v.ke].activeMonitors[v.mid]){ const activeMonitor = s.group[v.ke].activeMonitors[v.mid] r[n].currentlyWatching = Object.keys(activeMonitor.watch).length @@ -847,7 +856,6 @@ module.exports = function(s,config,lang,app,io){ } return streamURL } - var details = JSON.parse(r[n].details); if(!details.tv_channel_id||details.tv_channel_id==='')details.tv_channel_id = 'temp_'+s.gid(5) if(details.snap==='1'){ r[n].snapshot = '/'+req.params.auth+'/jpeg/'+v.ke+'/'+v.mid+'/s.jpg' @@ -1094,6 +1102,35 @@ module.exports = function(s,config,lang,app,io){ },res,req); }); /** + * Page : Get Wall Video View (Wall Timeline) + */ + app.get(config.webPaths.apiPrefix+':auth/wallvideoview/:ke', function (req,res){ + s.auth(req.params,function(user){ + const authKey = req.params.auth + const groupKey = req.params.ke + if( + user.permissions.watch_videos === "0" + && user.details.allmonitors !== '1' + ){ + res.end(user.lang['Not Permitted']) + return + } + s.renderPage(req,res,config.renderPaths.wallvideoview,{ + forceUrlPrefix: req.query.host || '', + data: req.params, + protocol: req.protocol, + baseUrl: req.protocol + '://' + req.hostname, + config: s.getConfigWithBranding(req.hostname), + define: s.getDefinitonFile(user.details ? user.details.lang : config.lang), + lang: lang, + $user: user, + authKey: authKey, + groupKey: groupKey, + originalURL: s.getOriginalUrl(req) + }); + },res,req); + }); + /** * API : Get Events */ app.get([ diff --git a/libs/webServerStreamPaths.js b/libs/webServerStreamPaths.js index 1d7b8478..733f579c 100644 --- a/libs/webServerStreamPaths.js +++ b/libs/webServerStreamPaths.js @@ -415,4 +415,33 @@ module.exports = function(s,config,lang,app){ },res,req); },res,req); }); + /** + * Page : Get WallView + */ + app.get(config.webPaths.apiPrefix+':auth/wallview/:ke', function (req,res){ + s.auth(req.params,function(user){ + const authKey = req.params.auth + const groupKey = req.params.ke + if( + user.permissions.watch_stream === "0" + && user.details.allmonitors !== '1' + ){ + res.end(user.lang['Not Permitted']) + return + } + s.renderPage(req,res,config.renderPaths.wallview,{ + forceUrlPrefix: req.query.host || '', + data: req.params, + protocol: req.protocol, + baseUrl: req.protocol + '://' + req.hostname, + config: s.getConfigWithBranding(req.hostname), + define: s.getDefinitonFile(user.details ? user.details.lang : config.lang), + lang: lang, + $user: user, + authKey: authKey, + groupKey: groupKey, + originalURL: s.getOriginalUrl(req) + }); + },res,req); + }); } diff --git a/package-lock.json b/package-lock.json index 0b076837..16958080 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,20 +27,20 @@ "googleapis": "^100.0.0", "http-proxy": "^1.18.1", "jsonfile": "^3.0.1", - "knex": "^0.21.21", + "knex": "^3.1.0", "ldapauth-fork": "^5.0.2", "marked": "^4.3.0", "moment": "^2.29.4", "mp4frag": "^0.6.1", "mqtt": "^4.3.7", "mysql": "^2.18.1", - "mysql2": "^2.1.0", + "mysql2": "^3.9.7", "node-abort-controller": "^3.0.1", "node-fetch": "^2.6.7", - "node-onvif-events": "^2.0.5", "node-ssh": "^12.0.4", - "node-telegram-bot-api": "^0.61.0", + "node-telegram-bot-api": "^0.65.1", "nodemailer": "^6.7.1", + "onvif": "^0.7.1", "pam-diff": "^1.1.0", "path": "^0.12.7", "pipe2pam": "^0.6.2", @@ -48,7 +48,7 @@ "pushover-notifications": "^1.2.2", "sat": "^0.7.1", "shinobi-node-moving-things-tracker": "^0.9.3", - "shinobi-onvif": "0.1.9", + "shinobi-onvif": "0.2.2", "shinobi-sound-detection": "^0.1.13", "shinobi-zwave": "^1.0.11", "smtp-server": "^3.13.0", @@ -870,6 +870,170 @@ "node": ">=6.9.0" } }, + "node_modules/@cypress/request": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@cypress/request/-/request-3.0.1.tgz", + "integrity": "sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ==", + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "http-signature": "~1.3.6", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "performance-now": "^2.1.0", + "qs": "6.10.4", + "safe-buffer": "^5.1.2", + "tough-cookie": "^4.1.3", + "tunnel-agent": "^0.6.0", + "uuid": "^8.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@cypress/request-promise": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@cypress/request-promise/-/request-promise-5.0.0.tgz", + "integrity": "sha512-eKdYVpa9cBEw2kTBlHeu1PP16Blwtum6QHg/u9s/MoHkZfuo1pRGka1VlUHXF5kdew82BvOJVVGk0x8X0nbp+w==", + "dependencies": { + "bluebird": "^3.5.0", + "request-promise-core": "1.1.3", + "stealthy-require": "^1.1.1", + "tough-cookie": "^4.1.3" + }, + "engines": { + "node": ">=0.10.0" + }, + "peerDependencies": { + "@cypress/request": "^3.0.0" + } + }, + "node_modules/@cypress/request-promise/node_modules/tough-cookie": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", + "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", + "dependencies": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@cypress/request-promise/node_modules/universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/@cypress/request/node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/@cypress/request/node_modules/http-signature": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", + "integrity": "sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw==", + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^2.0.2", + "sshpk": "^1.14.1" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/@cypress/request/node_modules/jsprim": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", + "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + } + }, + "node_modules/@cypress/request/node_modules/qs": { + "version": "6.10.4", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.4.tgz", + "integrity": "sha512-OQiU+C+Ds5qiH91qh/mg0w+8nwQuLjM4F4M/PbmhDOoYehPh+Fb0bDjtR1sOvy7YKxvj28Y/M0PhP5uVX0kB+g==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/@cypress/request/node_modules/tough-cookie": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", + "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", + "dependencies": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@cypress/request/node_modules/universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/@cypress/request/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@cypress/request/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==", + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, "node_modules/@discordjs/collection": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.1.6.tgz", @@ -1650,64 +1814,11 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/ansicolors": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.3.2.tgz", - "integrity": "sha512-QXu7BPrP29VllRxH8GwB7x5iX5qWKAAMLqKQGWTeLWVlNHNOpVMJ91dsxQAIWXpjuW5wqvxu3Jd/nRjrJ+0pqg==" - }, - "node_modules/arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", - "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, - "node_modules/array-slice": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", - "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/array.prototype.findindex": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array.prototype.findindex/-/array.prototype.findindex-2.1.0.tgz", @@ -1749,14 +1860,6 @@ "node": "*" } }, - "node_modules/assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/async": { "version": "3.2.5", "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", @@ -1775,17 +1878,6 @@ "node": ">= 4.0.0" } }, - "node_modules/atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "bin": { - "atob": "bin/atob.js" - }, - "engines": { - "node": ">= 4.5.0" - } - }, "node_modules/aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -1854,39 +1946,11 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, - "node_modules/base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dependencies": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/base-64": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/base-64/-/base-64-1.0.0.tgz", "integrity": "sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg==" }, - "node_modules/base/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/base32.js": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/base32.js/-/base32.js-0.1.0.tgz", @@ -2012,12 +2076,12 @@ "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" }, "node_modules/body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", "dependencies": { "bytes": "3.1.2", - "content-type": "~1.0.4", + "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", @@ -2025,7 +2089,7 @@ "iconv-lite": "0.4.24", "on-finished": "2.4.1", "qs": "6.11.0", - "raw-body": "2.5.1", + "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" }, @@ -2056,45 +2120,6 @@ "concat-map": "0.0.1" } }, - "node_modules/braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dependencies": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/braces/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/braces/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/bson": { "version": "4.6.1", "resolved": "https://registry.npmjs.org/bson/-/bson-4.6.1.tgz", @@ -2205,25 +2230,6 @@ "node": ">= 0.8" } }, - "node_modules/cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dependencies": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -2244,18 +2250,6 @@ "node": ">=6" } }, - "node_modules/cardinal": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/cardinal/-/cardinal-2.1.1.tgz", - "integrity": "sha512-JSr5eOgoEymtYHBjNWyjrMqet9Am2miJhlfKNdqLp6zoeAh0KN5dRAcxlecj5mAJrmQomgiOBj35xHLrFjqBpw==", - "dependencies": { - "ansicolors": "~0.3.2", - "redeyed": "~2.1.0" - }, - "bin": { - "cdl": "bin/cdl.js" - } - }, "node_modules/caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -2319,96 +2313,6 @@ "node": "*" } }, - "node_modules/class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dependencies": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/cliui": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", @@ -2419,18 +2323,6 @@ "wrap-ansi": "^6.2.0" } }, - "node_modules/collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dependencies": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -2448,9 +2340,9 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/colorette": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz", - "integrity": "sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==" + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", + "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==" }, "node_modules/combined-stream": { "version": "1.0.8", @@ -2464,11 +2356,11 @@ } }, "node_modules/commander": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", - "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", "engines": { - "node": ">= 6" + "node": ">=14" } }, "node_modules/commist": { @@ -2480,11 +2372,6 @@ "minimist": "^1.1.0" } }, - "node_modules/component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" - }, "node_modules/compute-array-constructors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/compute-array-constructors/-/compute-array-constructors-1.0.1.tgz", @@ -2601,17 +2488,17 @@ ] }, "node_modules/content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", "engines": { "node": ">= 0.6" } }, "node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", "engines": { "node": ">= 0.6" } @@ -2621,14 +2508,6 @@ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" }, - "node_modules/copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -2706,14 +2585,6 @@ "node": ">=0.10.0" } }, - "node_modules/decode-uri-component": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", - "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", - "engines": { - "node": ">=0.10" - } - }, "node_modules/deep-eql": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", @@ -2736,18 +2607,6 @@ "node": ">= 0.4" } }, - "node_modules/define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dependencies": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -2757,9 +2616,9 @@ } }, "node_modules/denque": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/denque/-/denque-1.5.1.tgz", - "integrity": "sha512-XwE+iZ4D6ZUB7mfYRMb5wByE8L74HCn30FBN7sWnXksWc1LO1bPDl67pBR9o/kC4z/xSNAwkMYcGgqDV3BE3Hw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", "engines": { "node": ">=0.10" } @@ -2773,14 +2632,6 @@ "npm": "1.2.8000 || >= 1.4.16" } }, - "node_modules/detect-file": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", - "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/digest-fetch": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/digest-fetch/-/digest-fetch-1.2.1.tgz", @@ -2980,9 +2831,9 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/ejs": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.9.tgz", - "integrity": "sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ==", + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", "dependencies": { "jake": "^10.8.5" }, @@ -3184,6 +3035,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "engines": { + "node": ">=6" + } + }, "node_modules/escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -3197,18 +3056,6 @@ "node": ">=6" } }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", @@ -3230,140 +3077,17 @@ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" }, - "node_modules/expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dependencies": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", - "dependencies": { - "homedir-polyfill": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", + "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.1", + "body-parser": "1.20.2", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.5.0", + "cookie": "0.6.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", @@ -3437,66 +3161,6 @@ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, - "node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dependencies": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", @@ -3576,39 +3240,6 @@ "node": ">=10" } }, - "node_modules/fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dependencies": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fill-range/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fill-range/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/finalhandler": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", @@ -3638,47 +3269,10 @@ "node": ">=8" } }, - "node_modules/findup-sync": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz", - "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==", - "dependencies": { - "detect-file": "^1.0.0", - "is-glob": "^4.0.0", - "micromatch": "^3.0.4", - "resolve-dir": "^1.0.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/fined": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", - "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", - "dependencies": { - "expand-tilde": "^2.0.2", - "is-plain-object": "^2.0.3", - "object.defaults": "^1.1.0", - "object.pick": "^1.2.0", - "parse-filepath": "^1.0.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/flagged-respawn": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", - "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", - "engines": { - "node": ">= 0.10" - } - }, "node_modules/follow-redirects": { - "version": "1.14.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz", - "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "funding": [ { "type": "individual", @@ -3694,25 +3288,6 @@ } } }, - "node_modules/for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", - "dependencies": { - "for-in": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -3742,17 +3317,6 @@ "node": ">= 0.6" } }, - "node_modules/fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dependencies": { - "map-cache": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", @@ -3834,9 +3398,12 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/gaxios": { "version": "4.3.2", @@ -3902,6 +3469,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/get-symbol-description": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", @@ -3917,18 +3492,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/getopts": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/getopts/-/getopts-2.2.5.tgz", - "integrity": "sha512-9jb7AW5p3in+IiJWhQiZmmwkpLaR/ccTWdWQCtZM66HJcHHLegowh4q4tSD7gouUyeNvFWRavfK9GXosQHDpFA==" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/getopts/-/getopts-2.3.0.tgz", + "integrity": "sha512-5eDf9fuSXwxBL6q5HX+dhDj+dslFGWzU5thZ9kNKUkcPtaPdatmUFKwHFrLb/uf/WpA4BHET+AX3Scl56cAjpA==" }, "node_modules/getpass": { "version": "0.1.7", @@ -3957,34 +3524,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/global-modules": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", - "dependencies": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/global-prefix": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", - "dependencies": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/google-auth-library": { "version": "7.10.2", "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-7.10.2.tgz", @@ -4145,40 +3684,15 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dependencies": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" + "function-bind": "^1.1.2" }, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dependencies": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values/node_modules/kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" } }, "node_modules/he": { @@ -4198,17 +3712,6 @@ "readable-stream": "^3.6.0" } }, - "node_modules/homedir-polyfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", - "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", - "dependencies": { - "parse-passwd": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/hot-patcher": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/hot-patcher/-/hot-patcher-1.0.0.tgz", @@ -4379,11 +3882,6 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" - }, "node_modules/internal-slot": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", @@ -4406,9 +3904,9 @@ } }, "node_modules/ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.9.tgz", + "integrity": "sha512-cyRxvOEpNHNtchU3Ln9KC/auJgup87llfQpQ+t5ghoC/UhL16SWzbueiCsdTnWmqAWl7LadfuwhlqmtOaqMHdQ==" }, "node_modules/ipaddr.js": { "version": "1.9.1", @@ -4423,29 +3921,6 @@ "resolved": "https://registry.npmjs.org/ipv6-normalize/-/ipv6-normalize-1.0.1.tgz", "integrity": "sha1-GzJYKQ02X6gyOeiZB93kWS52IKg=" }, - "node_modules/is-absolute": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", - "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", - "dependencies": { - "is-relative": "^1.0.0", - "is-windows": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-bigint": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", @@ -4489,27 +3964,16 @@ } }, "node_modules/is-core-module": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz", - "integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==", + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", "dependencies": { - "has": "^1.0.3" + "hasown": "^2.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-date-object": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", @@ -4524,38 +3988,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dependencies": { - "is-plain-object": "^2.0.4" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -4564,17 +3996,6 @@ "node": ">=8" } }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-negative-zero": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", @@ -4586,17 +4007,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-number-object": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", @@ -4611,28 +4021,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-number/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-property": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", @@ -4653,17 +4041,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-relative": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", - "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", - "dependencies": { - "is-unc-path": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-retry-allowed": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-2.2.0.tgz", @@ -4727,17 +4104,6 @@ "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, - "node_modules/is-unc-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", - "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", - "dependencies": { - "unc-path-regex": "^0.1.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-weakref": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.1.tgz", @@ -4749,32 +4115,11 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" - }, - "node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", @@ -4884,47 +4229,34 @@ "safe-buffer": "^5.0.1" } }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/knex": { - "version": "0.21.21", - "resolved": "https://registry.npmjs.org/knex/-/knex-0.21.21.tgz", - "integrity": "sha512-cjw5qO1EzVKjbywcVa61IQJMLt7PfYBRI/2NwCA/B9beXgbw652wDNLz+JM+UKKNsfwprq0ugYqBYc9q4JN36A==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/knex/-/knex-3.1.0.tgz", + "integrity": "sha512-GLoII6hR0c4ti243gMs5/1Rb3B+AjwMOfjYm97pu0FOQa7JH56hgBxYf5WK2525ceSbBY1cjeZ9yk99GPMB6Kw==", "dependencies": { - "colorette": "1.2.1", - "commander": "^6.2.0", - "debug": "4.3.1", + "colorette": "2.0.19", + "commander": "^10.0.0", + "debug": "4.3.4", + "escalade": "^3.1.1", "esm": "^3.2.25", - "getopts": "2.2.5", + "get-package-type": "^0.1.0", + "getopts": "2.3.0", "interpret": "^2.2.0", - "liftoff": "3.1.0", - "lodash": "^4.17.20", - "pg-connection-string": "2.4.0", - "tarn": "^3.0.1", - "tildify": "2.0.0", - "v8flags": "^3.2.0" + "lodash": "^4.17.21", + "pg-connection-string": "2.6.2", + "rechoir": "^0.8.0", + "resolve-from": "^5.0.0", + "tarn": "^3.0.2", + "tildify": "2.0.0" }, "bin": { "knex": "bin/cli.js" }, "engines": { - "node": ">=10" - }, - "peerDependencies": { - "mssql": "^6.2.1", - "mysql": "^2.18.1", - "mysql2": "^2.1.0", - "pg": "^8.3.0", - "sqlite3": "^5.0.0" + "node": ">=16" }, "peerDependenciesMeta": { - "mssql": { + "better-sqlite3": { "optional": true }, "mysql": { @@ -4936,15 +4268,21 @@ "pg": { "optional": true }, + "pg-native": { + "optional": true + }, "sqlite3": { "optional": true + }, + "tedious": { + "optional": true } } }, "node_modules/knex/node_modules/debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dependencies": { "ms": "2.1.2" }, @@ -5018,24 +4356,6 @@ "node": ">=0.10.0" } }, - "node_modules/liftoff": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz", - "integrity": "sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog==", - "dependencies": { - "extend": "^3.0.0", - "findup-sync": "^3.0.0", - "fined": "^1.0.1", - "flagged-respawn": "^1.0.0", - "is-plain-object": "^2.0.4", - "object.map": "^1.0.0", - "rechoir": "^0.6.2", - "resolve": "^1.1.7" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/listenercount": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/listenercount/-/listenercount-1.0.1.tgz", @@ -5068,9 +4388,9 @@ "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==" }, "node_modules/long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" }, "node_modules/lru-cache": { "version": "6.0.0", @@ -5097,36 +4417,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/make-iterator": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", - "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", - "dependencies": { - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dependencies": { - "object-visit": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/marked": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", @@ -5169,29 +4459,6 @@ "node": ">= 0.6" } }, - "node_modules/micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dependencies": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -5238,18 +4505,6 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" }, - "node_modules/mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", - "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", - "dependencies": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/mkdirp": { "version": "0.5.5", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", @@ -5450,47 +4705,49 @@ } }, "node_modules/mysql2": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-2.1.0.tgz", - "integrity": "sha512-9kGVyi930rG2KaHrz3sHwtc6K+GY9d8wWk1XRSYxQiunvGcn4DwuZxOwmK11ftuhhwrYDwGx9Ta4VBwznJn36A==", + "version": "3.9.7", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.9.7.tgz", + "integrity": "sha512-KnJT8vYRcNAZv73uf9zpXqNbvBG7DJrs+1nACsjZP1HMJ1TgXEy8wnNilXAn/5i57JizXKtrUtwDB7HxT9DDpw==", "dependencies": { - "cardinal": "^2.1.1", - "denque": "^1.4.1", + "denque": "^2.1.0", "generate-function": "^2.3.1", - "iconv-lite": "^0.5.0", - "long": "^4.0.0", - "lru-cache": "^5.1.1", - "named-placeholders": "^1.1.2", + "iconv-lite": "^0.6.3", + "long": "^5.2.1", + "lru-cache": "^8.0.0", + "named-placeholders": "^1.1.3", "seq-queue": "^0.0.5", - "sqlstring": "^2.3.1" + "sqlstring": "^2.3.2" }, "engines": { "node": ">= 8.0" } }, "node_modules/mysql2/node_modules/iconv-lite": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.5.2.tgz", - "integrity": "sha512-kERHXvpSaB4aU3eANwidg79K8FlrN77m8G9V+0vOR3HYaRifrlwMEpT7ZBJqLSEIHnEgJTHcWK82wwLwwKwtag==", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" + "safer-buffer": ">= 2.1.2 < 3.0.0" }, "engines": { "node": ">=0.10.0" } }, "node_modules/mysql2/node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dependencies": { - "yallist": "^3.0.2" + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-8.0.5.tgz", + "integrity": "sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA==", + "engines": { + "node": ">=16.14" } }, - "node_modules/mysql2/node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + "node_modules/mysql2/node_modules/sqlstring": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", + "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==", + "engines": { + "node": ">= 0.6" + } }, "node_modules/named-placeholders": { "version": "1.1.3", @@ -5517,27 +4774,6 @@ "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==", "optional": true }, - "node_modules/nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dependencies": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/ncp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", @@ -5592,14 +4828,6 @@ "node": ">= 6.13.0" } }, - "node_modules/node-onvif-events": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/node-onvif-events/-/node-onvif-events-2.0.5.tgz", - "integrity": "sha512-rZOHirBe/O47qD0zdjUBQn9dPFO9VdCw6ZSQGUN/Grjxh9p+LOZImN3kLuDdfNfczI8gIfg4JUV0LnSUSxzIeA==", - "dependencies": { - "onvif": "git+https://github.com/agsh/onvif.git" - } - }, "node_modules/node-ssh": { "version": "12.0.4", "resolved": "https://registry.npmjs.org/node-ssh/-/node-ssh-12.0.4.tgz", @@ -5617,19 +4845,19 @@ } }, "node_modules/node-telegram-bot-api": { - "version": "0.61.0", - "resolved": "https://registry.npmjs.org/node-telegram-bot-api/-/node-telegram-bot-api-0.61.0.tgz", - "integrity": "sha512-BZXd8Bh2C5+uBEQuuI3FD7TFJF3alV+6oFQt8CNLx3ldX/hsd+NYyllTX+Y+5X0tG+xtcRQQjbfLgz/4sRvmBQ==", + "version": "0.65.1", + "resolved": "https://registry.npmjs.org/node-telegram-bot-api/-/node-telegram-bot-api-0.65.1.tgz", + "integrity": "sha512-YhMSgUZCKWxI+MlCuh/2yuMvsqMnZGAA2QOjD10GWk8KszNN5LQOzO+kp1K1wMYuOJoZ7v0+epLpJsSrnmlyQQ==", "dependencies": { + "@cypress/request": "^3.0.1", + "@cypress/request-promise": "^5.0.0", "array.prototype.findindex": "^2.0.2", "bl": "^1.2.3", "debug": "^3.2.7", "eventemitter3": "^3.0.0", "file-type": "^3.9.0", "mime": "^1.6.0", - "pump": "^2.0.0", - "request": "^2.83.0", - "request-promise": "^4.2.2" + "pump": "^2.0.0" }, "engines": { "node": ">=0.12" @@ -5694,9 +4922,9 @@ } }, "node_modules/nodemailer": { - "version": "6.9.4", - "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.9.4.tgz", - "integrity": "sha512-CXjQvrQZV4+6X5wP6ZIgdehJamI63MFoYFGGPtHudWym9qaEHDNdPzaj5bfMCvxG1vhAileSWW90q7nL0N36mA==", + "version": "6.9.13", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.9.13.tgz", + "integrity": "sha512-7o38Yogx6krdoBf3jCAqnIN4oSQFx+fMa0I7dK1D+me9kBxx12D+/33wSb+fhOCtIxvYJ+4x4IMEhmhCKfAiOA==", "engines": { "node": ">=6.0.0" } @@ -5747,84 +4975,6 @@ "node": ">=0.10.0" } }, - "node_modules/object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dependencies": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object-inspect": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", @@ -5841,17 +4991,6 @@ "node": ">= 0.4" } }, - "node_modules/object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dependencies": { - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object.assign": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", @@ -5869,43 +5008,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object.defaults": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", - "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", - "dependencies": { - "array-each": "^1.0.1", - "array-slice": "^1.0.0", - "for-own": "^1.0.0", - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object.map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", - "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", - "dependencies": { - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", @@ -5926,15 +5028,15 @@ } }, "node_modules/onvif": { - "version": "0.6.9", - "resolved": "git+ssh://git@github.com/agsh/onvif.git#6495d3c6a18cc30dda19db3f06217cbf8b5d4160", - "license": "MIT", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/onvif/-/onvif-0.7.1.tgz", + "integrity": "sha512-KmgtdrjLzQQvphUwlTce+0wnNu7aq2mdHsWWUnKB1repFg3fttMf6d5qX9kBJZuWjk2wJ9hy4biyn+kYquAYkQ==", "dependencies": { "lodash.get": "^4.4.2", - "xml2js": "^0.5.0" + "xml2js": "^0.6.2" }, "engines": { - "node": ">=6.0" + "node": ">=8.0" } }, "node_modules/p-limit": { @@ -5982,27 +5084,6 @@ "node": ">=10" } }, - "node_modules/parse-filepath": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", - "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", - "dependencies": { - "is-absolute": "^1.0.0", - "map-cache": "^0.2.0", - "path-root": "^0.1.1" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/parse-passwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -6011,14 +5092,6 @@ "node": ">= 0.8" } }, - "node_modules/pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/path": { "version": "0.12.7", "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", @@ -6054,25 +5127,6 @@ "resolved": "https://registry.npmjs.org/path-posix/-/path-posix-1.0.0.tgz", "integrity": "sha1-BrJhE/Vr6rBCVFojv6iAA8ysJg8=" }, - "node_modules/path-root": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", - "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", - "dependencies": { - "path-root-regex": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-root-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", - "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", @@ -6092,9 +5146,9 @@ "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, "node_modules/pg-connection-string": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.4.0.tgz", - "integrity": "sha512-3iBXuv7XKvxeMrIgym7njT+HlZkwZqqGX4Bu9cci8xHZNT+Um1gWKqCsAzcC0d95rcKMU5WBg6YRUcHyV0HZKQ==" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.6.2.tgz", + "integrity": "sha512-ch6OwaeaPYcova4kKZ15sbJ2hKb/VP48ZD2gE7i1J+L4MspCtBMAx8nMgz7bksc7IojCIIWuEhHibSMFH8m8oA==" }, "node_modules/pipe2pam": { "version": "0.6.2", @@ -6134,14 +5188,6 @@ "resolved": "https://registry.npmjs.org/polygon-points/-/polygon-points-0.6.0.tgz", "integrity": "sha512-GiWcByVNyfbhGbBmiCfUXzXeDy+iMeYFUZ2Cc+ORWRpECcXi+AwyUH82ZT5zRDGIC8iU6jAcs0fFQGp03wbAFA==" }, - "node_modules/posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/precond": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/precond/-/precond-0.2.3.tgz", @@ -6215,9 +5261,9 @@ } }, "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "engines": { "node": ">=6" } @@ -6258,9 +5304,9 @@ } }, "node_modules/raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -6285,22 +5331,14 @@ } }, "node_modules/rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", "dependencies": { - "resolve": "^1.1.6" + "resolve": "^1.20.0" }, "engines": { - "node": ">= 0.10" - } - }, - "node_modules/redeyed": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/redeyed/-/redeyed-2.1.1.tgz", - "integrity": "sha512-FNpGGo1DycYAdnrKFxCMmKYgo/mILAqtRYbkdQD8Ep/Hk2PQ5+aEAEx+IU713RTDmuBaH0c8P5ZozurNu5ObRQ==", - "dependencies": { - "esprima": "~4.0.0" + "node": ">= 10.13.0" } }, "node_modules/regenerator-runtime": { @@ -6308,18 +5346,6 @@ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" }, - "node_modules/regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dependencies": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/regex-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/regex-regex/-/regex-regex-1.0.0.tgz", @@ -6330,22 +5356,6 @@ "resolved": "https://registry.npmjs.org/reinterval/-/reinterval-1.1.0.tgz", "integrity": "sha1-M2Hs+jymwYKDOA3Qu5VG85D17Oc=" }, - "node_modules/repeat-element": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", - "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "engines": { - "node": ">=0.10" - } - }, "node_modules/request": { "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", @@ -6377,30 +5387,12 @@ "node": ">= 6" } }, - "node_modules/request-promise": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/request-promise/-/request-promise-4.2.6.tgz", - "integrity": "sha512-HCHI3DJJUakkOr8fNoCc73E5nU5bqITjOYFMDrKHYOXWXrgD/SBaC7LjwuPymUprRyuF06UK7hd/lMHkmUXglQ==", - "deprecated": "request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142", - "dependencies": { - "bluebird": "^3.5.0", - "request-promise-core": "1.1.4", - "stealthy-require": "^1.1.1", - "tough-cookie": "^2.3.3" - }, - "engines": { - "node": ">=0.10.0" - }, - "peerDependencies": { - "request": "^2.34" - } - }, "node_modules/request-promise-core": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", - "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.3.tgz", + "integrity": "sha512-QIs2+ArIGQVp5ZYbWD5ZLCY29D5CfWizP8eWnm8FoGD1TX61veauETVQbrV60662V0oFBkrDOuaBI8XgtuyYAQ==", "dependencies": { - "lodash": "^4.17.19" + "lodash": "^4.17.15" }, "engines": { "node": ">=0.10.0" @@ -6449,41 +5441,27 @@ "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" }, "node_modules/resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dependencies": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/resolve-dir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", - "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", - "dependencies": { - "expand-tilde": "^2.0.0", - "global-modules": "^1.0.0" - }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "deprecated": "https://github.com/lydell/resolve-url#deprecated" - }, - "node_modules/ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "engines": { - "node": ">=0.12" + "node": ">=8" } }, "node_modules/rfdc": { @@ -6528,14 +5506,6 @@ "integrity": "sha512-gH8eh2nZudPQO6TytOvbxnuhYBOvDBBLW52tz5q6X58lJcd/tkmqFR+5Z9adS8aJtURSXWThWy/xJtJwixErvg==", "optional": true }, - "node_modules/safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dependencies": { - "ret": "~0.1.10" - } - }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -6638,39 +5608,6 @@ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, - "node_modules/set-value": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", - "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", - "dependencies": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/set-value/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/set-value/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", @@ -6700,9 +5637,9 @@ } }, "node_modules/shinobi-onvif": { - "version": "0.1.9", - "resolved": "https://registry.npmjs.org/shinobi-onvif/-/shinobi-onvif-0.1.9.tgz", - "integrity": "sha512-88vyIr7AlXSHmRALDHM31Rol5EII3FQcGSBvKjU4GP+7d2cwEo5chZZH/IBXSuBYeAprzsxb6fHwBaFdxrzs1w==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/shinobi-onvif/-/shinobi-onvif-0.2.2.tgz", + "integrity": "sha512-U03SRwScG0re4cBeqhuGtMrlw7rDNa7dU29K3AEmvFVOO1Nba4vtFLXWdei8hQK5SlZd/toqPMbcfNWikoSBpA==", "dependencies": { "html": ">=1.0.0", "xml2js": ">=0.4.17" @@ -6755,177 +5692,19 @@ } }, "node_modules/smtp-server": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/smtp-server/-/smtp-server-3.13.0.tgz", - "integrity": "sha512-thVFqpwrHIJ25rXjXA6RYFUO35el2O+X7WJ006qMVAyFs5Ss6XGPJASg7Fh1QvT28ADIv9hGGXmgR+kaSEikwQ==", + "version": "3.13.4", + "resolved": "https://registry.npmjs.org/smtp-server/-/smtp-server-3.13.4.tgz", + "integrity": "sha512-BbElv5UP+HgPtCZtcRW35N/GFoc4DzPkrbSMLioXsrVMmQT1mMBoO0k+egl264hxWaWczoVvadSPY2pLUINFXg==", "dependencies": { "base32.js": "0.1.0", "ipv6-normalize": "1.0.1", - "nodemailer": "6.9.4" + "nodemailer": "6.9.13", + "punycode": "2.3.1" }, "engines": { "node": ">=12.0.0" } }, - "node_modules/snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dependencies": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dependencies": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-node/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dependencies": { - "kind-of": "^3.2.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-util/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/socket.io": { "version": "4.7.2", "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.7.2.tgz", @@ -7040,42 +5819,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, - "node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", - "dependencies": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "node_modules/source-map-url": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", - "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==" - }, - "node_modules/split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dependencies": { - "extend-shallow": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/split2": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", @@ -7138,94 +5881,6 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, - "node_modules/static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dependencies": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/statuses": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", @@ -7237,7 +5892,7 @@ "node_modules/stealthy-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", - "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", + "integrity": "sha512-ZnWpYnYugiOVEY5GkcuJK1io5V8QmNYChG62gSit9pQVGErXtrKuPC55ITaVSukmMta5qpMU7vqLt2Lnni4f/g==", "engines": { "node": ">=0.10.0" } @@ -7346,10 +6001,21 @@ "node": ">=8" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/tarn": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/tarn/-/tarn-3.0.1.tgz", - "integrity": "sha512-6usSlV9KyHsspvwu2duKH+FMUhqJnAh6J5J/4MITl8s94iSUQTLkJggdiewKv4RyARQccnigV48Z+khiuVZDJw==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/tarn/-/tarn-3.0.2.tgz", + "integrity": "sha512-51LAVKUSZSVfI05vjPESNc5vwqqZpbXCsU+/+wxlOrUjk2SnFTt97v9ZgQrD4YmxYW1Px6w2KjaDitCfkvgxMQ==", "engines": { "node": ">=8.0.0" } @@ -7362,54 +6028,6 @@ "node": ">=8" } }, - "node_modules/to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-object-path/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dependencies": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dependencies": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/toidentifier": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", @@ -7516,41 +6134,11 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/unc-path-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", - "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/underscore": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.1.tgz", "integrity": "sha512-hzSoAVtJF+3ZtiFX0VgfFPHEDRm7Y/QPjGyNo4TVdnDTdft3tr8hEkD25a1jC+TjTuE7tkHGKkhwCgs9dgBB2g==" }, - "node_modules/union-value": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", - "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", - "dependencies": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^2.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/union-value/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/universalify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", @@ -7567,50 +6155,6 @@ "node": ">= 0.8" } }, - "node_modules/unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dependencies": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dependencies": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dependencies": { - "isarray": "1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/unzipper": { "version": "0.10.11", "resolved": "https://registry.npmjs.org/unzipper/-/unzipper-0.10.11.tgz", @@ -7663,12 +6207,6 @@ "punycode": "^2.1.0" } }, - "node_modules/urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "deprecated": "Please see https://github.com/lydell/urix#deprecated" - }, "node_modules/url-join": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", @@ -7688,14 +6226,6 @@ "resolved": "https://registry.npmjs.org/url-template/-/url-template-2.0.8.tgz", "integrity": "sha1-/FZaPMy/93MMd19WQflVV5FDnyE=" }, - "node_modules/use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/util": { "version": "0.10.4", "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", @@ -7774,17 +6304,6 @@ "uuid": "bin/uuid" } }, - "node_modules/v8flags": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", - "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", - "dependencies": { - "homedir-polyfill": "^1.0.1" - }, - "engines": { - "node": ">= 0.10" - } - }, "node_modules/validate.io-array": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/validate.io-array/-/validate.io-array-1.0.6.tgz", @@ -8009,17 +6528,6 @@ "webidl-conversions": "^3.0.0" } }, - "node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, "node_modules/which-boxed-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", @@ -8079,9 +6587,9 @@ } }, "node_modules/xml2js": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", - "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz", + "integrity": "sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==", "dependencies": { "sax": ">=0.6.0", "xmlbuilder": "~11.0.0" @@ -8857,6 +7365,132 @@ "regenerator-runtime": "^0.13.11" } }, + "@cypress/request": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@cypress/request/-/request-3.0.1.tgz", + "integrity": "sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "http-signature": "~1.3.6", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "performance-now": "^2.1.0", + "qs": "6.10.4", + "safe-buffer": "^5.1.2", + "tough-cookie": "^4.1.3", + "tunnel-agent": "^0.6.0", + "uuid": "^8.3.2" + }, + "dependencies": { + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "http-signature": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", + "integrity": "sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw==", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^2.0.2", + "sshpk": "^1.14.1" + } + }, + "jsprim": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", + "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + } + }, + "qs": { + "version": "6.10.4", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.4.tgz", + "integrity": "sha512-OQiU+C+Ds5qiH91qh/mg0w+8nwQuLjM4F4M/PbmhDOoYehPh+Fb0bDjtR1sOvy7YKxvj28Y/M0PhP5uVX0kB+g==", + "requires": { + "side-channel": "^1.0.4" + } + }, + "tough-cookie": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", + "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", + "requires": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + } + }, + "universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==" + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + } + } + }, + "@cypress/request-promise": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@cypress/request-promise/-/request-promise-5.0.0.tgz", + "integrity": "sha512-eKdYVpa9cBEw2kTBlHeu1PP16Blwtum6QHg/u9s/MoHkZfuo1pRGka1VlUHXF5kdew82BvOJVVGk0x8X0nbp+w==", + "requires": { + "bluebird": "^3.5.0", + "request-promise-core": "1.1.3", + "stealthy-require": "^1.1.1", + "tough-cookie": "^4.1.3" + }, + "dependencies": { + "tough-cookie": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", + "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", + "requires": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + } + }, + "universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==" + } + } + }, "@discordjs/collection": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.1.6.tgz", @@ -9480,46 +8114,11 @@ "color-convert": "^2.0.1" } }, - "ansicolors": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.3.2.tgz", - "integrity": "sha512-QXu7BPrP29VllRxH8GwB7x5iX5qWKAAMLqKQGWTeLWVlNHNOpVMJ91dsxQAIWXpjuW5wqvxu3Jd/nRjrJ+0pqg==" - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" - }, - "array-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", - "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=" - }, "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, - "array-slice": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", - "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==" - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" - }, "array.prototype.findindex": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array.prototype.findindex/-/array.prototype.findindex-2.1.0.tgz", @@ -9552,11 +8151,6 @@ "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==" }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" - }, "async": { "version": "3.2.5", "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", @@ -9572,11 +8166,6 @@ "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==" }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==" - }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -9638,30 +8227,6 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "^1.0.0" - } - } - } - }, "base-64": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/base-64/-/base-64-1.0.0.tgz", @@ -9753,12 +8318,12 @@ "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" }, "body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", "requires": { "bytes": "3.1.2", - "content-type": "~1.0.4", + "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", @@ -9766,7 +8331,7 @@ "iconv-lite": "0.4.24", "on-finished": "2.4.1", "qs": "6.11.0", - "raw-body": "2.5.1", + "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" }, @@ -9792,38 +8357,6 @@ "concat-map": "0.0.1" } }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" - } - } - }, "bson": { "version": "4.6.1", "resolved": "https://registry.npmjs.org/bson/-/bson-4.6.1.tgz", @@ -9898,22 +8431,6 @@ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==" }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, "call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -9928,15 +8445,6 @@ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" }, - "cardinal": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/cardinal/-/cardinal-2.1.1.tgz", - "integrity": "sha512-JSr5eOgoEymtYHBjNWyjrMqet9Am2miJhlfKNdqLp6zoeAh0KN5dRAcxlecj5mAJrmQomgiOBj35xHLrFjqBpw==", - "requires": { - "ansicolors": "~0.3.2", - "redeyed": "~2.1.0" - } - }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -9982,78 +8490,6 @@ "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=" }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } - } - }, "cliui": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", @@ -10064,15 +8500,6 @@ "wrap-ansi": "^6.2.0" } }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -10087,9 +8514,9 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "colorette": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz", - "integrity": "sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==" + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", + "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==" }, "combined-stream": { "version": "1.0.8", @@ -10100,9 +8527,9 @@ } }, "commander": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", - "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==" + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==" }, "commist": { "version": "1.1.0", @@ -10113,11 +8540,6 @@ "minimist": "^1.1.0" } }, - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" - }, "compute-array-constructors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/compute-array-constructors/-/compute-array-constructors-1.0.1.tgz", @@ -10216,25 +8638,20 @@ } }, "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==" }, "cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==" + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==" }, "cookie-signature": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" - }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -10293,11 +8710,6 @@ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" }, - "decode-uri-component": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", - "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==" - }, "deep-eql": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", @@ -10314,35 +8726,21 @@ "object-keys": "^1.0.12" } }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - } - }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, "denque": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/denque/-/denque-1.5.1.tgz", - "integrity": "sha512-XwE+iZ4D6ZUB7mfYRMb5wByE8L74HCn30FBN7sWnXksWc1LO1bPDl67pBR9o/kC4z/xSNAwkMYcGgqDV3BE3Hw==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==" }, "destroy": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==" }, - "detect-file": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", - "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=" - }, "digest-fetch": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/digest-fetch/-/digest-fetch-1.2.1.tgz", @@ -10498,9 +8896,9 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "ejs": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.9.tgz", - "integrity": "sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ==", + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", "requires": { "jake": "^10.8.5" } @@ -10643,6 +9041,11 @@ "is-symbol": "^1.0.2" } }, + "escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==" + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -10653,11 +9056,6 @@ "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz", "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==" }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" - }, "etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", @@ -10673,113 +9071,17 @@ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } - } - }, - "expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, "express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", + "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", "requires": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.1", + "body-parser": "1.20.2", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.5.0", + "cookie": "0.6.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", @@ -10832,53 +9134,6 @@ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" - } - } - }, "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", @@ -10938,32 +9193,6 @@ } } }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" - } - } - }, "finalhandler": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", @@ -10987,51 +9216,10 @@ "path-exists": "^4.0.0" } }, - "findup-sync": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz", - "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==", - "requires": { - "detect-file": "^1.0.0", - "is-glob": "^4.0.0", - "micromatch": "^3.0.4", - "resolve-dir": "^1.0.1" - } - }, - "fined": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", - "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", - "requires": { - "expand-tilde": "^2.0.2", - "is-plain-object": "^2.0.3", - "object.defaults": "^1.1.0", - "object.pick": "^1.2.0", - "parse-filepath": "^1.0.1" - } - }, - "flagged-respawn": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", - "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==" - }, "follow-redirects": { - "version": "1.14.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz", - "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==" - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" - }, - "for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", - "requires": { - "for-in": "^1.0.1" - } + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==" }, "forever-agent": { "version": "0.6.1", @@ -11053,14 +9241,6 @@ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==" }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "requires": { - "map-cache": "^0.2.2" - } - }, "fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", @@ -11126,9 +9306,9 @@ } }, "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" }, "gaxios": { "version": "4.3.2", @@ -11179,6 +9359,11 @@ "has-symbols": "^1.0.1" } }, + "get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==" + }, "get-symbol-description": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", @@ -11188,15 +9373,10 @@ "get-intrinsic": "^1.1.1" } }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" - }, "getopts": { - "version": "2.2.5", - "resolved": "https://registry.npmjs.org/getopts/-/getopts-2.2.5.tgz", - "integrity": "sha512-9jb7AW5p3in+IiJWhQiZmmwkpLaR/ccTWdWQCtZM66HJcHHLegowh4q4tSD7gouUyeNvFWRavfK9GXosQHDpFA==" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/getopts/-/getopts-2.3.0.tgz", + "integrity": "sha512-5eDf9fuSXwxBL6q5HX+dhDj+dslFGWzU5thZ9kNKUkcPtaPdatmUFKwHFrLb/uf/WpA4BHET+AX3Scl56cAjpA==" }, "getpass": { "version": "0.1.7", @@ -11219,28 +9399,6 @@ "path-is-absolute": "^1.0.0" } }, - "global-modules": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", - "requires": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - } - }, - "global-prefix": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", - "requires": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" - } - }, "google-auth-library": { "version": "7.10.2", "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-7.10.2.tgz", @@ -11354,33 +9512,12 @@ "has-symbols": "^1.0.2" } }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "requires": { - "is-buffer": "^1.1.5" - } - } + "function-bind": "^1.1.2" } }, "he": { @@ -11397,14 +9534,6 @@ "readable-stream": "^3.6.0" } }, - "homedir-polyfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", - "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", - "requires": { - "parse-passwd": "^1.0.0" - } - }, "hot-patcher": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/hot-patcher/-/hot-patcher-1.0.0.tgz", @@ -11548,11 +9677,6 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" - }, "internal-slot": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", @@ -11569,9 +9693,9 @@ "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==" }, "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.9.tgz", + "integrity": "sha512-cyRxvOEpNHNtchU3Ln9KC/auJgup87llfQpQ+t5ghoC/UhL16SWzbueiCsdTnWmqAWl7LadfuwhlqmtOaqMHdQ==" }, "ipaddr.js": { "version": "1.9.1", @@ -11583,23 +9707,6 @@ "resolved": "https://registry.npmjs.org/ipv6-normalize/-/ipv6-normalize-1.0.1.tgz", "integrity": "sha1-GzJYKQ02X6gyOeiZB93kWS52IKg=" }, - "is-absolute": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", - "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", - "requires": { - "is-relative": "^1.0.0", - "is-windows": "^1.0.1" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "requires": { - "kind-of": "^6.0.0" - } - }, "is-bigint": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", @@ -11628,19 +9735,11 @@ "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==" }, "is-core-module": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz", - "integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==", + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", "requires": { - "has": "^1.0.3" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "requires": { - "kind-of": "^6.0.0" + "hasown": "^2.0.0" } }, "is-date-object": { @@ -11651,65 +9750,16 @@ "has-tostringtag": "^1.0.0" } }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "requires": { - "is-plain-object": "^2.0.4" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" - }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "requires": { - "is-extglob": "^2.1.1" - } - }, "is-negative-zero": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==" }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "is-number-object": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", @@ -11718,14 +9768,6 @@ "has-tostringtag": "^1.0.0" } }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "requires": { - "isobject": "^3.0.1" - } - }, "is-property": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", @@ -11740,14 +9782,6 @@ "has-tostringtag": "^1.0.0" } }, - "is-relative": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", - "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", - "requires": { - "is-unc-path": "^1.0.0" - } - }, "is-retry-allowed": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-2.2.0.tgz", @@ -11784,14 +9818,6 @@ "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, - "is-unc-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", - "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", - "requires": { - "unc-path-regex": "^0.1.2" - } - }, "is-weakref": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.1.tgz", @@ -11800,26 +9826,11 @@ "call-bind": "^1.0.0" } }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" - }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" - }, "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", @@ -11919,34 +9930,31 @@ "safe-buffer": "^5.0.1" } }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" - }, "knex": { - "version": "0.21.21", - "resolved": "https://registry.npmjs.org/knex/-/knex-0.21.21.tgz", - "integrity": "sha512-cjw5qO1EzVKjbywcVa61IQJMLt7PfYBRI/2NwCA/B9beXgbw652wDNLz+JM+UKKNsfwprq0ugYqBYc9q4JN36A==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/knex/-/knex-3.1.0.tgz", + "integrity": "sha512-GLoII6hR0c4ti243gMs5/1Rb3B+AjwMOfjYm97pu0FOQa7JH56hgBxYf5WK2525ceSbBY1cjeZ9yk99GPMB6Kw==", "requires": { - "colorette": "1.2.1", - "commander": "^6.2.0", - "debug": "4.3.1", + "colorette": "2.0.19", + "commander": "^10.0.0", + "debug": "4.3.4", + "escalade": "^3.1.1", "esm": "^3.2.25", - "getopts": "2.2.5", + "get-package-type": "^0.1.0", + "getopts": "2.3.0", "interpret": "^2.2.0", - "liftoff": "3.1.0", - "lodash": "^4.17.20", - "pg-connection-string": "2.4.0", - "tarn": "^3.0.1", - "tildify": "2.0.0", - "v8flags": "^3.2.0" + "lodash": "^4.17.21", + "pg-connection-string": "2.6.2", + "rechoir": "^0.8.0", + "resolve-from": "^5.0.0", + "tarn": "^3.0.2", + "tildify": "2.0.0" }, "dependencies": { "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "requires": { "ms": "2.1.2" } @@ -12002,21 +10010,6 @@ "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", "integrity": "sha512-nvVPLpIHUxCUoRLrFqTgSxXJ614d8AgQoWl7zPe/2VadE8+1dpU3LBhowRuBAcuwruWtOdD8oYC9jDNJjXDPyA==" }, - "liftoff": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz", - "integrity": "sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog==", - "requires": { - "extend": "^3.0.0", - "findup-sync": "^3.0.0", - "fined": "^1.0.1", - "flagged-respawn": "^1.0.0", - "is-plain-object": "^2.0.4", - "object.map": "^1.0.0", - "rechoir": "^0.6.2", - "resolve": "^1.1.7" - } - }, "listenercount": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/listenercount/-/listenercount-1.0.1.tgz", @@ -12046,9 +10039,9 @@ "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==" }, "long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" }, "lru-cache": { "version": "6.0.0", @@ -12066,27 +10059,6 @@ "semver": "^6.0.0" } }, - "make-iterator": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", - "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", - "requires": { - "kind-of": "^6.0.2" - } - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "requires": { - "object-visit": "^1.0.0" - } - }, "marked": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", @@ -12117,26 +10089,6 @@ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, "mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -12168,15 +10120,6 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" }, - "mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", - "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - } - }, "mkdirp": { "version": "0.5.5", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", @@ -12327,41 +10270,37 @@ } }, "mysql2": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-2.1.0.tgz", - "integrity": "sha512-9kGVyi930rG2KaHrz3sHwtc6K+GY9d8wWk1XRSYxQiunvGcn4DwuZxOwmK11ftuhhwrYDwGx9Ta4VBwznJn36A==", + "version": "3.9.7", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.9.7.tgz", + "integrity": "sha512-KnJT8vYRcNAZv73uf9zpXqNbvBG7DJrs+1nACsjZP1HMJ1TgXEy8wnNilXAn/5i57JizXKtrUtwDB7HxT9DDpw==", "requires": { - "cardinal": "^2.1.1", - "denque": "^1.4.1", + "denque": "^2.1.0", "generate-function": "^2.3.1", - "iconv-lite": "^0.5.0", - "long": "^4.0.0", - "lru-cache": "^5.1.1", - "named-placeholders": "^1.1.2", + "iconv-lite": "^0.6.3", + "long": "^5.2.1", + "lru-cache": "^8.0.0", + "named-placeholders": "^1.1.3", "seq-queue": "^0.0.5", - "sqlstring": "^2.3.1" + "sqlstring": "^2.3.2" }, "dependencies": { "iconv-lite": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.5.2.tgz", - "integrity": "sha512-kERHXvpSaB4aU3eANwidg79K8FlrN77m8G9V+0vOR3HYaRifrlwMEpT7ZBJqLSEIHnEgJTHcWK82wwLwwKwtag==", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "requires": { - "safer-buffer": ">= 2.1.2 < 3" + "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "requires": { - "yallist": "^3.0.2" - } + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-8.0.5.tgz", + "integrity": "sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA==" }, - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + "sqlstring": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", + "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==" } } }, @@ -12386,24 +10325,6 @@ "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==", "optional": true }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - } - }, "ncp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", @@ -12438,14 +10359,6 @@ "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==" }, - "node-onvif-events": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/node-onvif-events/-/node-onvif-events-2.0.5.tgz", - "integrity": "sha512-rZOHirBe/O47qD0zdjUBQn9dPFO9VdCw6ZSQGUN/Grjxh9p+LOZImN3kLuDdfNfczI8gIfg4JUV0LnSUSxzIeA==", - "requires": { - "onvif": "git+https://github.com/agsh/onvif.git" - } - }, "node-ssh": { "version": "12.0.4", "resolved": "https://registry.npmjs.org/node-ssh/-/node-ssh-12.0.4.tgz", @@ -12460,19 +10373,19 @@ } }, "node-telegram-bot-api": { - "version": "0.61.0", - "resolved": "https://registry.npmjs.org/node-telegram-bot-api/-/node-telegram-bot-api-0.61.0.tgz", - "integrity": "sha512-BZXd8Bh2C5+uBEQuuI3FD7TFJF3alV+6oFQt8CNLx3ldX/hsd+NYyllTX+Y+5X0tG+xtcRQQjbfLgz/4sRvmBQ==", + "version": "0.65.1", + "resolved": "https://registry.npmjs.org/node-telegram-bot-api/-/node-telegram-bot-api-0.65.1.tgz", + "integrity": "sha512-YhMSgUZCKWxI+MlCuh/2yuMvsqMnZGAA2QOjD10GWk8KszNN5LQOzO+kp1K1wMYuOJoZ7v0+epLpJsSrnmlyQQ==", "requires": { + "@cypress/request": "^3.0.1", + "@cypress/request-promise": "^5.0.0", "array.prototype.findindex": "^2.0.2", "bl": "^1.2.3", "debug": "^3.2.7", "eventemitter3": "^3.0.0", "file-type": "^3.9.0", "mime": "^1.6.0", - "pump": "^2.0.0", - "request": "^2.83.0", - "request-promise": "^4.2.2" + "pump": "^2.0.0" }, "dependencies": { "bl": { @@ -12536,9 +10449,9 @@ } }, "nodemailer": { - "version": "6.9.4", - "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.9.4.tgz", - "integrity": "sha512-CXjQvrQZV4+6X5wP6ZIgdehJamI63MFoYFGGPtHudWym9qaEHDNdPzaj5bfMCvxG1vhAileSWW90q7nL0N36mA==" + "version": "6.9.13", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.9.13.tgz", + "integrity": "sha512-7o38Yogx6krdoBf3jCAqnIN4oSQFx+fMa0I7dK1D+me9kBxx12D+/33wSb+fhOCtIxvYJ+4x4IMEhmhCKfAiOA==" }, "number-allocator": { "version": "1.0.10", @@ -12574,67 +10487,6 @@ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "object-inspect": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", @@ -12645,14 +10497,6 @@ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "requires": { - "isobject": "^3.0.0" - } - }, "object.assign": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", @@ -12664,34 +10508,6 @@ "object-keys": "^1.1.1" } }, - "object.defaults": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", - "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", - "requires": { - "array-each": "^1.0.1", - "array-slice": "^1.0.0", - "for-own": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "object.map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", - "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", - "requires": { - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "requires": { - "isobject": "^3.0.1" - } - }, "on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", @@ -12709,11 +10525,12 @@ } }, "onvif": { - "version": "git+ssh://git@github.com/agsh/onvif.git#6495d3c6a18cc30dda19db3f06217cbf8b5d4160", - "from": "onvif@git+https://github.com/agsh/onvif.git", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/onvif/-/onvif-0.7.1.tgz", + "integrity": "sha512-KmgtdrjLzQQvphUwlTce+0wnNu7aq2mdHsWWUnKB1repFg3fttMf6d5qX9kBJZuWjk2wJ9hy4biyn+kYquAYkQ==", "requires": { "lodash.get": "^4.4.2", - "xml2js": "^0.5.0" + "xml2js": "^0.6.2" } }, "p-limit": { @@ -12746,31 +10563,11 @@ "polygon-points": "^0.6.0" } }, - "parse-filepath": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", - "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", - "requires": { - "is-absolute": "^1.0.0", - "map-cache": "^0.2.0", - "path-root": "^0.1.1" - } - }, - "parse-passwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=" - }, "parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" - }, "path": { "version": "0.12.7", "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", @@ -12800,19 +10597,6 @@ "resolved": "https://registry.npmjs.org/path-posix/-/path-posix-1.0.0.tgz", "integrity": "sha1-BrJhE/Vr6rBCVFojv6iAA8ysJg8=" }, - "path-root": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", - "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", - "requires": { - "path-root-regex": "^0.1.0" - } - }, - "path-root-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", - "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=" - }, "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", @@ -12829,9 +10613,9 @@ "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, "pg-connection-string": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.4.0.tgz", - "integrity": "sha512-3iBXuv7XKvxeMrIgym7njT+HlZkwZqqGX4Bu9cci8xHZNT+Um1gWKqCsAzcC0d95rcKMU5WBg6YRUcHyV0HZKQ==" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.6.2.tgz", + "integrity": "sha512-ch6OwaeaPYcova4kKZ15sbJ2hKb/VP48ZD2gE7i1J+L4MspCtBMAx8nMgz7bksc7IojCIIWuEhHibSMFH8m8oA==" }, "pipe2pam": { "version": "0.6.2", @@ -12864,11 +10648,6 @@ "resolved": "https://registry.npmjs.org/polygon-points/-/polygon-points-0.6.0.tgz", "integrity": "sha512-GiWcByVNyfbhGbBmiCfUXzXeDy+iMeYFUZ2Cc+ORWRpECcXi+AwyUH82ZT5zRDGIC8iU6jAcs0fFQGp03wbAFA==" }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" - }, "precond": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/precond/-/precond-0.2.3.tgz", @@ -12914,9 +10693,9 @@ } }, "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==" }, "pushover-notifications": { "version": "1.2.2", @@ -12942,9 +10721,9 @@ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" }, "raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "requires": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -12963,19 +10742,11 @@ } }, "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", "requires": { - "resolve": "^1.1.6" - } - }, - "redeyed": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/redeyed/-/redeyed-2.1.1.tgz", - "integrity": "sha512-FNpGGo1DycYAdnrKFxCMmKYgo/mILAqtRYbkdQD8Ep/Hk2PQ5+aEAEx+IU713RTDmuBaH0c8P5ZozurNu5ObRQ==", - "requires": { - "esprima": "~4.0.0" + "resolve": "^1.20.0" } }, "regenerator-runtime": { @@ -12983,15 +10754,6 @@ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, "regex-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/regex-regex/-/regex-regex-1.0.0.tgz", @@ -13002,16 +10764,6 @@ "resolved": "https://registry.npmjs.org/reinterval/-/reinterval-1.1.0.tgz", "integrity": "sha1-M2Hs+jymwYKDOA3Qu5VG85D17Oc=" }, - "repeat-element": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", - "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==" - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" - }, "request": { "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", @@ -13056,23 +10808,12 @@ } } }, - "request-promise": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/request-promise/-/request-promise-4.2.6.tgz", - "integrity": "sha512-HCHI3DJJUakkOr8fNoCc73E5nU5bqITjOYFMDrKHYOXWXrgD/SBaC7LjwuPymUprRyuF06UK7hd/lMHkmUXglQ==", - "requires": { - "bluebird": "^3.5.0", - "request-promise-core": "1.1.4", - "stealthy-require": "^1.1.1", - "tough-cookie": "^2.3.3" - } - }, "request-promise-core": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", - "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.3.tgz", + "integrity": "sha512-QIs2+ArIGQVp5ZYbWD5ZLCY29D5CfWizP8eWnm8FoGD1TX61veauETVQbrV60662V0oFBkrDOuaBI8XgtuyYAQ==", "requires": { - "lodash": "^4.17.19" + "lodash": "^4.17.15" } }, "require-directory": { @@ -13091,32 +10832,19 @@ "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" }, "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" } }, - "resolve-dir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", - "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", - "requires": { - "expand-tilde": "^2.0.0", - "global-modules": "^1.0.0" - } - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==" }, "rfdc": { "version": "1.3.0", @@ -13156,14 +10884,6 @@ "integrity": "sha512-gH8eh2nZudPQO6TytOvbxnuhYBOvDBBLW52tz5q6X58lJcd/tkmqFR+5Z9adS8aJtURSXWThWy/xJtJwixErvg==", "optional": true }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "requires": { - "ret": "~0.1.10" - } - }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -13250,32 +10970,6 @@ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, - "set-value": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", - "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" - } - } - }, "setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", @@ -13302,9 +10996,9 @@ } }, "shinobi-onvif": { - "version": "0.1.9", - "resolved": "https://registry.npmjs.org/shinobi-onvif/-/shinobi-onvif-0.1.9.tgz", - "integrity": "sha512-88vyIr7AlXSHmRALDHM31Rol5EII3FQcGSBvKjU4GP+7d2cwEo5chZZH/IBXSuBYeAprzsxb6fHwBaFdxrzs1w==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/shinobi-onvif/-/shinobi-onvif-0.2.2.tgz", + "integrity": "sha512-U03SRwScG0re4cBeqhuGtMrlw7rDNa7dU29K3AEmvFVOO1Nba4vtFLXWdei8hQK5SlZd/toqPMbcfNWikoSBpA==", "requires": { "html": ">=1.0.0", "xml2js": ">=0.4.17" @@ -13341,140 +11035,14 @@ } }, "smtp-server": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/smtp-server/-/smtp-server-3.13.0.tgz", - "integrity": "sha512-thVFqpwrHIJ25rXjXA6RYFUO35el2O+X7WJ006qMVAyFs5Ss6XGPJASg7Fh1QvT28ADIv9hGGXmgR+kaSEikwQ==", + "version": "3.13.4", + "resolved": "https://registry.npmjs.org/smtp-server/-/smtp-server-3.13.4.tgz", + "integrity": "sha512-BbElv5UP+HgPtCZtcRW35N/GFoc4DzPkrbSMLioXsrVMmQT1mMBoO0k+egl264hxWaWczoVvadSPY2pLUINFXg==", "requires": { "base32.js": "0.1.0", "ipv6-normalize": "1.0.1", - "nodemailer": "6.9.4" - } - }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "requires": { - "is-descriptor": "^1.0.0" - } - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } + "nodemailer": "6.9.13", + "punycode": "2.3.1" } }, "socket.io": { @@ -13564,36 +11132,6 @@ } } }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" - }, - "source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", - "requires": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-url": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", - "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==" - }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "requires": { - "extend-shallow": "^3.0.0" - } - }, "split2": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", @@ -13641,76 +11179,6 @@ } } }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" - } - } - }, "statuses": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", @@ -13719,7 +11187,7 @@ "stealthy-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", - "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=" + "integrity": "sha512-ZnWpYnYugiOVEY5GkcuJK1io5V8QmNYChG62gSit9pQVGErXtrKuPC55ITaVSukmMta5qpMU7vqLt2Lnni4f/g==" }, "stream-shift": { "version": "1.0.1", @@ -13795,54 +11263,21 @@ "has-flag": "^4.0.0" } }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" + }, "tarn": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/tarn/-/tarn-3.0.1.tgz", - "integrity": "sha512-6usSlV9KyHsspvwu2duKH+FMUhqJnAh6J5J/4MITl8s94iSUQTLkJggdiewKv4RyARQccnigV48Z+khiuVZDJw==" + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/tarn/-/tarn-3.0.2.tgz", + "integrity": "sha512-51LAVKUSZSVfI05vjPESNc5vwqqZpbXCsU+/+wxlOrUjk2SnFTt97v9ZgQrD4YmxYW1Px6w2KjaDitCfkvgxMQ==" }, "tildify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/tildify/-/tildify-2.0.0.tgz", "integrity": "sha512-Cc+OraorugtXNfs50hU9KS369rFXCfgGLpfCfvlc+Ud5u6VWmUQsOAa9HbTvheQdYnrdJqqv1e5oIqXppMYnSw==" }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, "toidentifier": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", @@ -13925,34 +11360,11 @@ "which-boxed-primitive": "^1.0.2" } }, - "unc-path-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", - "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=" - }, "underscore": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.1.tgz", "integrity": "sha512-hzSoAVtJF+3ZtiFX0VgfFPHEDRm7Y/QPjGyNo4TVdnDTdft3tr8hEkD25a1jC+TjTuE7tkHGKkhwCgs9dgBB2g==" }, - "union-value": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", - "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^2.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" - } - } - }, "universalify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", @@ -13963,42 +11375,6 @@ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==" }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" - } - } - }, "unzipper": { "version": "0.10.11", "resolved": "https://registry.npmjs.org/unzipper/-/unzipper-0.10.11.tgz", @@ -14053,11 +11429,6 @@ "punycode": "^2.1.0" } }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" - }, "url-join": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", @@ -14077,11 +11448,6 @@ "resolved": "https://registry.npmjs.org/url-template/-/url-template-2.0.8.tgz", "integrity": "sha1-/FZaPMy/93MMd19WQflVV5FDnyE=" }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" - }, "util": { "version": "0.10.4", "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", @@ -14155,14 +11521,6 @@ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" }, - "v8flags": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", - "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, "validate.io-array": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/validate.io-array/-/validate.io-array-1.0.6.tgz", @@ -14370,14 +11728,6 @@ "webidl-conversions": "^3.0.0" } }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "requires": { - "isexe": "^2.0.0" - } - }, "which-boxed-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", @@ -14417,9 +11767,9 @@ "requires": {} }, "xml2js": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", - "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz", + "integrity": "sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==", "requires": { "sax": ">=0.6.0", "xmlbuilder": "~11.0.0" diff --git a/package.json b/package.json index 05d773e0..c62fccfb 100644 --- a/package.json +++ b/package.json @@ -33,20 +33,20 @@ "googleapis": "^100.0.0", "http-proxy": "^1.18.1", "jsonfile": "^3.0.1", - "knex": "^0.21.21", + "knex": "^3.1.0", "ldapauth-fork": "^5.0.2", "marked": "^4.3.0", "moment": "^2.29.4", "mp4frag": "^0.6.1", "mqtt": "^4.3.7", "mysql": "^2.18.1", - "mysql2": "^2.1.0", + "mysql2": "^3.9.7", "node-abort-controller": "^3.0.1", "node-fetch": "^2.6.7", - "node-onvif-events": "^2.0.5", "node-ssh": "^12.0.4", - "node-telegram-bot-api": "^0.61.0", + "node-telegram-bot-api": "^0.65.1", "nodemailer": "^6.7.1", + "onvif": "^0.7.1", "pam-diff": "^1.1.0", "path": "^0.12.7", "pipe2pam": "^0.6.2", @@ -54,7 +54,7 @@ "pushover-notifications": "^1.2.2", "sat": "^0.7.1", "shinobi-node-moving-things-tracker": "^0.9.3", - "shinobi-onvif": "0.1.9", + "shinobi-onvif": "0.2.2", "shinobi-sound-detection": "^0.1.13", "shinobi-zwave": "^1.0.11", "smtp-server": "^3.13.0", diff --git a/tools/downloadPlugins.js b/tools/downloadPlugins.js new file mode 100644 index 00000000..616a5683 --- /dev/null +++ b/tools/downloadPlugins.js @@ -0,0 +1,68 @@ +const fetch = require('node-fetch'); +const AdmZip = require('adm-zip'); +const fs = require('fs').promises; +const path = require('path'); + +const GITLAB_API_URL = 'https://gitlab.com/api/v4'; +const PROJECT_ID = 'Shinobi-Systems/shinobi-plugins'; +const BRANCH = 'master'; + +async function fetchAndDownloadFolder(folderName) { + const url = `${GITLAB_API_URL}/projects/${encodeURIComponent(PROJECT_ID)}/repository/archive.zip?path=plugins/${folderName}&ref=${BRANCH}`; + + try { + const response = await fetch(url, { + headers: { + 'Accept': 'application/zip', + }, + }); + + if (!response.ok) { + throw new Error(`Failed to download folder: ${response.statusText}`); + } + + const buffer = await response.buffer(); + const zip = new AdmZip(buffer); + + // Extract the ZIP to a temporary location + const tempExtractPath = path.join(process.cwd(), 'temp_extracted'); + await fs.mkdir(tempExtractPath, { recursive: true }); + zip.extractAllTo(tempExtractPath, true); + + // Find the folder ending with the target name + const extractedFolder = (await fs.readdir(tempExtractPath)).find(dir => dir.endsWith(folderName)); + if (!extractedFolder) { + throw new Error(`Folder ${folderName} not found in the extracted ZIP`); + } + + // Move the contents to the specified output path + const sourcePath = path.join(tempExtractPath, extractedFolder, 'plugins', folderName); + const targetPath = path.join(process.cwd(), 'plugins', `dl_${folderName}`); + + // Ensure target path exists + await fs.mkdir(targetPath, { recursive: true }); + + // Copy files from source to target + const files = await fs.readdir(sourcePath); + await Promise.all(files.map(async file => { + const srcFile = path.join(sourcePath, file); + const destFile = path.join(targetPath, file); + await fs.rename(srcFile, destFile); + })); + + // Clean up temporary extraction directory + await fs.rm(tempExtractPath, { recursive: true }); + + console.log(`Folder ${folderName} extracted to ${targetPath}`); + } catch (error) { + console.error('Error fetching and extracting folder:', error); + } +} + +// Parse command-line arguments +const [folderName] = process.argv.slice(2); + +if (!folderName) { + console.error('Usage: node script.js '); + process.exit(1); +} diff --git a/tools/massBitrateUpdateOnvif.js b/tools/massBitrateUpdateOnvif.js new file mode 100644 index 00000000..ef27714e --- /dev/null +++ b/tools/massBitrateUpdateOnvif.js @@ -0,0 +1,90 @@ +const onvif = require('shinobi-onvif'); +const fs = require('fs'); +const { getDeviceInformation, mergeDeep, getFunctionParamNames } = require('./onvifUtilsForTest.js'); + +// Fetch command line arguments +const args = process.argv.slice(2); +const jsonFilePath = args[0]; +const streamType = args[1]; // 'main' or 'sub' +const newBitrate = parseInt(args[2]); // Bitrate in kbps + +if(!jsonFilePath || !streamType || !newBitrate){ + console.log(`node massBitrateUpdateOnvif.js ./exportedShinobiMonitors.json main 1500`) + return +} + +// Read camera configurations from a JSON file +const cameras = JSON.parse(fs.readFileSync(jsonFilePath, 'utf8')); + +function tokenCheck(token){ + return streamType === 'sub' ? + token.includes('sub') + || token.includes('Sub') + || token.includes('1') + : + token.includes('main') + || token.includes('Main') + || token.includes('0') +} + +// Function to update the bitrate +const updateBitrate = async (camera, newBitrate, streamType) => { + try { + const device = new onvif.OnvifDevice({ + xaddr: `http://${camera.host}:${camera.details.onvif_port}/onvif/device_service`, + user: camera.details.muser, + pass: camera.details.mpass + }); + + await device.init(); + + // Determine which stream type to update + const configs = (await device.services.media.getVideoEncoderConfigurations()).data.GetVideoEncoderConfigurationsResponse.Configurations; + const config = configs.find(c => tokenCheck(c.$.token)); + + if (!config) { + console.log(`No ${streamType} stream configuration found for camera ${camera.host}`); + return; + } + const chosenToken = config.$.token; + const { + videoEncoders, + videoEncoderOptions + } = await getDeviceInformation(device,{ + videoEncoders: true, + videoEncoderOptions: true + }); + const videoEncoderIndex = {}; + videoEncoders.forEach((encoder) => {videoEncoderIndex[encoder.$.token] = encoder}); + const videoEncoder = videoEncoderIndex[chosenToken] || {}; + const theChanges = { + RateControl: { + BitrateLimit: newBitrate + } + }; + const onvifParams = mergeDeep(videoEncoder,theChanges); + const newConfig = { + ConfigurationToken: config.$.token, + Configuration: onvifParams + }; + if(newBitrate != videoEncoder.RateControl.BitrateLimit){ + console.log(videoEncoder) + const updateResponse = await device.services.media.setVideoEncoderConfiguration(newConfig); + console.log('updateResponse',updateResponse.data) + console.log(`Updated ${streamType} stream bitrate for camera ${camera.host} to ${newBitrate} kbps`); + }else{ + console.log(`Skipped ${camera.host}`) + } + } catch (err) { + console.error(`Error updating bitrate for camera ${camera.host}:`, err); + } +}; + +// Iterate over cameras sequentially and update bitrate for the specified stream type +const updateAllCameras = async () => { + for (const camera of cameras) { + await updateBitrate(camera, newBitrate, streamType); + } +}; + +updateAllCameras(); diff --git a/tools/onvifUtilsForTest.js b/tools/onvifUtilsForTest.js new file mode 100644 index 00000000..90c1d455 --- /dev/null +++ b/tools/onvifUtilsForTest.js @@ -0,0 +1,546 @@ +// relies on https://gitlab.com/Shinobi-Systems/shinobi-onvif +const onvif = require('shinobi-onvif'); +const getFunctionParamNames = function(func) { + var fnStr = func.toString().replace(/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg, ''); + var result = fnStr.slice(fnStr.indexOf('(')+1, fnStr.indexOf(')')).match(/([^\s,]+)/g); + if(result === null) + result = []; + return result; +} +const mergeDeep = function(...objects) { + const isObject = obj => obj && typeof obj === 'object'; + + return objects.reduce((prev, obj) => { + Object.keys(obj).forEach(key => { + const pVal = prev[key]; + const oVal = obj[key]; + + if (Array.isArray(pVal) && Array.isArray(oVal)) { + prev[key] = pVal.concat(...oVal); + } + else if (isObject(pVal) && isObject(oVal)) { + prev[key] = mergeDeep(pVal, oVal); + } + else { + prev[key] = oVal; + } + }); + + return prev; + }, {}); +} +const replaceDynamicInOptions = (Camera,options) => { + const newOptions = {} + Object.keys(options).forEach((key) => { + const value = options[key] + if(typeof value === 'string'){ + newOptions[key] = value.replace(/__CURRENT_TOKEN/g,Camera.current_profile.token) + }else if(value !== undefined && value !== null){ + newOptions[key] = value + } + }) + return newOptions +} +const runOnvifMethod = async (onvifOptions) => { + return new Promise((resolve,reject) => { + const onvifDevice = onvifOptions.device + var response = {ok: false} + var errorMessage = function(msg,error){ + response.ok = false + response.msg = msg + response.error = error + resolve(response) + } + var actionCallback = function(onvifActionResponse){ + response.ok = true + if(onvifActionResponse.data){ + response.responseFromDevice = onvifActionResponse.data + }else{ + response.responseFromDevice = onvifActionResponse + } + if(onvifActionResponse.soap)response.soap = onvifActionResponse.soap + resolve(response) + } + var isEmpty = function(obj) { + for(var key in obj) { + if(obj.hasOwnProperty(key)) + return false; + } + return true; + } + var completeAction = function(command){ + if(command && command.then){ + command.then(actionCallback).catch(function(error){ + errorMessage('Device Action responded with an error',error) + }) + }else if(command){ + response.ok = true + response.repsonseFromDevice = command + resolve(response) + }else{ + response.error = 'Big Errors, Please report it to Shinobi Development' + resolve(response) + } + } + var action + if(onvifOptions.service){ + if(onvifDevice.services[onvifOptions.service] === undefined){ + return errorMessage('This is not an available service. Please use one of the following : '+Object.keys(onvifDevice.services).join(', ')) + } + if(onvifDevice.services[onvifOptions.service] === null){ + return errorMessage('This service is not activated. Maybe you are not connected through ONVIF. You can test by attempting to use the "Control" feature with ONVIF in Shinobi.') + } + action = onvifDevice.services[onvifOptions.service][onvifOptions.action] + }else{ + action = onvifDevice[onvifOptions.action] + } + if(!action || typeof action !== 'function'){ + errorMessage(onvifOptions.action+' is not an available ONVIF function. See https://github.com/futomi/node-onvif for functions.') + }else{ + var argNames = getFunctionParamNames(action) + var options + var command + if(argNames[0] === 'options' || argNames[0] === 'params'){ + options = replaceDynamicInOptions(onvifDevice,onvifOptions.options || {}) + response.options = options + } + if(onvifOptions.service){ + command = onvifDevice.services[onvifOptions.service][onvifOptions.action](options) + }else{ + command = onvifDevice[onvifOptions.action](options) + } + completeAction(command) + } + }) +} +const getDeviceInformation = async (onvifDevice,options) => { + // const options = { + // protocols: true, + // networkInterface: true, + // gateway: true, + // dns: true, + // ntp: true, + // } + const response = { + ok: true, + } + try{ + if(options.all || options.protocols){ + response.protocols = (await onvifDevice.services.device.getNetworkProtocols()).data.GetNetworkProtocolsResponse.NetworkProtocols + } + if(options.all || options.networkInterface){ + response.networkInterface = (await onvifDevice.services.device.getNetworkInterfaces()).data.GetNetworkInterfacesResponse.NetworkInterfaces + } + if(options.all || options.gatewayAddress){ + response.gateway = (await onvifDevice.services.device.getNetworkDefaultGateway()).data.GetNetworkDefaultGatewayResponse.NetworkGateway.IPv4Address + } + if(options.all || options.dns){ + response.dns = (await onvifDevice.services.device.getDNS()).data.GetDNSResponse.DNSInformation + } + if(options.all || options.ntp){ + response.ntp = (await onvifDevice.services.device.getNTP()).data.GetNTPResponse.NTPInformation + } + if(options.all || options.date){ + response.date = (await onvifDevice.services.device.getSystemDateAndTime()).data.GetSystemDateAndTimeResponse.SystemDateAndTime + } + if(options.all || options.users){ + response.users = (await onvifDevice.services.device.getUsers()).data.GetUsersResponse.User + } + if(options.all || options.hostname){ + response.hostname = (await onvifDevice.services.device.getHostname()).data.GetHostnameResponse.HostnameInformation.Name + } + if(options.all || options.discoveryMode){ + response.discoveryMode = (await onvifDevice.services.device.getDiscoveryMode()).data.GetDiscoveryModeResponse.DiscoveryMode + } + if(options.all || options.videoEncoders){ + response.videoEncoders = (await onvifDevice.services.media.getVideoEncoderConfigurations()).data.GetVideoEncoderConfigurationsResponse.Configurations + } + if(options.all || options.videoEncoderOptions){ + response.videoEncoderOptions = (await runOnvifMethod({ + device: onvifDevice, + action: 'getVideoEncoderConfigurationOptions', + service: 'media', + options: {} + })).responseFromDevice.GetVideoEncoderConfigurationOptionsResponse.Options + } + if(options.all || options.imagingSettings){ + const imagingSettings = (await runOnvifMethod({ + device: onvifDevice, + action: 'getImagingSettings', + service: 'imaging', + options: {"ConfigurationToken":"__CURRENT_TOKEN"} + })); + response.imagingSettings = imagingSettings.responseFromDevice ? imagingSettings.responseFromDevice.GetImagingSettingsResponse.ImagingSettings : imagingSettings + } + }catch(err){ + response.ok = false + response.error = err.stack.toString() + console.log(err) + console.log(onvifDevice) + } + return response +} +const setProtocols = async (onvifDevice,saveSet) => { + // const saveSet = { + // "HTTP": "80", + // "RTSP": "554", + // } + const response = { + ok: false + } + try{ + const saveKeys = Object.keys(saveSet) + const protocols = (await getDeviceInformation(onvifDevice,{protocols: true})).protocols + protocols.forEach((item) => { + saveKeys.forEach((key) => { + if(item.Name === key.toUpperCase()){ + const port = saveSet[key] && !isNaN(saveSet[key]) ? parseInt(saveSet[key]) : item.Name === 'RTSP' ? 554 : 80 + console.log('PORT',port) + item.Port = port + item.Enabled = true + } + }) + }) + console.log('protocols',protocols) + + const onvifResponse = await onvifDevice.services.device.setNetworkProtocols({ + NetworkProtocols: protocols + }) + response.ok = true + response.onvifResponse = onvifResponse + }catch(err){ + response.error = err.stack.toString() + } + return response +} +const setNetworkInterface = async (onvifDevice,options) => { + // const options = { + // interface: 'eth0', + // ipv4: '10.1.103.158', + // dhcp: false, + // } + const response = { + ok: false + } + try{ + const { networkInterface } = await getDeviceInformation(onvifDevice,{networkInterface: true}) + const onvifParams = { + SetNetworkInterfaces: { + InterfaceToken: options.interface || networkInterface.$.token, + NetworkInterface: { + Enabled: true, + IPv4: { + Enabled: true, + Manual: { + Address: options.ipv4 || networkInterface.IPv4.Config.Manual.Address, + PrefixLength: '24', + }, + 'DHCP': options.dhcp === undefined || options.dhcp === null ? networkInterface.IPv4.Config.DHCP === 'true' ? true : false : options.dhcp, + } + } + } + } + const onvifResponse = await onvifDevice.services.device.setNetworkInterfaces(onvifParams) + response.ok = true + response.onvifResponse = onvifResponse + }catch(err){ + response.error = err.stack.toString() + } + return response +} +const setGateway = async (onvifDevice,options) => { + // const options = { + // ipv4: '1.1.1.1,8.8.8.8', + // } + const response = { + ok: false + } + try{ + const gatewayAddress = (await getDeviceInformation(onvifDevice,{gateway: true})).gateway + const onvifResponse = await onvifDevice.services.device.setNetworkDefaultGateway({ + 'NetworkGateway': [ + {'IPv4Address': options.ipv4 || gatewayAddress} + ] + }) + response.ok = true + response.onvifResponse = onvifResponse + }catch(err){ + response.error = err.stack.toString() + } + return response +} +const setDNS = async (onvifDevice,options) => { + options = Object.assign({ + dns: '1.1.1.1,8.8.8.8', + searchDomain: 'localhost', + dhcp: false, + },options) + const response = { + ok: false + } + try{ + const dnsArray = [] + const searchDomain = (options.searchDomain || '').split(',') + const dnsList = (options.dns || '1.1.1.1').split(',') + dnsList.forEach((item) => { + dnsArray.push({ + Type: 'IPv4', + IPv4Address: item, + }) + }) + const dnsInfo = (await getDeviceInformation(onvifDevice,{dns: true})).dns + const onvifResponse = await onvifDevice.services.device.setDNS({ + 'FromDHCP' : !options.dhcp ? false : true, + 'SearchDomain': searchDomain, + 'DNSManual' : dnsArray + }) + response.ok = true + response.onvifResponse = onvifResponse + }catch(err){ + response.error = err.stack.toString() + } + return response +} +const setNTP = async (onvifDevice,options) => { + // const options = { + // ipv4: '1.1.1.1,8.8.8.8', + // dhcp: false, + // } + const response = { + ok: false + } + try{ + const ntpInfo = (await getDeviceInformation(onvifDevice,{ntp: true})).ntp + const ipv4 = options.ipv4 || ntpInfo.NTPManual.IPv4Address + const onvifResponse = await onvifDevice.services.device.setNTP({ + FromDHCP: !options.dhcp ? false : true, + NTPManual: {'Type': "IPv4", 'IPv4Address': ipv4} + }) + response.ok = true + response.onvifResponse = onvifResponse + }catch(err){ + response.error = err.stack.toString() + } + return response +} +const setHostname = async (onvifDevice,options) => { + // const options = { + // name: 'hostname', + // } + const response = { + ok: false + } + try{ + const hostname = options.name || (await getDeviceInformation(onvifDevice,{hostname: true})).hostname + const onvifResponse = await onvifDevice.services.device.setHostname({ + Name: hostname + }) + response.ok = true + response.onvifResponse = onvifResponse + }catch(err){ + response.error = err.stack.toString() + } + return response +} +const rebootCamera = async (onvifDevice,options) => { + const response = { + ok: false + } + try{ + const onvifResponse = await onvifDevice.services.device.reboot() + response.ok = true + response.onvifResponse = onvifResponse + }catch(err){ + response.error = err.stack.toString() + } + return response +} +const setDateAndTime = async (onvifDevice,options) => { + // const options = { + // dateTimeType: 'ntp', + // daylightSavings: false, + // timezone: 'XXXX', + // utcDateTime: 'XXXX', + // } + const response = { + ok: false + } + try{ + // const dateInfo = await onvifDevice.services.device.getSystemDateAndTime().GetSystemDateAndTimeResponse.SystemDateAndTime + const onvifResponse = await onvifDevice.services.device.setSystemDateAndTime ({ + DateTimeType: options.dateTimeType, + DaylightSavings: !options.daylightSavings ? false : true, + // TimeZone: options.timezone, + UTCDateTime: new Date(options.utcDateTime), + }) + response.ok = true + response.onvifResponse = onvifResponse + }catch(err){ + response.error = err.stack.toString() + } + return response +} +const createUser = async (onvifDevice,options) => { + // const options = { + // name: 'user1', + // password: '123', + // level: 'Administrator' || 'Operator' || 'User', + // } + const response = { + ok: false + } + try{ + const onvifResponse = await onvifDevice.services.device.createUsers({ + 'User' : [ + {'Username': options.name, 'Password' : options.password, 'UserLevel': options.level} + ] + }) + response.ok = true + response.onvifResponse = onvifResponse + }catch(err){ + response.error = err.stack.toString() + } + return response +} +const deleteUser = async (onvifDevice,options) => { + // const options = { + // name: 'user1', + // } + const response = { + ok: false + } + try{ + const onvifResponse = await onvifDevice.services.device.deleteUsers({ + 'User' : [ + {'Username': options.name} + ] + }) + response.ok = true + response.onvifResponse = onvifResponse + }catch(err){ + response.error = err.stack.toString() + } + return response +} +const validateEncoderOptions = (chosenOptions, videoEncoderOptions) => { + const resolutions = [] + const minQuality = parseInt(videoEncoderOptions.QualityRange.Min) || 1 + const maxQuality = parseInt(videoEncoderOptions.QualityRange.Max) || 6 + const quality = !isNaN(chosenOptions.Quality) ? parseInt(chosenOptions.Quality) : 1 + const minGovLength = parseInt(videoEncoderOptions.H264.GovLengthRange.Min) || 0 + const maxGovLength = parseInt(videoEncoderOptions.H264.GovLengthRange.Max) || 100 + const govLength = !isNaN(chosenOptions.H264.GovLength) ? parseInt(chosenOptions.H264.GovLength) : 10 + const minFrameRateLimit = parseInt(videoEncoderOptions.H264.FrameRateRange.Min) || 1 + const maxFrameRateLimit = parseInt(videoEncoderOptions.H264.FrameRateRange.Max) || 30 + const frameRateLimit = !isNaN(chosenOptions.RateControl.FrameRateLimit) ? parseInt(chosenOptions.RateControl.FrameRateLimit) : 15 + const minEncodingInterval = parseInt(videoEncoderOptions.H264.EncodingIntervalRange.Min) || 1 + const maxEncodingInterval = parseInt(videoEncoderOptions.H264.EncodingIntervalRange.Max) || 30 + const encodingInterval = !isNaN(chosenOptions.RateControl.EncodingInterval) ? parseInt(chosenOptions.RateControl.EncodingInterval) : 1 + videoEncoderOptions.H264.ResolutionsAvailable.forEach((resolution) => { + resolutions.push(`${resolution.Width}x${resolution.Height}`) + }) + if(resolutions.indexOf(`${chosenOptions.Resolution.Width}x${chosenOptions.Resolution.Height}`) === -1){ + chosenOptions.Resolution.Width = resolutions[0].Width + chosenOptions.Resolution.Height = resolutions[0].Height + } + if(quality < minQuality || quality > maxQuality){ + chosenOptions.Quality = 1 + } + if(govLength < minGovLength || govLength > maxGovLength){ + chosenOptions.H264.GovLength = 10 + } + if(frameRateLimit < minFrameRateLimit || frameRateLimit > maxFrameRateLimit){ + chosenOptions.RateControl.FrameRateLimit = 15 + } + if(encodingInterval < minEncodingInterval || encodingInterval > maxEncodingInterval){ + chosenOptions.RateControl.EncodingInterval = 1 + } +} +const setVideoConfiguration = async (onvifDevice,options) => { + const response = { + ok: false + } + try{ + const { + videoEncoders, + videoEncoderOptions + } = await getDeviceInformation(onvifDevice,{ + videoEncoders: true, + videoEncoderOptions: true + }) + const videoEncoderIndex = {} + videoEncoders.forEach((encoder) => {videoEncoderIndex[encoder.$.token] = encoder}) + const chosenToken = `${options.videoToken || videoEncoders[0].$.token}` + const videoEncoder = videoEncoderIndex[chosenToken] || {} + const onvifParams = mergeDeep(videoEncoder,options,{ + Multicast: { + AutoStart: !options.Multicast || !options.Multicast.AutoStart ? 'false' : 'true' + }, + }) + const validatedEncoderOptions = validateEncoderOptions(onvifParams, videoEncoderOptions) + const onvifResponse = await onvifDevice.services.media.setVideoEncoderConfiguration({ + Configuration: onvifParams, + ConfigurationToken: chosenToken + }) + response.ok = true + response.onvifResponse = onvifResponse + }catch(err){ + response.error = err.stack.toString() + } + return response +} +const setImagingSettings = async (onvifDevice,options) => { + const response = { + ok: false + } + try{ + const { imagingSettings } = await getDeviceInformation(onvifDevice,{imagingSettings: true}) + const onvifParams = mergeDeep(imagingSettings,options) + const onvifResponse = await onvifDevice.services.imaging.setImagingSettings({ + ConfigurationToken: options.videoToken || onvifDevice.current_profile.token, + ImagingSettings: onvifParams + }) + response.ok = true + response.onvifResponse = onvifResponse + }catch(err){ + response.error = err.stack.toString() + } + return response +} +const setDiscoveryMode = async (onvifDevice,options) => { + const response = { + ok: false + } + try{ + const onvifResponse = await onvifDevice.services.device.setDiscoveryMode(options.mode === 'Discoverable' || options.mode === 'NonDiscoverable' ? options.mode : 'Discoverable') + response.ok = true + response.onvifResponse = onvifResponse + }catch(err){ + response.error = err.stack.toString() + } + return response +} +const getUIFieldValues = async (onvifDevice) => { + return await getDeviceInformation(onvifDevice,{ + all: true, + }) +} +module.exports = { + mergeDeep, + getFunctionParamNames, + getDeviceInformation: getDeviceInformation, + setHostname: setHostname, + setProtocols: setProtocols, + setGateway: setGateway, + setDNS: setDNS, + setNTP: setNTP, + rebootCamera: rebootCamera, + setDateAndTime: setDateAndTime, + createUser: createUser, + deleteUser: deleteUser, + setVideoConfiguration: setVideoConfiguration, + setImagingSettings: setImagingSettings, + setDiscoveryMode: setDiscoveryMode, + setNetworkInterface: setNetworkInterface, + getUIFieldValues: getUIFieldValues, +} diff --git a/web/assets/css/bs5.onvifScanner.css b/web/assets/css/bs5.onvifScanner.css index 9a38f40f..33aa3039 100644 --- a/web/assets/css/bs5.onvifScanner.css +++ b/web/assets/css/bs5.onvifScanner.css @@ -3,12 +3,22 @@ background-size: cover; height: 100px; } -#tab-onvifScanner .onvif_result .card { +/* #tab-onvifScanner .onvif_result .card { cursor: pointer; -} +} */ #tab-onvifScanner .onvif_result .card-body { min-height: auto; } #tab-onvifScanner .onvif_result { - padding-top:2rem; + padding-top: 0.5rem; +} +#tab-onvifScanner .onvif_result .uri{ + word-break: break-word; +} +#tab-onvifScanner .scan-item-img { + width: 100px; + border-radius: 7px; + height: 100px; + background-size: cover; + background-color: #1f80f9; } diff --git a/web/assets/css/bs5.wallview.css b/web/assets/css/bs5.wallview.css new file mode 100644 index 00000000..21799b36 --- /dev/null +++ b/web/assets/css/bs5.wallview.css @@ -0,0 +1,89 @@ +#wallview-container { + position: absolute; + width: 100vw; + height: 100vh; + background: rgba(0, 0, 0, 0.9); +} + +#wallview-canvas,body { + position: relative; + width: 100vw; + height: 100vh; + flex-grow: 1; + overflow: hidden; + flex: 1; +} + +#wallview-controls{ + position: absolute; + width: 100%; + top: 0; + padding: 5px; + opacity: 0; + transition: 0.2s; + z-index: 11; +} + +#wallview-controls:hover{ + opacity: 100%; + background: rgba(0,0,0,0.2) +} + +#wallview-info-screen{ + z-index: 10; + background-color: rgba(0,0,0,0.6); + position: fixed; + width: 100vw; + height: 100vh; +} + +#wallview-monitorList i{ + display: none; +} + +#wallview-monitorList .active i{ + display: inlin-block; +} + +#wallview-canvas .wallview-video { + position: absolute; +} +#wallview-canvas .wallview-video .overlay { + position: absolute; + height: 100%; + width: 100%; + border: 0; +} +#wallview-canvas .wallview-video iframe { + height: 100%; + width: 100%; + border: 0; +} + +#wallview-canvas .wallview-video.col-md-4 { + height:30vh; +} +#wallview-canvas .wallview-video.col-md-6 { + height: 40vh; +} +#wallview-canvas .wallview-video.col-md-12 { + height: 80vh; + margin-bottom: 0.5rem !important; +} +#wallview-canvas .wallview-video:not(.no-video){ + background-color: #000!important; +} +#wallview-canvas .wallview-video.no-video{ + display: none; +} +#wallview-canvas.show-non-playing .wallview-video.no-video{ + display: flex; +} +#wallview-canvas .wallview-video .wallview-item-controls{ + width: 100%; + padding: 5px; + opacity: 0; +} +#wallview-canvas .wallview-video:hover .wallview-item-controls{ + opacity: 0.5; +} diff --git a/web/assets/css/super.easyRemoteAccess.css b/web/assets/css/super.easyRemoteAccess.css index 692f183f..9c3cfc92 100644 --- a/web/assets/css/super.easyRemoteAccess.css +++ b/web/assets/css/super.easyRemoteAccess.css @@ -35,6 +35,12 @@ #easyRemoteAccess .card.active .fa { color: #6ee068; } +#easyRemoteAccess .card .remote-dashboard-link { + display: none!important; +} +#easyRemoteAccess .card.active .remote-dashboard-link { + display: block!important; +} #easyRemoteAccess .card .selected-badge { display: none; color: #fff!important; @@ -56,3 +62,7 @@ #p2pServerList .card .d-flex.flex-row:nth-of-type(odd) { background: rgba(0,0,0,0.1) } + +#easyRemoteAccess .active .activate-remote-selection .fa-check:before { + content: "\f00d"!important; +} diff --git a/web/assets/js/bs5.alternateLogins.js b/web/assets/js/bs5.alternateLogins.js new file mode 100644 index 00000000..8374c284 --- /dev/null +++ b/web/assets/js/bs5.alternateLogins.js @@ -0,0 +1,59 @@ +$(document).ready(function(){ + var alternateLoginsBox = $('#alternate-logins') + function getAlternateLogins(){ + $.get(getApiPrefix('loginTokens'),function(data){ + var rows = data.rows + alternateLoginsBox.empty() + if(rows.length > 0){ + $.each(rows,function(n,row){ + alternateLoginsBox.append(`
+
+   + ${row.type} +
+
+
${row.name}
+
+
+
${moment(row.lastLogin).format('YYYY-MM-DD hh:mm:ss A')}
+
+ +
`) + }) + }else{ + alternateLoginsBox.append(`
+
+ ${lang.noLoginTokensAdded} +
+
`) + } + }) + } + getAlternateLogins() + alternateLoginsBox.on('click','.unlink-account',function(){ + var loginId = $(this).parents('[login-id]').attr('login-id') + $.confirm.create({ + title: lang['Unlink Login'], + body: lang.noUndoForAction, + clickOptions: { + title: lang['Unlink'], + class: 'btn-danger' + }, + clickCallback: function(){ + $.get(getApiPrefix('loginTokens') + '/' + loginId + '/delete',function(data){ + if(data.ok){ + new PNotify({ + title: lang.Unlinked, + text: lang.loginHandleUnbound, + type: 'success' + }) + alternateLoginsBox.find(`[login-id="${loginId}"]`).remove() + } + }) + } + }) + }) + window.drawAlternateLoginsToSettings = getAlternateLogins +}) diff --git a/web/assets/js/bs5.dashboard-base.buttons.js b/web/assets/js/bs5.dashboard-base.buttons.js new file mode 100644 index 00000000..c724ddc5 --- /dev/null +++ b/web/assets/js/bs5.dashboard-base.buttons.js @@ -0,0 +1,180 @@ +$(document).ready(function(){ + onInitWebsocket(function(){ + loadMonitorsIntoMemory(function(data){ + setInterfaceCounts(data) + openTab('initial') + onDashboardReadyExecute() + }) + }); + $('body') + // .on('tab-away',function(){ + // + // }) + // .on('tab-close',function(){ + // + // }) + .on('click','.toggle-accordion-list',function(e){ + e.preventDefault(); + var el = $(this) + var iconEl = el.find('i') + var targetEl = el.parent().find('.accordion-list').first() + targetEl.toggle() + el.toggleClass('btn-primary btn-success') + iconEl.toggleClass('fa-plus fa-minus') + return false; + }) + .on('click','.toggle-display-of-el',function(e){ + e.preventDefault(); + var el = $(this) + var target = el.attr('data-target') + var targetFirstOnly = el.attr('data-get') === 'first' + var startIsParent = el.attr('data-start') === 'parent' + var targetEl = startIsParent ? el.parent().find(target) : $(target) + if(targetFirstOnly){ + targetEl = targetEl.first() + } + targetEl.toggle() + return false; + }) + .on('click','.pop-image',function(){ + var imageSrc = $(this).attr('src') + if(!imageSrc){ + new PNotify({ + title: lang['Action Failed'], + text: lang['No Image'], + type: 'warning' + }) + return; + }; + popImage(imageSrc) + }) + .on('click','.popped-image',function(){ + $(this).remove() + }) + .on('click','.popped-image img',function(e){ + e.stopPropagation() + return false; + }) + .on('click','.go-home',goBackHome) + .on('click','.go-back',goBackOneTab) + .on('click','.delete-tab',function(e){ + e.preventDefault() + e.stopPropagation() + var tabName = $(this).parents(`[page-open]`).attr(`page-open`) + if(activeTabName === tabName){ + goBackOneTab() + } + deleteTab(tabName) + return false; + }) + .on('click','.delete-tab-dynamic',function(e){ + e.preventDefault() + e.stopPropagation() + var tabName = $(this).parents('.page-tab').attr('id').replace('tab-','') + goBackOneTab() + deleteTab(tabName) + return false; + }) + .on('click','[page-open]',function(){ + var el = $(this) + var pageChoice = el.attr('page-open') + var pageOptions = JSON.parse(el.attr('page-options') || '{}') + if(tabTree.name === pageChoice)return; + openTab(pageChoice,pageOptions) + }) + .on('click','[class_toggle]',function(){ + var el = $(this) + var targetElement = el.attr('data-target') + var classToToggle = el.attr('class_toggle') + var iconClassesToToggle = el.attr('icon-toggle').split(' ') + var iconTarget = el.attr('icon-child') + var iconTargetElement = el.find(el.attr('icon-child')) + var togglPosition = $(targetElement).hasClass(classToToggle) ? 0 : 1 + var classToggles = dashboardOptions().class_toggle || {} + classToggles[targetElement] = [classToToggle,togglPosition,iconClassesToToggle,iconTarget]; + dashboardOptions('class_toggle',classToggles) + $(targetElement).toggleClass(classToToggle) + iconTargetElement + .removeClass(iconClassesToToggle[togglPosition === 1 ? 0 : 1]) + .addClass(iconClassesToToggle[togglPosition]) + }) + .on('keyup','.search-parent .search-controller',function(){ + var _this = this; + var parent = $(this).parents('.search-parent') + $.each(parent.find(".search-body .search-row"), function() { + if($(this).text().toLowerCase().indexOf($(_this).val().toLowerCase()) === -1) + $(this).hide(); + else + $(this).show(); + }); + }) + .on('click','[tab-chooser]',function(){ + var el = $(this) + var parent = el.parents('[tab-chooser-parent]') + var tabName = el.attr('tab-chooser') + var allTabChoosersInParent = parent.find('[tab-chooser]') + var allTabsInParent = parent.find('[tab-section]') + allTabsInParent.hide() + allTabChoosersInParent.removeClass('active') + el.addClass('active') + parent.find(`[tab-section="${tabName}"]`).show() + }); + if(!isMobile){ + $('body').on('mousedown',"select[multiple]",function(e){ + e.preventDefault(); + var select = this; + var scroll = select .scrollTop; + e.target.selected = !e.target.selected; + setTimeout(function(){select.scrollTop = scroll;}, 0); + $(select).focus().change(); + }).on('mousemove',"select[multiple]",function(e){ + e.preventDefault() + }); + } + $('.logout').click(function(e){ + $.get(getApiPrefix() + '/logout/' + $user.ke + '/' + $user.uid,function(data){ + localStorage.removeItem('ShinobiLogin_'+location.host); + location.href = location.href.split('#')[0]; + }) + }) + // only binded on load + $('.form-section-header:not(.no-toggle-header)').click(function(e){ + var parent = $(this).parent('.form-group-group') + var boxWrapper = parent.attr('id') + parent.toggleClass('hide-box-wrapper') + var hideBoxWrapper = parent.hasClass('hide-box-wrapper') + boxWrappersHidden[boxWrapper] = hideBoxWrapper + dashboardOptions('boxWrappersHidden',boxWrappersHidden) + }) + $('[data-bs-target="#sidebarMenu"]').click(function(e){ + resizeMonitorIcons() + }) + if(!isMobile){ + var clicked = false, clickX, oldClickX; + var htmlBody = $('html') + pageTabLinks.on({ + 'mousemove': function(e) { + clicked && updateScrollPos(e); + }, + 'mousedown': function(e) { + e.preventDefault(); + clicked = true; + oldClickX = clickX + 0; + clickX = e.pageX; + }, + 'mouseup': function(e) { + if(oldClickX !== clickX){ + e.preventDefault() + } + clicked = false; + htmlBody.css('cursor', 'auto'); + } + }); + + var updateScrollPos = function(e) { + htmlBody.css('cursor', 'grabbing'); + pageTabLinks.scrollLeft(pageTabLinks.scrollLeft() + (clickX - e.pageX)); + } + } + +}) diff --git a/web/assets/js/bs5.dashboard-base.js b/web/assets/js/bs5.dashboard-base.js index ed22e601..65fc4445 100644 --- a/web/assets/js/bs5.dashboard-base.js +++ b/web/assets/js/bs5.dashboard-base.js @@ -239,7 +239,7 @@ function getApiHost(path,isAdmin){ return getLocation() + (window.adminApiPrefix && isAdmin ? `${window.adminApiPrefix}` : ''); } function getApiPrefix(path,isAdmin){ - var mainPart = getApiHost(path,isAdmin) + $user.auth_token + var mainPart = getApiHost(path,isAdmin) + ($user.auth_token || $user.auth) return path ? mainPart + '/' + path + '/' + $user.ke : mainPart } @@ -1096,183 +1096,9 @@ function featureIsActivated(showNotice){ return false } } -$(document).ready(function(){ - onInitWebsocket(function(){ - loadMonitorsIntoMemory(function(data){ - setInterfaceCounts(data) - openTab('initial') - onDashboardReadyExecute() - }) - }); - $('body') - // .on('tab-away',function(){ - // - // }) - // .on('tab-close',function(){ - // - // }) - .on('click','.toggle-accordion-list',function(e){ - e.preventDefault(); - var el = $(this) - var iconEl = el.find('i') - var targetEl = el.parent().find('.accordion-list').first() - targetEl.toggle() - el.toggleClass('btn-primary btn-success') - iconEl.toggleClass('fa-plus fa-minus') - return false; - }) - .on('click','.toggle-display-of-el',function(e){ - e.preventDefault(); - var el = $(this) - var target = el.attr('data-target') - var targetFirstOnly = el.attr('data-get') === 'first' - var startIsParent = el.attr('data-start') === 'parent' - var targetEl = startIsParent ? el.parent().find(target) : $(target) - if(targetFirstOnly){ - targetEl = targetEl.first() - } - targetEl.toggle() - return false; - }) - .on('click','.pop-image',function(){ - var imageSrc = $(this).attr('src') - if(!imageSrc){ - new PNotify({ - title: lang['Action Failed'], - text: lang['No Image'], - type: 'warning' - }) - return; - }; - popImage(imageSrc) - }) - .on('click','.popped-image',function(){ - $(this).remove() - }) - .on('click','.popped-image img',function(e){ - e.stopPropagation() - return false; - }) - .on('click','.go-home',goBackHome) - .on('click','.go-back',goBackOneTab) - .on('click','.delete-tab',function(e){ - e.preventDefault() - e.stopPropagation() - var tabName = $(this).parents(`[page-open]`).attr(`page-open`) - if(activeTabName === tabName){ - goBackOneTab() - } - deleteTab(tabName) - return false; - }) - .on('click','.delete-tab-dynamic',function(e){ - e.preventDefault() - e.stopPropagation() - var tabName = $(this).parents('.page-tab').attr('id').replace('tab-','') - goBackOneTab() - deleteTab(tabName) - return false; - }) - .on('click','[page-open]',function(){ - var el = $(this) - var pageChoice = el.attr('page-open') - var pageOptions = JSON.parse(el.attr('page-options') || '{}') - if(tabTree.name === pageChoice)return; - openTab(pageChoice,pageOptions) - }) - .on('click','[class_toggle]',function(){ - var el = $(this) - var targetElement = el.attr('data-target') - var classToToggle = el.attr('class_toggle') - var iconClassesToToggle = el.attr('icon-toggle').split(' ') - var iconTarget = el.attr('icon-child') - var iconTargetElement = el.find(el.attr('icon-child')) - var togglPosition = $(targetElement).hasClass(classToToggle) ? 0 : 1 - var classToggles = dashboardOptions().class_toggle || {} - classToggles[targetElement] = [classToToggle,togglPosition,iconClassesToToggle,iconTarget]; - dashboardOptions('class_toggle',classToggles) - $(targetElement).toggleClass(classToToggle) - iconTargetElement - .removeClass(iconClassesToToggle[togglPosition === 1 ? 0 : 1]) - .addClass(iconClassesToToggle[togglPosition]) - }) - .on('keyup','.search-parent .search-controller',function(){ - var _this = this; - var parent = $(this).parents('.search-parent') - $.each(parent.find(".search-body .search-row"), function() { - if($(this).text().toLowerCase().indexOf($(_this).val().toLowerCase()) === -1) - $(this).hide(); - else - $(this).show(); - }); - }) - .on('click','[tab-chooser]',function(){ - var el = $(this) - var parent = el.parents('[tab-chooser-parent]') - var tabName = el.attr('tab-chooser') - var allTabChoosersInParent = parent.find('[tab-chooser]') - var allTabsInParent = parent.find('[tab-section]') - allTabsInParent.hide() - allTabChoosersInParent.removeClass('active') - el.addClass('active') - parent.find(`[tab-section="${tabName}"]`).show() - }); - if(!isMobile){ - $('body').on('mousedown',"select[multiple]",function(e){ - e.preventDefault(); - var select = this; - var scroll = select .scrollTop; - e.target.selected = !e.target.selected; - setTimeout(function(){select.scrollTop = scroll;}, 0); - $(select).focus().change(); - }).on('mousemove',"select[multiple]",function(e){ - e.preventDefault() - }); - } - $('.logout').click(function(e){ - $.get(getApiPrefix() + '/logout/' + $user.ke + '/' + $user.uid,function(data){ - localStorage.removeItem('ShinobiLogin_'+location.host); - location.href = location.href.split('#')[0]; - }) - }) - // only binded on load - $('.form-section-header:not(.no-toggle-header)').click(function(e){ - var parent = $(this).parent('.form-group-group') - var boxWrapper = parent.attr('id') - parent.toggleClass('hide-box-wrapper') - var hideBoxWrapper = parent.hasClass('hide-box-wrapper') - boxWrappersHidden[boxWrapper] = hideBoxWrapper - dashboardOptions('boxWrappersHidden',boxWrappersHidden) - }) - $('[data-bs-target="#sidebarMenu"]').click(function(e){ - resizeMonitorIcons() - }) - if(!isMobile){ - var clicked = false, clickX, oldClickX; - var htmlBody = $('html') - pageTabLinks.on({ - 'mousemove': function(e) { - clicked && updateScrollPos(e); - }, - 'mousedown': function(e) { - e.preventDefault(); - clicked = true; - oldClickX = clickX + 0; - clickX = e.pageX; - }, - 'mouseup': function(e) { - if(oldClickX !== clickX){ - e.preventDefault() - } - clicked = false; - htmlBody.css('cursor', 'auto'); - } - }); - - var updateScrollPos = function(e) { - htmlBody.css('cursor', 'grabbing'); - pageTabLinks.scrollLeft(pageTabLinks.scrollLeft() + (clickX - e.pageX)); - } - } - -}) +function makeButton({ color, link, text, class: classes}){ + return `${text}` +} +function replaceBrokenImage(_this){ + $(_this).attr('src', `${libURL}/libs/img/bg.jpg`) +} diff --git a/web/assets/js/bs5.embed.js b/web/assets/js/bs5.embed.js index b28deb95..b11081e5 100644 --- a/web/assets/js/bs5.embed.js +++ b/web/assets/js/bs5.embed.js @@ -195,14 +195,39 @@ function initiateLiveGridPlayer(monitor,subStreamChannel){ var stream = containerElement.find('.stream-element'); var onPoseidonError = function(){ // setTimeout(function(){ - // mainSocket.f({f:'monitor',ff:'watch_on',id:monitor.mid}) - // },5000) + // mainSocket.f({f:'monitor',ff:'watch_on',id:monitorId}) + // },2000) } if(!loadedPlayer.PoseidonErrorCount)loadedPlayer.PoseidonErrorCount = 0 if(loadedPlayer.PoseidonErrorCount >= 5)return - stream.attr('src',getApiPrefix(`mp4`)+'/'+monitor.mid + (subStreamChannel ? `/${subStreamChannel}` : '')+'/s.mp4?time=' + (new Date()).getTime()) - stream[0].onerror = function(err){ - console.error(err) + if(subStreamChannel ? details.substream.output.stream_flv_type === 'ws' : monitor.details.stream_flv_type === 'ws'){ + if(loadedPlayer.Poseidon){ + loadedPlayer.Poseidon.stop() + revokeVideoPlayerUrl(monitorId) + } + try{ + loadedPlayer.Poseidon = new Poseidon({ + video: stream[0], + auth_token: $user.auth_token, + ke: monitor.ke, + uid: $user.uid, + id: monitor.mid, + url: location.origin, + path: websocketPath, + query: websocketQuery, + onError : onPoseidonError, + channel : subStreamChannel + }) + loadedPlayer.Poseidon.start(); + }catch(err){ + // onPoseidonError() + console.log('onTryPoseidonError',err) + } + }else{ + stream.attr('src',getApiPrefix(`mp4`)+'/'+monitor.mid + (subStreamChannel ? `/${subStreamChannel}` : '')+'/s.mp4?time=' + (new Date()).getTime()) + stream[0].onerror = function(err){ + console.error(err) + } } },1000) break; diff --git a/web/assets/js/bs5.ldapSignIn.js b/web/assets/js/bs5.ldapSignIn.js new file mode 100644 index 00000000..bacce063 --- /dev/null +++ b/web/assets/js/bs5.ldapSignIn.js @@ -0,0 +1,14 @@ +$(document).ready(function(){ + $('#settings').on('click','.ldap-sign-in',function(e){ + e.preventDefault() + var signInWindow = window.open(getApiPrefix('loginTokenAddLDAP'),'popup','width=500,height=700,scrollbars=no,resizable=no'); + if(!signInWindow || signInWindow.closed || typeof signInWindow.closed=='undefined'){ + alert(`Your Popup Blocker is disabling this feature.`) + }else{ + signInWindow.onbeforeunload = function(){ + drawAlternateLoginsToSettings() + } + } + return false; + }) +}) diff --git a/web/assets/js/bs5.liveGrid.js b/web/assets/js/bs5.liveGrid.js index 9f797eb5..d1eaca83 100644 --- a/web/assets/js/bs5.liveGrid.js +++ b/web/assets/js/bs5.liveGrid.js @@ -136,6 +136,7 @@ function resetMonitorCanvas(monitorId,initiateAfter,subStreamChannel){ streamBlock.append(buildStreamElementHtml(streamType)) attachVideoElementErrorHandler(monitorId) if(initiateAfter)initiateLiveGridPlayer(monitor,subStreamChannel) + resetLiveGridDimensionsInMemory(monitorId) } function replaceMonitorInfoInHtml(htmlString,monitor){ var monitorMutes = dashboardOptions().monitorMutes || {} @@ -261,6 +262,7 @@ function loadVideoMiniList(monitorId){ } function updateLiveGridElementHeightWidth(monitorId){ var liveGridElement = liveGridElements[monitorId] + liveGridElement.streamElement = liveGridElement.monitorItem.find('.stream-element') var streamElement = liveGridElement.streamElement liveGridElement.width = streamElement.width() liveGridElement.height = streamElement.height() @@ -712,12 +714,19 @@ function openLiveGrid(){ } } function popOutMonitor(monitorId){ - var monitorPop = monitorPops[monitorId] + var monitorPop = monitorPops[monitorId] || {} + if(monitorPop.isOpen){ + return + } function finish(img){ - if(monitorPop){ - monitorPop.close() + monitorPops[monitorId] = window.open(getApiPrefix() + '/embed/' + $user.ke + '/' + monitorId + '/fullscreen|jquery|relative|gui' + `?host=${location.pathname}`,'pop_' + monitorId + $user.auth_token,'height='+img.height+',width='+img.width); + monitorPop = monitorPops[monitorId] + monitorPop.isOpen = true + monitorPop.onload = function(){ + this.onbeforeunload = function(){ + monitorPop.isOpen = false + } } - monitorPop = window.open(getApiPrefix() + '/embed/' + $user.ke + '/' + monitorId + '/fullscreen|jquery|relative|gui' + `?host=${location.pathname}`,'pop_' + monitorId + $user.auth_token,'height='+img.height+',width='+img.width); } if(loadedLiveGrids[monitorId]){ getSnapshot(loadedMonitors[monitorId],function(url){ @@ -736,6 +745,12 @@ function popOutMonitor(monitorId){ finish(img) } } +function createWallViewWindow(windowName){ + var el = $(document) + var width = el.width() + var height = el.height() + window.open(getApiPrefix() + '/wallview/' + $user.ke + (windowName ? 'window=' + windowName : ''), 'wallview_'+windowName, 'height='+height+',width='+width) +} function fullScreenLiveGridStream(monitorItem){ var videoElement = monitorItem.find('.stream-element') monitorItem.addClass('fullscreen') @@ -1092,6 +1107,9 @@ $(document).ready(function(e){ var monitorId = $(this).parents('[data-mid]').attr('data-mid') popOutMonitor(monitorId) }) + .on('click','.open-wallview',function(){ + createWallViewWindow() + }) .on('click','.toggle-monitor-substream',function(){ var monitorId = $(this).parents('[data-mid]').attr('data-mid') toggleSubStream(monitorId) @@ -1290,6 +1308,7 @@ $(document).ready(function(e){ // break; case'detector_trigger': var monitorId = d.id + var matrices = d.details.matrices var liveGridElement = liveGridElements[monitorId] if(!window.dontShowDetection && liveGridElement){ var monitorElement = liveGridElement.monitorItem @@ -1303,12 +1322,12 @@ $(document).ready(function(e){ }else{ monitorElement.removeClass('doObjectDetection') } - if(d.details.matrices&&d.details.matrices.length>0){ + if(matrices && matrices.length > 0){ drawMatrices(d,{ theContainer: liveGridElement.eventObjects, height: liveGridElement.height, width: liveGridElement.width, - }) + }, null, true) } if(d.details.confidence){ var eventConfidence = d.details.confidence @@ -1329,7 +1348,7 @@ $(document).ready(function(e){ } playAudioAlert() var monitorPop = monitorPops[monitorId] - if(window.popLiveOnEvent && (!monitorPop || monitorPop.closed === true)){ + if(window.popLiveOnEvent && (!monitorPop || !monitorPop.isOpen)){ popOutMonitor(monitorId) } // console.log({ diff --git a/web/assets/js/bs5.monitorSettings.js b/web/assets/js/bs5.monitorSettings.js index cd1a5c8f..5ec616c6 100644 --- a/web/assets/js/bs5.monitorSettings.js +++ b/web/assets/js/bs5.monitorSettings.js @@ -1150,8 +1150,8 @@ editorForm.find('[name="type"]').change(function(e){ setCosmeticMonitorInfo(newMonitorData) drawMonitorGroupList() if(!d.silenceNote){ - new PNotify({ - title: 'Monitor Saved', + redAlertNotify({ + title: lang['Monitor Saved'], text: ''+newMonitorData.name+' '+newMonitorData.mid+' has been saved.', type: 'success' }) diff --git a/web/assets/js/bs5.monitorsUtils.js b/web/assets/js/bs5.monitorsUtils.js index a4fd1927..392f447d 100644 --- a/web/assets/js/bs5.monitorsUtils.js +++ b/web/assets/js/bs5.monitorsUtils.js @@ -669,6 +669,25 @@ function readAlertNotice(title, text, type) { }); } } +function redAlertNotify(options) { + var title = options.title; + var redAlertNotice = redAlertNotices[title]; + var notifyOptions = { + title: title, + text: options.text, + type: options.type, + hide: options.hide === undefined ? false : options.hide, + delay: options.delay || 30000 + }; + if (redAlertNotice) { + redAlertNotice.update(notifyOptions); + } else { + redAlertNotices[title] = new PNotify(notifyOptions); + redAlertNotices[title].on('close', function() { + redAlertNotices[title] = null; + }); + } +} function buildPosePoints(bodyParts, x, y){ let theArray = [] for(const point of bodyParts){ @@ -683,7 +702,7 @@ function buildPosePoints(bodyParts, x, y){ } return theArray; } -function drawMatrices(event,options){ +function drawMatrices(event, options, autoRemoveTimeout, drawTrails){ var theContainer = options.theContainer var height = options.height var width = options.width @@ -695,8 +714,11 @@ function drawMatrices(event,options){ let moreMatrices = [] var monitorId = event.id; function processMatrix(n,matrix){ - html += `
` - if(matrix.tag)html += `${matrix.tag}${!isNaN(matrix.id) ? ` ${matrix.id}`: ''}` + const newWidth = widthRatio * matrix.width; + const newHeight = heightRatio * matrix.height; + if(drawTrails)html += `
` + html += `
` + if(matrix.tag)html += `${matrix.tag}${!isNaN(matrix.id) ? ` ${matrix.id}`: ''} (${matrix.confidence.toFixed(2) || 0})` if(matrix.notice)html += `
${matrix.notice}
`; if(matrix.missingNear && matrix.missingNear.length > 0){ html += `
Missing Near
${matrix.missingRecently.map(item => `${item.tag} (${item.id}) by ${item.missedNear.tag} (${item.missedNear.id})`).join(', ')}
`; @@ -728,7 +750,7 @@ function drawMatrices(event,options){ if(matrix.nearBy){ html += `
` matrix.nearBy.forEach((nearMatrix) => { - html += `
${nearMatrix.tag} ${nearMatrix.id} (${nearMatrix.overlapPercent}%)
` + html += `
${nearMatrix.tag} ${nearMatrix.id} (${nearMatrix.overlapPercent.toFixed(2)}%)
` }); html += `
` } @@ -740,7 +762,19 @@ function drawMatrices(event,options){ } $.each(event.details.matrices, processMatrix); $.each(moreMatrices, processMatrix); - theContainer.append(html) + var addedEls = theContainer.append(html) + if(autoRemoveTimeout){ + addedEls = addedEls.find('.fresh-detected-object').removeClass('fresh-detected-object') + setTimeout(function(){ + addedEls.remove() + }, autoRemoveTimeout); + } + if(drawTrails){ + var addedTrails = theContainer.find('.fresh-detected-trail').removeClass('fresh-detected-trail') + setTimeout(function(){ + addedTrails.remove() + }, 5000); + } } function setMonitorCountOnUI(){ $('.cameraCount').text(Object.keys(loadedMonitors).length) diff --git a/web/assets/js/bs5.onvifScanner.js b/web/assets/js/bs5.onvifScanner.js index f39221d1..170ed056 100644 --- a/web/assets/js/bs5.onvifScanner.js +++ b/web/assets/js/bs5.onvifScanner.js @@ -4,6 +4,8 @@ $(document).ready(function(e){ var loadedResultsByIp = {} var monitorEditorWindow = $('#tab-monitorSettings') var onvifScannerWindow = $('#tab-onvifScanner') + var onvifScannerStartButton = onvifScannerWindow.find('.start-scan') + var onvifScannerStopButton = onvifScannerWindow.find('.stop-scan') var onvifScannerResultPane = onvifScannerWindow.find('.onvif_result') var onvifScannerErrorResultPane = onvifScannerWindow.find('.onvif_result_error') var scanForm = onvifScannerWindow.find('form'); @@ -30,86 +32,97 @@ $(document).ready(function(e){ var html = buildSubMenuItems(allFound) sideMenuList.html(html) } - var setAsLoading = function(appearance){ + var showStopButton = function(appearance){ if(appearance){ - onvifScannerWindow.find('._loading').show() - onvifScannerWindow.find('[type="submit"]').prop('disabled',true) + onvifScannerStartButton.addClass('d-none') + onvifScannerStopButton.removeClass('d-none') }else{ - onvifScannerWindow.find('._loading').hide() - onvifScannerWindow.find('[type="submit"]').prop('disabled',false) + onvifScannerStartButton.removeClass('d-none') + onvifScannerStopButton.addClass('d-none') } } - function drawProbeResult(options){ - if(!options.error){ - var currentUsername = onvifScannerWindow.find('[name="user"]').val() - var currentPassword = onvifScannerWindow.find('[name="pass"]').val() - var tempID = generateId() - var info = options.info ? jsonToHtmlBlock(options.info) : '' - var streamUrl = '' - var launchWebPage = `target="_blank" href="http${options.port == 443 ? 's' : ''}://${options.ip}:${options.port}"` - if(options.uri){ - streamUrl = options.uri - } - var theLocation = getLocationFromUri(options.uri) - var pathLocation = theLocation.location - var monitorConfigPartial = { - name: pathLocation.hostname, - mid: tempID + `${options.port}`, - host: pathLocation.hostname, - port: pathLocation.port, - path: pathLocation.pathname + (pathLocation.search && pathLocation.search !== '?' ? pathLocation.search : ''), - protocol: theLocation.protocol, - details: { - auto_host: addCredentialsToUri(streamUrl,currentUsername,currentPassword), - muser: currentUsername, - mpass: currentPassword, - is_onvif: '1', - onvif_port: options.port, - }, - } - if(options.isPTZ){ - monitorConfigPartial.details = Object.assign(monitorConfigPartial.details,{ - control: '1', - control_url_method: 'ONVIF', - control_stop: '1', - }) - } - var monitorAlreadyAdded = isOnvifRowAlreadyALoadedMonitor(monitorConfigPartial) - if(monitorAlreadyAdded){ - monitorConfigPartial.mid = monitorAlreadyAdded.mid; - } - var monitorId = monitorConfigPartial.mid - loadedResults[monitorId] = monitorConfigPartial; - loadedResultsByIp[monitorConfigPartial.host] = monitorConfigPartial; - onvifScannerResultPane.append(` -
-
-
-
-
${info}
-
${streamUrl}
-
- -
-
- `) - onvifScannerWindow.find('._notfound').remove() - setAsLoading(false) - drawFoundCamerasSubMenu() + + function drawDeviceTableRow(device, gotAccess){ + var ip = device.ip; + var el = onvifScannerResultPane.find(`[scan-item="${ip}"]`) + var hasError = !!device.error; + var uriText = !hasError ? device.uri ? device.uri.split('?')[0] : '' : device.error; + var statusColor = hasError ? 'red' : 'green'; + var snapShot = device.snapShot; + // console.log(ip, device.error, hasError) + if(gotAccess)loadMonitorConfigFromResult(device) + if(el.length === 0){ + var html = `
+
+
+
+
${ip}
${uriText}
+
${!hasError ? makeButton({text: lang.Copy, class:'copy', color: 'primary'}) : ''}
+
+
` + onvifScannerResultPane.append(html) }else{ - if(!loadedResultsByIp[options.ip]){ - onvifScannerErrorResultPane.append(` -
-
${options.ip}:${options.port}
-
${options.error}
-
- -
-
- `) + var copyButton = el.find('.copy-button'); + var imgEl = el.find('.scan-item-img'); + if(hasError){ + copyButton.empty() + imgEl.removeClass('copy cursor-pointer') + }else{ + copyButton.html(makeButton({text: lang.Copy, class:'copy', color: 'primary'})) + imgEl.addClass('copy cursor-pointer') } + if(snapShot){ + imgEl.css('background-image', `url("data:image/jpeg;base64,${snapShot}")`) + }else{ + imgEl.css('background-image', '') + } + imgEl.css('background-color', statusColor) + el.find('.uri').text(uriText) + el.find('.card').css('border-color', statusColor) + el.find('.fa-circle').css('color', statusColor) } } + function loadMonitorConfigFromResult(options){ + var monitorId = removeSpecialCharacters(options.ip) + var currentUsername = options.user + var currentPassword = options.pass + var streamUrl = '' + var launchWebPage = `target="_blank" href="http${options.port == 443 ? 's' : ''}://${options.ip}:${options.port}"` + if(options.uri){ + streamUrl = options.uri + } + var theLocation = getLocationFromUri(options.uri) + var pathLocation = theLocation.location + var monitorConfigPartial = { + name: pathLocation.hostname, + mid: monitorId, + host: pathLocation.hostname, + port: pathLocation.port, + path: pathLocation.pathname + (pathLocation.search && pathLocation.search !== '?' ? pathLocation.search : ''), + protocol: theLocation.protocol, + details: { + auto_host: addCredentialsToUri(streamUrl,currentUsername,currentPassword), + muser: currentUsername, + mpass: currentPassword, + is_onvif: '1', + onvif_port: options.port, + }, + } + if(options.isPTZ){ + monitorConfigPartial.details = Object.assign(monitorConfigPartial.details,{ + control: '1', + control_url_method: 'ONVIF', + control_stop: '1', + }) + } + var monitorAlreadyAdded = isOnvifRowAlreadyALoadedMonitor(monitorConfigPartial) + if(monitorAlreadyAdded){ + monitorConfigPartial.mid = monitorAlreadyAdded.mid; + } + loadedResults[monitorId] = monitorConfigPartial; + loadedResultsByIp[monitorConfigPartial.host] = monitorConfigPartial; + return monitorConfigPartial + } function isOnvifRowAlreadyALoadedMonitor(onvifRow){ var matches = null; $.each(loadedMonitors,function(n,monitor){ @@ -174,7 +187,7 @@ $(document).ready(function(e){ var form = el.serializeObject(); onvifScannerResultPane.empty(); onvifScannerErrorResultPane.empty(); - setAsLoading(true) + showStopButton(true) mainSocket.f({ f: 'onvif', ip: form.ip, @@ -184,34 +197,80 @@ $(document).ready(function(e){ }); clearTimeout(checkTimeout) checkTimeout = setTimeout(function(){ - if(onvifScannerResultPane.find('.card').length === 0){ - setAsLoading(false) + if(onvifScannerResultPane.find('[scan-item]').length === 0){ + showStopButton(false) onvifScannerResultPane.append(`
${lang.sorryNothingWasFound}
`) } },5000) return false; }); - onvifScannerWindow.on('click','.copy',function(){ + onvifScannerWindow.on('click','.copy',function(e){ + e.preventDefault() openMonitorEditorPage() - var el = $(this).parents('[onvif_row]'); - var id = el.attr('onvif_row'); - var onvifRecord = loadedResults[id]; + var el = $(this).parents('[scan-item]'); + var id = el.attr('scan-item'); + var onvifRecord = loadedResultsByIp[id]; var streamURL = onvifRecord.details.auto_host writeToMonitorSettingsWindow(onvifRecord) }) onvifScannerWindow.on('click','.add-all',function(){ filterOutMonitorsThatAreAlreadyAdded(loadedResults,function(importableCameras){ - $.each(importableCameras,function(n,camera){ - // console.log(camera) - postMonitor(camera) - }) + const numberOfCameras = importableCameras.length + if(numberOfCameras === 0){ + new PNotify({ + title: lang["ONVIF Scanner"], + text: lang.sorryNothingWasFound, + type: 'danger', + }) + }else{ + $.confirm.create({ + title: lang['Add Cameras'], + body: `

${lang.addAllCamerasText.replace('9001', numberOfCameras)}

    ${importableCameras.map(item => `
  • ${item.host}
  • `).join('')}
`, + clickOptions: { + class: 'btn-success', + title: lang.Add, + }, + clickCallback: function(){ + $.each(importableCameras,function(n,camera){ + // console.log(camera) + postMonitor(camera) + }) + } + }) + } }) }) + onvifScannerWindow.on('click','.stop-scan',function(){ + mainSocket.f({ f: 'onvif_stop' }); + }) + loadLocalOptions() + onInitWebsocket(function (){ + mainSocket.f({ f: 'onvif_scan_reconnect' }); + }) onWebSocketEvent(function (d){ switch(d.f){ case'onvif': - drawProbeResult(d) + try{ + drawDeviceTableRow(d, d.ff !== 'failed_capture' && !d.failedConnection); + }catch(err){ + console.error(err) + } + break; + case'onvif_scan_current': + console.log(d) + if(d.isScanning){ + showStopButton(true) + }else{ + showStopButton(false) + } + d.devices.forEach(device => { + console.log('onvif_scan_current', device) + drawDeviceTableRow(device, !device.error && !d.failedConnection) + }); + break; + case'onvif_scan_complete': + showStopButton(false) break; } }) diff --git a/web/assets/js/bs5.timeline.js b/web/assets/js/bs5.timeline.js index c1c6a947..d9456fb3 100644 --- a/web/assets/js/bs5.timeline.js +++ b/web/assets/js/bs5.timeline.js @@ -8,6 +8,7 @@ $(document).ready(function(){ var timeStripObjectSearchInput = $('#timeline-video-object-search'); var dateSelector = $('#timeline-date-selector'); var sideMenuList = $(`#side-menu-link-timeline ul`) + var monitorList = $(`#timeline-monitor-list`) var playToggles = timeStripControls.find('[timeline-action="playpause"]') var speedButtons = timeStripControls.find('[timeline-action="speed"]') var gridSizeButtons = timeStripControls.find('[timeline-action="gridSize"]') @@ -50,6 +51,8 @@ $(document).ready(function(){ var dateRangeChanging = false var lastDateChecked = new Date(0) var monitorSelectionElements = [] + var sideMenuListMissing = sideMenuList.length === 0; + var selectingMonitorList = (sideMenuListMissing ? monitorList : sideMenuList); function setLoadingMask(turnOn){ if(turnOn){ if(theWindow.find('.loading-mask').length === 0){ @@ -441,7 +444,7 @@ $(document).ready(function(){ function setVideoInCanvas(newVideo){ var monitorId = newVideo.mid var container = getVideoContainerInCanvas(newVideo) - .removeClass('no-video').find('.film').html(``) + .removeClass('no-video').find('.film').html(``) var vidEl = getVideoElInCanvas(newVideo) var objectContainer = getObjectContainerInCanvas(newVideo) vidEl.playbackRate = timelineSpeed @@ -821,15 +824,16 @@ $(document).ready(function(){ }) }) var html = buildSubMenuItems(allFound) - sideMenuList.html(html) - monitorSelectionElements = sideMenuList.find('.timeline-selectMonitor') + if(!sideMenuListMissing)sideMenuList.html(html) + monitorList.html(html) + monitorSelectionElements = selectingMonitorList.find('.timeline-selectMonitor') } async function setSideMenuMonitorVisualSelection(){ var getForAllMonitors = timeStripSelectedMonitors.length === 0; monitorSelectionElements.find('.dot').removeClass('dot-green') if(!getForAllMonitors){ timeStripSelectedMonitors.forEach((monitorId) => { - sideMenuList.find(`[data-mid="${monitorId}"] .dot`).addClass('dot-green') + selectingMonitorList.find(`[data-mid="${monitorId}"] .dot`).addClass('dot-green') }) } } @@ -928,7 +932,7 @@ $(document).ready(function(){ refreshTimeline() } } - sideMenuList.on('click','[timeline-menu-action]',function(){ + function monitorSelectorController(){ var el = $(this) var type = el.attr('timeline-menu-action') switch(type){ @@ -957,7 +961,9 @@ $(document).ready(function(){ } break; } - }) + } + monitorList.on('click','[timeline-menu-action]', monitorSelectorController) + sideMenuList.on('click','[timeline-menu-action]', monitorSelectorController) timelineActionButtons.click(function(){ var el = $(this) var type = el.attr('timeline-action') diff --git a/web/assets/js/bs5.videos.buttons.js b/web/assets/js/bs5.videos.buttons.js new file mode 100644 index 00000000..963308ce --- /dev/null +++ b/web/assets/js/bs5.videos.buttons.js @@ -0,0 +1,155 @@ +onWebSocketEvent(function(d){ + switch(d.f){ + case'video_edit':case'video_archive': + var video = loadedVideosInMemory[`${d.mid}${d.time}${d.type}`] + if(video){ + let filename = `${formattedTimeForFilename(convertTZ(d.time),false,`YYYY-MM-DDTHH-mm-ss`)}.${video.ext || 'mp4'}` + loadedVideosInMemory[`${d.mid}${d.time}${d.type}`].status = d.status + $(`[data-mid="${d.mid}"][data-filename="${filename}"]`).attr('data-status',d.status); + } + break; + case'video_delete': + $('[file="'+d.filename+'"][mid="'+d.mid+'"]:not(.modal)').remove(); + $('[data-file="'+d.filename+'"][data-mid="'+d.mid+'"]:not(.modal)').remove(); + $('[data-time-formed="'+(new Date(d.time))+'"][data-mid="'+d.mid+'"]:not(.modal)').remove(); + var videoPlayerId = getVideoPlayerTabId(d) + if(tabTree.name === videoPlayerId){ + goBackOneTab() + } + deleteTab(videoPlayerId) + break; + } +}) +$(document).ready(function(){ + $('body') + .on('click','.open-video',function(e){ + e.preventDefault() + var _this = this; + var { + monitorId, + videoTime, + video, + } = getVideoInfoFromEl(_this) + createVideoPlayerTab(video) + setVideoStatus(video) + return false; + }) + .on('click','[video-time-seeked-video-position]',function(){ + var el = $(this) + var monitorId = el.attr('data-mid') + var videoTime = el.attr('video-time-seeked-video-position') + var timeInward = (parseInt(el.attr('video-slice-seeked')) / 1000) - 2 + var video = loadedVideosInMemory[`${monitorId}${videoTime}${undefined}`] + timeInward = timeInward < 0 ? 0 : timeInward + createVideoPlayerTab(video,timeInward) + }) + .on('click','.delete-video',function(e){ + e.preventDefault() + var el = $(this).parents('[data-mid]') + var monitorId = el.attr('data-mid') + var videoTime = el.attr('data-time') + var type = el.attr('data-type') + var video = loadedVideosInMemory[`${monitorId}${videoTime}${type}`] + var videoSet = video.videoSet + var ext = video.filename.split('.') + ext = ext[ext.length - 1] + var isCloudVideo = videoSet === 'cloudVideos' + var videoEndpoint = getApiPrefix(videoSet || 'videos') + '/' + video.mid + '/' + video.filename + var endpointType = isCloudVideo ? `?type=${video.type}` : '' + $.confirm.create({ + title: lang["Delete Video"] + ' : ' + video.filename, + body: `${lang.DeleteVideoMsg}

`, + clickOptions: { + title: ' ' + lang.Delete, + class: 'btn-danger btn-sm' + }, + clickCallback: function(){ + $.getJSON(videoEndpoint + '/delete' + endpointType,function(data){ + if(data.ok){ + console.log('Video Deleted') + }else{ + console.log('Video Not Deleted',data,videoEndpoint + endpointType) + } + }) + } + }); + return false; + }) + .on('click','.compress-video',function(e){ + e.preventDefault() + var el = $(this).parents('[data-mid]') + var monitorId = el.attr('data-mid') + var videoTime = el.attr('data-time') + var video = loadedVideosInMemory[`${monitorId}${videoTime}${undefined}`] + var ext = video.filename.split('.') + ext = ext[ext.length - 1] + var videoEndpoint = getApiPrefix(`videos`) + '/' + video.mid + '/' + video.filename + $.confirm.create({ + title: lang["Compress"] + ' : ' + video.filename, + body: `${lang.CompressVideoMsg}

`, + clickOptions: { + title: ' ' + lang.Compress, + class: 'btn-primary btn-sm' + }, + clickCallback: function(){ + compressVideo(video) + } + }); + return false; + }) + .on('click','.archive-video',function(e){ + e.preventDefault() + var el = $(this).parents('[data-mid]') + var monitorId = el.attr('data-mid') + var videoTime = el.attr('data-time') + var unarchive = $(this).hasClass('status-archived') + var video = loadedVideosInMemory[`${monitorId}${videoTime}${undefined}`] + var ext = video.filename.split('.') + ext = ext[ext.length - 1] + var videoEndpoint = getApiPrefix(`videos`) + '/' + video.mid + '/' + video.filename + if(unarchive){ + unarchiveVideo(video) + }else{ + // $.confirm.create({ + // title: lang["Archive"] + ' : ' + video.filename, + // body: `${lang.ArchiveVideoMsg}

`, + // clickOptions: { + // title: ' ' + lang.Archive, + // class: 'btn-primary btn-sm' + // }, + // clickCallback: function(){ + archiveVideo(video) + // } + // }); + } + return false; + }) + .on('click','.fix-video',function(e){ + e.preventDefault() + var el = $(this).parents('[data-mid]') + var monitorId = el.attr('data-mid') + var videoTime = el.attr('data-time') + var video = loadedVideosInMemory[`${monitorId}${videoTime}${undefined}`] + var ext = video.filename.split('.') + ext = ext[ext.length - 1] + var videoEndpoint = getApiPrefix(`videos`) + '/' + video.mid + '/' + video.filename + $.confirm.create({ + title: lang["Fix Video"] + ' : ' + video.filename, + body: `${lang.FixVideoMsg}

`, + clickOptions: { + title: ' ' + lang.Fix, + class: 'btn-danger btn-sm' + }, + clickCallback: function(){ + $.getJSON(videoEndpoint + '/fix',function(data){ + if(data.ok){ + console.log('Video Fixed') + }else{ + console.log('Video Not Fixed',data,videoEndpoint) + } + }) + } + }); + return false; + }) +}) diff --git a/web/assets/js/bs5.videos.js b/web/assets/js/bs5.videos.js index 83ff0d36..a91a31a6 100644 --- a/web/assets/js/bs5.videos.js +++ b/web/assets/js/bs5.videos.js @@ -658,158 +658,3 @@ function getDisplayDimensions(videoElement) { videoHeight: displayHeight, }; } -onWebSocketEvent(function(d){ - switch(d.f){ - case'video_edit':case'video_archive': - var video = loadedVideosInMemory[`${d.mid}${d.time}${d.type}`] - if(video){ - let filename = `${formattedTimeForFilename(convertTZ(d.time),false,`YYYY-MM-DDTHH-mm-ss`)}.${video.ext || 'mp4'}` - loadedVideosInMemory[`${d.mid}${d.time}${d.type}`].status = d.status - $(`[data-mid="${d.mid}"][data-filename="${filename}"]`).attr('data-status',d.status); - } - break; - case'video_delete': - $('[file="'+d.filename+'"][mid="'+d.mid+'"]:not(.modal)').remove(); - $('[data-file="'+d.filename+'"][data-mid="'+d.mid+'"]:not(.modal)').remove(); - $('[data-time-formed="'+(new Date(d.time))+'"][data-mid="'+d.mid+'"]:not(.modal)').remove(); - var videoPlayerId = getVideoPlayerTabId(d) - if(tabTree.name === videoPlayerId){ - goBackOneTab() - } - deleteTab(videoPlayerId) - break; - } -}) -$(document).ready(function(){ - $('body') - .on('click','.open-video',function(e){ - e.preventDefault() - var _this = this; - var { - monitorId, - videoTime, - video, - } = getVideoInfoFromEl(_this) - createVideoPlayerTab(video) - setVideoStatus(video) - return false; - }) - .on('click','[video-time-seeked-video-position]',function(){ - var el = $(this) - var monitorId = el.attr('data-mid') - var videoTime = el.attr('video-time-seeked-video-position') - var timeInward = (parseInt(el.attr('video-slice-seeked')) / 1000) - 2 - var video = loadedVideosInMemory[`${monitorId}${videoTime}${undefined}`] - timeInward = timeInward < 0 ? 0 : timeInward - createVideoPlayerTab(video,timeInward) - }) - .on('click','.delete-video',function(e){ - e.preventDefault() - var el = $(this).parents('[data-mid]') - var monitorId = el.attr('data-mid') - var videoTime = el.attr('data-time') - var type = el.attr('data-type') - var video = loadedVideosInMemory[`${monitorId}${videoTime}${type}`] - var videoSet = video.videoSet - var ext = video.filename.split('.') - ext = ext[ext.length - 1] - var isCloudVideo = videoSet === 'cloudVideos' - var videoEndpoint = getApiPrefix(videoSet || 'videos') + '/' + video.mid + '/' + video.filename - var endpointType = isCloudVideo ? `?type=${video.type}` : '' - $.confirm.create({ - title: lang["Delete Video"] + ' : ' + video.filename, - body: `${lang.DeleteVideoMsg}

`, - clickOptions: { - title: ' ' + lang.Delete, - class: 'btn-danger btn-sm' - }, - clickCallback: function(){ - $.getJSON(videoEndpoint + '/delete' + endpointType,function(data){ - if(data.ok){ - console.log('Video Deleted') - }else{ - console.log('Video Not Deleted',data,videoEndpoint + endpointType) - } - }) - } - }); - return false; - }) - .on('click','.compress-video',function(e){ - e.preventDefault() - var el = $(this).parents('[data-mid]') - var monitorId = el.attr('data-mid') - var videoTime = el.attr('data-time') - var video = loadedVideosInMemory[`${monitorId}${videoTime}${undefined}`] - var ext = video.filename.split('.') - ext = ext[ext.length - 1] - var videoEndpoint = getApiPrefix(`videos`) + '/' + video.mid + '/' + video.filename - $.confirm.create({ - title: lang["Compress"] + ' : ' + video.filename, - body: `${lang.CompressVideoMsg}

`, - clickOptions: { - title: ' ' + lang.Compress, - class: 'btn-primary btn-sm' - }, - clickCallback: function(){ - compressVideo(video) - } - }); - return false; - }) - .on('click','.archive-video',function(e){ - e.preventDefault() - var el = $(this).parents('[data-mid]') - var monitorId = el.attr('data-mid') - var videoTime = el.attr('data-time') - var unarchive = $(this).hasClass('status-archived') - var video = loadedVideosInMemory[`${monitorId}${videoTime}${undefined}`] - var ext = video.filename.split('.') - ext = ext[ext.length - 1] - var videoEndpoint = getApiPrefix(`videos`) + '/' + video.mid + '/' + video.filename - if(unarchive){ - unarchiveVideo(video) - }else{ - // $.confirm.create({ - // title: lang["Archive"] + ' : ' + video.filename, - // body: `${lang.ArchiveVideoMsg}

`, - // clickOptions: { - // title: ' ' + lang.Archive, - // class: 'btn-primary btn-sm' - // }, - // clickCallback: function(){ - archiveVideo(video) - // } - // }); - } - return false; - }) - .on('click','.fix-video',function(e){ - e.preventDefault() - var el = $(this).parents('[data-mid]') - var monitorId = el.attr('data-mid') - var videoTime = el.attr('data-time') - var video = loadedVideosInMemory[`${monitorId}${videoTime}${undefined}`] - var ext = video.filename.split('.') - ext = ext[ext.length - 1] - var videoEndpoint = getApiPrefix(`videos`) + '/' + video.mid + '/' + video.filename - $.confirm.create({ - title: lang["Fix Video"] + ' : ' + video.filename, - body: `${lang.FixVideoMsg}

`, - clickOptions: { - title: ' ' + lang.Fix, - class: 'btn-danger btn-sm' - }, - clickCallback: function(){ - $.getJSON(videoEndpoint + '/fix',function(data){ - if(data.ok){ - console.log('Video Fixed') - }else{ - console.log('Video Not Fixed',data,videoEndpoint) - } - }) - } - }); - return false; - }) -}) diff --git a/web/assets/js/bs5.wallvideoview.js b/web/assets/js/bs5.wallvideoview.js new file mode 100644 index 00000000..2693a160 --- /dev/null +++ b/web/assets/js/bs5.wallvideoview.js @@ -0,0 +1,21 @@ +function createVideoPlayerTab(video){ + // not real one, dummy for wallvideoview. + var videoEndpoint = getApiPrefix(`videos`) + '/' + video.mid + '/' + video.filename + $.confirm.create({ + title: lang["Download"], + body: `
${loadedMonitors[video.mid].name}
${video.time}
`, + clickOptions: { + title: ' ' + lang.Download, + class: 'btn-success btn-sm' + }, + clickCallback: function(){ + downloadFile(videoEndpoint, video.filename) + } + }); +} +$(document).ready(function(){ + loadMonitorsIntoMemory(function(data){ + openTab('timeline') + onDashboardReadyExecute() + }) +}) diff --git a/web/assets/js/bs5.wallview.js b/web/assets/js/bs5.wallview.js new file mode 100644 index 00000000..8beb50cf --- /dev/null +++ b/web/assets/js/bs5.wallview.js @@ -0,0 +1,299 @@ +var loadedMonitors = {} +var selectedMonitors = {} +var selectedMonitorsCount = 0 +$(document).ready(function(){ + PNotify.prototype.options.styling = "fontawesome"; + var wallViewMonitorList = $('#wallview-monitorList') + var wallViewControls = $('#wallview-controls') + var wallViewCanvas = $('#wallview-canvas') + var wallViewInfoScreen = $('#wallview-info-screen') + var theWindow = $(window); + var lastWindowWidth = theWindow.width() + var lastWindowHeight = theWindow.height() + function featureIsActivated(showNotice){ + if(userHasSubscribed){ + return true + }else{ + if(showNotice){ + new PNotify({ + title: lang.activationRequired, + text: lang.featureRequiresActivationText, + type: 'warning' + }) + } + return false + } + } + function createWallViewWindow(windowName){ + var el = $(document) + var width = el.width() + var height = el.height() + window.open(getApiPrefix() + '/wallview/' + groupKey + (windowName ? '?window=' + windowName : ''), 'wallview_'+windowName, 'height='+height+',width='+width) + } + function getApiPrefix(innerPart){ + return `${urlPrefix}${authKey}${innerPart ? `/${innerPart}/${groupKey}` : ''}` + } + function getWindowName(){ + const urlParams = new URLSearchParams(window.location.search); + const theWindowChoice = urlParams.get('window'); + return theWindowChoice || '1' + } + function drawMonitorListItem(monitor){ + wallViewMonitorList.append(`
  • ${monitor.name}
  • `) + } + function drawMonitorList(){ + return new Promise((resolve) => { + $.get(getApiPrefix('monitor'),function(monitors){ + $.each(monitors, function(n,monitor){ + if(monitor.mode !== 'stop' && monitor.mode !== 'idle'){ + loadedMonitors[monitor.mid] = monitor; + drawMonitorListItem(monitor) + } + }) + resolve(monitors) + }) + }) + } + + function getMonitorListItem(monitorId){ + return wallViewMonitorList.find(`[select-monitor="${monitorId}"]`) + } + + function selectMonitor(monitorId, css){ + css = css || {}; + var isSelected = selectedMonitors[monitorId] + if(isSelected)return; + var numberOfSelected = Object.keys(selectedMonitors) + if(numberOfSelected > 3 && !featureIsActivated(true)){ + return + } + ++selectedMonitorsCount + selectedMonitors[monitorId] = Object.assign({}, loadedMonitors[monitorId]); + wallViewCanvas.append(`
    `) + wallViewCanvas.find(`[live-stream="${monitorId}"]`) + .draggable({ + grid: [40, 40], + snap: '#wallview-canvas', + containment: "window", + stop: function(){ + saveLayout() + } + }) + .resizable({ + grid: [40, 40], + snap: '#wallview-container', + stop: function(){ + saveLayout() + } + }); + getMonitorListItem(monitorId).addClass('active') + } + function deselectMonitor(monitorId){ + --selectedMonitorsCount + delete(selectedMonitors[monitorId]) + var monitorItem = wallViewCanvas.find(`[live-stream="${monitorId}"]`); + monitorItem.find('iframe').attr('src','about:blank') + monitorItem.remove() + getMonitorListItem(monitorId).removeClass('active') + } + + function getCurrentLayout(){ + var layout = [] + wallViewCanvas.find('.wallview-video').each(function(n,v){ + var el = $(v) + var monitorId = el.attr('live-stream') + var position = el.position() + layout.push({ + monitorId, + css: { + left: position.left, + top: position.top, + width: el.width(), + height: el.height(), + } + }) + }) + return layout + } + + function saveLayout(){ + var windowName = getWindowName(); + var layouts = getAllLayouts(); + var layout = getCurrentLayout(); + var saveContainer = { + layout, + windowInnerWidth: window.innerWidth, + windowInnerHeight: window.innerHeight, + } + layouts[windowName] = saveContainer; + localStorage.setItem('windowLayouts', JSON.stringify(layouts)); + } + + function getAllLayouts(){ + return JSON.parse(localStorage.getItem(`windowLayouts`) || '{}'); + } + + function getLayout(full){ + var windowName = getWindowName(); + var saveContainer = getAllLayouts()[windowName] + if(full)return saveContainer || { layout: [] }; + var layout = saveContainer.layout || [] + return layout; + } + + function resetWindowDimensions(){ + var saveContainer = getLayout(true); + if(saveContainer.windowInnerWidth && saveContainer.windowInnerHeight){ + var widthDiff = window.outerWidth - window.innerWidth; + var heightDiff = window.outerHeight - window.innerHeight; + lastWindowWidth = saveContainer.windowInnerWidth + lastWindowHeight = saveContainer.windowInnerHeight + window.resizeTo(saveContainer.windowInnerWidth + widthDiff, saveContainer.windowInnerHeight + heightDiff); + } + } + + function loadSavedLayout(){ + var saveContainer = getLayout(true); + resetWindowDimensions() + saveContainer.layout.forEach(function({ monitorId, css }, n){ + selectMonitor(monitorId, css); + }); + displayInfoScreen(); + } + + function displayInfoScreen(){ + if(selectedMonitorsCount === 0){ + wallViewInfoScreen.css('display','flex') + }else{ + wallViewInfoScreen.hide() + } + } + function resizeMonitorItem({ monitorId, css }, oldWidth, oldHeight, newWidth, newHeight){ + var monitorItem = wallViewCanvas.find(`[live-stream="${monitorId}"]`); + var newCss = rescaleMatrix(css, oldWidth, oldHeight, newWidth, newHeight) + monitorItem.css(newCss) + } + function rescaleMatrix(matrix, oldWidth, oldHeight, newWidth, newHeight) { + const scaleX = newWidth / oldWidth; + const scaleY = newHeight / oldHeight; + + return { + left: matrix.left * scaleX, + top: matrix.top * scaleY, + width: matrix.width * scaleX, + height: matrix.height * scaleY + }; + } + + function onWindowResize(){ + var currentWindowWidth = theWindow.width() + var currentWindowHeight = theWindow.height() + var layout = getCurrentLayout(); + for(item of layout){ + resizeMonitorItem(item,lastWindowWidth,lastWindowHeight,currentWindowWidth,currentWindowHeight) + } + lastWindowWidth = currentWindowWidth + lastWindowHeight = currentWindowHeight + } + + function autoPlaceCurrentMonitorItems() { + const wallviewVideos = wallViewCanvas.find('.wallview-video'); + const totalItems = wallviewVideos.length; + + let numRows, numCols; + + if (totalItems === 6 || totalItems === 5) { + numCols = 3; + numRows = 2; + } else { + numRows = Math.ceil(Math.sqrt(totalItems)); + numCols = Math.ceil(totalItems / numRows); + } + + const containerWidth = wallViewCanvas.width(); + const containerHeight = wallViewCanvas.height(); + const itemWidth = containerWidth / numCols; + const itemHeight = containerHeight / numRows; + + wallviewVideos.each(function(index, element) { + const row = Math.floor(index / numCols); + const col = index % numCols; + + $(element).css({ + left: col * itemWidth, + top: row * itemHeight, + width: itemWidth, + height: itemHeight + }); + }); + } + + function openAllMonitors(){ + $.each(loadedMonitors,function(monitorId, monitor){ + selectMonitor(monitorId) + }) + autoPlaceCurrentMonitorItems() + displayInfoScreen() + saveLayout() + } + + function closeAllMonitors(){ + $.each(loadedMonitors,function(monitorId, monitor){ + deselectMonitor(monitorId) + }) + displayInfoScreen() + saveLayout() + } + + drawMonitorList().then(() => { + loadSavedLayout() + setTimeout(() => { + theWindow.resize(() => { + onWindowResize() + saveLayout() + }) + },500) + }) + $('body') + .on('click', '[select-monitor]', function(e){ + e.preventDefault() + var el = $(this); + var monitorId = el.attr('select-monitor') + var isSelected = selectedMonitors[monitorId] + if(isSelected){ + deselectMonitor(monitorId) + }else{ + selectMonitor(monitorId) + } + displayInfoScreen() + saveLayout() + }) + .on('click', '.open-wallview', function(e){ + e.preventDefault() + var windowName = getWindowName(); + if(isNaN(windowName)){ + windowName = windowName + '2' + }else{ + windowName = `${parseInt(windowName) + 1}` + } + createWallViewWindow(windowName) + }) + .on('click', '.wallview-autoplace', function(e){ + e.preventDefault() + autoPlaceCurrentMonitorItems() + saveLayout() + }) + .on('click', '.wallview-item-close', function(e){ + e.preventDefault() + var monitorId = $(this).parents('[live-stream]').attr('live-stream') + deselectMonitor(monitorId) + }) + .on('click', '.wallview-open-all', function(e){ + e.preventDefault() + openAllMonitors() + }) + .on('click', '.wallview-close-all', function(e){ + e.preventDefault() + closeAllMonitors() + }) +}) diff --git a/web/assets/js/super.easyRemoteAccess.js b/web/assets/js/super.easyRemoteAccess.js index a9e8b2ca..d356d270 100644 --- a/web/assets/js/super.easyRemoteAccess.js +++ b/web/assets/js/super.easyRemoteAccess.js @@ -7,7 +7,6 @@ $(document).ready(function(){ var remoteDashboardLinkButton = easyRemoteAccessTab.find('.remote-dashboard-link') var loadingRegistration = false var statusConnections = {} - var currentlyRegisteredP2PServer = currentlySelectedP2PServerId ? currentlySelectedP2PServerId + '' : undefined function copyToClipboard(str) { const el = document.createElement('textarea'); el.value = str; @@ -72,37 +71,11 @@ $(document).ready(function(){ loadingRegistration = false easyRemoteAccessTab.find('.remote-dashboard-link').html(` ` + lang['Open Remote Dashboard']) easyRemoteAccessTab.find('.remote-dashboard-link-copy').html(` ` + lang['Copy Remote Link']) - displayCurrentlySelectedInternally() - } - function displayCurrentlySelectedInternally(){ - var selectedServer = p2pServerList[currentlyRegisteredP2PServer] - if(selectedServer){ - var key = selectedServer.key - var cardEl = easyRemoteAccessTab.find(`[drawn-id="${key}"]`) - easyRemoteAccessTab.find(`[drawn-id].selected`).removeClass('selected') - cardEl.addClass('selected') - setCurrentRemoteLink() - } } function makeHostLink(selectedServer,apiKey){ var href = `https://${selectedServer.host}:${selectedServer.webPort == 80 ? 443 : selectedServer.webPort}/s/${apiKey}/` return href } - function setCurrentRemoteLink(){ - var apiKey = easyRemoteAccessForm.find('[name="p2pApiKey"]').val() - var selectedServer = p2pServerList[currentlyRegisteredP2PServer] - console.log(selectedServer,currentlySelectedP2PServerId,p2pServerList) - if(selectedServer && selectedServer.host){ - var href = makeHostLink(selectedServer,apiKey) - remoteDashboardLinkButton.attr('href',href) - }else{ - new PNotify({ - type: 'warning', - title: lang['P2P Server Not Selected'], - text: lang.p2pServerNotSelectedText, - }) - } - } function beginAllStatusConnections(){ $.each(p2pServerList,function(key,server){ server.key = key @@ -127,6 +100,14 @@ $(document).ready(function(){ toggleAffected.hide() } } + function getSelectedServers(){ + var theArray = []; + $(`[drawn-id].active`).each(function(){ + var theKey = $(this).attr('drawn-id') + theArray.push(theKey) + }) + return theArray + } p2pEnabledSwitch.change(setVisibilityForList) easyRemoteAccessTab.find('.submit').click(function(){ easyRemoteAccessForm.submit() @@ -135,39 +116,51 @@ $(document).ready(function(){ e.preventDefault() var formValues = $(this).serializeObject() disableForm() - formValues.p2pHostSelected = currentlySelectedP2PServerId + // formValues.p2pHostSelected = currentlySelectedP2PServerId + formValues.p2pHostMultiSelected = getSelectedServers() console.log(formValues) $.post(superApiPrefix + $user.sessionKey + '/p2p/save',{ data: JSON.stringify(formValues) },function(data){ console.log(data) if(data.ok){ - currentlyRegisteredP2PServer = currentlySelectedP2PServerId + '' new PNotify({ type: 'success', title: lang['P2P Settings Applied'], text: lang.p2pSettingsText1, }) - setCurrentRemoteLink() setTimeout(enableForm,5000) } }) return false }) - easyRemoteAccessForm.on('click','[drawn-id]',function(){ + easyRemoteAccessTab.on('click','.activate-remote-selection',function(e){ + e.preventDefault() var el = $(this) - var p2pServerId = el.attr('drawn-id') - easyRemoteAccessForm.find('[drawn-id]').removeClass('active') - el.addClass('active') - currentlySelectedP2PServerId = p2pServerId + var parent = el.parents('[drawn-id]') + var drawnId = parent.attr('drawn-id') + var alreadyActive = parent.hasClass('active') + var selectedServer = p2pServerList[drawnId] + var isWss = selectedServer.p2pPort == 443 + console.log(selectedServer) + if(alreadyActive){ + parent.removeClass('active') + }else{ + parent.addClass('active') + const drawnIdToDisable = isWss ? drawnId.replace('-ssl','') : `${drawnId}-ssl` + console.log(drawnIdToDisable) + easyRemoteAccessTab.find(`[drawn-id="${drawnIdToDisable}"]`).removeClass('active') + } + return false; }) easyRemoteAccessTab.on('click','.remote-dashboard-link-copy',function(e){ e.preventDefault() if(!loadingRegistration){ + var parent = $(this).parents('[drawn-id]') + var drawnId = parent.attr('drawn-id') var apiKey = easyRemoteAccessForm.find('[name="p2pApiKey"]').val() - var selectedServer = p2pServerList[currentlyRegisteredP2PServer] - console.log(selectedServer,currentlySelectedP2PServerId,p2pServerList) - if(selectedServer && selectedServer.host){ + var selectedServer = p2pServerList[drawnId] + if(parent.hasClass('active') && selectedServer && selectedServer.host){ var href = makeHostLink(selectedServer,apiKey) copyToClipboard(href) new PNotify({ @@ -183,8 +176,24 @@ $(document).ready(function(){ }) } } + e.stopPropagation() + return false; + }) + easyRemoteAccessTab.on('click','.remote-dashboard-link',function(e){ + e.preventDefault() + if(!loadingRegistration){ + var parent = $(this).parents('[drawn-id]') + var drawnId = parent.attr('drawn-id') + var apiKey = easyRemoteAccessForm.find('[name="p2pApiKey"]').val() + var selectedServer = p2pServerList[drawnId] + console.log(selectedServer,parent.hasClass('active'),parent.length) + if(parent.hasClass('active') && selectedServer && selectedServer.host){ + var href = makeHostLink(selectedServer,apiKey) + window.open(href, '_blank').focus(); + } + } + e.stopPropagation() return false; }) setVisibilityForList() - displayCurrentlySelectedInternally() }) diff --git a/web/pages/blocks/easyRemoteAccess.ejs b/web/pages/blocks/easyRemoteAccess.ejs index 09683f74..5aa9cdee 100644 --- a/web/pages/blocks/easyRemoteAccess.ejs +++ b/web/pages/blocks/easyRemoteAccess.ejs @@ -1,5 +1,7 @@ -<% const p2pServerList = config.p2pServerList || {} - const selectedServer = p2pServerList[config.p2pHostSelected] +<% + const p2pServerList = config.p2pServerList || {} + const selectedServers = config.p2pHostMultiSelected + const multipleSelected = selectedServers instanceof Array && selectedServers.length > 0; %>
    @@ -40,12 +43,6 @@
    - @@ -72,7 +69,7 @@ if(!config.useBetterP2P && details.v2)return; %> @@ -115,7 +116,6 @@
    diff --git a/web/pages/blocks/footer.ejs b/web/pages/blocks/footer.ejs index ae6b1857..98611724 100644 --- a/web/pages/blocks/footer.ejs +++ b/web/pages/blocks/footer.ejs @@ -21,12 +21,15 @@ + + + diff --git a/web/pages/blocks/home/monitorSettings.ejs b/web/pages/blocks/home/monitorSettings.ejs index 8ec8b6e5..64b28dc9 100644 --- a/web/pages/blocks/home/monitorSettings.ejs +++ b/web/pages/blocks/home/monitorSettings.ejs @@ -42,12 +42,16 @@ diff --git a/web/pages/blocks/loginTokenAddLDAP.ejs b/web/pages/blocks/loginTokenAddLDAP.ejs index cfd6f81d..69db0ec3 100644 --- a/web/pages/blocks/loginTokenAddLDAP.ejs +++ b/web/pages/blocks/loginTokenAddLDAP.ejs @@ -17,10 +17,7 @@ var buildOptions %> -<%- include('home/fieldBuilders'); %> -<% - drawBlock(define['LDAP'].blocks.LDAP) -%> +<%- include('home/drawBlock', { theBlock: define['LDAP'].blocks.LDAP }) %> + + + + + + + + + + + + + + + + + + +
    +
    +
    + <%- include('blocks/home/timeline.ejs') %> + <%- include('blocks/confirm.ejs') %> +
    +
    +
    + + + + + + + + + + + + + + + diff --git a/web/pages/wallview.ejs b/web/pages/wallview.ejs new file mode 100644 index 00000000..204b6dc3 --- /dev/null +++ b/web/pages/wallview.ejs @@ -0,0 +1,78 @@ +<%- lang.Shinobi %> +<% + var forceUrlPrefix + var urlPrefix = `` + var targetPort = config.ssl && config.ssl.port && protocol === 'https' ? config.ssl.port : config.port + var addonsEnabled = {} + var rawAddonList = decodeURI(data.addon || '').split('|'); + rawAddonList.forEach(function(piece){ + var pieceParts = piece.split('='); + var key = pieceParts[0]; + var value = pieceParts[1] || true; + addonsEnabled[key] = value; + }); + function getAddon(addonTag){ + return addonsEnabled[addonTag]; + } + var streamWidth = parseInt(getAddon('width')) || 640 + var streamHeight = parseInt(getAddon('height')) || 480 + var hasGUI = getAddon('gui') + var isFullscreen = getAddon('fullscreen') + var isRelativeUrl = getAddon('relative') + if(forceUrlPrefix){ + urlPrefix = forceUrlPrefix + }else if(isRelativeUrl){ + urlPrefix = '' + }else if(config.baseURL){ + urlPrefix = config.baseURL + }else if(!targetPort || targetPort === '' || targetPort == 80 || targetPort == 443){ + urlPrefix = baseUrl + }else{ + urlPrefix = `${baseUrl}:${targetPort}` + } + if(urlPrefix.endsWith('/') === false){ + urlPrefix += '/' + } + var originalURL = `${urlPrefix}` +%> +<%- include('blocks/header-favicon') %> + + + + + + + + + + + + + + + + + +