@quecue/dev-notify 0.2.0 → 0.2.1
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.en.md +10 -0
- package/CHANGELOG.md +10 -0
- package/dist/cli.js +2 -2
- package/dist/reply-bridge.js +4 -2
- package/package.json +1 -1
package/CHANGELOG.en.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
English | [简体中文](CHANGELOG.md)
|
|
4
4
|
|
|
5
|
+
## 0.2.1 — 2026-11-04
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Fixed mixed Chinese and English Telegram messages after switching the interface language: the reply bridge is a long-running process and previously read the language only once at startup; it now follows the configured language on every polling cycle, so subsequent messages immediately use the new language after `dev-notify language`. An already running bridge must be restarted once (`reply stop` / `reply start`) to load the fix.
|
|
10
|
+
|
|
11
|
+
### Verification
|
|
12
|
+
|
|
13
|
+
- Automated regression totals 204 items: 203 passed, 0 failed, and 1 native credential test requiring explicit enablement was skipped.
|
|
14
|
+
|
|
5
15
|
## 0.2.0 — 2026-11-04
|
|
6
16
|
|
|
7
17
|
### Added
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
简体中文 | [English](CHANGELOG.en.md)
|
|
4
4
|
|
|
5
|
+
## 0.2.1 — 2026-11-04
|
|
6
|
+
|
|
7
|
+
### 修复
|
|
8
|
+
|
|
9
|
+
- 修复切换界面语言后 Telegram 消息中英混用的问题:回复桥接是长驻进程,之前只在启动时读取一次语言;现在桥接每轮跟随配置语言,`dev-notify language` 切换后后续消息立即使用新语言。已在运行的桥接需重启一次(`reply stop` / `reply start`)以加载修复。
|
|
10
|
+
|
|
11
|
+
### 验证
|
|
12
|
+
|
|
13
|
+
- 自动化回归共 204 项:203 通过、0 失败、1 项需要显式启用的原生凭据测试跳过。
|
|
14
|
+
|
|
5
15
|
## 0.2.0 — 2026-11-04
|
|
6
16
|
|
|
7
17
|
### 新增
|
package/dist/cli.js
CHANGED
|
@@ -16,7 +16,7 @@ import { startBridge, stopBridge, bridgeStatus, runBridge } from './reply-bridge
|
|
|
16
16
|
import { updatePackage } from './update.js';
|
|
17
17
|
import { postUpdate } from './maintenance.js';
|
|
18
18
|
import { localeName, parseLocale, resolveLocale, setLocale, t } from './i18n.js';
|
|
19
|
-
export const VERSION = '0.2.
|
|
19
|
+
export const VERSION = '0.2.1';
|
|
20
20
|
const helpText = () => t('cli.help', { version: VERSION });
|
|
21
21
|
function rawLang(argv) {
|
|
22
22
|
for (let i = 0; i < argv.length; i++) {
|
|
@@ -191,7 +191,7 @@ export async function main(argv = process.argv.slice(2), overrides = {}) {
|
|
|
191
191
|
return access && status.ready ? 0 : 1;
|
|
192
192
|
}
|
|
193
193
|
if (action === 'run') {
|
|
194
|
-
await runBridge(file, { env: context.env, log: context.err });
|
|
194
|
+
await runBridge(file, { env: context.env, lang: values.lang, log: context.err });
|
|
195
195
|
return 0;
|
|
196
196
|
}
|
|
197
197
|
const ready = await startBridge(file, context.env);
|
package/dist/reply-bridge.js
CHANGED
|
@@ -4,8 +4,8 @@ import { fileURLToPath } from 'node:url';
|
|
|
4
4
|
import path from 'node:path';
|
|
5
5
|
import { randomBytes } from 'node:crypto';
|
|
6
6
|
import { setTimeout as delay } from 'node:timers/promises';
|
|
7
|
-
import { appPaths, ConfigError } from './config.js';
|
|
8
|
-
import { t } from './i18n.js';
|
|
7
|
+
import { appPaths, ConfigError, readConfigLanguage } from './config.js';
|
|
8
|
+
import { resolveLocale, setLocale, t } from './i18n.js';
|
|
9
9
|
import { accessReplies, atomicJson, readJson, replyDirectory, stateTransaction } from './reply-state.js';
|
|
10
10
|
import { telegramApi } from './reply-telegram.js';
|
|
11
11
|
import { drainReplies, processUpdate } from './reply-engine.js';
|
|
@@ -118,6 +118,8 @@ export async function runBridge(file, options = {}) {
|
|
|
118
118
|
await atomicJson(leasePath(file), lease);
|
|
119
119
|
let iteration = 0, failures = 0;
|
|
120
120
|
while (!await isStopped() && iteration++ < (options.maxIterations ?? Infinity)) {
|
|
121
|
+
// 桥接是长驻进程,语言切换后要跟着配置文件走;否则后续消息会和 hook 进程的语言不一致。
|
|
122
|
+
setLocale(resolveLocale(options.lang, env, await readConfigLanguage(file)));
|
|
121
123
|
const current = await fresh();
|
|
122
124
|
if (!current)
|
|
123
125
|
break;
|