mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[PR #2907] [MERGED] refactor: cli updates #4133
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#4133
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/2907
Author: @aitchnyu
Created: 1/25/2023
Status: ✅ Merged
Merged: 2/7/2023
Merged by: @AndrewBastin
Base:
main← Head:cli-updates📝 Commits (7)
4d6c28cchore: move test command from functional to imperativee8e21fdMerge branch 'main' of github.com:aitchnyu/hoppscotch into cli-updatesd306f23Merge branch 'hoppscotch:main' into cli-updatese94fb04refactor: comments1b44f3cchore: additional readability spaces1a0a225refactor: use instead ofe731525chore: bump cli version to 0.3.1📊 Changes
13 files changed (+137 additions, -271 deletions)
View changed files
📝
packages/hoppscotch-cli/package.json(+1 -1)📝
packages/hoppscotch-cli/src/__tests__/commands/test.spec.ts(+32 -22)➖
packages/hoppscotch-cli/src/__tests__/functions/checks/checkFile.spec.ts(+0 -28)📝
packages/hoppscotch-cli/src/__tests__/functions/collection/collectionsRunner.spec.ts(+4 -4)📝
packages/hoppscotch-cli/src/__tests__/functions/mutators/parseCollectionData.spec.ts(+9 -11)📝
packages/hoppscotch-cli/src/commands/test.ts(+16 -13)📝
packages/hoppscotch-cli/src/handlers/error.ts(+3 -4)📝
packages/hoppscotch-cli/src/options/test/delay.ts(+13 -19)📝
packages/hoppscotch-cli/src/options/test/env.ts(+18 -55)📝
packages/hoppscotch-cli/src/types/commands.ts(+3 -3)📝
packages/hoppscotch-cli/src/utils/checks.ts(+1 -63)📝
packages/hoppscotch-cli/src/utils/collections.ts(+4 -5)📝
packages/hoppscotch-cli/src/utils/mutators.ts(+33 -43)📄 Description
Description
Refactoring
hoppcli. The cli has one commandhopp test [-d delay in seconds] [-e environment key values] collectionfile.json. The old code was fp-ts heavy, returningEithers and code was composed of pipes. I replaced the functions ofEither<error, result>signature to returnresultin the happy path or throwerrorotherwise. The command handlertesteither prints the result or prints specific error messages.Error messages are printed to stderr intead of stdout.
Test cases are updated to reflect new code.
Checks
Additional Information
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.