disable `npm audit fix --force`

merge-requests/210/merge
Moe 2021-05-05 13:43:03 -07:00
parent c9659cf963
commit dff8532739
21 changed files with 29 additions and 31 deletions

View File

@ -87,8 +87,7 @@ COPY ./plugins /home/Shinobi/plugins
RUN chmod -R 777 /home/Shinobi/plugins
RUN npm i npm@latest -g && \
npm install pm2 -g && \
npm install --unsafe-perm && \
npm audit fix --force
npm install --unsafe-perm
COPY ./Docker/pm2.yml ./
# Copy default configuration files

View File

@ -250,7 +250,7 @@ echo "Installing NPM libraries..."
sudo npm i npm -g
sudo npm install --unsafe-perm
sudo npm install ffbinaries mp4frag@latest cws@latest
sudo npm audit fix --force
# sudo npm audit fix --force
echo "========================================================="
echo "Installing PM2..."

View File

@ -95,7 +95,7 @@ echo "Shinobi - Install NPM Libraries"
sudo npm i npm -g
sudo npm install --unsafe-perm
sudo npm install mp4frag@latest cws@latest
sudo npm audit fix --force
# sudo npm audit fix --force
echo "============="
echo "Shinobi - Install PM2"
sudo npm install pm2@latest -g

View File

@ -43,7 +43,7 @@ echo "============="
echo "Shinobi - Install NPM Libraries"
npm i npm -g
npm install --unsafe-perm
sudo npm audit fix --force
# sudo npm audit fix --force
echo "============="
echo "Shinobi - Install PM2"
npm install pm2@3.0.0 -g

View File

@ -17,7 +17,7 @@ echo "Securing mysql..."
npm i npm -g
#There are some errors in here that I don't want you to see. Redirecting to dev null :D
npm install --unsafe-perm > & /dev/null
npm audit fix --force > & /dev/null
# npm audit fix --force > & /dev/null
npm install pm2@3.0.0 -g
cp conf.sample.json conf.json
cp super.sample.json super.json

View File

@ -15,7 +15,7 @@ echo "============="
echo "Shinobi - Install NPM Libraries"
sudo npm i npm -g
sudo npm install --unsafe-perm
sudo npm audit fix --unsafe-perm
# sudo npm audit fix --unsafe-perm
echo "============="
echo "Shinobi - Install PM2"
sudo npm install pm2@3.0.0 -g

View File

@ -42,7 +42,7 @@ fi
echo "Shinobi - Install NPM Libraries"
sudo npm i npm -g
sudo npm install --unsafe-perm
sudo npm audit fix --unsafe-perm
# sudo npm audit fix --unsafe-perm
echo "============="
echo "Shinobi - Install PM2"
sudo npm install pm2@3.0.0 -g

View File

