regression: CLI processing of globs
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- typescript
调研方向
从 bin/httpsnippet 中的 CLI 入口点开始,使用 glob 命令针对 src/fixtures/requests/*.json 重现失败。跟踪参数的解析方式以及单个输入的处理方式,然后添加涵盖多个 glob 文件的 CLI 测试,并验证每个输入都会产生输出,而不是出现 unknown-arguments 错误。
由索引模型根据 Issue 内容生成。
描述
The prior version of HTTPSnippet allowed processing of globs on the CLI as follows:
httpsnippet ./*.json --target node --client request --output ./snippets
$ tree snippets/
snippets/
├── endpoint-1.js
├── endpoint-2.js
└── endpoint-3.js
I wasn't aware of this prior functionality (and there were no tests covering it) so it was missed.
Shouldn't be too terrible to add back. Let's have some tests for it this time, too.
Reproduction steps
run the following:
./bin/httpsnippet src/fixtures/requests/*.json --target node --client unirest --output ./example
And it returns this input:
Unknown arguments: src/fixtures/requests/application-json.json, src/fixtures/requests/cookies.json, src/fixtures/requests/custom-method.json, src/fixtures/requests/full.json, src/fixtures/requests/headers.json, src/fixtures/requests/https.json, src/fixtures/requests/jsonObj-multiline.json, src/fixtures/requests/jsonObj-null-value.json, src/fixtures/requests/multipart-data.json, src/fixtures/requests/multipart-file.json, src/fixtures/requests/multipart-form-data.json, src/fixtures/requests/multipart-form-data-no-params.json, src/fixtures/requests/nested.json, src/fixtures/requests/query.json, src/fixtures/requests/short.json, src/fixtures/requests/text-plain.json
When it should, instead, process all of those files.
- 主要语言
- TypeScript
- 星标
- 1.2k
- 派生
- 242
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Kong/httpsnippet 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 62/100
Kong/httpsnippet#356 ·
-
难度 3/5 1-2 天 新手友好度 35/100
Kong/httpsnippet#389 ·
-
难度 5/5 一周以上 新手友好度 25/100
Kong/httpsnippet#383 ·
-
难度 3/5 1-2 天 新手友好度 35/100
Kong/httpsnippet#379 ·
-
难度 3/5 1-2 天 新手友好度 48/100
Kong/httpsnippet#370 ·
相似的 Issue
-
Browser Waiting for: Product Owner
难度 2/5 1-3 小时 新手友好度 85/100
getsentry/sentry-javascript#24577 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
agilepathway/label-checker#640 ·
-
难度 2/5 1-3 小时 新手友好度 84/100
copse-dev/agent-pane#2953 ·
-
agentic-workflows
难度 1/5 1 小时以内 新手友好度 85/100
githubnext/rig#534 ·
-
automation missing-model model-sync provider:pioneer
难度 2/5 1-3 小时 新手友好度 76/100
anomalyco/models.dev#7701 ·