Compare commits

..

3 commits

Author SHA1 Message Date
f01fc2ac02 sc: Fix new ABI showing running always false
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded
2024-04-06 17:36:35 +00:00
d175782f73 updater: Return latest version, not the latest installed one. Failed installs will be hidden otherwise.
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded
2022-08-18 11:13:17 +00:00
bdaf58b7b0 util: Fix bug where application config was still being leaked
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded
2022-04-02 20:21:46 +00:00
3 changed files with 7 additions and 5 deletions

View file

@ -102,7 +102,7 @@ export async function listentoapp(ctx, data) {
if (!app) return if (!app) return
ctx.socket.join('app.' + data.name) ctx.socket.join('app.' + data.name)
let version = ctx.db.get(ctx.db.data.core[app.name].versions, ctx.db.data.core[app.name].latestInstalled) let version = ctx.db.data.core[app.name].versions[0]
ctx.socket.emit('app.updatelog', { ctx.socket.emit('app.updatelog', {
name: data.name, name: data.name,
log: version?.log || ctx.db.data.core[app.name].updater log: version?.log || ctx.db.data.core[app.name].updater

View file

@ -19,7 +19,9 @@ export function safeWrap(log, name, fn) {
export function getConfig(ctx) { export function getConfig(ctx) {
let merge = { let merge = {
applications: [] applications: [],
name: ctx.db.config.name || '',
title: ctx.db.config.title || '',
} }
for (let app of ctx.core.applications) { for (let app of ctx.core.applications) {
merge[app.name] = { merge[app.name] = {
@ -30,7 +32,7 @@ export function getConfig(ctx) {
} }
merge.applications.push(app.name) merge.applications.push(app.name)
} }
return defaults(ctx.db.config, merge) return merge
} }
export function getApp(ctx, name, action) { export function getApp(ctx, name, action) {
@ -88,7 +90,7 @@ export function getStatus(ctx) {
active: active, active: active,
latestInstalled: installed, latestInstalled: installed,
updated: appDb.updater, updated: appDb.updater,
running: app.running, running: app.running || app.ctx.version,
updating: app.updating, updating: app.updating,
} }
} }

View file

@ -1,6 +1,6 @@
{ {
"name": "sc-manager", "name": "sc-manager",
"version": "2.0.3", "version": "2.0.6",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {