apiskill 0.1.4 → 0.1.6
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 +11 -1
- package/README.zh.md +13 -1
- package/dist/assets/index-B_wAJLu_.js +324 -0
- package/dist/assets/index-CHOQ6xhP.css +1 -0
- package/dist/index.html +2 -2
- package/docs/cli.md +16 -2
- package/docs/cli.zh.md +16 -2
- package/docs/mcp.ja.md +2 -4
- package/docs/mcp.ko.md +2 -4
- package/docs/mcp.md +2 -4
- package/docs/mcp.zh.md +2 -4
- package/docs/web.md +3 -1
- package/docs/web.zh.md +3 -1
- package/mcp-config.example.json +1 -5
- package/package.json +4 -3
- package/scripts/apiskill-cli.mjs +48 -9
- package/scripts/lib/apiskill-core.mjs +6 -0
- package/scripts/lib/cache-paths.mjs +94 -4
- package/scripts/test-shared-cache.mjs +175 -0
- package/src/App.tsx +29 -0
- package/src/CacheSettingsDialog.tsx +166 -0
- package/src/DocumentVersionManager.tsx +47 -1
- package/src/styles.css +119 -0
- package/src/swagger.ts +2 -0
- package/vite.config.ts +92 -1
- package/dist/assets/index-CV6e3HAP.js +0 -299
- package/dist/assets/index-slFOragU.css +0 -1
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ npm install -g apiskill
|
|
|
17
17
|
apiskill run web
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
Web, CLI, and MCP all use the same user-writable `~/.apiskill/cache` directory by default. `--cwd` only changes the Web process working directory and never changes this shared cache. For an isolated cache, set the same absolute `APISKILL_CACHE_DIR` for every Web, CLI, and MCP process. When developing this repository, you can also start it from the project root:
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
23
|
npm install
|
|
@@ -26,6 +26,16 @@ npm run dev
|
|
|
26
26
|
|
|
27
27
|
Open the local URL shown in the terminal. The New Document dialog can import a direct OpenAPI JSON/YAML URL, crawl a Swagger UI / Knife4j / Redoc page, upload a local file, execute a curl command that returns an OpenAPI document, or create a blank document from scratch.
|
|
28
28
|
|
|
29
|
+
Cache Settings in the upper-right corner shows the active session cache and changes the saved default. The setting is stored in `~/.apiskill/config.json`; changing it never moves or deletes existing files. Restart Web to use the new location, or use Update Cache Location in version management to copy selected versions there. CLI uses the same setting:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
apiskill cache show
|
|
33
|
+
apiskill cache set /absolute/path/to/apiskill-cache
|
|
34
|
+
apiskill cache reset
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`APISKILL_CACHE_DIR` remains the highest-priority temporary override for automation and isolated runs.
|
|
38
|
+
|
|
29
39
|
After importing or creating a blank document, use the version selector to switch cached documents, search endpoints by path, summary, tag, method, or parameter text, and open endpoint tabs to inspect request parameters, request bodies, response fields, AI-ready context, and raw JSON. You can also add, edit, or delete manual API operations; those changes are saved as local cached versions.
|
|
30
40
|
|
|
31
41
|
After API document data exists, click Start MOCK Service in the web app or run `apiskill mock` in CLI to start a local random-data MOCK API server from the current interface definitions.
|
package/README.zh.md
CHANGED
|
@@ -17,7 +17,7 @@ npm install -g apiskill
|
|
|
17
17
|
apiskill run web
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
Web、CLI 和 MCP 默认统一使用用户可写的 `~/.apiskill/cache`,共同读写同一份文档和版本。`--cwd` 只改变 Web 进程的工作目录,不再改变共享缓存。需要隔离缓存时,必须为 Web、CLI 和 MCP 设置完全相同的绝对路径 `APISKILL_CACHE_DIR`。开发本仓库时也可以在项目根目录启动:
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
23
|
npm install
|
|
@@ -26,6 +26,18 @@ npm run dev
|
|
|
26
26
|
|
|
27
27
|
打开终端输出的本地地址。“新建文档”弹窗可以导入直接的 OpenAPI JSON/YAML 地址,爬取 Swagger UI / Knife4j / Redoc 页面,上传本地文件,执行返回 OpenAPI 文档的 curl 命令,也可以从零新建空白文档。
|
|
28
28
|
|
|
29
|
+
页面右上角的“缓存设置”可以查看当前会话缓存位置并修改默认缓存地址。设置保存在 `~/.apiskill/config.json`,不会移动或删除已有缓存文件;Web 重启以及后续 CLI、MCP 进程会使用新地址。版本管理中的“更新缓存地址”可以在确认源地址和目标地址后,将指定版本复制到新的默认缓存目录。
|
|
30
|
+
|
|
31
|
+
CLI 使用同一份设置:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
apiskill cache show
|
|
35
|
+
apiskill cache set /absolute/path/to/apiskill-cache
|
|
36
|
+
apiskill cache reset
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
`APISKILL_CACHE_DIR` 仍具有最高优先级,适合临时或自动化隔离,不会覆盖已保存的默认设置。
|
|
40
|
+
|
|
29
41
|
导入或新建文档后,可以用版本选择器切换缓存文档,按路径、摘要、tag、method 或参数文本搜索接口,并打开接口 tab 查看请求参数、请求体、响应字段、AI 友好的上下文和原始 JSON。也可以新增、编辑、删除手动接口;这些改动会保存为本地缓存版本。
|
|
30
42
|
|
|
31
43
|
已有 API 文档数据后,可以在 Web 端点击“启动MOCK服务”,或在 CLI 里运行 `apiskill mock`,根据当前接口定义启动本地随机数据 MOCK API 服务。
|