@coclaw/openclaw-coclaw 0.11.0 → 0.11.2
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coclaw/openclaw-coclaw",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"description": "OpenClaw CoClaw channel plugin for remote chat",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"typecheck": "echo \"No typecheck configured yet (coclaw openclaw plugin)\"",
|
|
48
48
|
"check": "pnpm lint && pnpm typecheck",
|
|
49
49
|
"test:plugin": "node --test src/plugin-mode.test.js",
|
|
50
|
-
"test": "c8 --check-coverage --lines 100 --functions 100 --branches
|
|
50
|
+
"test": "c8 --check-coverage --lines 100 --functions 100 --branches 95 --statements 100 --reporter=text --reporter=lcov bash -c 'for f in src/**/*.test.js src/*.test.js index.test.js; do node --test \"$f\" || exit 1; done'",
|
|
51
51
|
"verify": "pnpm check && pnpm test",
|
|
52
52
|
"link": "bash ./scripts/link.sh",
|
|
53
53
|
"unlink": "bash ./scripts/unlink.sh",
|
|
@@ -34,8 +34,10 @@ async function atomicWriteFile(filePath, content, opts) {
|
|
|
34
34
|
try {
|
|
35
35
|
await fs.writeFile(tmp, content, { encoding, mode });
|
|
36
36
|
// best-effort chmod(部分平台 writeFile 的 mode 可能不生效)
|
|
37
|
+
/* c8 ignore next -- chmod 在正常文件系统上不会失败 */
|
|
37
38
|
try { await fs.chmod(tmp, mode); } catch { /* ignore */ }
|
|
38
39
|
await fs.rename(tmp, filePath);
|
|
40
|
+
/* c8 ignore next -- chmod 在正常文件系统上不会失败 */
|
|
39
41
|
try { await fs.chmod(filePath, mode); } catch { /* ignore */ }
|
|
40
42
|
} finally {
|
|
41
43
|
// 确保临时文件不残留
|
|
@@ -124,7 +124,7 @@ export class WebRtcPeer {
|
|
|
124
124
|
const { urls, username, credential } = msg.turnCreds;
|
|
125
125
|
for (const url of urls) {
|
|
126
126
|
const server = { urls: url };
|
|
127
|
-
if (url.startsWith('turn:')) {
|
|
127
|
+
if (url.startsWith('turn:') || url.startsWith('turns:')) {
|
|
128
128
|
server.username = username;
|
|
129
129
|
server.credential = credential;
|
|
130
130
|
}
|