refactor: 包名改为 @wishesl/dsh-lan-access

与 GitHub 仓库归属 wishedl 对齐(原 @sutong 不是发布身份,npm 发布会 403)。
同时把包名改为单一来源:scripts/build-client.mjs 与 scripts/test-client.mjs
都从 package.json 读取,避免产物 id 与清单漂移。LICENSE 版权主体同步为 wishesl。
顺带修正 src/panel.js 里「Plugins 内页」的过时注释(面板早已是 Settings 顶层入口)。
This commit is contained in:
2026-09-27 04:11:15 +08:00
parent a2c635455a
commit a5f51a029f
11 changed files with 25 additions and 21 deletions
+5 -2
View File
@@ -17,6 +17,9 @@ import { fileURLToPath } from 'node:url'
const here = dirname(fileURLToPath(import.meta.url))
const root = join(here, '..')
/** The browser module id must equal the package name; read it, never restate it. */
const packageName = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8')).name
/** Read a source file and turn its ESM exports into plain declarations. */
function inline(relativePath) {
const source = readFileSync(join(root, relativePath), 'utf8')
@@ -30,12 +33,12 @@ const qrcode = inline('src/qrcode.js')
const panel = inline('src/panel.js')
const artifact = `/**
* @sutong/dsh-lan-access — browser half (generated by scripts/build-client.mjs).
* ${packageName} — browser half (generated by scripts/build-client.mjs).
*
* Do not edit this file: change src/panel.js or src/qrcode.js and rebuild.
*/
window.__ModuleLoader__.load({
id: "@sutong/dsh-lan-access",
id: ${JSON.stringify(packageName)},
factory: function (require) {
"use strict";
var React = require("react");