Commit Graph

13 Commits

Author SHA1 Message Date
Hexxa
e5ce4cd390
fix: init the hidden window when renderers are reloaded (#7428)
* fix: init the hidden window when renderers are reloaded

* fix: missing some smoke test stuff after merging

* feedback

---------

Co-authored-by: jackkav <jackkav@gmail.com>
2024-05-22 09:29:49 +02:00
Hexxa
69fb149274
fix(sdk): some of external modules are missing (#7315)
* fix: some external modules are missing

* chore: update @types/tv4

* chore: use map instead of switch-case statement

* test(scripting): check using external libs in the critical test suite
2024-04-26 19:44:01 +08:00
Hexxa
8e00a2e27e
fix: persist script's changes on environment and baseEnvironment (#7306)
* fix: persist script's changes on environment and baseEnvironment

* fix: avoid persisting effect when no environment is activated

* fix: comparing mutated env with baseEnvironment

* Update packages/insomnia/src/ui/routes/request.tsx

---------

Co-authored-by: Jack Kavanagh <jackkav@gmail.com>
2024-04-24 12:04:37 +02:00
Hexxa
ba610daca3
fix: insomnia.environment.name is missing (#7289) 2024-04-22 16:57:36 +08:00
Hexxa
03c74532c0
feat(hidden-win): try to simulate the existing behavior of handling async tasks (#7281) 2024-04-19 12:23:33 +02:00
Hexxa
6c63b0d8d3
feat: enable external modules in pre-request script (#7257) 2024-04-15 10:14:00 +02:00
Hexxa
7f767a8341
feat: translate pm object handler into insomnia object instead of supporting alias - INS-3702 (#7253)
* feat: translate pm object handler into insomnia object instead of supporting alias

* chore: remove comment

* simplify implementation

---------

Co-authored-by: jackkav <jackkav@gmail.com>
2024-04-09 13:13:51 +00:00
Hexxa
aaf76f755e
fix: some minor fixes for pre-request script sdk - INS-3379 (#7225)
* fix: try to make sendRequest compatible with the existing behavior by adding await

* fix: add _index for making method behavior (such as upsert) consistent with existing ones
2024-04-09 13:00:09 +00:00
Hexxa
38896f4547
feat: enable insomnia.test and insomnia.expect in scripting - INS-3637 (#7202)
* feat: enable insomnia.test and insomnia.expect in scripting

* fix: lint error

* feat: enable replaceIn method
2024-03-26 15:04:26 +01:00
Hexxa
a79b01e1e6
chore(pre-req): clean up pre-request script sdk objects - INS-3379 (#7172)
* feat: enable eval() in script

* feat: enable requiring node.js modules

* fix: request auth type is not correctly updated

* test: add tests for unphappy paths

* test: fixed a flaky test

* chore: make console.log outputs more friendly

* feat: enable requiring npm modules and built-in lodash

* fix: add prefix to 'fs' module requiring name as it is for internal usage

* fix: smoke test failure

* fix: use fs module directly to avoid exposing it

* fix: replace atob btoa with node.js modules

* chore: remove unused line

* fix: lint error

* fix: smoke test failed because fs no longer exposed

* fix: use builtin atob, btoa

* fix: disable lint error for builtin lodash

* chore: remove lodash as it's redundant

* chore: temporarily remove external dependencies

* fix: rebase and update smoke tests style

* chore: restore lock

* chore: remove comments

* chore: remove comments
2024-03-22 20:02:56 +08:00
Hexxa
fab636a669
feat(pre-req): enable manipulation of proxy and certificate through insomnia.request - INS-3379 (#7171)
* feat: enable manipulation on insomnia.request

* feat: enable manipulate proxy, certificate and auth through insomnia.request

Changes:
- chore: revert changes on test
- fix: allow user to update active request certs and proxy through insomnia.request
- feat: hook settings to insomnia.request and cleanups
- test: add a test for proxy and certificate manipulation
- fix: lint error
- fix: problems after rebasing
- fix: revamp auth transforming functions
- fix: type checking
- test: add a unit test for auth transforming

* chore: move auth manipulation changes to another PR

* fix: missing OAuth2AuthOption and lint error

* fix: add back UT for auth transforming

* fix: incorrect merging

* fix: lint error

* chore: remove no-proposed comparison

* fix: use predefined requests for test instead of reusing one

* fix: remove waiting

* test: refactor smoke tests to use predefined request if possible
2024-03-21 11:35:51 +00:00
Hexxa
bdd0d420e5
feat: enable manipulation on insomnia.request - INS-3379 (#7145)
* feat: enable manipulation on insomnia.request

* chore: revert changes on test

* fix: lint errors

* chore: clean up dependencies

* fix: lint error

* fix: smoke test failure

* chore: fix and re-org pre-request scripts

* fix: bring back request test in smoke spec
2024-03-08 16:40:20 +01:00
Jack Kavanagh
8ff2c6b522
feat(prereq): add cancellation (#7078)
* add cancellation

* add cancel test

* fix test

* remove folder check
2024-02-13 10:28:46 +01:00