@monoedge/jdu-cli 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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +28 -0
  3. package/dist/cli.js +4055 -0
  4. package/package.json +43 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Monoedge
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # @monoedge/jdu-cli
2
+
3
+ `jdu` 把本地 Markdown(含图片、嵌套 md)发布到简牍服务。
4
+
5
+ ## 快速开始
6
+
7
+ ```bash
8
+ npm i -g @monoedge/jdu-cli
9
+ jdu login --server https://docs.example.com
10
+ jdu push notes/hello.md --visibility public
11
+ ```
12
+
13
+ 成功时 stdout 只有文档 URL。需要 Node.js ≥ 22。
14
+
15
+ token 鉴权的站点要带 `--token`:
16
+
17
+ ```bash
18
+ jdu login --server https://docs.example.com --token <token>
19
+ ```
20
+
21
+ forward-auth 的站点打开浏览器走 OIDC;issuer / client id 来自 `--issuer` / `--client-id`、server `/healthz` 的 `oidc` 字段,或环境变量 `JIANDU_OIDC_ISSUER` / `JIANDU_OIDC_CLIENT_ID`。
22
+
23
+ ## 适用范围
24
+
25
+ - 支持:把文档和 widget 推到已部署的简牍 server(anonymous / token / forward-auth)
26
+ - 不支持:本包不含 server;不内置任何 IdP
27
+
28
+ 配置在 `~/.config/jiandu/`,可被 `JIANDU_SERVER` / `JIANDU_TOKEN` 覆盖。