Commit Graph

470 Commits

Author SHA1 Message Date
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
Jack Kavanagh
4c82c8ce75
minor bumps (#7243) 2024-04-05 17:42:41 +02:00
Jack Kavanagh
13fddd3822
bump oidc (#7242) 2024-04-05 17:22:10 +02:00
Jack Kavanagh
6fa06b3a60
bump grpc stuff (#7241) 2024-04-05 17:18:38 +02:00
Jack Kavanagh
5a2cd8fd9c
Bump/minors-and-types (#7234)
* bump minors and types

* lock

* fix types

* windback

* yaml-source-map pins to yaml 1.6.0

* swagger css path

* fix tests

* fix type

* fix o2k tests

* fix markdown

* fix smoke tests
2024-04-04 14:48:56 +02:00
Jack Kavanagh
e38badfbf3
mock-extraction feedback (#7207)
* save point

* both cases work

* use action and hack

* throw error on naming collision

* fix type

* fix test
2024-04-02 13:42:39 +00:00
Filipe Freire
40a51a5961 Bump app version to 9.0.0-beta.3 2024-03-27 18:08:16 +00:00
Filipe Freire
3c2e57493e Bump app version to 9.0.0-beta.2 2024-03-27 13:14:31 +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
James Gatz
582665df1c
feat(Command Palette): Introduce global search (#7191)
* global search

* fix local url

* environments and scratchpad handling

* update test
2024-03-22 11:51:47 +01:00
Hexxa
915513c2d0
fix(pre-req): several fixes to the current hidden window launching process - INS-3319 (#7174)
* fix: restart the hidden window if it is down

* fix: lint error

* fix: smoke test error because of restarting hidden window

* fix: the hidden window is not started after packaged, so sending request is always timeout

* fix: restart the hidden window when it is stuck

* fix: make createWindow and createHiddenWindow signatures and behaviour aligned

* flatten conditions

---------

Co-authored-by: jackkav <jackkav@gmail.com>
2024-03-22 03:10:53 +00: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
85cb6dba3c
feat(pre-req): enable auth manipulation through insomnia.request - INS-3379 (#7186)
* feat: enable auth manipulation through insomnia.request

* test: add smoke tests for auth transforming

* feedback

* auth type fix

---------

Co-authored-by: jackkav <jackkav@gmail.com>
2024-03-18 11:19:09 +01:00
Hexxa
7bd2441178
feat: enable insomnia.sendRequest in pre-request scripting - INS-3379 (#7147)
* feat: enable manipulation on insomnia.request

* chore: revert changes on test

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

* fix: bring back request test in smoke spec

* feat: enable insomnia.sendRequest

* chore: implement req-sender with function, remove unused cancellation

* add types

* feedback

* remove duplicate enums

* fix: pass settings and certificates to the hidden window

---------

Co-authored-by: jackkav <jackkav@gmail.com>
2024-03-15 17:27:49 +08:00
James Gatz
112ba40c8c Bump app version to 9.0.0-alpha.0 2024-03-12 15:56:49 +00:00
Insomnia
0b67970fdb
Bump app version to 9.0.0-beta.1 (#7158)
Co-authored-by: Jack Kavanagh <3679927+jackkav@users.noreply.github.com>
2024-03-08 18:00:39 +01: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
Insomnia
46432fab51
Bump app version to 9.0.0-beta.0 (#7155)
Co-authored-by: Jack Kavanagh <3679927+jackkav@users.noreply.github.com>
2024-03-08 15:08:31 +00:00
Jack Kavanagh
6d5b2a6024
feat(prereq): add simple timeout (#7079)
* add simple timeout

* configurable timeout

* use label for workspace cards

* toggle visible

* add stop

* second timeout

* add test

* fix lint

* exclude from eslint

* fix types
2024-03-01 13:17:21 +01:00
Filipe Freire
b853660300
Revert "chore: temporarily disable pre-request scripting (#7132)" (#7136)
This reverts commit 6567a18175.
2024-03-01 12:00:50 +00:00
Hexxa
6567a18175
chore: temporarily disable pre-request scripting (#7132)
* chore: temporarily disable pre-request scripting

* chore: fix comments

* fix: lint error
2024-02-29 23:18:12 +08:00
Jack Kavanagh
9314fa56e3
feat: testing a mock endpoint cancellation (#7093)
* first pass

* update logs

* wait for response

* actually cancel
2024-02-29 15:04:46 +01:00
Hexxa
21505566fd
feat: enable Request and Response in pre-request scripting [INS-3379] (#7128)
* feat: enable ProxyConfig in pre-request scripting

* feat: enable RequestAuth for pre-request scripting

* feat: enable Cookie in pre-request scripting

* feat: enable Certificate in pre-request script

* feat: enable Request and Response in pre-request scripting
2024-02-29 14:41:29 +01:00
Hexxa
86f6d01ac9
feat: enable Url in pre-request scripting [INS-3379] (#7123)
* chore: enable Headers in pre-request scripting

* feat: add Variables and VariableList to the collection

* feat(hidden-window): enable url and UrlMatchPattern in pre-request scripting

---------

Co-authored-by: Jack Kavanagh <jackkav@gmail.com>
2024-02-29 14:37:04 +01:00
Hexxa
a15b09af27
feat: enable collection-variable in pre-request scripting [INS-3379] (#7122)
* chore: enable Headers in pre-request scripting

* feat: add Variables and VariableList to the collection

---------

Co-authored-by: Jack Kavanagh <jackkav@gmail.com>
2024-02-29 14:32:06 +01:00
Hexxa
2ee1475cea
feat: enable property in pre-request scripting (#7120) 2024-02-29 10:51:49 +08:00
Hexxa
3fe4d89e8c
feat(hidden-window): add globals, iterationData and variables interfaces in pre-request scripting (#7103) 2024-02-27 09:37:34 +00:00
Hexxa
d7a0bc1e58
feat(hidden-window): enable baseEnvironment in the pre-request scripting (#7102)
* feat(hidden-window): enable baseEnvironment in the pre-request scripting

* fix: input empty selected environment data to avoid incorrect environment manipulation and overriding

* test: add a test for folder environments overriding

* fix: smoke tests failed because of env overriding
2024-02-23 20:00:20 +08:00
Hexxa
7718df0489
feat(hidden-window): enable the insomnia object with the environment api [INS-3379] (#7097)
* feat(hidden-window): enable the insomnia object with the environment api

* fix: tests and lint errors

* fix: app building is flaky

* fix: fallback to the original environment instead of an invalid id

* chore: improve comment and remove unused code
2024-02-21 18:02:59 +08: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
Jack Kavanagh
039c12160c
E2e/mock-test-fixture (#7086)
* fix export

* add fixture

* use fixture
2024-02-13 09:01:32 +00:00
jackkav
d7d86837f0 fix mock flake 2024-02-09 16:17:03 +01:00
James Gatz
45edba1269
chore(tailwind): Move grpc-method-dropdown to tailwind (#7074)
* grpc-method-dropdown tailwind

* fix disabled prop
2024-02-09 16:11:21 +01:00
Jack Kavanagh
c0707c884f
Add pre-request tab and minimal execution context (#7065)
* works

* add preload

* promise api

* tidy

* create hash works

* return errors from worker

* basic wiring

* remove preload

* move build output to folder

* async execution

* add simple context object

* smoke test

* fix types

* fix unit tests

* remove createHash remote function

* tidy

* naming

* fix test

* add errors to preview and timeline

* basic require support

* fix types

* fix warning

* can get logs

* fix console.log patch

* logs

* fix test

* remove log

* skip mock test

* fix test

* fix types

* can write to timeline

* add watcher

* improved dx

* can console.log in the script

* simplify

* enable contextIsolation

* fix types

* use vite for hidden window build and dev

* fix type

* rename

* move pre request test to critical

* fix typo

* close ports

* unskip test
2024-02-09 10:51:55 +00:00
James Gatz
4010dd5358
chore(tailwind): Transform empty design state to tailwind (#7071)
* design-empty-state tailwind

* example spec from file instead of fetching

* styles

* fix spec test
2024-02-07 18:00:01 +00:00
Jack Kavanagh
112a1c8060
feat: append to timelines (#7070)
* working pass

* fix tests

* fix await issue with streams

* fix test

* fix mockbin test

* move to main

* inso cli test
2024-02-07 18:51:10 +01:00
jackkav
71c995c696 fix mock test 2024-02-07 14:55:11 +01:00
Insomnia
51b9ef76e9
🚀 8.6.1 (#7014)
* Bump app version to 8.6.1

* feat(unit-tests): Unit test reordering (#7020)

* re-orderable test suites

* re-orderable tests

* fix ts

* Use db methods for sorting

* sort suites and unit tests in inso

* fix suite rename

* Fixes https://github.com/Kong/insomnia/issues/7011 (#7012)

* Fixes https://github.com/Kong/insomnia/issues/7009 (#7010)

* chore: edit changelog process [INS-3456] (#7001)

* fix(workspace): Add default name for when creating a workspace (#7046)

* Add default name for when creating a design/collection

* workspace update and creation

* fix filter history keys not being valid selectors (#7040)

* remove invalid wide css prop (#7041)

* feat(environment): update environments icons (#7050)

* update environments icons

* fix workspace name

* fix one line editor being scrollable (#7059)

* change 8.0 to 8 (#7061)

* Cleanup page containers and add hint container in the page (#7060)

* feat(pane-tabs): Consistent styles for tabs (#7062)

* response/request pane tab counts

* tab dropdown colors

* fix updates to db leading to errors in loader fetchers (#7033)

* feat(command-palette): add button to open the command palette (#7064)

* add button for quick search

* update button styles in project

* make it look good with gh stars

* fix ts issue

* changelog

---------

Co-authored-by: Jack Kavanagh <3679927+jackkav@users.noreply.github.com>
Co-authored-by: James Gatz <jamesgatzos@gmail.com>
Co-authored-by: Jeroen Van den Berghe <vandenberghe.jeroen@gmail.com>
Co-authored-by: Filipe Freire <livrofubia@gmail.com>
2024-02-06 12:16:54 +00:00
Jack Kavanagh
33e80d56cd
Adds a hidden window (#7063)
* init new window

* fix tests

* preload listener

* merge processes and windows

* trigger CI

* fix types

* mock test flake
2024-02-05 14:37:05 +01:00
Jack Kavanagh
01e048faab
add mock test (#7031)
* add mock test

* add custom testing headers

* use insomnia fetch

* fix types

* normalise error structure

* using insomniaFetch for log

* fix warning

* add modal for vaults

* remove status code assertion

* use org id

* check status code
2024-01-30 16:57:01 +01:00
Jack Kavanagh
97b1d7f3ac
Bump/types (#7025)
* bump types

* lockfile
2024-01-29 13:55:11 +01:00
Jack Kavanagh
dd791fe349
Bump/jest-29 (#7027)
* bump jest pkgs

* fix tests
2024-01-29 13:49:07 +01:00
Jack Kavanagh
557e5c0c6e
feat: mock resources (#6760)
* project ui changes

* project ui changes

* create mock server model

* model mock server similarly to design doc

* use spec modelling and nav

* layout pass

* rename requestbin to mock-route

* sidebar ui pass

* load mock server

* add url bar

* can navigate to headers

* Refactor mock server and mock route creation and
retrieval

* route crud

* sidebar layout

* add delete guuard

* patch route

* Add mock response tab to request pane

* wire up mock servers in requests

* Update mock server and route selection in
RequestPane

* make it work without internet

* can create bin

* pass body and headers to bin

* can fetch logs but cant see em

* split out response pane for hmr

* basic table

* extract mock url bar

* add header tab

* made a dumb cache

* url bar pass

* send request and create response

* wire up timeline

* wire up preview

* timeline useeffect

* move to action

* fix types

* empty states

* rebase updating aria

* use har type

* can edit bins

* cookie support

* wire up status

* status text

* magic status text

* ui

* always use put rather than create bin

* add url to mock route

* scroll bar

* add content types

* validation

* fix flake

* improve logs

* fix outlet warning

* fix send to mock endpoint

* switch table to grid

* handle errors

* rotate log

* create mockbin on open if needed

* add full url ux

* reverse log order

* binId from store

* remove http method

* rename prefix

* use server Id for bin id

* fix copy

* show log har

* fix url bar

* fix button padding

* tailwind

* method select

* remove default status text

* full tailwind

* fix breadcrumb

* default to json

* move copy to end, remove save

* error msg

* only patch when needed

* fix ws colors

* fix command palette

* add isMock helper

* revert local storage mechanism

* fix redirect

* fix ignore upsert

* extract to constant

* ui test

* hide actions from mock-server

* fix code editor onBlur

* lift update to route

* refactor to return only errors

* add url to mock server model

* select mock ui pass

* can modify url in settings

* use server url from db if selected

* hide url option

* fix lint error

* extract to file

* remove binResponse

* can sync

* move things around

* rename name path sync

* fix type check

* capture kvp onBlur

* fix error message

* basic mock test

* wire up mock patcher and navigate

* rename component

* remove url prop of route

* fix lint

* fix test

* temporary skip e2e test

* fix constant url

* fix migration

* remove console logs

* rename function

* only create a single hidden request

---------

Co-authored-by: gatzjames <jamesgatzos@gmail.com>
2024-01-24 16:38:31 +01:00
James Gatz
5082975c7d Bump app version to 8.6.0 2024-01-18 21:40:54 +00:00
James Gatz
a8c1da727a
Request path parameters (#6994)
* add path parameters to the request/ws-request model

* render path params

* show path params on the ui

* fix rendering of params

* cleanup params ui in ws

* cleanup request model

* add empty state info

* update styles

* certificate-styles

* fix tests

* cleanup code

* fix e2e tests
2024-01-18 22:35:32 +01:00
James Gatz
b24008c41d
update test and use the filechooser api (#6995) 2024-01-18 14:42:26 +01:00
Filipe Freire
3e4e860268 Bump app version to 8.5.2-beta.0 2024-01-11 13:58:02 +00:00