mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
fix: update nodemon and start scripts to include --no-node-snapshot option; add prepare-native-deps script for isolated-vm management
This commit is contained in:
@@ -16,5 +16,5 @@
|
||||
"TS_NODE_TRANSPILE_ONLY": "1",
|
||||
"TS_NODE_FILES": "false"
|
||||
},
|
||||
"exec": "node -r ts-node/register/transpile-only Index.ts"
|
||||
}
|
||||
"exec": "node --no-node-snapshot -r ts-node/register/transpile-only Index.ts"
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
"watch-frontend:status-page": "bash ./scripts/frontend-run.sh FeatureSet/StatusPage dev-build --watch",
|
||||
"watch-frontend:public-dashboard": "bash ./scripts/frontend-run.sh FeatureSet/PublicDashboard dev-build --watch",
|
||||
"dev:api": "npx nodemon",
|
||||
"start": "export NODE_OPTIONS='--max-old-space-size=8096' && node --require ts-node/register Index.ts",
|
||||
"start": "export NODE_OPTIONS='--max-old-space-size=8096' && node --no-node-snapshot --require ts-node/register Index.ts",
|
||||
"compile": "tsc",
|
||||
"clear-modules": "rm -rf node_modules && rm package-lock.json && npm install",
|
||||
"dev": "bash ./scripts/dev.sh",
|
||||
|
||||
@@ -31,6 +31,8 @@ pids+=($!)
|
||||
npm run watch-frontend:public-dashboard &
|
||||
pids+=($!)
|
||||
|
||||
bash ./scripts/prepare-native-deps.sh
|
||||
|
||||
npm run dev:api &
|
||||
pids+=($!)
|
||||
|
||||
|
||||
26
App/scripts/prepare-native-deps.sh
Normal file
26
App/scripts/prepare-native-deps.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
common_dir="/usr/src/Common"
|
||||
|
||||
if [ ! -d "${common_dir}/node_modules/isolated-vm" ]; then
|
||||
echo "Installing Common dependencies..."
|
||||
npm --prefix "${common_dir}" install
|
||||
fi
|
||||
|
||||
if (
|
||||
cd "${common_dir}" &&
|
||||
node --no-node-snapshot -e "require('isolated-vm')"
|
||||
) >/dev/null 2>&1; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Rebuilding isolated-vm for Node $(node -p 'process.version')..."
|
||||
|
||||
npm --prefix "${common_dir}" rebuild isolated-vm
|
||||
|
||||
(
|
||||
cd "${common_dir}" &&
|
||||
node --no-node-snapshot -e "require('isolated-vm')"
|
||||
) >/dev/null
|
||||
Reference in New Issue
Block a user