@ban-sky/dsh-github 0.4.1 → 0.4.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/README.md CHANGED
@@ -41,10 +41,10 @@ command line, a log line or a Tool result.
41
41
 
42
42
  ## Install
43
43
 
44
- **From npm** (this is what the plugin market installs):
44
+ **From npm:**
45
45
 
46
46
  Use the Harness `plugin_manager` tool with `install_bundle` and the exact version
47
- `@ban-sky/dsh-github@0.4.1` as the target. The name carries a scope because
47
+ `@ban-sky/dsh-github@0.4.2` as the target. The name carries a scope because
48
48
  `dsh-github` is taken on npm; the Release packages contain the same code.
49
49
 
50
50
  **From a release (recommended):**
@@ -61,10 +61,10 @@ Open the [Releases](https://github.com/ban-sky/dsh-github/releases) page in a
61
61
  browser where you are signed in, or use the GitHub CLI:
62
62
 
63
63
  ```bash
64
- gh release download v0.3.0 -R ban-sky/dsh-github # needs gh auth login first
64
+ gh release download v0.4.2 -R ban-sky/dsh-github # needs gh auth login first
65
65
  sha256sum -c SHA256SUMS.txt
66
- tar -xzf dsh-github-0.3.0.tgz # web
67
- tar -xzf dsh-github-0.3.0-dsh-go.tgz # phone
66
+ tar -xzf dsh-github-0.4.2.tgz # web
67
+ tar -xzf dsh-github-0.4.2-dsh-go.tgz # phone
68
68
  ```
69
69
 
70
70
  > The plain `releases/download/...` URL of a **private** repository only accepts
@@ -85,18 +85,15 @@ Plugins → install from directory, or the Harness `plugin_manager` tool with
85
85
  and (when enabled) the `github` tool.
86
86
  - Client: one `Settings → GitHub` page.
87
87
 
88
- ## DSH GO market
88
+ ## DSH GO
89
89
 
90
- The plugin is adapted to the [DSH GO market](https://github.com/ccch1mneyyy/dsh-go-market):
91
- its `package.json.dshGo` v1 manifest declares the native panel and the composer
92
- entries (`minApp` 1.0.13), which the market reports as `adapted: true`, `minApp`
93
- and `features: native-slots`.
90
+ The plugin also speaks the DSH GO surface: `package.json.dshGo` (protocol v1)
91
+ declares the native panel and the composer entries (`minApp` 1.0.13), and the
92
+ `-dsh-go.tgz` package ships `lib/dsh-go.js`. The npm package carries the Web UI
93
+ and that surface together, so `@ban-sky/dsh-github` fits either host.
94
94
 
95
- The market only lists exact npm versions, so the package is published as
96
- `@ban-sky/dsh-github` (`dsh-github` is taken on npm). Each release publishes that
97
- version to npm and then uploads the GitHub Release assets; without an `NPM_TOKEN`
98
- secret only the Release runs and the log carries a warning. The entry to submit
99
- lives in [`market/dsh-go-market.json`](market/dsh-go-market.json).
95
+ This plugin is not submitted to any plugin market. npm and the GitHub Release are
96
+ the only distribution channels.
100
97
 
101
98
  ## Setup: create the OAuth App
102
99
 
package/README.zh.md CHANGED
@@ -32,10 +32,10 @@ git config、命令行参数、日志或 Tool 返回值。
32
32
 
33
33
  ## 安装
34
34
 
35
- **从 npm 安装**(插件市场用的就是这个):
35
+ **从 npm 安装**:
36
36
 
37
37
  在 Harness 里用 `plugin_manager` 的 `install_bundle`,target 写精确版本
38
- `@ban-sky/dsh-github@0.4.1`。包名带 scope 是因为 `dsh-github` 在 npm 上已被他人
38
+ `@ban-sky/dsh-github@0.4.2`。包名带 scope 是因为 `dsh-github` 在 npm 上已被他人
39
39
  占用;Release 里的安装包内容相同。
40
40
 
41
41
  **从 Release 下载安装包**(推荐):
@@ -51,10 +51,10 @@ git config、命令行参数、日志或 Tool 返回值。
51
51
  [Releases](https://github.com/ban-sky/dsh-github/releases) 下载,或者用 GitHub CLI:
52
52
 
53
53
  ```bash
54
- gh release download v0.3.0 -R ban-sky/dsh-github # 需要先 gh auth login
54
+ gh release download v0.4.2 -R ban-sky/dsh-github # 需要先 gh auth login
55
55
  sha256sum -c SHA256SUMS.txt
56
- tar -xzf dsh-github-0.3.0.tgz # 网页版
57
- tar -xzf dsh-github-0.3.0-dsh-go.tgz # 手机用这个
56
+ tar -xzf dsh-github-0.4.2.tgz # 网页版
57
+ tar -xzf dsh-github-0.4.2-dsh-go.tgz # 手机用这个
58
58
  ```
59
59
 
60
60
  > 私有仓库的 `releases/download/...` 直链只认浏览器登录态,API 令牌访问会
@@ -71,16 +71,13 @@ tar -xzf dsh-github-0.3.0-dsh-go.tgz # 手机用这个
71
71
  - Host 端:`/api/github` 认证路由、`github` 授权流程,以及(开启后)`github` 工具。
72
72
  - Client 端:一个 `设置 → GitHub` 页面。
73
73
 
74
- ## DSH GO 插件市场
74
+ ## DSH GO
75
75
 
76
- 插件适配了 [DSH GO 插件市场](https://github.com/ccch1mneyyy/dsh-go-market):用
77
- `package.json` 的 `dshGo` 协议 v1 声明原生面板与输入框入口(`minApp` 为 1.0.13),
78
- 市场会据此标出 `adapted: true`、`minApp` 与 `features: native-slots`。
76
+ 插件同时提供 DSH GO 原生界面:`package.json` 的 `dshGo` 协议 v1 声明原生面板与
77
+ 输入框入口(`minApp` 1.0.13),`-dsh-go.tgz` 里带 `lib/dsh-go.js`。npm 上的包同时
78
+ 包含 Web UI 与这套界面,因此 `@ban-sky/dsh-github` 对两种宿主都适用。
79
79
 
80
- 市场只收 npm 上的精确版本,所以包名是 `@ban-sky/dsh-github`(`dsh-github` 已被他人
81
- 占用)。每次发版,工作流把该版本发到 npm,再上传 GitHub Release 附件;没有
82
- `NPM_TOKEN` 密钥时只发 Release,并在日志里给出警告。提交市场用的条目在
83
- [`market/dsh-go-market.json`](market/dsh-go-market.json)。
80
+ 本插件不提交任何插件市场,分发渠道只有 npm 与 GitHub Release。
84
81
 
85
82
  ## 配置:创建 OAuth App
86
83
 
package/lib/github-api.js CHANGED
@@ -16,7 +16,7 @@ import { GithubError } from './errors.js'
16
16
  const API_ROOT = 'https://api.github.com'
17
17
  const DEVICE_CODE_URL = 'https://github.com/login/device/code'
18
18
  const ACCESS_TOKEN_URL = 'https://github.com/login/oauth/access_token'
19
- const USER_AGENT = 'dsh-github/0.4.1'
19
+ const USER_AGENT = 'dsh-github/0.4.2'
20
20
  const DEFAULT_TIMEOUT_MS = 20000
21
21
 
22
22
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ban-sky/dsh-github",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "GitHub integration for DSH: official device-flow sign-in, repository creation, cloning, pull, commit and push. Security first.",
5
5
  "type": "module",
6
6
  "engines": {