2.0.2 PreRelease Version
This commit is contained in:
parent
8701ea5d4a
commit
3d38fea6c5
91
package-lock.json
generated
91
package-lock.json
generated
@ -1,15 +1,16 @@
|
|||||||
{
|
{
|
||||||
"name": "subsonics-manager",
|
"name": "subsonics-manager",
|
||||||
"version": "2.0.0",
|
"version": "2.0.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "subsonics-manager",
|
"name": "subsonics-manager",
|
||||||
"version": "2.0.0",
|
"version": "2.0.1",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"decompress": "^4.2.1",
|
"decompress": "^4.2.1",
|
||||||
|
"fs-extra": "^11.1.1",
|
||||||
"socket.io-client": "^4.6.1"
|
"socket.io-client": "^4.6.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@ -56,6 +57,20 @@
|
|||||||
"global-agent": "^3.0.0"
|
"global-agent": "^3.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@electron/get/node_modules/fs-extra": {
|
||||||
|
"version": "8.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
|
||||||
|
"integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"graceful-fs": "^4.2.0",
|
||||||
|
"jsonfile": "^4.0.0",
|
||||||
|
"universalify": "^0.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6 <7 || >=8"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@electron/notarize": {
|
"node_modules/@electron/notarize": {
|
||||||
"version": "1.2.3",
|
"version": "1.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/@electron/notarize/-/notarize-1.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/@electron/notarize/-/notarize-1.2.3.tgz",
|
||||||
@ -1031,17 +1046,35 @@
|
|||||||
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
|
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
|
||||||
},
|
},
|
||||||
"node_modules/fs-extra": {
|
"node_modules/fs-extra": {
|
||||||
"version": "8.1.0",
|
"version": "11.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz",
|
||||||
"integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
|
"integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==",
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"graceful-fs": "^4.2.0",
|
"graceful-fs": "^4.2.0",
|
||||||
"jsonfile": "^4.0.0",
|
"jsonfile": "^6.0.1",
|
||||||
"universalify": "^0.1.0"
|
"universalify": "^2.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6 <7 || >=8"
|
"node": ">=14.14"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/fs-extra/node_modules/jsonfile": {
|
||||||
|
"version": "6.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
|
||||||
|
"integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"universalify": "^2.0.0"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"graceful-fs": "^4.1.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/fs-extra/node_modules/universalify": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 10.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/fs.realpath": {
|
"node_modules/fs.realpath": {
|
||||||
@ -2389,6 +2422,19 @@
|
|||||||
"progress": "^2.0.3",
|
"progress": "^2.0.3",
|
||||||
"semver": "^6.2.0",
|
"semver": "^6.2.0",
|
||||||
"sumchecker": "^3.0.1"
|
"sumchecker": "^3.0.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"fs-extra": {
|
||||||
|
"version": "8.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
|
||||||
|
"integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"graceful-fs": "^4.2.0",
|
||||||
|
"jsonfile": "^4.0.0",
|
||||||
|
"universalify": "^0.1.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@electron/notarize": {
|
"@electron/notarize": {
|
||||||
@ -3125,14 +3171,29 @@
|
|||||||
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
|
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
|
||||||
},
|
},
|
||||||
"fs-extra": {
|
"fs-extra": {
|
||||||
"version": "8.1.0",
|
"version": "11.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz",
|
||||||
"integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
|
"integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"graceful-fs": "^4.2.0",
|
"graceful-fs": "^4.2.0",
|
||||||
"jsonfile": "^4.0.0",
|
"jsonfile": "^6.0.1",
|
||||||
"universalify": "^0.1.0"
|
"universalify": "^2.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"jsonfile": {
|
||||||
|
"version": "6.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
|
||||||
|
"integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
|
||||||
|
"requires": {
|
||||||
|
"graceful-fs": "^4.1.6",
|
||||||
|
"universalify": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"universalify": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ=="
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"fs.realpath": {
|
"fs.realpath": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "subsonics-manager",
|
"name": "subsonics-manager",
|
||||||
"version": "2.0.1",
|
"version": "2.0.2",
|
||||||
"description": "Manager for subsonics",
|
"description": "Manager for subsonics",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -17,6 +17,7 @@
|
|||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"decompress": "^4.2.1",
|
"decompress": "^4.2.1",
|
||||||
|
"fs-extra": "^11.1.1",
|
||||||
"socket.io-client": "^4.6.1"
|
"socket.io-client": "^4.6.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@ -60,4 +60,28 @@
|
|||||||
-webkit-transform: rotate(360deg);
|
-webkit-transform: rotate(360deg);
|
||||||
transform: rotate(360deg);
|
transform: rotate(360deg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.buttonTryAgain {
|
||||||
|
|
||||||
|
font-family: 'Open Sans', sans-serif !important;
|
||||||
|
background-color: transparent;
|
||||||
|
border: solid;
|
||||||
|
border-radius: 15px;
|
||||||
|
padding: 2%;
|
||||||
|
border-color: rgb(46, 196, 255);
|
||||||
|
color: white;
|
||||||
|
transition: all 0.2s ease 0s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.buttonTryAgain:hover {
|
||||||
|
|
||||||
|
color: black;
|
||||||
|
background-color: rgb(46, 196, 255);
|
||||||
|
box-shadow: 2px 2px 5px rgb(46, 196, 255);
|
||||||
|
}
|
||||||
|
|
||||||
|
.buttonTryAgain:active {
|
||||||
|
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
@ -20,9 +20,10 @@
|
|||||||
<p>Mise à jour de l'application</p>
|
<p>Mise à jour de l'application</p>
|
||||||
<span id="loadingSpan" class="loadingSpan"><img class="loading" src="../common/mettre-a-jour.png"></span>
|
<span id="loadingSpan" class="loadingSpan"><img class="loading" src="../common/mettre-a-jour.png"></span>
|
||||||
<br>
|
<br>
|
||||||
<p class="infoSpan">Veuillez patienter pendant que l'application se met à jour !</p>
|
<p id="infoSpan" class="infoSpan">Veuillez patienter pendant que l'application se met à jour !</p>
|
||||||
<span class="infoSpan"><p>Submanager - Version : <span id="version"></span></p></span>
|
<span class="infoSpan"><p>Submanager - Version : <span id="version"></span></p></span>
|
||||||
<img style="width: 5%; height: 5%;" class="loadingRot" src="../common/spinner-third-svgrepo-com.svg">
|
<span id="load"><img style="width: 5%; height: 5%;" class="loadingRot" src="../common/spinner-third-svgrepo-com.svg"></span>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,10 +3,27 @@ const packageJson = require("../../package.json")
|
|||||||
const ipc = ipcRenderer;
|
const ipc = ipcRenderer;
|
||||||
const fs = require("fs")
|
const fs = require("fs")
|
||||||
|
|
||||||
const minimizeBtn = document.getElementById("minimizeBtn")
|
const loadingSpan = document.getElementById("loadingSpan")
|
||||||
|
const infoSpan = document.getElementById("infoSpan")
|
||||||
|
const load = document.getElementById("load")
|
||||||
|
|
||||||
document.getElementById("version").innerHTML = packageJson.version
|
document.getElementById("version").innerHTML = packageJson.version
|
||||||
|
|
||||||
|
ipc.on("error", () => {
|
||||||
|
|
||||||
|
loadingSpan.innerHTML = "<i class='fa fa-times'></i>"
|
||||||
|
load.innerHTML = "<button style='padding: 10%;' class='buttonTryAgain' id='close'>Fermer</button>"
|
||||||
|
infoSpan.innerHTML = 'Une erreur est apparu lors de la mise à jour, fermez puis relancez !'
|
||||||
|
const close = document.getElementById("close")
|
||||||
|
close.addEventListener("click", () => {
|
||||||
|
|
||||||
|
ipc.send("close")
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
const log = require("./sublog")
|
const log = require("./sublog")
|
||||||
const { BrowserWindow, app } = require("electron")
|
const { BrowserWindow, app, ipcMain } = require("electron")
|
||||||
const https = require('https');
|
const https = require('https');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
const fse = require('fs-extra');
|
||||||
const BWin = BrowserWindow
|
const BWin = BrowserWindow
|
||||||
const path = require("path")
|
const path = require("path")
|
||||||
const decompress = require('decompress');
|
const decompress = require('decompress');
|
||||||
@ -11,7 +12,7 @@ module.exports.checkUpdate = () => {
|
|||||||
|
|
||||||
log.update("Verification des mises a jour ... Processing !")
|
log.update("Verification des mises a jour ... Processing !")
|
||||||
|
|
||||||
fetch("https://git.raphix.fr/subsonics/manager/raw/branch/main/package.json").then(resp => resp.json()).then(resp => checkUpdateProcessing(resp)).catch(err => log.update("Erreur lors de la verification des mises a jour !"))
|
fetch("https://git.raphix.fr/subsonics/manager/raw/branch/main/package.json").catch(err => catchError(err)).then(resp => resp.json()).then(resp => checkUpdateProcessing(resp))
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkUpdateProcessing(serverPackage) {
|
function checkUpdateProcessing(serverPackage) {
|
||||||
@ -37,7 +38,12 @@ function update() {
|
|||||||
const win = BWin.getFocusedWindow()
|
const win = BWin.getFocusedWindow()
|
||||||
win.loadFile("templates/update/update.html")
|
win.loadFile("templates/update/update.html")
|
||||||
|
|
||||||
log.update("Téléchargement de la mise à jour ... Processing !")
|
ipcMain.on("close", () => {
|
||||||
|
|
||||||
|
app.quit()
|
||||||
|
})
|
||||||
|
|
||||||
|
log.update("Telechargement de la mise à jour ... Processing !")
|
||||||
|
|
||||||
if(fs.existsSync(__dirname + path.sep + "update.tar.gz")) {
|
if(fs.existsSync(__dirname + path.sep + "update.tar.gz")) {
|
||||||
|
|
||||||
@ -45,18 +51,28 @@ function update() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const updatePack = fs.createWriteStream(__dirname + path.sep + "update.tar.gz");
|
const updatePack = fs.createWriteStream(__dirname + path.sep + "update.tar.gz");
|
||||||
const request = http.get("https://git.raphix.fr/subsonics/manager/archive/main.tar.gz", function(response) {
|
const request = https.get("https://git.raphix.fr/subsonics/manager/archive/main.tar.gz", function(response) {
|
||||||
response.pipe(file);
|
response.pipe(updatePack);
|
||||||
|
|
||||||
// after download completed close filestream
|
// after download completed close filestream
|
||||||
updatePack.on("finish", () => {
|
updatePack.on("finish", () => {
|
||||||
updatePack.close();
|
updatePack.close();
|
||||||
log.update("Téléchargement de la mise à jour ... Finish !")
|
log.update("Telechargement de la mise à jour ... Finish !")
|
||||||
|
|
||||||
install(__dirname + path.sep + "update.tar.gz")
|
install(__dirname + path.sep + "update.tar.gz")
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
updatePack.on("error", (err) => {
|
||||||
|
log.update("Erreur lors du telechargement de la mise à jour !")
|
||||||
|
updatePack.close();
|
||||||
|
console.log(err)
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -64,8 +80,33 @@ function update() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function install(filename) {
|
function install(filename) {
|
||||||
decompress(filename, 'tmp').then(files => {
|
|
||||||
console.log('done!');
|
log.update("Extraction de la mise à jour ... Processing !")
|
||||||
});
|
decompress(filename, __dirname).then(files => {
|
||||||
|
log.update("Extraction de la mise à jour ... Finish !")
|
||||||
|
log.update("Installation de la mise à jour ... Processing !")
|
||||||
|
fse.copy(__dirname + path.sep + "manager", __dirname, { overwrite: true }, () => {
|
||||||
|
fs.rmdirSync(__dirname + path.sep + "manager", { recursive: true, force: true })
|
||||||
|
log.update("Installation de la mise à jour ... Finish !")
|
||||||
|
log.update("Rédémarrage de l'application.")
|
||||||
|
app.relaunch()
|
||||||
|
app.exit()
|
||||||
|
})
|
||||||
|
|
||||||
|
}).catch(err => catchError(err, true));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function catchError(err, inUp) {
|
||||||
|
log.update("Erreur lors de la verification des mises a jour !")
|
||||||
|
log.update(err)
|
||||||
|
|
||||||
|
if(inUp == true) {
|
||||||
|
win.webContents.send("error")
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user