@akairos/code-deploy 0.2.0 → 0.2.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/README.md +10 -0
- package/dist/credentials.js +3 -2
- package/dist/process.js +2 -1
- package/package.json +10 -4
package/README.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
基于 Ink 8、React 和 `@inkjs/ui`,把本地目录 A 的内容发布到 SSH 服务器目录 B。支持直接发布已有内容,或先执行自定义构建命令。工具不包含任何业务环境、服务器或分支预设;真实配置仅存用户目录。
|
|
4
4
|
|
|
5
|
+
## 安装
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm i -g @akairos/code-deploy
|
|
9
|
+
# 或
|
|
10
|
+
bun add -g @akairos/code-deploy
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
兼容 Node.js 22+ 与 Bun。
|
|
14
|
+
|
|
5
15
|
## 启动
|
|
6
16
|
|
|
7
17
|
需要 Node.js 22+、pnpm、本地 `ssh`、`scp`、`tar`、`find`。启用 Git 检查或分支锁时需要 `git`。远端需要 POSIX shell 和常用文件命令。
|
package/dist/credentials.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Entry } from "@napi-rs/keyring";
|
|
2
2
|
// 凭据绑定环境及服务器,编辑目标后不会误用旧服务器密码。
|
|
3
|
+
// 用同步 Entry 而非 AsyncEntry:后者的 AbortSignal 封装在 Bun 下不可用。
|
|
3
4
|
function entry(profile) {
|
|
4
|
-
return new
|
|
5
|
+
return new Entry("code-deploy", `${profile.id}:${profile.user}@${profile.host}:${profile.port}`);
|
|
5
6
|
}
|
|
6
7
|
export async function savePassword(profile, password) {
|
|
7
8
|
if (!password)
|
package/dist/process.js
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akairos/code-deploy",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Configurable local-to-SSH directory publishing with an Ink terminal interface",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"bin": {
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
"bin": {
|
|
8
|
+
"code-deploy": "dist/cli.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=22"
|
|
15
|
+
},
|
|
10
16
|
"scripts": {
|
|
11
17
|
"build": "tsc",
|
|
12
18
|
"prepack": "tsc",
|