From 084529efd1bfbcc9685da5acce9b65ce2e9b2bf4 Mon Sep 17 00:00:00 2001 From: margrop <1731827+margrop@users.noreply.github.com> Date: Thu, 22 Oct 2026 08:40:03 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20npm=E3=80=81=E6=A1=8C=E9=9D=A2?= =?UTF-8?q?=E7=89=88=E5=92=8C=E9=A3=9E=E7=89=9BOS=20=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E5=8C=85=E9=9A=8F=E9=99=84=20LICENSE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- scripts/package/build.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/package/build.mjs b/scripts/package/build.mjs index bfe082f8..de6cfd5d 100644 --- a/scripts/package/build.mjs +++ b/scripts/package/build.mjs @@ -211,6 +211,8 @@ function buildBundle() { } pruneBundle(); fs.copyFileSync(path.join(PACKAGING, 'runtime', 'launcher.js'), path.join(BUNDLE, 'launcher.js')); + // MIT 许可证要求随软件分发许可证文本,npm、桌面版和飞牛OS 安装包都基于此目录 + fs.copyFileSync(path.join(ROOT, 'LICENSE'), path.join(BUNDLE, 'LICENSE')); const pkg = readJson(path.join(BUNDLE, 'package.json')); writeJson(path.join(BUNDLE, 'package.json'), { @@ -254,7 +256,7 @@ function buildNpm() { bugs: 'https://github.com/margrop/wrong-notebook/issues', license: 'MIT', bin: { 'wrong-notebook': 'bin/wrong-notebook.js' }, - files: ['bin', 'launcher.js', 'server.js', '.next', 'public', 'prisma', 'README.md'], + files: ['bin', 'launcher.js', 'server.js', '.next', 'public', 'prisma', 'README.md', 'LICENSE'], engines: { node: '>=22.15' }, scripts: { postinstall: 'node bin/wrong-notebook.js prepare-client' }, dependencies: readJson(path.join(WORK, 'runtime-dependencies.json')),