mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-28 15:40:56 +03:00
Dependencies now install during update
This commit is contained in:
@@ -137,9 +137,6 @@ async function startServer() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// getLatestVersion();
|
|
||||||
// restartServer();
|
|
||||||
updateServer();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function restartServer() {
|
async function restartServer() {
|
||||||
@@ -173,6 +170,9 @@ async function updateServer() {
|
|||||||
// grab new package.json and public folder
|
// grab new package.json and public folder
|
||||||
await downloadUpdateFiles();
|
await downloadUpdateFiles();
|
||||||
|
|
||||||
|
// run npm install
|
||||||
|
await installDependencies();
|
||||||
|
|
||||||
restartServer();
|
restartServer();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -244,6 +244,16 @@ async function downloadLatestRelease(tag) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function installDependencies() {
|
||||||
|
return new Promise(resolve => {
|
||||||
|
var child_process = require('child_process');
|
||||||
|
child_process.execSync('npm install',{stdio:[0,1,2]});
|
||||||
|
resolve(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// helper function to download file using fetch
|
// helper function to download file using fetch
|
||||||
const fetchFile = (async (url, path) => {
|
const fetchFile = (async (url, path) => {
|
||||||
const res = await fetch(url);
|
const res = await fetch(url);
|
||||||
|
|||||||
24
package.json
24
package.json
@@ -19,17 +19,17 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular-devkit/core": "^9.0.6",
|
"@angular-devkit/core": "^9.0.6",
|
||||||
"@angular/animations": "^9.0.6",
|
"@angular/animations": "^9.1.0",
|
||||||
"@angular/cdk": "^9.1.2",
|
"@angular/cdk": "^9.1.2",
|
||||||
"@angular/common": "^9.0.6",
|
"@angular/common": "^9.1.0",
|
||||||
"@angular/compiler": "^9.0.6",
|
"@angular/compiler": "^9.1.0",
|
||||||
"@angular/core": "^9.0.6",
|
"@angular/core": "^9.1.0",
|
||||||
"@angular/forms": "^9.0.6",
|
"@angular/forms": "^9.1.0",
|
||||||
"@angular/localize": "^9.0.6",
|
"@angular/localize": "^9.1.0",
|
||||||
"@angular/material": "^9.1.2",
|
"@angular/material": "^9.2.0",
|
||||||
"@angular/platform-browser": "^9.0.6",
|
"@angular/platform-browser": "^9.1.0",
|
||||||
"@angular/platform-browser-dynamic": "^9.0.6",
|
"@angular/platform-browser-dynamic": "^9.1.0",
|
||||||
"@angular/router": "^9.0.6",
|
"@angular/router": "^9.1.0",
|
||||||
"@locl/core": "0.0.1-beta.2",
|
"@locl/core": "0.0.1-beta.2",
|
||||||
"core-js": "^2.4.1",
|
"core-js": "^2.4.1",
|
||||||
"file-saver": "^2.0.2",
|
"file-saver": "^2.0.2",
|
||||||
@@ -48,8 +48,8 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-devkit/build-angular": "^0.901.0",
|
"@angular-devkit/build-angular": "^0.901.0",
|
||||||
"@angular/cli": "^9.1.0",
|
"@angular/cli": "^9.1.0",
|
||||||
"@angular/compiler-cli": "^9.0.6",
|
"@angular/compiler-cli": "^9.1.0",
|
||||||
"@angular/language-service": "^9.0.6",
|
"@angular/language-service": "^9.1.0",
|
||||||
"@locl/cli": "0.0.1-beta.6",
|
"@locl/cli": "0.0.1-beta.6",
|
||||||
"@types/core-js": "^2.5.2",
|
"@types/core-js": "^2.5.2",
|
||||||
"@types/file-saver": "^2.0.1",
|
"@types/file-saver": "^2.0.1",
|
||||||
|
|||||||
Reference in New Issue
Block a user