wwt-platform 1.1.7 → 1.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/platform.html +12 -2
- package/tools.json +1 -1
package/package.json
CHANGED
package/platform.html
CHANGED
|
@@ -1357,7 +1357,7 @@ function doAddMod(){
|
|
|
1357
1357
|
// ═══════════════════════════════════════════════════════════
|
|
1358
1358
|
// 平台更新(方案B:平台 + 内置工具统一检查)
|
|
1359
1359
|
// ═══════════════════════════════════════════════════════════
|
|
1360
|
-
const PLATFORM_VER = '1.1.
|
|
1360
|
+
const PLATFORM_VER = '1.1.8';
|
|
1361
1361
|
const NPM_PKG = 'wwt-platform'; // NPM 包名(主力分发源)
|
|
1362
1362
|
const GITEE_TOKEN_KEY = 'wwt_gitee_token';
|
|
1363
1363
|
const GITEE_TOKEN_DEF = 'e45883b9c89b8d9689746ce42bbc2b0b';
|
|
@@ -1382,7 +1382,7 @@ const SOURCES = [
|
|
|
1382
1382
|
// 更新清单:每个条目 = 一个可更新对象(平台或工具)
|
|
1383
1383
|
// 这是「离线兜底种子」——联网时会与远程 tools.json 合并,远程为准
|
|
1384
1384
|
const UPD_REG_DEF = [
|
|
1385
|
-
{key:'platform', name:'WWT 工作平台', cur:'1.1.
|
|
1385
|
+
{key:'platform', name:'WWT 工作平台', cur:'1.1.8', repo:GITEE_PLATFORM_REPO, verFile:'version.js', appFile:'app.js', pat:'__WWT_PLATFORM_VER', kind:'platform'},
|
|
1386
1386
|
{key:'erp-recon', name:'ERP 对账工具', cur:'V1.0.2',repo:'wwtmrhu/erp-recon', verFile:'version.js', appFile:'app.js', pat:'__ERP_LATEST_VER'},
|
|
1387
1387
|
{key:'erp-tool', name:'ERP 对账单生成匹配', cur:'1.0.0', repo:'wwtmrhu/erp-tool', verFile:'version.js', appFile:'app.js', pat:'__ERP_LATEST_VER'},
|
|
1388
1388
|
{key:'voucher', name:'WWT 凭证工具', cur:'P1.2.12',repo:'wwtmrhu/certificate-generation', verFile:'dist/version.json', appFile:'', pat:'ver', appUrl:true}
|
|
@@ -1697,10 +1697,20 @@ async function checkOneUpd(it, token) {
|
|
|
1697
1697
|
// 没有远程更新源的工具:不做版本比对
|
|
1698
1698
|
if (it.noSrc) { r.latest = it.cur; r.note = '本地工具(无远程更新源)'; return r; }
|
|
1699
1699
|
|
|
1700
|
+
// ① 优先用 NPM 清单里声明的版本号——版本检查不再频繁请求 Gitee,避免被限流
|
|
1701
|
+
if (it.manifestVer) {
|
|
1702
|
+
r.latest = it.manifestVer;
|
|
1703
|
+
r.srcLabel = 'NPM清单';
|
|
1704
|
+
r.hasNew = verGt(r.latest, r.cur);
|
|
1705
|
+
return r;
|
|
1706
|
+
}
|
|
1707
|
+
|
|
1708
|
+
// ② 清单未声明版本时,才回退去读工具自身仓库
|
|
1700
1709
|
try {
|
|
1701
1710
|
const vc = await fetchGiteeFile(it.repo, it.verFile, token);
|
|
1702
1711
|
r.latest = parseVer(vc, it.pat);
|
|
1703
1712
|
if (!r.latest) { r.error = '版本文件中未找到版本号'; return r; }
|
|
1713
|
+
r.srcLabel = 'Gitee';
|
|
1704
1714
|
r.hasNew = verGt(r.latest, r.cur);
|
|
1705
1715
|
} catch(e) { r.error = e.message; }
|
|
1706
1716
|
return r;
|