@ -2,16 +2,16 @@
# Copyright (c) 2020 Jordan Geoghegan <jordan@geoghegan.ca>
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# Functions
@ -97,7 +97,7 @@ schema_install () {
pro_download () {
echo "\n### Grabbing Shinobi Pro from master branch\n"
doas -u _shinobi ftp -o /home/_shinobi/shinobi.tar.gz https://gitlab.com/Shinobi-Systems/Shinobi/-/archive/master/Shinobi-master.tar.gz
doas -u _shinobi ftp -o /home/_shinobi/shinobi.tar.gz https://gitlab.com/Shinobi-Systems/Shinobi/-/archive/master/Shinobi-master.tar.gz
}
gpl_download () {
@ -187,7 +187,6 @@ done
echo "\n### Installing required Node modules\n"
cd /home/_shinobi/shinobi || npm_abort
doas -u _shinobi npm install --unsafe-perm
doas npm audit fix --force
doas -u _shinobi cp /home/_shinobi/shinobi/conf.sample.json /home/_shinobi/shinobi/conf.json
doas -u _shinobi cp /home/_shinobi/shinobi/super.sample.json /home/_shinobi/shinobi/super.json
doas npm install -g pm2
@ -198,7 +197,7 @@ echo "\nCongratulations, Shinobi is now installed!\n"
echo 'To start Shinobi at boot, add a crontab entry for the user "_shinobi" with something like this:\n'
echo '$ doas crontab -u _shinobi -e
@reboot /bin/sh -c "cd /home/_shinobi/Shinobi && pm2 start camera.js cron.js"
echo "\nYou can access Shinobi at http://$(ifconfig | grep 'inet ' | awk '!/127.0.0.1/ {print $2}'):8080"
@ -209,4 +208,4 @@ echo "\nThe default login credentials are:
username: admin@shinobi.video
password: admin"
echo "\nThe official Shinobi Documentation can be found at: https://shinobi.video/docs/"
echo "\nThe official Shinobi Documentation can be found at: https://shinobi.video/docs/"

View File

@ -86,7 +86,7 @@ echo "============="
echo "Shinobi - Install NPM Libraries"
npm i npm -g
npm install --unsafe-perm
sudo npm audit fix --force
# sudo npm audit fix --force
echo "============="
echo "Shinobi - Install PM2"
sudo npm install pm2@3.0.0 -g

View File

@ -146,7 +146,7 @@ if [[ $@ == *'update'* ]]; then
pm2 stop "$installationDirectory"/camera.js
pm2 stop "$installationDirectory"/cron.js
npm install --unsafe-perm
npm audit fix --force
# npm audit fix --force
git reset --hard
git pull
pm2 start "$installationDirectory"/camera.js

View File

@ -149,7 +149,7 @@ echo "============="
echo "Shinobi - Install NPM Libraries"
sudo npm i npm -g
sudo npm install --unsafe-perm
sudo npm audit fix --unsafe-perm
# sudo npm audit fix --unsafe-perm
echo "============="
#Install PM2

View File

@ -97,7 +97,7 @@ echo "============="
echo "Shinobi - Install NPM Libraries"
sudo npm i npm -g
sudo npm install --unsafe-perm
sudo npm audit fix --force
# sudo npm audit fix --force
echo "============="
echo "Shinobi - Install PM2"
sudo npm install pm2@3.0.0 -g

View File

@ -102,7 +102,7 @@ echo "============="
echo "Shinobi - Install NPM Libraries"
sudo npm i npm -g
sudo npm install --unsafe-perm
sudo npm audit fix --force
# sudo npm audit fix --force
echo "============="
echo "Shinobi - Install PM2"
sudo npm install pm2@3.0.0 -g

View File

@ -109,7 +109,7 @@ echo "============="
echo "Shinobi - Install NPM Libraries"
sudo npm i npm -g
sudo npm install --unsafe-perm
sudo npm audit fix --force
# sudo npm audit fix --force
echo "============="
echo "Shinobi - Install PM2"
sudo npm install pm2@3.0.0 -g

View File

@ -1,6 +1,6 @@
git reset --hard
git pull
npm install --unsafe-perm
npm audit fix --force
# npm audit fix --force
# pm2 restart camera
# pm2 restart cron

View File

@ -42,7 +42,7 @@ npm install nopt npmlog rimraf semver -g
npm install
npm uninstall nopt npmlog rimraf semver -g
echo "Finding and Fixing Module Vulnerabilities.."
npm audit fix --force
# npm audit fix --force
echo "Shinobi - Do you want to start the plugin?"
echo "(Y)es or (n)o?"
echo "Press [ENTER] for default (Yes)"

View File

@ -41,7 +41,7 @@ else
fi
npm install --unsafe-perm
npm install @tensorflow-models/coco-ssd@2.0.3 @tensorflow/tfjs-converter@1.7.3 @tensorflow/tfjs-core@1.7.3 @tensorflow/tfjs-layers@1.7.3 @tensorflow/tfjs-node@1.7.3 --unsafe-perm
npm audit fix --force
# npm audit fix --force
if [ ! -e "./conf.json" ]; then
echo "Creating conf.json"
sudo cp conf.sample.json conf.json

View File

@ -148,7 +148,7 @@ else
installNonGpuRoute
fi
fi
# npm audit fix --force
# # npm audit fix --force
if [ ! -e "$DIR/conf.json" ]; then
dontCreateKeyFlag=false
echo "Creating conf.json"

View File

@ -148,7 +148,7 @@ else
installNonGpuRoute
fi
fi
# npm audit fix --force
# # npm audit fix --force
if [ ! -e "$DIR/conf.json" ]; then
dontCreateKeyFlag=false
echo "Creating conf.json"

View File

@ -132,7 +132,7 @@ fi
# npm install @tensorflow/tfjs-node-gpu@2.7.0
npm audit fix --force
# npm audit fix --force
if [ "$installGpuFlag" = true ]; then
runRebuildGpu
else

View File

@ -86,7 +86,7 @@ echo "Getting C++ module : node-yolo-shinobi"
echo "https://www.npmjs.com/package/node-yolo-shinobi is a fork of https://github.com/rcaceiro/node-yolo"
npm install --unsafe-perm
npm install node-yolo-shinobi --unsafe-perm
npm audit fix --force
# npm audit fix --force
echo "-----------------------------------"
echo "Start the plugin with pm2 like so :"
echo "pm2 start shinobi-yolo.js"