agent-publish-server 1.0.13 → 1.0.15

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 (2) hide show
  1. package/README.md +42 -32
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -8,37 +8,21 @@
8
8
  npm install agent-publish-server -g
9
9
  ```
10
10
 
11
- ## 使用
11
+ ## 使用步骤
12
12
 
13
- ```bash
14
- agent-publish-server
15
- ```
16
-
17
- ## 配置
18
-
19
- ### 配置文件路径
20
-
21
- 你可以通过以下方式指定配置文件路径:
22
-
23
- 1. 使用相对路径(相对于当前工作目录):
24
-
25
- ```bash
26
- agent-publish-server -c ./agent_config.json
27
- ```
13
+ ### 步骤 1:初始化配置文件
28
14
 
29
- 2. 使用绝对路径:
15
+ 首先,初始化配置文件:
30
16
 
31
17
  ```bash
32
- agent-publish-server -c /path/to/agent_config.json
18
+ agent-publish-server init
33
19
  ```
34
20
 
35
- 3. 使用初始化命令创建默认配置:
21
+ 这将在当前目录生成默认配置文件 `agent_config.json`。
36
22
 
37
- ```bash
38
- agent-publish-server init
39
- ```
23
+ ### 步骤 2:自定义配置(可选)
40
24
 
41
- ### 配置文件格式
25
+ 根据需要修改生成的 `agent_config.json` 配置文件。配置格式如下:
42
26
 
43
27
  ```json
44
28
  {
@@ -58,13 +42,39 @@ agent-publish-server init
58
42
  }
59
43
  ```
60
44
 
61
- ## 说明
45
+ ### 步骤 3:启动服务
46
+
47
+ ```bash
48
+ agent-publish-server
49
+ ```
50
+
51
+ ## 配置选项
52
+
53
+ ### 指定配置文件
54
+
55
+ 你可以通过以下方式指定自定义配置文件路径:
56
+
57
+ 1. 使用相对路径(相对于当前工作目录):
58
+
59
+ ```bash
60
+ agent-publish-server -c ./agent_config.json
61
+ ```
62
+
63
+ 2. 使用绝对路径:
64
+
65
+ ```bash
66
+ agent-publish-server -c /path/to/agent_config.json
67
+ ```
68
+
69
+ 支持的配置文件参数:
70
+
71
+ - `-c`
72
+ - `--config`
73
+ - `--cf`
74
+ - `--config-file`
75
+
76
+ ## 其他说明
62
77
 
63
- > 1. 配置文件路径为 agent_config.json
64
- > 2. 配置文件路径可以通过 -c 来指定
65
- > 3. 配置文件路径可以通过 --config 来指定
66
- > 4. 配置文件路径可以通过 --cf 来指定
67
- > 5. 配置文件路径可以通过 --config-file 来指定
68
- > 6. 适配 react vue 等前端框架
69
- > 7. 使用 -v 或 --version 查看当前版本
70
- > 8. 使用 init 命令初始化配置文件,将在当前目录生成 agent_config.json
78
+ - 适配 React、Vue 等前端框架
79
+ - 使用 `-v` `--version` 查看当前版本
80
+ - 默认配置文件名为 `agent_config.json`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-publish-server",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "基于 nodejs+express+http-proxy-middleware 的前端服务启动插件",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",