Commit graph

73 commits

Author SHA1 Message Date
James George
dfe3d05c5a
fix(cli): inherit collection variables in folders without own variables (#5771) 2026-01-14 19:54:36 +05:30
James George
d3144f99fb
fix: strip comments from JSON request bodies in CLI (#5769)
Fixes collections with JSON comments failing in the CLI with `SerializationException` while working fine in the app, where comments are stripped before sending requests, but the CLI was sending them as-is, breaking APIs like AWS Cognito that expect valid JSON.
2026-01-14 17:06:30 +05:30
James George
f88c81fccc test(cli): prevent flaky CLI E2E tests by detecting generic REQUEST_ERROR patterns 2025-12-04 12:57:47 +05:30
James George
c6c86e8db2 fix(cli): prevent false test skips for intentional error scenarios
Refined network retry logic to distinguish between transient infrastructure
failures and intentional test errors, preventing incorrect test skips in
JUnit validation scenarios.

1. Network Error Detection (utils.ts)
   - Renamed `hasNetworkError` → `hasLowLevelNetworkError` for clarity
   - Removed REQUEST_ERROR from retry patterns (too generic, matches intentional bad URLs)
   - Now only retries on unambiguous TCP/DNS errors: ECONNRESET, EAI_AGAIN,
     ENOTFOUND, ETIMEDOUT, ECONNREFUSED
   - Preserved TEST_SCRIPT_ERROR detection when concurrent with REQUEST_ERROR
     (the actual CI failure mode from undefined response objects)
   - Added comprehensive JSDoc explaining when to use vs plain runCLI

2. JUnit XML Validation (test.spec.ts, 4 locations)
   - Removed REQUEST_ERROR and TEST_SCRIPT_ERROR from XML retry patterns
   - Only retry when low-level errors corrupt XML structure
   - Prevents skipping tests with intentional errors in collections
     (test-junit-report-export-coll.json has intentional invalid-url and
     script reference errors for validation)

3. Test Corrections
   - Fixed: "Fails to display console logs..." test now uses plain runCLI
     (test expects errors from legacy sandbox, shouldn't use retry)
   - Added: Environment version tests (v0, v1, v2) now use runCLIWithNetworkRetry
     (use echo.hoppscotch.io, expect success, benefit from retry)
   - Removed: Obsolete SKIP_EXTERNAL_TESTS env var check (retry logic handles this)
2025-11-26 19:39:38 +05:30
James George
f2f015c1c8
feat(scripting-revamp): add support for sending requests in scripting context (#5596) 2025-11-26 09:52:00 +05:30
Nivedin
e63bfe3723
feat: API Documentation (#5499)
Co-authored-by: mirarifhasan <arif.ishan05@gmail.com>
Co-authored-by: James George <25279263+jamesgeorge007@users.noreply.github.com>
2025-11-25 11:26:57 +05:30
Mir Arif Hasan
904a1b0405
chore: security patch for the dependency chain v2025.11.0 (#5590)
Bump dependencies and account for breaking changes.

---------

Co-authored-by: James George <25279263+jamesgeorge007@users.noreply.github.com>
2025-11-24 14:21:29 +05:30
jamesgeorge007
98f07f8a4c test(js-sandbox): expand unsupported API coverage and sync error messages
Add comprehensive test coverage for unsupported Postman APIs and ensure
consistent error messages across pre-request and post-request contexts.

Test improvements:
- Expand coverage from 13 to 25 unsupported APIs (50 tests total)
- Add missing APIs: collectionVariables.set/unset/has/clear/toObject,
  vault.set/unset, iterationData.set/unset/has/toJSON
- Fix assertions to match actual error format with prefix
- Add pre-request context test for pm.execution.location

Implementation fixes:
- Add missing pm.iterationData.toJSON() in pre-request.js
- Sync post-request.js collectionVariables error messages to match
  pre-request.js ("use environment or request variables instead")
2025-11-12 14:35:16 +05:30
James George
9cd6c7d6cf
feat(scripting-revamp): chai powered assertions and postman compatibility layer (#5417)
Co-authored-by: nivedin <nivedinp@gmail.com>
2025-10-27 17:49:58 +05:30
Prit Rojivadiya
c31f74829d
refactor: cleanup sync logic and imports (#5428) 2025-10-08 13:31:29 +05:30
James George
b62b50c1e2
feat(scripting-revamp): introduce hopp namespace (#5388) 2025-09-24 17:09:55 +05:30
Nivedin
2d2e65369f
feat: collection variables (#5325)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
2025-08-22 14:39:42 +05:30
James George
42089fbb55
chore: bump dependencies and account for breaking changes (#5329)
Co-authored-by: mirarifhasan <arif.ishan05@gmail.com>
2025-08-20 23:04:14 +05:30
Anwarul Islam
b07212cb05
feat(common): add advanced configuration for auth and token request parameters (#5253)
Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
2025-07-28 23:43:08 +05:30
James George
5ac2ac40de
feat: add support for version bounded parsing and migration (#5127)
- CLI Collection runner enhancements:

  - Support mixed versions - child collections based on different versions compared to the parent collection.
  - Better support for incoming data via IDs conforming to older formats.

- Bump `verzod` across packages.
- Relevant updates to test suite.
- Bump `zod` under `selfhost-desktop`.
2025-06-05 14:51:19 +05:30
Nivedin
a325f2945d
fix: fill current value to existing value (#5109) 2025-05-29 18:36:58 +05:30
jamesgeorge007
052dc1708c test: update CLI test suite
- Flexible assertions avoiding flakiness.
- Update test fixtures conforming to the schema.
2025-05-28 16:43:12 +05:30
Anwarul Islam
82d9367843
feat: add JWT authentication support (#5079)
Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
2025-05-28 15:41:47 +05:30
James George
aab2924139
feat: extend platform API support for experimental scripting sandbox (#5097) 2025-05-26 20:39:51 +05:30
James George
656a15a983
feat: migrate to a unified scripting system based on faraday-cage (#5090)
Co-authored-by: curiouscorrelation <curiouscorrelation@gmail.com>
2025-05-23 22:54:27 +05:30
Nivedin
01d96fa577
feat: initial and current value for environment variables (#5055) 2025-05-23 22:38:36 +05:30
Anwarul Islam
130facb440
fix: include request body to AWS V4 signer in effective request functions (#5084) 2025-05-21 21:02:07 +05:30
Anwarul Islam
ccf3c6f834
feat: add support for HAWK authentication (#4694)
Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
2025-04-29 14:51:16 +05:30
jamesgeorge007
2b591b9536 test: resolve flaky CLI tests
Move to the in-house echo service for reliability.
2025-04-25 20:45:32 +05:30
luzpaz
a8bf6c0611
fix: resolve typos across packages (#4867) 2025-03-12 13:53:08 +05:30
Shreyas
6df6eec34b
test(cli): temporarily skip digest auth test (#4770) 2025-02-20 15:59:09 +05:30
Akash K
8b70d7f419
feat: support for sending client credentials via basic auth header (#4635)
Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
Co-authored-by: nivedin <nivedinp@gmail.com>
2025-01-15 18:43:05 +05:30
Akash K
9cc1e47b39
fix: show file chip for the selected file in binary body (#4562)
Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
2024-11-27 15:05:35 +05:30
Akash K
80d7dd046d
feat: support for binary body (#4466)
Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
2024-11-26 19:48:01 +05:30
Anwarul Islam
e8ed938b4c
feat: collection runner (#3600)
Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
Co-authored-by: nivedin <nivedinp@gmail.com>
2024-11-26 15:56:09 +05:30
Akash K
c74c42ebaf
feat: add individual content types for formadata (#4550)
Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
2024-11-24 19:36:10 +05:30
shobanrajm
b78cd57884
feat: collection CLI runner with iterations and data feed (#4475)
Co-authored-by: Shoban <mshobanr@ford.com>
Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
2024-11-22 22:38:51 +05:30
Shreyas
3de3209d5e
fix(cli): use os-specific invalid paths for tests (#4518) 2024-11-07 13:26:24 +05:30
jamesgeorge007
3fc43cc9b9 test: bump timeout
Specify timeout at the CLI e2e test suite level.
2024-11-06 19:22:54 +05:30
James George
8ac934599a
fix: process headers correctly in Digest Auth and other updates (#4494) 2024-10-30 17:12:19 +05:30
Anwarul Islam
1236e6b719
fix: scrollbar appearing on digest auth input fields and other improvements (#4492)
Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
2024-10-29 20:35:13 +05:30
Anwarul Islam
4b2f04df82
feat: add support for Digest authorization (#4339)
Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
Co-authored-by: nivedin <nivedinp@gmail.com>
2024-10-29 12:34:40 +05:30
James George
7aa43232cc
chore: bump dependencies (#4444) 2024-10-24 03:25:55 +05:30
Akash K
db8cf229ac
chore: make client secret optional across grant types (#4363)
Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
2024-09-27 17:20:26 +05:30
Anwarul Islam
c2fb6aee3f
chore: AWS Signature Authorization type flow updates (#4311)
Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
2024-08-30 20:28:27 +05:30
James George
9ca899a28a
feat(cli): add support for AWS Signature Authorization type (#4305) 2024-08-30 14:12:32 +05:30
Akash K
181ad098e0
feat: ability to refresh tokens for oauth flows (#4302)
Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
2024-08-29 13:27:31 +05:30
Anwarul Islam
43730d66f6
feat: description field for request parameters and headers (#4187)
* feat: key-value component added for reuse

* chore: inspection result added

* chore: add `HoppRESTRequest` schema `v7`

* feat: add `description` for field for REST request headers

* feat: add `description` for field for GraphQL request headers

* fix: synchronization logic b/w bulk edit context and the default view

- Add `HoppGQLRequest` schema `v6`.
- Fix pre-existing issue with changes in bulk edit context not immediately reflecting in the default GQL request headers view.

* feat: support importing `description` fields from external sources

* test: fix failing tests

* chore: include description field for computed headers

Headers computed based on authorization info & inherited entries.

* feat: add `description` field for headers at the collection level

Add `HoppCollection` schema `v3`.

* test: fix failing tests

* ci: update tests workflow target branch trigger

* chore: cleanup

* chore: cleanup

* chore: rely on type inference

---------

Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
Co-authored-by: nivedin <nivedinp@gmail.com>
2024-08-27 14:30:12 +05:30
James George
33b0a54af1
feat(cli): add support for request variables (#4275)
feat: add support for request variables in the CLI
2024-08-26 19:21:29 +05:30
James George
a8bcc75467
fix: ensure Content-Type header priority in the CLI (#4242)
- Ensure the `Content-Type` header takes priority over the value set in the request body.
- Introduces `HoppRESTRequest` schema `v6` with `text/xml` added under the supported content types.
2024-08-07 21:46:27 +05:30
James George
5f96cda5e2
feat(cli): add support for JUnit reporter (#4189) 2024-07-26 22:56:58 +05:30
jamesgeorge007
bf5d62364d chore: bump CLI tests timeout 2024-07-22 19:21:16 +05:30
jamesgeorge007
ac84166b8b chore: update documentation link references 2024-06-28 11:49:09 +05:30
jamesgeorge007
07e7180dc9 chore: update CLI documentation link references
Bump CLI version.
2024-06-28 11:16:47 +05:30
James George
a9afb17dc0
feat(cli): access team workspace collections and environments (#4095)
Co-authored-by: nivedin <nivedinp@gmail.com>
2024-06-27 18:11:29 +05:30