@morehao/dsh-github-trending 0.0.0-stage → 0.1.0
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 +31 -0
- package/LICENSE +21 -0
- package/README.md +128 -2
- package/client.js +1376 -0
- package/contract/CONTRACT.sha256 +10 -0
- package/contract/UPSTREAM.json +37 -0
- package/contract/fixtures/digest-degraded.json +39 -0
- package/contract/fixtures/digest-empty-lang.json +39 -0
- package/contract/fixtures/digest-normal.json +91 -0
- package/contract/schema/api.v1.yaml +70 -0
- package/contract/schema/digest.v1.json +24 -0
- package/contract/schema/ipc.v1.json +103 -0
- package/contract/schema/model.v1.json +46 -0
- package/cordis.patch.yml +10 -0
- package/icon.svg +5 -0
- package/lib/chunk-CWB5L7RW.js +2683 -0
- package/lib/chunk-XLIFTAVL.js +117 -0
- package/lib/exec-33EQXGUA.js +8 -0
- package/lib/index.d.ts +34 -0
- package/lib/index.js +92 -0
- package/lib/internal.d.ts +1316 -0
- package/lib/internal.js +46 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +105 -4
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# trendradar contract hash (v1)
|
|
2
|
+
# algorithm: sha256 per file (sorted), then sha256 of the concatenated lines
|
|
3
|
+
f34aa3642938bad32df912768d543925f91858da66a8e726e4e4bf88a07d086c fixtures/digest-degraded.json
|
|
4
|
+
7bc67dcdc36c7b81df1915c4b50025cef6f0304ef2feb24f393d17771df252c9 fixtures/digest-empty-lang.json
|
|
5
|
+
4fe9d91ce3f0ddcc17982e4f0acac950ebc6ec7f63427fe962ea581f3114c0c4 fixtures/digest-normal.json
|
|
6
|
+
d52adbbb473d7ee2d856398a5651f96ba2019ee53ba6e14c27ef2d792b5db723 schema/api.v1.yaml
|
|
7
|
+
ca9b640f374cded12a09ea00f0686eac14eee59eef94c27a61016175bc0d4ebb schema/digest.v1.json
|
|
8
|
+
16f8f69c8a01da905b2653fb360eea798c1773808737251b54f1f56b134dad22 schema/ipc.v1.json
|
|
9
|
+
2140c9d538bc935c092a83fb6377e3878b2c060992bf458f2437898f4649d41d schema/model.v1.json
|
|
10
|
+
aggregate: eb7f1ac9e117a709d15d87de89cf30e309c479e62dfa3d320cb8f154d3f1dc1e
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"repo": "https://github.com/morehao/trendradar.git",
|
|
3
|
+
"ref": "d3bf720",
|
|
4
|
+
"commit": "d3bf720a869732e7a2ee04fa39d32dd50868fd61",
|
|
5
|
+
"aggregate": "eb7f1ac9e117a709d15d87de89cf30e309c479e62dfa3d320cb8f154d3f1dc1e",
|
|
6
|
+
"syncedAt": "2026-10-30T13:20:43.663Z",
|
|
7
|
+
"files": [
|
|
8
|
+
{
|
|
9
|
+
"path": "schema/api.v1.yaml",
|
|
10
|
+
"sha256": "d52adbbb473d7ee2d856398a5651f96ba2019ee53ba6e14c27ef2d792b5db723"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"path": "schema/digest.v1.json",
|
|
14
|
+
"sha256": "ca9b640f374cded12a09ea00f0686eac14eee59eef94c27a61016175bc0d4ebb"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"path": "schema/ipc.v1.json",
|
|
18
|
+
"sha256": "16f8f69c8a01da905b2653fb360eea798c1773808737251b54f1f56b134dad22"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "schema/model.v1.json",
|
|
22
|
+
"sha256": "2140c9d538bc935c092a83fb6377e3878b2c060992bf458f2437898f4649d41d"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"path": "fixtures/digest-degraded.json",
|
|
26
|
+
"sha256": "f34aa3642938bad32df912768d543925f91858da66a8e726e4e4bf88a07d086c"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"path": "fixtures/digest-empty-lang.json",
|
|
30
|
+
"sha256": "7bc67dcdc36c7b81df1915c4b50025cef6f0304ef2feb24f393d17771df252c9"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"path": "fixtures/digest-normal.json",
|
|
34
|
+
"sha256": "4fe9d91ce3f0ddcc17982e4f0acac950ebc6ec7f63427fe962ea581f3114c0c4"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": 1,
|
|
3
|
+
"date": "2026-10-30",
|
|
4
|
+
"period": "daily",
|
|
5
|
+
"languages": ["all", "go"],
|
|
6
|
+
"count": 2,
|
|
7
|
+
"degraded": true,
|
|
8
|
+
"contentHash": "sha256:b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2",
|
|
9
|
+
"coreVersion": "0.1.0",
|
|
10
|
+
"generatedAt": "2026-10-30T00:05:00Z",
|
|
11
|
+
"repos": [
|
|
12
|
+
{
|
|
13
|
+
"fullName": "golang/go",
|
|
14
|
+
"url": "https://github.com/golang/go",
|
|
15
|
+
"description": "The Go programming language",
|
|
16
|
+
"language": "go",
|
|
17
|
+
"stars": 126000,
|
|
18
|
+
"starsInPeriod": 0,
|
|
19
|
+
"forks": 17800,
|
|
20
|
+
"rank": 1,
|
|
21
|
+
"source": "search-api",
|
|
22
|
+
"summaryZh": "[原文] The Go programming language",
|
|
23
|
+
"summarySource": "original"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"fullName": "gin-gonic/gin",
|
|
27
|
+
"url": "https://github.com/gin-gonic/gin",
|
|
28
|
+
"description": "HTTP web framework written in Go",
|
|
29
|
+
"language": "go",
|
|
30
|
+
"stars": 80200,
|
|
31
|
+
"starsInPeriod": 0,
|
|
32
|
+
"forks": 8100,
|
|
33
|
+
"rank": 2,
|
|
34
|
+
"source": "search-api",
|
|
35
|
+
"summaryZh": "[原文] HTTP web framework written in Go",
|
|
36
|
+
"summarySource": "original"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": 1,
|
|
3
|
+
"date": "2026-10-30",
|
|
4
|
+
"period": "daily",
|
|
5
|
+
"languages": ["all", "unknown"],
|
|
6
|
+
"count": 2,
|
|
7
|
+
"degraded": false,
|
|
8
|
+
"contentHash": "sha256:c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2",
|
|
9
|
+
"coreVersion": "0.1.0",
|
|
10
|
+
"generatedAt": "2026-10-30T00:05:00Z",
|
|
11
|
+
"repos": [
|
|
12
|
+
{
|
|
13
|
+
"fullName": "someorg/no-language",
|
|
14
|
+
"url": "https://github.com/someorg/no-language",
|
|
15
|
+
"description": "A repo whose primary language could not be detected",
|
|
16
|
+
"language": "unknown",
|
|
17
|
+
"stars": 1200,
|
|
18
|
+
"starsInPeriod": 40,
|
|
19
|
+
"forks": 30,
|
|
20
|
+
"rank": 1,
|
|
21
|
+
"source": "trending-html",
|
|
22
|
+
"summaryZh": "语言未知的仓库,热度进入榜单。",
|
|
23
|
+
"summarySource": "model"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"fullName": "someorg/aggregate-only",
|
|
27
|
+
"url": "https://github.com/someorg/aggregate-only",
|
|
28
|
+
"description": "Repo surfaced only in the all-languages list",
|
|
29
|
+
"language": "unknown",
|
|
30
|
+
"stars": 980,
|
|
31
|
+
"starsInPeriod": 33,
|
|
32
|
+
"forks": 12,
|
|
33
|
+
"rank": 2,
|
|
34
|
+
"source": "trending-html",
|
|
35
|
+
"summaryZh": "仅在全局榜单出现的仓库。",
|
|
36
|
+
"summarySource": "model"
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": 1,
|
|
3
|
+
"date": "2026-10-30",
|
|
4
|
+
"period": "daily",
|
|
5
|
+
"languages": ["all", "go", "python", "rust"],
|
|
6
|
+
"count": 6,
|
|
7
|
+
"degraded": false,
|
|
8
|
+
"contentHash": "sha256:3f7a2c9e1b4d5a6f8c0e2d4b6a8f0c2e4d6b8a0f2c4e6d8b0a2f4c6e8d0b2a4f",
|
|
9
|
+
"coreVersion": "0.1.0",
|
|
10
|
+
"generatedAt": "2026-10-30T00:05:00Z",
|
|
11
|
+
"repos": [
|
|
12
|
+
{
|
|
13
|
+
"fullName": "golang/go",
|
|
14
|
+
"url": "https://github.com/golang/go",
|
|
15
|
+
"description": "The Go programming language",
|
|
16
|
+
"language": "go",
|
|
17
|
+
"stars": 126000,
|
|
18
|
+
"starsInPeriod": 320,
|
|
19
|
+
"forks": 17800,
|
|
20
|
+
"rank": 1,
|
|
21
|
+
"source": "trending-html",
|
|
22
|
+
"summaryZh": "Go 官方仓库,今日新增 star 位居榜单前列。",
|
|
23
|
+
"summarySource": "model"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"fullName": "gin-gonic/gin",
|
|
27
|
+
"url": "https://github.com/gin-gonic/gin",
|
|
28
|
+
"description": "HTTP web framework written in Go",
|
|
29
|
+
"language": "go",
|
|
30
|
+
"stars": 80200,
|
|
31
|
+
"starsInPeriod": 210,
|
|
32
|
+
"forks": 8100,
|
|
33
|
+
"rank": 2,
|
|
34
|
+
"source": "trending-html",
|
|
35
|
+
"summaryZh": "流行的 Go Web 框架,热度持续。",
|
|
36
|
+
"summarySource": "model"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"fullName": "python/cpython",
|
|
40
|
+
"url": "https://github.com/python/cpython",
|
|
41
|
+
"description": "The Python programming language",
|
|
42
|
+
"language": "python",
|
|
43
|
+
"stars": 64500,
|
|
44
|
+
"starsInPeriod": 180,
|
|
45
|
+
"forks": 30500,
|
|
46
|
+
"rank": 3,
|
|
47
|
+
"source": "trending-html",
|
|
48
|
+
"summaryZh": "CPython 官方实现,今日关注度上升。",
|
|
49
|
+
"summarySource": "model"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"fullName": "psf/requests",
|
|
53
|
+
"url": "https://github.com/psf/requests",
|
|
54
|
+
"description": "A simple, yet elegant HTTP library",
|
|
55
|
+
"language": "python",
|
|
56
|
+
"stars": 52500,
|
|
57
|
+
"starsInPeriod": 95,
|
|
58
|
+
"forks": 9400,
|
|
59
|
+
"rank": 4,
|
|
60
|
+
"source": "trending-html",
|
|
61
|
+
"summaryZh": "经典 Python HTTP 库,稳居热榜。",
|
|
62
|
+
"summarySource": "model"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"fullName": "rust-lang/rust",
|
|
66
|
+
"url": "https://github.com/rust-lang/rust",
|
|
67
|
+
"description": "Empowering everyone to build reliable and efficient software",
|
|
68
|
+
"language": "rust",
|
|
69
|
+
"stars": 102000,
|
|
70
|
+
"starsInPeriod": 260,
|
|
71
|
+
"forks": 13200,
|
|
72
|
+
"rank": 5,
|
|
73
|
+
"source": "trending-html",
|
|
74
|
+
"summaryZh": "Rust 语言主仓库,社区活跃。",
|
|
75
|
+
"summarySource": "model"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"fullName": "tokio-rs/tokio",
|
|
79
|
+
"url": "https://github.com/tokio-rs/tokio",
|
|
80
|
+
"description": "A runtime for writing reliable asynchronous applications with Rust",
|
|
81
|
+
"language": "rust",
|
|
82
|
+
"stars": 28600,
|
|
83
|
+
"starsInPeriod": 120,
|
|
84
|
+
"forks": 2650,
|
|
85
|
+
"rank": 6,
|
|
86
|
+
"source": "trending-html",
|
|
87
|
+
"summaryZh": "Rust 异步运行时,性能方向关注度高。",
|
|
88
|
+
"summarySource": "model"
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
openapi: 3.1.0
|
|
2
|
+
info:
|
|
3
|
+
title: trendradar serve API
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
description: |
|
|
6
|
+
Read-only HTTP surface exposed by `trendradar serve`. All payloads reuse the
|
|
7
|
+
digest.v1 schema, so the plugin can consume the same shape whether data comes
|
|
8
|
+
from the filesystem or over HTTP.
|
|
9
|
+
servers:
|
|
10
|
+
- url: http://127.0.0.1:8787
|
|
11
|
+
paths:
|
|
12
|
+
/api/v1/digests/{date}:
|
|
13
|
+
get:
|
|
14
|
+
operationId: getDigest
|
|
15
|
+
summary: Fetch one day's digest
|
|
16
|
+
parameters:
|
|
17
|
+
- name: date
|
|
18
|
+
in: path
|
|
19
|
+
required: true
|
|
20
|
+
schema:
|
|
21
|
+
type: string
|
|
22
|
+
format: date
|
|
23
|
+
responses:
|
|
24
|
+
"200":
|
|
25
|
+
description: The digest document
|
|
26
|
+
content:
|
|
27
|
+
application/json:
|
|
28
|
+
schema:
|
|
29
|
+
$ref: "./digest.v1.json"
|
|
30
|
+
"404":
|
|
31
|
+
description: No digest for that date
|
|
32
|
+
/api/v1/manifest:
|
|
33
|
+
get:
|
|
34
|
+
operationId: getManifest
|
|
35
|
+
summary: List available dates and their contentHash
|
|
36
|
+
responses:
|
|
37
|
+
"200":
|
|
38
|
+
description: Manifest of available digests
|
|
39
|
+
content:
|
|
40
|
+
application/json:
|
|
41
|
+
schema:
|
|
42
|
+
type: object
|
|
43
|
+
required: [entries]
|
|
44
|
+
properties:
|
|
45
|
+
coreVersion:
|
|
46
|
+
type: string
|
|
47
|
+
entries:
|
|
48
|
+
type: array
|
|
49
|
+
items:
|
|
50
|
+
type: object
|
|
51
|
+
required: [date, contentHash]
|
|
52
|
+
properties:
|
|
53
|
+
date:
|
|
54
|
+
type: string
|
|
55
|
+
format: date
|
|
56
|
+
contentHash:
|
|
57
|
+
type: string
|
|
58
|
+
degraded:
|
|
59
|
+
type: boolean
|
|
60
|
+
/feed.xml:
|
|
61
|
+
get:
|
|
62
|
+
operationId: getFeed
|
|
63
|
+
summary: RSS feed of the most recent digests
|
|
64
|
+
responses:
|
|
65
|
+
"200":
|
|
66
|
+
description: RSS 2.0 feed
|
|
67
|
+
content:
|
|
68
|
+
application/rss+xml:
|
|
69
|
+
schema:
|
|
70
|
+
type: string
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/morehao/trendradar/contract/schema/digest.v1.json",
|
|
4
|
+
"title": "trendradar digest v1",
|
|
5
|
+
"description": "One day's rendered digest document. contentHash is stable across runs (generatedAt/coreVersion excluded).",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": true,
|
|
8
|
+
"required": ["schema", "date", "period", "languages", "count", "degraded", "contentHash", "repos"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schema": { "const": 1 },
|
|
11
|
+
"date": { "type": "string", "format": "date" },
|
|
12
|
+
"period": { "type": "string", "enum": ["daily", "weekly", "monthly"] },
|
|
13
|
+
"languages": { "type": "array", "minItems": 1, "items": { "type": "string" } },
|
|
14
|
+
"count": { "type": "integer", "minimum": 0 },
|
|
15
|
+
"degraded": { "type": "boolean" },
|
|
16
|
+
"contentHash": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
|
|
17
|
+
"coreVersion": { "type": "string" },
|
|
18
|
+
"generatedAt": { "type": "string", "format": "date-time" },
|
|
19
|
+
"repos": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"items": { "$ref": "model.v1.json#/$defs/RepoDigest" }
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/morehao/trendradar/contract/schema/ipc.v1.json",
|
|
4
|
+
"title": "trendradar ipc v1",
|
|
5
|
+
"description": "Envelope exchanged between the trendradar core binary and the DSH plugin. Only RunRequest forbids extra fields.",
|
|
6
|
+
"oneOf": [
|
|
7
|
+
{ "$ref": "#/$defs/RunRequest" },
|
|
8
|
+
{ "$ref": "#/$defs/RunResult" }
|
|
9
|
+
],
|
|
10
|
+
"$defs": {
|
|
11
|
+
"ErrorCode": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"enum": [
|
|
14
|
+
"INTERNAL",
|
|
15
|
+
"CONFIG_INVALID",
|
|
16
|
+
"PAYLOAD_TOO_LARGE",
|
|
17
|
+
"FETCH_FAILED",
|
|
18
|
+
"FETCH_RATE_LIMITED",
|
|
19
|
+
"PARSE_FAILED",
|
|
20
|
+
"MODEL_UNAUTHORIZED",
|
|
21
|
+
"MODEL_RATE_LIMITED",
|
|
22
|
+
"MODEL_TIMEOUT",
|
|
23
|
+
"MODEL_FAILED",
|
|
24
|
+
"MODEL_BAD_OUTPUT",
|
|
25
|
+
"GIT_NOT_INSTALLED",
|
|
26
|
+
"REPO_NOT_GIT",
|
|
27
|
+
"REPO_DIRTY",
|
|
28
|
+
"GIT_OPERATION_FAILED",
|
|
29
|
+
"PR_FAILED",
|
|
30
|
+
"NOT_MERGEABLE"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"ErrorInfo": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"additionalProperties": true,
|
|
36
|
+
"required": ["code", "message", "retriable"],
|
|
37
|
+
"properties": {
|
|
38
|
+
"code": { "$ref": "#/$defs/ErrorCode" },
|
|
39
|
+
"message": { "type": "string" },
|
|
40
|
+
"retriable": { "type": "boolean" },
|
|
41
|
+
"details": { "type": "object", "additionalProperties": true }
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"FileArtifact": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"additionalProperties": true,
|
|
47
|
+
"required": ["path", "bytes", "sha256"],
|
|
48
|
+
"properties": {
|
|
49
|
+
"path": { "type": "string" },
|
|
50
|
+
"bytes": { "type": "integer", "minimum": 0 },
|
|
51
|
+
"sha256": { "type": "string" }
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"RunRequest": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"additionalProperties": false,
|
|
57
|
+
"required": ["ipcSchema", "command"],
|
|
58
|
+
"properties": {
|
|
59
|
+
"ipcSchema": { "const": 1 },
|
|
60
|
+
"command": { "type": "string", "enum": ["run", "serve", "config", "version"] },
|
|
61
|
+
"configPath": { "type": "string" },
|
|
62
|
+
"date": { "type": "string", "format": "date" },
|
|
63
|
+
"dryRun": { "type": "boolean" },
|
|
64
|
+
"outputDir": { "type": "string" }
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"RunResult": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"additionalProperties": true,
|
|
70
|
+
"required": ["ipcSchema", "ok", "command", "startedAt", "finishedAt", "skipped", "files"],
|
|
71
|
+
"properties": {
|
|
72
|
+
"ipcSchema": { "const": 1 },
|
|
73
|
+
"ok": { "type": "boolean" },
|
|
74
|
+
"command": { "type": "string", "enum": ["run", "serve", "config", "version"] },
|
|
75
|
+
"startedAt": { "type": "string", "format": "date-time" },
|
|
76
|
+
"finishedAt": { "type": "string", "format": "date-time" },
|
|
77
|
+
"skipped": { "type": "boolean" },
|
|
78
|
+
"files": { "type": "array", "items": { "$ref": "#/$defs/FileArtifact" } },
|
|
79
|
+
"error": { "$ref": "#/$defs/ErrorInfo" },
|
|
80
|
+
"warnings": { "type": "array", "items": { "type": "string" } }
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"StateRun": {
|
|
84
|
+
"type": "object",
|
|
85
|
+
"additionalProperties": true,
|
|
86
|
+
"required": ["date", "contentHash", "runAt"],
|
|
87
|
+
"properties": {
|
|
88
|
+
"date": { "type": "string", "format": "date" },
|
|
89
|
+
"contentHash": { "type": "string" },
|
|
90
|
+
"runAt": { "type": "string", "format": "date-time" }
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"State": {
|
|
94
|
+
"type": "object",
|
|
95
|
+
"additionalProperties": true,
|
|
96
|
+
"required": ["ipcSchema"],
|
|
97
|
+
"properties": {
|
|
98
|
+
"ipcSchema": { "const": 1 },
|
|
99
|
+
"lastRun": { "$ref": "#/$defs/StateRun" }
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/morehao/trendradar/contract/schema/model.v1.json",
|
|
4
|
+
"title": "trendradar model v1",
|
|
5
|
+
"description": "Domain model: a scraped repository snapshot and its digested form.",
|
|
6
|
+
"$ref": "#/$defs/RepoSnapshot",
|
|
7
|
+
"$defs": {
|
|
8
|
+
"RepoSnapshot": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"additionalProperties": true,
|
|
11
|
+
"required": ["fullName", "url", "language", "stars", "starsInPeriod", "rank", "source"],
|
|
12
|
+
"properties": {
|
|
13
|
+
"fullName": { "type": "string", "pattern": "^[^/]+/[^/]+$" },
|
|
14
|
+
"url": { "type": "string", "format": "uri" },
|
|
15
|
+
"description": { "type": "string" },
|
|
16
|
+
"language": { "type": "string" },
|
|
17
|
+
"stars": { "type": "integer", "minimum": 0 },
|
|
18
|
+
"starsInPeriod": { "type": "integer", "minimum": 0 },
|
|
19
|
+
"forks": { "type": "integer", "minimum": 0 },
|
|
20
|
+
"rank": { "type": "integer", "minimum": 1 },
|
|
21
|
+
"source": { "type": "string", "enum": ["trending-html", "search-api"] }
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"RepoDigest": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"additionalProperties": true,
|
|
27
|
+
"required": [
|
|
28
|
+
"fullName", "url", "language", "stars", "starsInPeriod", "rank",
|
|
29
|
+
"source", "summaryZh", "summarySource"
|
|
30
|
+
],
|
|
31
|
+
"properties": {
|
|
32
|
+
"fullName": { "type": "string", "pattern": "^[^/]+/[^/]+$" },
|
|
33
|
+
"url": { "type": "string", "format": "uri" },
|
|
34
|
+
"description": { "type": "string" },
|
|
35
|
+
"language": { "type": "string" },
|
|
36
|
+
"stars": { "type": "integer", "minimum": 0 },
|
|
37
|
+
"starsInPeriod": { "type": "integer", "minimum": 0 },
|
|
38
|
+
"forks": { "type": "integer", "minimum": 0 },
|
|
39
|
+
"rank": { "type": "integer", "minimum": 1 },
|
|
40
|
+
"source": { "type": "string", "enum": ["trending-html", "search-api"] },
|
|
41
|
+
"summaryZh": { "type": "string" },
|
|
42
|
+
"summarySource": { "type": "string", "enum": ["model", "original"] }
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# dsh-github-trending profile bundle patch
|
|
2
|
+
# `name` 是宿主 import() 用的模块标识符,必须与 npm 包名一致。
|
|
3
|
+
# `id` 是 cordis 配置树内的键,与插件导出的插件名保持一致。
|
|
4
|
+
#
|
|
5
|
+
# config 只放「安装形态」相关的覆盖项;用户设置(模型 / 仓库 / 调度等)在
|
|
6
|
+
# $DSH_HOME/github-trending/settings.json,由设置页写入,不进 profile 补丁。
|
|
7
|
+
- insert:
|
|
8
|
+
- id: dsh-github-trending
|
|
9
|
+
name: '@morehao/dsh-github-trending'
|
|
10
|
+
config: {}
|
package/icon.svg
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64">
|
|
2
|
+
<rect x="4" y="4" width="56" height="56" rx="14" fill="#0d1117"/>
|
|
3
|
+
<path d="M18 46V22l14 12 14-12v24" fill="none" stroke="#58a6ff" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<circle cx="32" cy="45" r="3" fill="#3fb950"/>
|
|
5
|
+
</svg>
|