update 2026-11-11 12:16:13

This commit is contained in:
action committed 2026-11-11 12:16:13 +08:00
1 parent 30afd5f00d
commit dc0eb451d5
19 files changed
+1042 -13

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI shared integration for LinkEase apps
LUCI_PKGARCH:=all
PKG_VERSION:=1.2.1-r1
PKG_VERSION:=1.2.1-r3
PKG_RELEASE:=
include $(TOPDIR)/feeds/luci/luci.mk
@@ -25,7 +25,16 @@ local manifests = {
basePath = "/apps/kspeeder/",
externalOpen = { enabled = true, path = "/" }
},
desktop = { mode = "module", entry = "desktop-entry.js" },
desktop = {
mode = "iframe",
target = {
scheme = "http", hostMode = "request-host", path = "/",
port = {
default = 5003,
keys = { uci = "istoreenhance.@istoreenhance[0].adminport" }
}
}
},
backend = {
type = "http", portFromUci = "istoreenhance.@istoreenhance[0].adminport",
defaultPort = 5003
@@ -155,4 +164,47 @@ equal(builtin.registered, true)
equal(builtin.available, false)
equal(builtin.reason, "entry_unsupported_and_external_disabled")
local scanned = {}
local default_deps = dependencies("fastnet.json", false)
default_deps.registration_dirs = nil
default_deps.fs.dir = function(directory)
table.insert(scanned, directory)
return function() return nil end
end
apps_openwrt.new(default_deps):resolve("missing-app")
equal(#scanned, 2, "default discovery must retain the old desktop fallback")
equal(scanned[1], "/usr/share/linkease/apps.d")
equal(scanned[2], "/usr/share/linkeasefull/desktop-apps.d")
local function compatibility_lookup(current, legacy, explicit)
local deps = dependencies("fastnet.json", true)
deps.registration_dirs = explicit
deps.fs.dir = function(directory)
local value = directory == "/usr/share/linkease/apps.d" and current
or directory == "/usr/share/linkeasefull/desktop-apps.d" and legacy
local emitted = false
return function()
if emitted or not value then return nil end
emitted = true
return "17-fastnet.json"
end
end
local readfile = deps.fs.readfile
deps.fs.readfile = function(path)
if path == "/usr/share/linkease/apps.d/17-fastnet.json" then return current end
if path == "/usr/share/linkeasefull/desktop-apps.d/17-fastnet.json" then return legacy end
return readfile(path)
end
deps.json.parse = function(raw)
if raw == "new" then return { id = "fastnet", desktop = { mode = "module" }, standalone = { basePath = "/apps/fastnet/new/" } } end
if raw == "old" then return { id = "fastnet", desktop = { mode = "module" }, standalone = { basePath = "/apps/fastnet/old/" } } end
if raw == "state" then return { active = "gateway" } end
end
return apps_openwrt.new(deps):resolve("fastnet")
end
equal(compatibility_lookup("new", "old").url, "/apps/fastnet/new/", "canonical ID wins")
equal(compatibility_lookup(nil, "old").url, "/apps/fastnet/old/", "legacy-only app stays visible")
equal(compatibility_lookup("invalid", "old").url, "/apps/fastnet/old/", "invalid JSON must not hide legacy")
equal(compatibility_lookup(nil, "old", { "/explicit" }).registered, false, "explicit directories stay isolated")
print("linkease apps OpenWrt adapter tests passed")