dsh-podwave 0.11.24 → 0.11.25
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/CHANGELOG.md +503 -0
- package/dist/client.js +1 -1
- package/docs/ARCHITECTURE.md +138 -0
- package/docs/DETAIL.md +3 -0
- package/docs/DETAIL.zh.md +3 -0
- package/docs/screenshot-detail.png +0 -0
- package/icon.svg +12 -0
- package/locale/en.json +7 -0
- package/locale/zh.json +7 -0
- package/package.json +11 -2
- package/src/host.js +1 -1
- package/scripts/__pycache__/asr_sherpa.cpython-312.pyc +0 -0
- package/scripts/release.mjs +0 -79
package/locale/en.json
ADDED
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-podwave",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.25",
|
|
4
4
|
"description": "DeepSeek Harness 插件:本地优先的播客播放器 + 转写 + 双语字幕 + 字幕翻译。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/host.js",
|
|
7
|
+
"icon": "./icon.svg",
|
|
7
8
|
"exports": {
|
|
8
9
|
".": "./src/host.js",
|
|
9
10
|
"./client": "./dist/client.js",
|
|
10
11
|
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
12
|
+
"./locale/*.json": "./locale/*.json",
|
|
11
13
|
"./package.json": "./package.json"
|
|
12
14
|
},
|
|
13
15
|
"dsh": {
|
|
@@ -55,6 +57,13 @@
|
|
|
55
57
|
"dist",
|
|
56
58
|
"cordis.patch.yml",
|
|
57
59
|
"README.md",
|
|
58
|
-
"
|
|
60
|
+
"CHANGELOG.md",
|
|
61
|
+
"locale",
|
|
62
|
+
"icon.svg",
|
|
63
|
+
"docs/DETAIL.md",
|
|
64
|
+
"docs/DETAIL.zh.md",
|
|
65
|
+
"docs/ARCHITECTURE.md",
|
|
66
|
+
"docs/screenshot-detail.png",
|
|
67
|
+
"scripts/*.py"
|
|
59
68
|
]
|
|
60
69
|
}
|
package/src/host.js
CHANGED
|
Binary file
|
package/scripts/release.mjs
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// 发布脚本:node scripts/release.mjs 0.8.0
|
|
3
|
-
// 只做一条链路:改版本号 → 跑测试 → 构建 → 打包 → 提交 → 打 tag → 推送 → 建 Release。
|
|
4
|
-
// Release 说明取自 CHANGELOG.md 里对应的 "## <version> — <date>" 小节。
|
|
5
|
-
import { execSync } from 'node:child_process'
|
|
6
|
-
import fs from 'node:fs'
|
|
7
|
-
import path from 'node:path'
|
|
8
|
-
import { fileURLToPath } from 'node:url'
|
|
9
|
-
|
|
10
|
-
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..')
|
|
11
|
-
const version = process.argv[2]
|
|
12
|
-
if (!version || !/^\d+\.\d+\.\d+(-[\w.]+)?$/.test(version)) {
|
|
13
|
-
console.error('用法: node scripts/release.mjs <version>,例如 0.8.0')
|
|
14
|
-
process.exit(1)
|
|
15
|
-
}
|
|
16
|
-
const [major, minor] = version.split('.')
|
|
17
|
-
const tag = `v${version}`
|
|
18
|
-
|
|
19
|
-
function run(command) {
|
|
20
|
-
console.log(`\n$ ${command}`)
|
|
21
|
-
execSync(command, { cwd: root, stdio: 'inherit' })
|
|
22
|
-
}
|
|
23
|
-
function read(rel) {
|
|
24
|
-
return fs.readFileSync(path.join(root, rel), 'utf8')
|
|
25
|
-
}
|
|
26
|
-
function write(rel, content) {
|
|
27
|
-
fs.writeFileSync(path.join(root, rel), content)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// 1. CHANGELOG 小节
|
|
31
|
-
const changelog = read('CHANGELOG.md')
|
|
32
|
-
const heading = new RegExp(`^## ${version.replace(/\./g, '\\.')} — .+$`, 'm')
|
|
33
|
-
if (!heading.test(changelog)) {
|
|
34
|
-
console.error(`CHANGELOG.md 里没有 ${version} 的小节(## ${version} — YYYY-MM-DD)`)
|
|
35
|
-
process.exit(1)
|
|
36
|
-
}
|
|
37
|
-
const start = changelog.search(heading)
|
|
38
|
-
const rest = changelog.slice(start)
|
|
39
|
-
const end = rest.indexOf('\n## ', 1)
|
|
40
|
-
const notes = rest.slice(0, end === -1 ? undefined : end).trim()
|
|
41
|
-
const lines = notes.split('\n')
|
|
42
|
-
const headingText = lines[0].replace(/^##\s*/, '')
|
|
43
|
-
const descLine = lines.slice(1).map((line) => line.trim()).find(Boolean) || headingText
|
|
44
|
-
const title = `${tag} ${descLine.replace(/^[-*]\s*/, '').replace(/\*\*/g, '').slice(0, 90)}`
|
|
45
|
-
|
|
46
|
-
// 2. 版本号:package.json / host health / 客户端 brand
|
|
47
|
-
write('package.json', read('package.json').replace(/"version": "[^"]+"/, `"version": "${version}"`))
|
|
48
|
-
let host = read('src/host.js')
|
|
49
|
-
if (!/version: '\d+\.\d+\.\d+'/.test(host)) throw new Error('host.js 里找不到 version 字面量')
|
|
50
|
-
host = host.replace(/version: '\d+\.\d+\.\d+'/, `version: '${version}'`)
|
|
51
|
-
write('src/host.js', host)
|
|
52
|
-
let app = read('client/src/App.jsx')
|
|
53
|
-
if (!/<span className="brand-version">[\d.]+<\/span>/.test(app)) throw new Error('App.jsx 里找不到 brand-version')
|
|
54
|
-
app = app.replace(/<span className="brand-version">[\d.]+<\/span>/, `<span className="brand-version">${major}.${minor}</span>`)
|
|
55
|
-
write('client/src/App.jsx', app)
|
|
56
|
-
|
|
57
|
-
// 3. 测试 + 构建
|
|
58
|
-
run('npm test')
|
|
59
|
-
run('npm run build')
|
|
60
|
-
|
|
61
|
-
// 4. 打包(产物只用于 Release 附件,不提交)
|
|
62
|
-
const packDir = fs.mkdtempSync('/tmp/podwave-release-')
|
|
63
|
-
run(`npm pack --pack-destination "${packDir}"`)
|
|
64
|
-
const tgz = path.join(packDir, `dsh-podwave-${version}.tgz`)
|
|
65
|
-
if (!fs.existsSync(tgz)) throw new Error(`没有找到打包产物 ${tgz}`)
|
|
66
|
-
|
|
67
|
-
// 5. 提交、打 tag、推送
|
|
68
|
-
run('git add -A')
|
|
69
|
-
const description = title.replace(/^v\S+\s+/, '').replace(/"/g, "'")
|
|
70
|
-
run(`git commit -m "v${version}: ${description}"`)
|
|
71
|
-
run(`git tag -f ${tag}`)
|
|
72
|
-
run('git push')
|
|
73
|
-
run(`git push -f origin ${tag}`)
|
|
74
|
-
|
|
75
|
-
// 6. Release
|
|
76
|
-
const notesFile = path.join(packDir, 'notes.md')
|
|
77
|
-
fs.writeFileSync(notesFile, notes)
|
|
78
|
-
run(`gh release create ${tag} "${tgz}" --title "${title.replace(/"/g, "'")}" --notes-file "${notesFile}"`)
|
|
79
|
-
console.log(`\n完成:https://github.com/Watchcats211/dsh-podwave/releases/tag/${tag}`)
|