# Flow Step Toolkit SDK

Flow 步骤工具SDK，在这个SDK中，我们会提供以下能力：

- 基础能力：
    - Job 执行的 paths，环境变量，secrets 的设置等
    - 提供不同 level 的日志打印能力，比如 DEBUG,INFO,WARNING,ERROR 等
- 工具安装：提供下载，缓存工具的能力
- 进程调用：提供调用命令行工具和获取调用日志的能力
- Flow集成：提供和Flow系统交互的能力，比如获取 Maven Settings配置，ACR镜像仓库账密信息等

# Quickstart
初始化工程
``` shell
// 安装 flow-cli 工程初始化工具
npm install -g @flow-step/flow-cli --registry=https://registry.npmmirror.com

// 工程初始化 （要求node版本>=16）
flow-cli step init
'? Step Sign: HelloV2Step'
...
```
下载依赖 & 测试
```shell
cd HelloV2Step
npm install --registry=https://registry.npmmirror.com
npm run test
```
![cnpm run test](./pictures/run_test.png)

构建运行
```shell
npm run build
node dist/index.js 
```
![node dist/index.js](./pictures/node_dist_index.png)

# Reference
* [examples](./examples/README.md)