@actiondock/cli 2.0.11 → 2.0.12
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 +15 -2
- package/bin/ad.js +13 -2
- package/dist/commands/action/create.d.ts +2 -0
- package/dist/commands/action/index.d.ts +16 -0
- package/dist/commands/action/list.d.ts +5 -0
- package/dist/commands/action/run.d.ts +4 -0
- package/dist/commands/action/show.d.ts +5 -0
- package/dist/commands/action/sync.d.ts +2 -0
- package/dist/commands/action/validate.d.ts +5 -0
- package/dist/commands/build.d.ts +2 -0
- package/dist/commands/config.d.ts +2 -0
- package/dist/commands/doctor.d.ts +2 -0
- package/dist/commands/export.d.ts +2 -0
- package/dist/commands/index.d.ts +2 -0
- package/dist/commands/info.d.ts +2 -0
- package/dist/commands/init.d.ts +2 -0
- package/dist/commands/link.d.ts +2 -0
- package/dist/commands/mcp.d.ts +2 -0
- package/dist/commands/playbook.d.ts +6 -0
- package/dist/commands/profile.d.ts +2 -0
- package/dist/commands/runs.d.ts +2 -0
- package/dist/commands/serve.d.ts +2 -0
- package/dist/commands/state.d.ts +2 -0
- package/dist/commands/test.d.ts +2 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +745 -65708
- package/{src/utils/bytes.ts → dist/utils/bytes.d.ts} +0 -1
- package/{src/utils/filter.ts → dist/utils/filter.d.ts} +0 -1
- package/package.json +20 -15
- package/src/commands/action/create.ts +0 -129
- package/src/commands/action/index.ts +0 -27
- package/src/commands/action/list.ts +0 -247
- package/src/commands/action/run.ts +0 -197
- package/src/commands/action/show.ts +0 -128
- package/src/commands/action/sync.ts +0 -76
- package/src/commands/action/validate.ts +0 -102
- package/src/commands/build.ts +0 -56
- package/src/commands/config.ts +0 -583
- package/src/commands/doctor.ts +0 -84
- package/src/commands/export.ts +0 -196
- package/src/commands/index.ts +0 -75
- package/src/commands/info.ts +0 -537
- package/src/commands/init.ts +0 -24
- package/src/commands/link.ts +0 -73
- package/src/commands/mcp.ts +0 -195
- package/src/commands/playbook.ts +0 -566
- package/src/commands/profile.ts +0 -296
- package/src/commands/runs.ts +0 -452
- package/src/commands/serve.ts +0 -132
- package/src/commands/state.ts +0 -590
- package/src/commands/test.ts +0 -48
- package/src/index.ts +0 -58
- /package/{src/commands/action.ts → dist/commands/action.d.ts} +0 -0
- /package/{src/utils/duration.ts → dist/utils/duration.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
ActionDock 2.0 官方命令行门面工具链。
|
|
4
4
|
|
|
5
|
-
[](https://nodejs.org/)
|
|
6
6
|
[](https://www.typescriptlang.org/)
|
|
7
7
|
[](https://opensource.org/licenses/Apache-2.0)
|
|
8
8
|
|
|
@@ -12,7 +12,7 @@ ActionDock 2.0 官方命令行门面工具链。
|
|
|
12
12
|
|
|
13
13
|
## 运行环境
|
|
14
14
|
|
|
15
|
-
- 原生基于 Node.js 22.
|
|
15
|
+
- 原生基于 Node.js 22.13.0 或更高版本运行。
|
|
16
16
|
- 支持 npm、pnpm 与 yarn 进行全局安装或项目级管理。
|
|
17
17
|
- 日常开发、调试、测试、MCP 服务启动与 HTTP 部署完全基于 Node.js,无需安装 Bun。
|
|
18
18
|
- 仅在使用 `ad build` 编译单文件独立二进制产物时,需要系统安装外部 Bun 编译器。
|
|
@@ -33,6 +33,19 @@ npm install -g @actiondock/cli
|
|
|
33
33
|
npx ad --help
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
+
### 从源码安装本地开发版
|
|
37
|
+
|
|
38
|
+
若需从仓库源码调试最新开发版本:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
git clone https://github.com/team4u/actiondock.git
|
|
42
|
+
cd actiondock
|
|
43
|
+
bun install
|
|
44
|
+
bun run build
|
|
45
|
+
cd packages/cli
|
|
46
|
+
npm link
|
|
47
|
+
```
|
|
48
|
+
|
|
36
49
|
---
|
|
37
50
|
|
|
38
51
|
## 快速上手流程
|
package/bin/ad.js
CHANGED
|
@@ -29,9 +29,15 @@ if (!isBun && !hasTsx) {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
const extraArgs = [];
|
|
33
|
+
const [major, minor] = (process.versions.node || "").split(".").map(Number);
|
|
34
|
+
if (major === 22 && minor < 13) {
|
|
35
|
+
extraArgs.push("--experimental-sqlite");
|
|
36
|
+
}
|
|
37
|
+
|
|
32
38
|
const res = spawnSync(
|
|
33
39
|
process.execPath,
|
|
34
|
-
["--import", tsxSpecifier, fileURLToPath(import.meta.url), ...process.argv.slice(2)],
|
|
40
|
+
["--import", tsxSpecifier, ...extraArgs, fileURLToPath(import.meta.url), ...process.argv.slice(2)],
|
|
35
41
|
{
|
|
36
42
|
stdio: "inherit",
|
|
37
43
|
}
|
|
@@ -39,6 +45,11 @@ if (!isBun && !hasTsx) {
|
|
|
39
45
|
process.exit(res.status ?? (res.signal ? 1 : 0));
|
|
40
46
|
}
|
|
41
47
|
|
|
42
|
-
|
|
48
|
+
let main;
|
|
49
|
+
try {
|
|
50
|
+
({ main } = await import("../dist/index.js"));
|
|
51
|
+
} catch {
|
|
52
|
+
({ main } = await import("../src/index.ts"));
|
|
53
|
+
}
|
|
43
54
|
await main(process.argv);
|
|
44
55
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
import { executeAction } from "@actiondock/runtime-cli";
|
|
3
|
+
export { executeAction };
|
|
4
|
+
export { registerActionCreateCommand } from "./create";
|
|
5
|
+
export { registerActionSyncCommand } from "./sync";
|
|
6
|
+
export { registerActionListCommand } from "./list";
|
|
7
|
+
export { registerActionShowCommand } from "./show";
|
|
8
|
+
export { registerActionValidateCommand } from "./validate";
|
|
9
|
+
export { registerActionRunCommand } from "./run";
|
|
10
|
+
/**
|
|
11
|
+
* 注册 Action 相关的 CLI 命令集合。
|
|
12
|
+
* 委托 list, show, validate, run 至 @actiondock/runtime-cli,保留开发者专用的 create 与 sync 命令。
|
|
13
|
+
*
|
|
14
|
+
* @param program Commander 根程序对象
|
|
15
|
+
*/
|
|
16
|
+
export declare function registerActionCommands(program: Command): void;
|