regression: CLI processing of globs
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
Research direction
Start with the CLI entry point at bin/httpsnippet and reproduce the failure using the glob command against src/fixtures/requests/*.json. Trace how arguments are parsed and how a single input is processed, then add CLI tests covering multiple globbed files and verify that each input produces an output instead of an unknown-arguments error.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 242
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Kong/httpsnippet
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
Kong/httpsnippet#356 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Kong/httpsnippet#389 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Kong/httpsnippet#383 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Kong/httpsnippet#379 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
Kong/httpsnippet#370 ·
All issues in Kong/httpsnippet
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·