@hmharness/domain-ops 0.5.0 → 0.5.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/dist/index.d.ts +1 -1
- package/dist/index.js +17 -4
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -17,11 +17,15 @@ import { join } from 'node:path';
|
|
|
17
17
|
import { chat } from '@hmharness/kernel';
|
|
18
18
|
import { issueTools } from "./issues.js";
|
|
19
19
|
import { channelTools } from "./channel.js";
|
|
20
|
+
// Live sources: GitHub commit feeds on the four core OpenHarmony repos.
|
|
21
|
+
// (The original gitee-releases/github-tags sources were DEAD - all pinned at
|
|
22
|
+
// 2020/2024, so every scan showed "0 new items" and the radar looked like a
|
|
23
|
+
// no-op. Commits update daily; the diff actually catches movement now.)
|
|
20
24
|
const DEFAULT_SOURCES = [
|
|
21
|
-
{ key: 'oh-docs', kind: '
|
|
22
|
-
{ key: 'oh-ace', kind: 'github-
|
|
23
|
-
{ key: 'oh-ets', kind: 'github-
|
|
24
|
-
{ key: 'oh-ability', kind: 'github-
|
|
25
|
+
{ key: 'oh-docs', kind: 'github-commits', repo: 'openharmony/docs', label: 'OpenHarmony 文档' },
|
|
26
|
+
{ key: 'oh-ace', kind: 'github-commits', repo: 'openharmony/arkui_ace_engine', label: 'ArkUI 框架' },
|
|
27
|
+
{ key: 'oh-ets', kind: 'github-commits', repo: 'openharmony/arkcompiler_ets_frontend', label: 'ArkTS/方舟编译器' },
|
|
28
|
+
{ key: 'oh-ability', kind: 'github-commits', repo: 'openharmony/ability_ability_runtime', label: 'Ability 运行时' },
|
|
25
29
|
];
|
|
26
30
|
function opsDir(home) {
|
|
27
31
|
return join(home, 'ops');
|
|
@@ -43,6 +47,15 @@ async function fetchJson(url, timeoutMs = 15_000) {
|
|
|
43
47
|
}
|
|
44
48
|
}
|
|
45
49
|
async function fetchSource(src) {
|
|
50
|
+
if (src.kind === 'github-commits') {
|
|
51
|
+
const data = (await fetchJson(`https://api.github.com/repos/${src.repo}/commits?per_page=5`));
|
|
52
|
+
return data.map((c) => ({
|
|
53
|
+
id: c.sha?.slice(0, 12) ?? Math.random().toString(36),
|
|
54
|
+
title: `${src.label}: ${(c.commit?.message ?? '').split('\n')[0].slice(0, 80)}`,
|
|
55
|
+
url: c.html_url ?? `https://github.com/${src.repo}/commits`,
|
|
56
|
+
date: (c.commit?.committer?.date ?? '').slice(0, 10),
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
46
59
|
if (src.kind === 'gitee-releases') {
|
|
47
60
|
const data = (await fetchJson(`https://gitee.com/api/v5/repos/${src.repo}/releases?per_page=5`));
|
|
48
61
|
return data.map((r) => ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hmharness/domain-ops",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "hmharness ops keeper: ecosystem radar (OpenHarmony release tracking, snapshot diff, model brief with template fallback). Rewrite of the old line's hm-keeper per its captured behavior spec.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"build": "tsc -p tsconfig.build.json"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@hmharness/kernel": "0.5.
|
|
18
|
+
"@hmharness/kernel": "0.5.1"
|
|
19
19
|
},
|
|
20
20
|
"files": [
|
|
21
21
|
"dist"
|